/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu6-K6h9Q.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/rP2Yp2ywxg089UriI5-g4vlH9VoD8Cmcqbu0-K4.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko70yyygA.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* vietnamese */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko50yyygA.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(../assets/fonts/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   C3NTRO Telecom | Data Center Explorer
   main.css — Design system, reset, typography, layout
   Premium redesign — Modern SaaS aesthetic
   ============================================================ */

/* Fonts loaded locally via fonts.css (no internet needed in Niagara) */

/* --- Design Tokens --- */
:root {
  /* Typography */
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-body: 'DM Sans', system-ui, -apple-system, sans-serif;

  /* Colors - Premium Neo-Tech palette */
  --color-bg: #070A15;
  --color-surface: rgba(16, 22, 42, 0.55);
  --color-surface-2: rgba(26, 35, 65, 0.55);
  --color-surface-3: rgba(45, 55, 88, 0.6);
  --color-border: rgba(0, 240, 255, 0.2);
  --color-border-focus: rgba(0, 240, 255, 0.5);
  --color-text: #F8FAFC;
  --color-text-2: #94A3B8;
  --color-muted: #64748B;
  --color-accent: #00F0FF;
  --color-accent-hover: #00C3FF;
  --color-accent-soft: #0A84FF;
  --color-accent-light: rgba(0, 240, 255, 0.15);
  --color-accent-lighter: rgba(0, 240, 255, 0.05);
  --color-success: #00FF9D;
  --color-success-light: rgba(0, 255, 157, 0.15);
  --color-warning: #FFB000;
  --color-warning-light: rgba(255, 176, 0, 0.15);
  --color-danger: #FF0055;
  --color-danger-light: rgba(255, 0, 85, 0.15);

  /* Rack Status */
  --color-rack-operative: rgba(0, 240, 255, 0.1);
  --color-rack-available: rgba(0, 255, 157, 0.1);
  --color-rack-maintenance: rgba(255, 176, 0, 0.1);
  --color-rack-operative-border: #00F0FF;
  --color-rack-available-border: #00FF9D;
  --color-rack-maintenance-border: #FFB000;

  /* Shadows - Layered glowing depth system */
  --shadow-xs: 0 2px 4px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 8px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 240, 255, 0.05);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 240, 255, 0.1);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 240, 255, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 240, 255, 0.2);
  --shadow-glow: 0 0 15px rgba(0, 240, 255, 0.3), 0 0 30px rgba(0, 240, 255, 0.15);
  --shadow-inner: inset 0 0 10px rgba(0, 240, 255, 0.05);

  /* Glass effect */
  --glass-bg: rgba(12, 16, 33, 0.65);
  --glass-border: rgba(0, 240, 255, 0.2);
  --glass-blur: 24px;

  /* Header — translucent gradient for glassy tech look; lighter than page bg so dark logo strokes stay legible */
  --header-bg: linear-gradient(180deg, rgba(38, 54, 92, 0.78) 0%, rgba(16, 24, 48, 0.55) 100%);
  --header-accent-line: linear-gradient(90deg, transparent 0%, rgba(0, 240, 255, 0.55) 50%, transparent 100%);

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-page: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Layout */
  --header-height: 88px;
  --content-max-width: 1320px;
  --content-padding: 32px;
}

/* --- Light Theme --- */
/* Activates via prefers-color-scheme OR .light-theme class on body */
@media (prefers-color-scheme: light) {
  :root {
    /* Colors - ISA-101 Industrial Gray */
    --color-bg: #C8CCD0;
    --color-surface: rgba(212, 216, 220, 0.92);
    --color-surface-2: rgba(200, 204, 210, 0.9);
    --color-surface-3: rgba(188, 192, 198, 0.85);
    --color-border: rgba(0, 0, 0, 0.15);
    --color-border-focus: rgba(0, 0, 0, 0.3);
    --color-text: #1A1A1A;
    --color-text-2: #333333;
    --color-muted: #555555;
    --color-accent: #2B6CB0;
    --color-accent-hover: #1E5A9E;
    --color-accent-soft: #3A7BC8;
    --color-accent-light: rgba(43, 108, 176, 0.15);
    --color-accent-lighter: rgba(43, 108, 176, 0.08);
    --color-success: #2D862D;
    --color-success-light: rgba(45, 134, 45, 0.15);
    --color-warning: #D48800;
    --color-warning-light: rgba(212, 136, 0, 0.15);
    --color-danger: #CC2233;
    --color-danger-light: rgba(204, 34, 51, 0.12);

    /* Rack Status */
    --color-rack-operative: rgba(43, 108, 176, 0.12);
    --color-rack-available: rgba(45, 134, 45, 0.12);
    --color-rack-maintenance: rgba(212, 136, 0, 0.12);
    --color-rack-operative-border: #2B6CB0;
    --color-rack-available-border: #2D862D;
    --color-rack-maintenance-border: #D48800;

    /* Shadows - Subtle for industrial */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 10px 30px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 1px 6px rgba(0, 0, 0, 0.1);
    --shadow-inner: inset 0 1px 2px rgba(0, 0, 0, 0.06);

    /* Glass - adapted for gray bg */
    --glass-bg: rgba(210, 214, 218, 0.8);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-blur: 16px;

    --header-bg: linear-gradient(180deg, rgba(230, 234, 240, 0.9) 0%, rgba(200, 206, 214, 0.72) 100%);
    --header-accent-line: linear-gradient(90deg, transparent 0%, rgba(43, 108, 176, 0.5) 50%, transparent 100%);
  }
}

/* Manual toggle class - same overrides */
body.light-theme {
  /* Colors - ISA-101 Industrial Gray */
  --color-bg: #C8CCD0;
  --color-surface: rgba(212, 216, 220, 0.92);
  --color-surface-2: rgba(200, 204, 210, 0.9);
  --color-surface-3: rgba(188, 192, 198, 0.85);
  --color-border: rgba(0, 0, 0, 0.15);
  --color-border-focus: rgba(0, 0, 0, 0.3);
  --color-text: #1A1A1A;
  --color-text-2: #333333;
  --color-muted: #555555;
  --color-accent: #2B6CB0;
  --color-accent-hover: #1E5A9E;
  --color-accent-soft: #3A7BC8;
  --color-accent-light: rgba(43, 108, 176, 0.15);
  --color-accent-lighter: rgba(43, 108, 176, 0.08);
  --color-success: #2D862D;
  --color-success-light: rgba(45, 134, 45, 0.15);
  --color-warning: #D48800;
  --color-warning-light: rgba(212, 136, 0, 0.15);
  --color-danger: #CC2233;
  --color-danger-light: rgba(204, 34, 51, 0.12);

  /* Rack Status */
  --color-rack-operative: rgba(43, 108, 176, 0.12);
  --color-rack-available: rgba(45, 134, 45, 0.12);
  --color-rack-maintenance: rgba(212, 136, 0, 0.12);
  --color-rack-operative-border: #2B6CB0;
  --color-rack-available-border: #2D862D;
  --color-rack-maintenance-border: #D48800;

  /* Shadows - Subtle for industrial */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 10px 30px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 1px 6px rgba(0, 0, 0, 0.1);
  --shadow-inner: inset 0 1px 2px rgba(0, 0, 0, 0.06);

  /* Glass - adapted for gray bg */
  --glass-bg: rgba(210, 214, 218, 0.8);
  --glass-border: rgba(0, 0, 0, 0.1);
  --glass-blur: 16px;

  --header-bg: linear-gradient(180deg, rgba(230, 234, 240, 0.9) 0%, rgba(200, 206, 214, 0.72) 100%);
  --header-accent-line: linear-gradient(90deg, transparent 0%, rgba(43, 108, 176, 0.5) 50%, transparent 100%);
}

/* --- Modern CSS Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  background-image:
    radial-gradient(ellipse at 50% -20%, rgba(0, 240, 255, 0.15) 0%, transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (prefers-color-scheme: light) {
  body {
    background-image:
      radial-gradient(ellipse at 50% -20%, rgba(43, 108, 176, 0.04) 0%, transparent 70%),
      linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
      linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  }
}

body.light-theme {
  background-image:
    radial-gradient(ellipse at 50% -20%, rgba(43, 108, 176, 0.04) 0%, transparent 70%),
    linear-gradient(rgba(0, 0, 0, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

img,
svg {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ol,
ul {
  list-style: none;
}

table {
  border-collapse: collapse;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
}

h1 {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

h4 {
  font-size: 0.9375rem;
  font-weight: 600;
}

p {
  color: var(--color-text-2);
  line-height: 1.65;
}

small {
  font-size: 0.8125rem;
}

/* --- Base Layout --- */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#header-container {
  position: sticky;
  top: 0;
  z-index: 100;
  flex-shrink: 0;
}

#view-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* --- View Base --- */
.view {
  width: 100%;
  max-width: var(--content-max-width);
  margin-left: auto;
  margin-right: auto;
  padding: var(--content-padding);
  padding-top: 24px;
}

.view-home {
  max-width: 1200px;
  padding-top: 0;
}

.view-floorplan {
  max-width: 100%;
  padding: 0;
}

.view-rack-detail {
  max-width: 1320px;
}

/* --- Loading State --- */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60vh;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spinnerRotate 0.7s linear infinite;
}

@keyframes spinnerRotate {
  to { transform: rotate(360deg); }
}

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--color-border-focus);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-muted);
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-border-focus) transparent;
}

/* --- Selection --- */
::selection {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

/* --- Focus Visible --- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Utility: Glassmorphism --- */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* --- Responsive --- */
@media (max-width: 1366px) {
  :root {
    --content-padding: 24px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.375rem;
  }
}

@media (max-width: 1024px) {
  :root {
    --content-padding: 20px;
    --header-height: 56px;
  }

  body {
    font-size: 14px;
  }

  h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.25rem;
  }
}

@media (max-width: 768px) {
  :root {
    --content-padding: 16px;
    --header-height: 52px;
  }

  h1 {
    font-size: 1.375rem;
  }

  h2 {
    font-size: 1.125rem;
  }
}

@media (max-width: 480px) {
  :root {
    --content-padding: 12px;
    --header-height: 48px;
  }

  body {
    font-size: 13px;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1rem;
  }
}

@media (max-width: 360px) {
  :root {
    --content-padding: 10px;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loading-spinner {
    animation: none;
    border-top-color: var(--color-accent);
    opacity: 0.6;
  }
}

/* ============================================================
   C3NTRO Telecom | Data Center Explorer
   components.css — Header, breadcrumb, cards, tabs, badges,
                    stats, gauges, alerts, navigation
   Premium redesign — Sales-oriented aesthetic
   ============================================================ */

/* --- HEADER --- */
.header {
  position: relative;
  background: var(--header-bg);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 8px 24px rgba(0, 0, 0, 0.28);
  height: var(--header-height);
  display: flex;
  align-items: center;
}

.header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--header-accent-line);
  pointer-events: none;
}

.header__inner {
  width: 100%;
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.header__logo {
  max-height: 72px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.header__logo-fallback {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.header__breadcrumb {
  display: flex;
  align-items: center;
  margin-left: 8px;
  min-width: 0;
}

/* --- Theme Toggle --- */
.theme-toggle {
  margin-left: auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  color: var(--color-muted);
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--color-surface-3);
  color: var(--color-accent);
  border-color: var(--color-border-focus);
}

.theme-toggle svg {
  width: 22px;
  height: 22px;
}

/* --- BREADCRUMB --- */
.breadcrumb__list {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.breadcrumb__sep {
  color: var(--color-border-focus);
  font-size: 1.0625rem;
  user-select: none;
}

.breadcrumb__link {
  font-size: 1.0625rem;
  font-weight: 500;
  color: var(--color-muted);
  transition: color var(--transition-fast);
  cursor: pointer;
}

.breadcrumb__link:hover {
  color: var(--color-accent);
}

.breadcrumb__current {
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--color-text-2);
}

/* --- HOME HERO --- */
.home-hero {
  text-align: center;
  padding: 80px 32px 56px;
  position: relative;
}

.home-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.15) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.home-hero__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-lighter);
  border: 1px solid var(--color-accent-light);
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.home-hero__title {
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.home-hero__subtitle {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* --- FEATURES STRIP --- */
.home-features {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 0 32px 48px;
  max-width: 800px;
  margin: 0 auto;
}

.home-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
}

.home-feature__icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-feature__icon svg {
  width: 16px;
  height: 16px;
}

/* --- CONFIG CARDS GRID --- */
.config-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 0 32px 80px;
  max-width: 1100px;
  margin: 0 auto;
}

/* --- CONFIG CARD --- */
.config-card {
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.config-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-xl);
  padding: 1px;
  background: linear-gradient(135deg, transparent 40%, var(--color-border) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 1;
}

.config-card:hover {
  box-shadow: var(--shadow-xl);
  border-color: transparent;
}

.config-card:hover::before {
  opacity: 1;
}

.config-card:hover::before {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.4), rgba(0, 240, 255, 0.8), rgba(0, 240, 255, 0.4));
}

.config-card__icon-area {
  width: 100%;
  height: 200px;
  background: linear-gradient(180deg, var(--color-surface-2) 0%, var(--color-surface) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.config-card__icon-area svg {
  width: 240px;
  height: 160px;
}

.config-card__icon-area .rack-illustration {
  opacity: 0.9;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.config-card:hover .config-card__icon-area .rack-illustration {
  opacity: 1;
  transform: scale(1.04) translateY(-2px);
}

.config-card__badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 100px;
  z-index: 2;
}

.config-card .config-card__badge {
  background: var(--color-accent-lighter);
  color: var(--color-accent);
  border: 1px solid var(--color-accent-light);
}

.config-card__content {
  padding: 24px 28px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.config-card__size {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 8px;
}

.config-card__title {
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.3;
}

.config-card__specs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  flex: 1;
}

.config-card__spec-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
  color: var(--color-text-2);
}

.config-card__spec-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.config-card .config-card__spec-item::before {
  background: var(--color-accent);
}

.config-card__arrow {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  transition: color var(--transition-base), gap var(--transition-base);
}

.config-card__arrow span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-2);
  font-size: 0.875rem;
  transition: background var(--transition-base), transform var(--transition-base);
}

.config-card:hover .config-card__arrow {
  color: var(--color-accent);
}

.config-card:hover .config-card__arrow span {
  background: var(--color-accent-lighter);
}

/* --- CONFIG TABS --- */
.floorplan-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 0;
  padding: 16px 24px;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border);
}

.config-tabs {
  display: flex;
  gap: 2px;
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.config-tab {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 6px;
  color: var(--color-muted);
  white-space: nowrap;
  transition: all var(--transition-base);
}

.config-tab:hover {
  color: var(--color-text-2);
}

.config-tab.active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

/* --- STATUS BADGE --- */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 100px;
  line-height: 1.4;
}

.status-badge::before {
  font-size: 0.6875rem;
}

.status-badge.operative {
  background: var(--color-rack-operative);
  color: var(--color-rack-operative-border);
}

.status-badge.operative::before {
  content: '\2713';
}

.status-badge.available {
  background: var(--color-rack-available);
  color: var(--color-rack-available-border);
}

.status-badge.available::before {
  content: '\25CB';
}

.status-badge.maintenance {
  background: var(--color-rack-maintenance);
  color: var(--color-rack-maintenance-border);
}

.status-badge.maintenance::before {
  content: '\26A0';
}

/* --- STATS GRID --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stat-card {
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-md);
}

.stat-card:hover {
  border-color: var(--color-border-focus);
  box-shadow: var(--shadow-md);
}

.stat-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}

.stat-card.stat-temp .stat-card__icon {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.stat-card.stat-ocupacion .stat-card__icon {
  background: var(--color-accent-light);
  color: var(--color-accent);
}

.stat-card.stat-consumo .stat-card__icon {
  background: var(--color-warning-light);
  color: var(--color-warning);
}

.stat-card.stat-uptime .stat-card__icon {
  background: var(--color-success-light);
  color: var(--color-success);
}

.stat-card__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-card__label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-bottom: 2px;
}

.stat-card__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.2;
}

.stat-card__unit {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  margin-left: 2px;
}

/* --- TEMPERATURE GAUGE --- */
.temp-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 8px;
}

.temp-gauge-svg {
  width: 140px;
  height: 80px;
}

.temp-gauge-svg .gauge-bg {
  fill: none;
  stroke: var(--color-surface-2);
  stroke-width: 12;
  stroke-linecap: round;
}

.temp-gauge-svg .gauge-fill {
  fill: none;
  stroke-width: 12;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease, stroke 0.4s ease;
}

.temp-gauge-svg .gauge-value {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  fill: var(--color-text);
  text-anchor: middle;
}

.temp-gauge-svg .gauge-label {
  font-family: var(--font-body);
  font-size: 10px;
  fill: var(--color-muted);
  text-anchor: middle;
}

/* --- OCCUPANCY BAR --- */
.occupancy-bar {
  width: 100%;
  height: 8px;
  background: var(--color-surface-2);
  border-radius: 4px;
  overflow: hidden;
  margin: 8px 0;
}

.occupancy-bar__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
  background: var(--color-accent);
}

/* --- ALERTS --- */
.alerts-section {
  margin-top: 20px;
}

.alerts-section h4 {
  margin-bottom: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alerts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  line-height: 1.5;
}

.alert-item.warn {
  background: var(--color-warning-light);
  border-left: 3px solid var(--color-warning);
}

.alert-item.info {
  background: var(--color-accent-light);
  border-left: 3px solid var(--color-accent);
}

.alert-item__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  margin-top: 1px;
}

.alert-item.warn .alert-item__icon {
  color: var(--color-warning);
}

.alert-item.info .alert-item__icon {
  color: var(--color-accent);
}

.alert-item__text {
  flex: 1;
  color: var(--color-text-2);
}

.alert-item__time {
  flex-shrink: 0;
  font-size: 0.6875rem;
  color: var(--color-muted);
  margin-top: 1px;
}

/* --- SPARKLINE --- */
.sparkline-section {
  margin-top: 20px;
}

.sparkline-section h4 {
  margin-bottom: 10px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sparkline-container {
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.sparkline-canvas {
  width: 100%;
  height: 80px;
  display: block;
}

.sparkline-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.6875rem;
  color: var(--color-muted);
}

/* --- RACK NAVIGATION --- */
.rack-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.rack-nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text-2);
  font-size: 1rem;
}

.rack-nav__btn:hover:not(:disabled) {
  background: var(--color-surface-2);
  border-color: var(--color-border-focus);
  color: var(--color-accent);
}

.rack-nav__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.rack-nav__info {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.rack-nav__info strong {
  color: var(--color-text);
  font-weight: 600;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .home-hero {
    padding: 56px 20px 40px;
  }

  .home-hero__title {
    font-size: 2rem;
  }

  .config-cards {
    gap: 20px;
    padding: 0 20px 56px;
  }

  .config-card__icon-area {
    height: 170px;
  }

  .config-card__content {
    padding: 20px 24px 22px;
  }

  .home-features {
    gap: 24px;
    flex-wrap: wrap;
  }

  /* Header: from tablet down, collapse the breadcrumb to the CURRENT page only
     (single line, ellipsis) so it never wraps or overlaps the logo/indicators. */
  .header__logo {
    max-height: 40px;
  }
  .header__breadcrumb {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    margin-left: 8px;
  }
  .breadcrumb__list {
    flex-wrap: nowrap;
    min-width: 0;
  }
  .breadcrumb__item:not(:last-child) {
    display: none;
  }
  .breadcrumb__item:last-child .breadcrumb__sep {
    display: none;
  }
  .breadcrumb__current {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .config-cards {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .home-features {
    flex-direction: column;
    gap: 16px;
  }
}

/* ============================================================
   RESPONSIVE — PHONE (768px and below)
   Header, breadcrumb, home hero, stat cards
   ============================================================ */

/* --- Header: logo shrinks, inner gap tightens --- */
@media (max-width: 768px) {
  .header__logo {
    max-height: 34px;
  }

  .header__inner {
    gap: 12px;
    padding: 0 16px;
  }

  .header__breadcrumb {
    margin-left: 4px;
  }

  /* Minimum 44 px touch targets */
  .theme-toggle {
    width: 44px;
    height: 44px;
  }

  /* Compact status-indicator pill (inline styles need !important) */
  .header-indicators {
    gap: 8px !important;
    padding: 5px 10px !important;
  }

  /* Home hero tighter on tablets/phones */
  .home-hero {
    padding: 40px 16px 28px;
  }

  .home-hero__title {
    font-size: 1.875rem;
  }

  .config-cards {
    padding: 0 0 48px;
  }
}

/* --- 480 px: compact indicators, allow breadcrumb wrap --- */
@media (max-width: 480px) {
  .header__logo {
    max-height: 30px;
  }

  .header__inner {
    gap: 8px;
    padding: 0 12px;
  }

  /* Hide connection-status text label; keep the dot */
  #connText {
    display: none !important;
  }

  /* Shrink data-age timestamp */
  #dataAge {
    font-size: 11px !important;
    letter-spacing: 0 !important;
  }

  .header-indicators {
    gap: 6px !important;
    padding: 4px 8px !important;
  }

  /* Keep breadcrumb on one line; only the current page shows (see <=1024 rule).
     Hide the data-age timestamp to free space for the connection dot + theme. */
  #dataAge {
    display: none !important;
  }

  .breadcrumb__link,
  .breadcrumb__current,
  .breadcrumb__sep {
    font-size: 0.875rem;
  }

  /* Home hero */
  .home-hero {
    padding: 28px 12px 20px;
  }

  .home-hero__title {
    font-size: 1.5rem;
  }

  .home-hero__subtitle {
    font-size: 0.9375rem;
  }

  /* Feature strip is purely decorative — hide on small phones */
  .home-features {
    display: none;
  }

  .config-card__icon-area {
    height: 150px;
  }
}

/* --- 360 px: minimal header, hide breadcrumb history --- */
@media (max-width: 360px) {
  .header__logo {
    max-height: 30px;
  }

  .header__inner {
    gap: 6px;
    padding: 0 10px;
  }

  /* Keep only the current-page breadcrumb item (last child) */
  .breadcrumb__item:not(:last-child) {
    display: none;
  }

  /* Drop data-age — only status dot remains */
  #dataAge {
    display: none !important;
  }

  .header-indicators {
    gap: 4px !important;
    padding: 4px 6px !important;
    border-radius: 6px !important;
  }

  .home-hero {
    padding: 20px 10px 16px;
  }

  .home-hero__title {
    font-size: 1.25rem;
  }

  .config-card__content {
    padding: 16px 16px 18px;
  }
}


/* ============================================================
   C3NTRO Telecom | Data Center Explorer
   floorplan.css — Three.js 3D canvas, floating controls,
                   legend, tooltip, hints overlay
   Premium redesign for 3D interactive views
   ============================================================ */

/* ========================
   FLOORPLAN WRAPPER
   ======================== */
.floorplan-wrapper {
  position: relative;
  overflow: hidden;
  height: calc(100vh - var(--header-height) - 56px);
  min-height: 500px;
  background: transparent;
}

/* ========================
   THREE.JS CANVAS CONTAINER
   ======================== */
.three-canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.three-canvas-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  outline: none;
}

/* ========================
   FLOATING VIEW CONTROLS
   ======================== */
.view-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 6px;
  box-shadow: var(--shadow-glow);
}

.view-btn {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  color: var(--color-muted);
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: left;
}

.view-btn:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.view-btn.active {
  background: var(--color-accent);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.25);
}

/* ========================
   FLOATING LEGEND
   ======================== */
.three-legend {
  position: absolute;
  bottom: 16px;
  left: 16px;
  z-index: 10;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.three-legend__title {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 2px;
}

.three-legend__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--color-text-2);
}

.legend-item__swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-item__swatch.operative {
  background: var(--color-rack-operative);
  border: 1.5px solid var(--color-rack-operative-border);
}

.legend-item__swatch.available {
  background: var(--color-rack-available);
  border: 1.5px solid var(--color-rack-available-border);
}

.legend-item__swatch.maintenance {
  background: var(--color-rack-maintenance);
  border: 1.5px solid var(--color-rack-maintenance-border);
}

.legend-item__swatch.ac {
  background: rgba(255, 0, 85, 0.15);
  border: 1.5px solid var(--color-danger);
  border-radius: 50%;
}

.legend-item__swatch.ups {
  background: rgba(148, 163, 184, 0.15);
  border: 1.5px dashed #94A3B8;
}

/* ========================
   FLOATING HINT BAR
   ======================== */
.three-hint {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  background: var(--color-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 20px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.three-hint span {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-muted);
  white-space: nowrap;
}

.three-hint:hover {
  opacity: 1;
}

.three-hint kbd {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 4px;
  color: var(--color-text-2);
}

/* ========================
   SVG-related (kept for backwards compat)
   ======================== */
.floorplan-svg {
  display: block;
  /* min-width was 600px — fluid on phones to avoid horizontal scroll */
  min-width: 0;
  width: 100%;
  height: auto;
  user-select: none;
}

.room-wall {
  fill: none;
  stroke: #374151;
  stroke-width: 2;
}

.room-fill {
  fill: #F9FAFB;
}

.room-label {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  fill: var(--color-text);
  text-anchor: middle;
}

.dimension-line {
  stroke: var(--color-border-focus);
  stroke-width: 0.8;
  stroke-dasharray: 3, 2;
}

.dimension-text {
  font-family: var(--font-body);
  font-size: 9px;
  fill: var(--color-muted);
  text-anchor: middle;
}

.rack-rect {
  cursor: pointer;
  stroke-width: 1.5;
  rx: 2;
  ry: 2;
  transition: filter var(--transition-fast), stroke-width var(--transition-fast);
}

.rack-rect:hover {
  filter: brightness(0.92);
  stroke-width: 2.5;
}

.rack-rect.operative {
  fill: var(--color-rack-operative);
  stroke: var(--color-rack-operative-border);
}

.rack-rect.available {
  fill: var(--color-rack-available);
  stroke: var(--color-rack-available-border);
}

.rack-rect.maintenance {
  fill: var(--color-rack-maintenance);
  stroke: var(--color-rack-maintenance-border);
}

.rack-label {
  font-size: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  text-anchor: middle;
  fill: #374151;
  pointer-events: none;
}

.rack-sublabel {
  font-size: 7.5px;
  font-family: var(--font-body);
  font-weight: 400;
  text-anchor: middle;
  fill: var(--color-muted);
  pointer-events: none;
}

.aisle-hot {
  fill: rgba(255, 139, 0, 0.06);
}

.aisle-cold {
  fill: rgba(0, 82, 204, 0.05);
}

.aisle-label {
  font-size: 9px;
  font-family: var(--font-body);
  fill: var(--color-muted);
  text-anchor: middle;
  font-weight: 500;
}

.ac-circle {
  fill: #FFEBE6;
  stroke: var(--color-danger);
  stroke-width: 1.5;
}

.ac-label {
  font-size: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  fill: var(--color-danger);
  text-anchor: middle;
}

.ac-icon {
  fill: none;
  stroke: var(--color-danger);
  stroke-width: 1;
  stroke-linecap: round;
}

.ups-zone {
  fill: #F0F4F8;
  stroke: #94A3B8;
  stroke-width: 1;
  stroke-dasharray: 4, 2;
  rx: 4;
  ry: 4;
}

.ups-label {
  font-size: 9px;
  font-family: var(--font-body);
  font-weight: 600;
  fill: #64748B;
  text-anchor: middle;
}

.fire-circle {
  fill: #FEE2E2;
  stroke: #EF4444;
  stroke-width: 1;
}

.fire-label {
  font-size: 7px;
  font-family: var(--font-body);
  font-weight: 600;
  fill: #EF4444;
  text-anchor: middle;
}

.door-rect {
  fill: var(--color-surface);
  stroke: #374151;
  stroke-width: 1.5;
}

.door-arc {
  fill: none;
  stroke: #94A3B8;
  stroke-width: 0.8;
  stroke-dasharray: 2, 2;
}

.door-label {
  font-size: 8px;
  font-family: var(--font-body);
  fill: var(--color-muted);
  text-anchor: middle;
}

/* ========================
   LEGACY LEGEND (non-floating)
   ======================== */
.floorplan-legend {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 0 0;
  margin-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 1366px) {
  .floorplan-wrapper {
    height: calc(100vh - var(--header-height) - 56px);
    min-height: 450px;
  }
}

@media (max-width: 1024px) {
  .floorplan-wrapper {
    height: calc(100vh - var(--header-height) - 52px);
    min-height: 400px;
  }

  .view-controls {
    top: 12px;
    right: 12px;
  }

  .three-legend {
    bottom: 12px;
    left: 12px;
  }

  .three-hint {
    bottom: 12px;
    right: 12px;
    gap: 12px;
  }
}

@media (max-width: 768px) {
  .floorplan-wrapper {
    height: calc(100vh - var(--header-height) - 48px);
    min-height: 350px;
  }

  .three-hint {
    flex-direction: column;
    gap: 4px;
  }

  .three-legend {
    max-width: 160px;
  }

  .view-controls {
    flex-direction: row;
    top: auto;
    bottom: 60px;
    right: 12px;
  }
}

/* --- Phone: 480 px --- */
@media (max-width: 480px) {
  .floorplan-wrapper {
    min-height: 280px;
  }

  /* Keyboard hints don't apply on touch devices — hide to free space */
  .three-hint {
    display: none;
  }

  /* Compact legend to avoid overlap with HVAC panel */
  .three-legend {
    max-width: 140px;
    padding: 10px 12px;
    gap: 6px;
    bottom: 8px;
    left: 8px;
  }

  .three-legend__title {
    font-size: 0.625rem;
  }

  .legend-item {
    font-size: 0.6875rem;
  }

  /* View-control buttons: ensure 44 px touch targets */
  .view-controls {
    bottom: 52px;
    right: 8px;
    padding: 4px;
  }

  .view-btn {
    padding: 10px 12px;
    min-height: 44px;
  }

  /* Tooltip: constrain to viewport on phones */
  .rack-tooltip {
    max-width: calc(100vw - 24px);
  }
}

/* --- Phone: 360 px --- */
@media (max-width: 360px) {
  .three-legend {
    max-width: 120px;
    padding: 8px 10px;
  }

  .legend-item__swatch {
    width: 10px;
    height: 10px;
  }

  .floorplan-view-header {
    padding: 12px 14px;
    gap: 10px;
  }

  .config-tab {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}


/* ================================================================
   LIGHT THEME OVERRIDES
   ISA-101 industrial gray palette
   ================================================================ */

@media (prefers-color-scheme: light) {

  /* --- SVG Elements --- */
  .room-wall {
    stroke: #555555;
  }

  .room-fill {
    fill: #E8EAED;
  }

  .rack-label {
    fill: #1A1A1A;
  }

  .ac-circle {
    fill: #FEE2E2;
  }

  .ups-zone {
    fill: #E8EAED;
    stroke: #94A3B8;
  }

  .ups-label {
    fill: #555555;
  }

  .fire-circle {
    fill: #FEE2E2;
  }

  .door-rect {
    stroke: #555555;
  }

  .door-arc {
    stroke: #94A3B8;
  }

  /* --- Legend item swatch borders for UPS --- */
  .legend-item__swatch.ups {
    background: rgba(148, 163, 184, 0.12);
    border-color: #94A3B8;
  }

  /* --- Floating view button active state --- */
  .view-btn.active {
    box-shadow: 0 2px 8px rgba(0, 82, 204, 0.15);
  }
}

/* ---- body.light-theme selector ---- */

body.light-theme .room-wall {
  stroke: #555555;
}

body.light-theme .room-fill {
  fill: #E8EAED;
}

body.light-theme .rack-label {
  fill: #1A1A1A;
}

body.light-theme .ac-circle {
  fill: #FEE2E2;
}

body.light-theme .ups-zone {
  fill: #E8EAED;
  stroke: #94A3B8;
}

body.light-theme .ups-label {
  fill: #555555;
}

body.light-theme .fire-circle {
  fill: #FEE2E2;
}

body.light-theme .door-rect {
  stroke: #555555;
}

body.light-theme .door-arc {
  stroke: #94A3B8;
}

body.light-theme .legend-item__swatch.ups {
  background: rgba(148, 163, 184, 0.12);
  border-color: #94A3B8;
}

body.light-theme .view-btn.active {
  box-shadow: 0 2px 8px rgba(0, 82, 204, 0.15);
}

/* ============================================================
   RACK / HVAC TOOLTIP (floating, follows cursor)
   ============================================================ */
.rack-tooltip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  min-width: 200px;
  max-width: 260px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.rack-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.rack-tooltip__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.rack-tooltip__name {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
}

.rack-tooltip__specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rack-tooltip__spec {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rack-tooltip__spec-label {
  font-size: 0.75rem;
  color: var(--color-muted);
}

.rack-tooltip__spec-value {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ============================================================
   HVAC PACKAGE UNITS PANEL (ISA-101 Level 2 overview)
   Collapsible side panel — ASHRAE TC 9.9 recommended fields
   ============================================================ */
.hvac-panel {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  width: 360px;
  max-height: calc(100% - 100px);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width 250ms ease, opacity 250ms ease;
}

.hvac-panel.collapsed {
  width: 48px;
}

.hvac-panel.collapsed .hvac-panel__body,
.hvac-panel.collapsed .hvac-panel__title,
.hvac-panel.collapsed .hvac-panel__count {
  display: none;
}

.hvac-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.hvac-panel__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hvac-panel__title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  white-space: nowrap;
}

.hvac-panel__count {
  font-size: 0.6875rem;
  color: var(--color-muted);
  white-space: nowrap;
}

.hvac-panel__toggle {
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.hvac-panel__toggle:hover {
  background: var(--color-surface-2);
  color: var(--color-accent);
}

.hvac-panel__toggle-icon {
  font-size: 0.625rem;
}

.hvac-panel__body {
  overflow-y: auto;
  flex: 1;
}

/* Column headers */
.hvac-panel__cols {
  display: grid;
  grid-template-columns: 1fr 50px 48px 48px 44px;
  gap: 4px;
  padding: 8px 14px 6px;
  border-bottom: 1px solid var(--color-border);
}

.hvac-panel__cols span {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.hvac-panel__col-temp,
.hvac-panel__col-fan {
  text-align: right;
}

/* Data rows */
.hvac-panel__rows {
  padding: 4px 0;
}

.hvac-panel__row {
  display: grid;
  grid-template-columns: 1fr 50px 48px 48px 44px;
  gap: 4px;
  padding: 6px 14px;
  cursor: pointer;
  transition: background var(--transition-fast);
  align-items: center;
}

.hvac-panel__row:hover {
  background: var(--color-surface-2);
}

.hvac-panel__row.hvac-row--warn {
  background: var(--color-warning-light);
}

.hvac-panel__row.hvac-row--fault {
  background: var(--color-danger-light);
}

.hvac-panel__cell-id {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

.hvac-panel__cell-status {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hvac-panel__cell-temp,
.hvac-panel__cell-fan {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-2);
  text-align: right;
}

/* Status dots — ISA-101 color coding */
.hvac-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.hvac-dot.running {
  background: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.hvac-dot.standby {
  background: var(--color-accent);
  box-shadow: 0 0 6px var(--color-accent);
}

.hvac-dot.warning {
  background: var(--color-warning);
  box-shadow: 0 0 6px var(--color-warning);
  animation: hvac-pulse 1.5s ease-in-out infinite;
}

.hvac-dot.fault {
  background: var(--color-danger);
  box-shadow: 0 0 8px var(--color-danger);
  animation: hvac-pulse 0.8s ease-in-out infinite;
}

@keyframes hvac-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Scrollbar styling */
.hvac-panel__body::-webkit-scrollbar {
  width: 4px;
}

.hvac-panel__body::-webkit-scrollbar-track {
  background: transparent;
}

.hvac-panel__body::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 2px;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .hvac-panel {
    width: 300px;
    top: 12px;
    left: 12px;
  }
}

@media (max-width: 768px) {
  .hvac-panel {
    position: absolute;
    top: auto;
    bottom: 68px;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: 220px;
  }

  .hvac-panel.collapsed {
    width: auto;
    max-height: 48px;
  }
}

/* --- Light theme overrides --- */
body.light-theme .rack-tooltip {
  background: rgba(240, 242, 245, 0.95);
  border-color: var(--color-border);
}

body.light-theme .hvac-panel {
  background: rgba(240, 242, 245, 0.95);
  border-color: var(--color-border);
}

body.light-theme .hvac-dot.running {
  box-shadow: 0 0 4px var(--color-success);
}

body.light-theme .hvac-dot.standby {
  box-shadow: 0 0 4px var(--color-accent);
}

body.light-theme .hvac-dot.warning {
  box-shadow: 0 0 4px var(--color-warning);
}

body.light-theme .hvac-dot.fault {
  box-shadow: 0 0 4px var(--color-danger);
}

@media (prefers-color-scheme: light) {
  .rack-tooltip {
    background: rgba(240, 242, 245, 0.95);
  }

  .hvac-panel {
    background: rgba(240, 242, 245, 0.95);
  }
}
/* ============================================================
   C3NTRO Telecom | Data Center Explorer
   rack-detail.css — DC Monitor dashboard, HVAC detail, Room detail
                     (dark mode), NOC/SCADA dashboard monitor
   ============================================================ */


/* ================================================================
   DC MONITOR — NOC/SCADA DASHBOARD
   Professional dark-theme data center monitoring panel
   ================================================================ */

/* --- Keyframe Animations --- */
@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-alarm {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

@keyframes shimmer-border {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes glow-breathe {
  0%, 100% {
    box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
  }
  50% {
    box-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
  }
}

/* --- Monitor Container --- */
.dc-monitor {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ========================
   ROW 1: KPI GAUGES
   ======================== */
.dc-monitor__kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dc-kpi-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
  animation: fade-in-up 0.4s ease both;
}

.dc-kpi-card:nth-child(1) { animation-delay: 0ms; }
.dc-kpi-card:nth-child(2) { animation-delay: 80ms; }
.dc-kpi-card:nth-child(3) { animation-delay: 160ms; }

/* Top gradient accent line */
.dc-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 240, 255, 0.4) 20%,
    var(--color-accent) 50%,
    rgba(0, 240, 255, 0.4) 80%,
    transparent 100%
  );
  opacity: 0.7;
}

/* Subtle ambient glow behind gauge */
.dc-kpi-card::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle, rgba(0, 240, 255, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.dc-kpi-card:hover {
  transform: scale(1.02);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 240, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.dc-kpi-card__header {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.dc-kpi-card__gauge {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.1));
}

.dc-kpi-card__gauge canvas {
  display: block;
}

.dc-kpi-card__value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
  text-shadow:
    0 0 20px rgba(0, 240, 255, 0.25),
    0 0 40px rgba(0, 240, 255, 0.1);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 3px;
}

.dc-kpi-card__unit {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  opacity: 0.85;
}


/* ========================
   ROW 2: ENVIRONMENTAL CARDS
   ======================== */
.dc-monitor__env-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dc-env-card {
  position: relative;
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px 12px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast);
  animation: fade-in-up 0.4s ease both;
}

.dc-env-card:nth-child(1) { animation-delay: 0ms; }
.dc-env-card:nth-child(2) { animation-delay: 80ms; }
.dc-env-card:nth-child(3) { animation-delay: 160ms; }
.dc-env-card:nth-child(4) { animation-delay: 240ms; }

/* Thin accent top edge */
.dc-env-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
}

.dc-env-card:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 240, 255, 0.3);
}

.dc-env-card__ring {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.08));
}

.dc-env-card__ring canvas {
  display: block;
}

.dc-env-card__label {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.dc-env-card__value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 2px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.dc-env-card__unit {
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-muted);
}


/* ========================
   ROW 3: STATUS GRID
   ======================== */
.dc-monitor__status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dc-status-group {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  animation: fade-in-up 0.4s ease both;
  animation-delay: 100ms;
}

.dc-status-group__title {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding-left: 10px;
  border-left: 3px solid var(--color-accent);
  line-height: 1;
  padding-top: 1px;
  padding-bottom: 1px;
}

.dc-status-group__grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* --- Individual Status Item --- */
.dc-status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.dc-status-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.dc-status-item__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-muted);
  box-shadow: 0 0 4px rgba(100, 116, 139, 0.4);
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.dc-status-item__name {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-status-item__val {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-text);
  white-space: nowrap;
  flex-shrink: 0;
}

/* OK state */
.dc-status-item--ok {
  background: rgba(0, 255, 157, 0.04);
  border-color: rgba(0, 255, 157, 0.1);
}

.dc-status-item--ok .dc-status-item__dot {
  background: var(--color-success);
  box-shadow: 0 0 6px rgba(0, 255, 157, 0.5), 0 0 12px rgba(0, 255, 157, 0.2);
}

.dc-status-item--ok .dc-status-item__val {
  color: var(--color-success);
}

/* Warning state */
.dc-status-item--warn {
  background: rgba(255, 176, 0, 0.04);
  border-color: rgba(255, 176, 0, 0.12);
}

.dc-status-item--warn .dc-status-item__dot {
  background: var(--color-warning);
  box-shadow: 0 0 6px rgba(255, 176, 0, 0.5), 0 0 12px rgba(255, 176, 0, 0.2);
}

.dc-status-item--warn .dc-status-item__val {
  color: var(--color-warning);
}

/* Alarm state — pulsing */
.dc-status-item--alarm {
  background: rgba(255, 0, 85, 0.05);
  border-color: rgba(255, 0, 85, 0.15);
}

.dc-status-item--alarm .dc-status-item__dot {
  background: var(--color-danger);
  box-shadow: 0 0 8px rgba(255, 0, 85, 0.6), 0 0 16px rgba(255, 0, 85, 0.25);
  animation: pulse-alarm 1.5s ease-in-out infinite;
}

.dc-status-item--alarm .dc-status-item__val {
  color: var(--color-danger);
}


/* ========================
   ROW 4: CHART PANELS
   ======================== */
.dc-monitor__charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.dc-chart-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  overflow: hidden;
  animation: fade-in-up 0.4s ease both;
  animation-delay: 150ms;
}

.dc-chart-panel__title {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dc-chart-panel__body {
  position: relative;
  width: 100%;
  height: 200px;
}

.dc-chart-panel__body canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

/* Tall modifier for history charts */
.dc-chart-panel__body--tall {
  height: 280px;
}

/* Full-width modifier */
.dc-chart-panel--full {
  grid-column: 1 / -1;
}


/* ========================
   ROW 5: ENERGY CARDS
   ======================== */
.dc-monitor__energy-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 16px;
  margin-bottom: 20px;
}

.dc-energy-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  animation: fade-in-up 0.4s ease both;
  animation-delay: 120ms;
}

.dc-energy-card__header {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

/* --- Diesel Bar (progress) --- */
.dc-energy-card__bar-wrap {
  width: 100%;
  height: 18px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

.dc-energy-card__bar {
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(
    90deg,
    var(--color-danger) 0%,
    var(--color-warning) 40%,
    var(--color-success) 75%,
    var(--color-success) 100%
  );
  background-size: 200% 100%;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.2);
}

/* Animated shine on the bar */
.dc-energy-card__bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer-border 3s ease-in-out infinite;
}

.dc-energy-card__value {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  text-shadow: 0 0 15px rgba(0, 240, 255, 0.15);
}

/* --- Sub-meter Card Modifier --- */
.dc-energy-card--meters {
  display: flex;
  flex-direction: column;
}

.dc-meter-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dc-meter-reading {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 1fr 50px;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: background var(--transition-fast);
}

.dc-meter-reading:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dc-meter-reading__phase {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  text-align: center;
}

.dc-meter-reading__phase--l1 {
  color: var(--color-accent);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.dc-meter-reading__phase--l2 {
  color: var(--color-success);
  background: rgba(0, 255, 157, 0.12);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.dc-meter-reading__phase--l3 {
  color: var(--color-warning);
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.2);
}

.dc-meter-reading__val {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-2);
  text-align: right;
}

.dc-meter-reading__val--highlight {
  color: var(--color-text);
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}


/* ========================
   ROW 6: HISTORY (full width)
   ======================== */
.dc-monitor__history-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 20px;
}


/* ========================
   LEGACY DASHBOARD CARDS
   (kept for backwards compatibility)
   ======================== */
.bananapro-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-card {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.5;
}

.dashboard-card__title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  text-align: left;
  width: 100%;
}

.dashboard-card__value {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1;
  text-shadow: 0 0 15px var(--color-accent-light);
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.dashboard-card__unit {
  font-size: 1rem;
  color: var(--color-accent);
  font-weight: 600;
}

.dashboard-card__chart {
  width: 100%;
  height: 140px;
  position: relative;
}

.dashboard-row-large {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.dashboard-card-large {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dashboard-card-large__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.dashboard-card-large__chart {
  width: 100%;
  height: 280px;
  position: relative;
}


/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 1366px) {
  /* DC Monitor: tighter gaps */
  .dc-monitor__kpi-row,
  .dc-monitor__env-row,
  .dc-monitor__status-row,
  .dc-monitor__charts-row,
  .dc-monitor__energy-row,
  .dc-monitor__history-row {
    gap: 12px;
  }

  .dc-kpi-card {
    padding: 16px 12px 14px;
  }

  .dc-kpi-card__value {
    font-size: 1.5rem;
  }
}

@media (max-width: 1024px) {
  /* DC Monitor: KPI stays 3 cols, env drops to 2 */
  .dc-monitor__kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .dc-monitor__env-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dc-monitor__status-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dc-monitor__charts-row {
    grid-template-columns: 1fr;
  }

  .dc-monitor__energy-row {
    grid-template-columns: 1fr;
  }

  .dc-kpi-card__gauge canvas {
    width: 150px;
    height: 150px;
  }

  .dc-chart-panel__body {
    height: 180px;
  }

  .dc-chart-panel__body--tall {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .gauges-row {
    grid-template-columns: 1fr;
  }

  /* DC Monitor: everything single column */
  .dc-monitor__kpi-row {
    grid-template-columns: 1fr;
  }

  .dc-monitor__env-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .dc-monitor__status-row {
    grid-template-columns: 1fr;
  }

  .dc-monitor__charts-row {
    grid-template-columns: 1fr;
  }

  .dc-monitor__energy-row {
    grid-template-columns: 1fr;
  }

  .dc-kpi-card {
    padding: 14px 12px;
  }

  .dc-kpi-card__value {
    font-size: 1.375rem;
  }

  .dc-kpi-card__gauge canvas {
    width: 130px;
    height: 130px;
  }

  .dc-chart-panel__body {
    height: 160px;
  }

  .dc-chart-panel__body--tall {
    height: 200px;
  }

  .dc-meter-reading {
    grid-template-columns: 36px 1fr 1fr 1fr;
    gap: 6px;
  }

  /* Hide PF column on small widths */
  .dc-meter-reading__val:nth-child(5) {
    display: none;
  }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .dc-kpi-card,
  .dc-env-card,
  .dc-status-group,
  .dc-chart-panel,
  .dc-energy-card {
    animation: none;
  }

  .dc-kpi-card:hover {
    transform: none;
  }

  .dc-env-card:hover {
    transform: none;
  }

  .dc-status-item--alarm .dc-status-item__dot {
    animation: none;
    opacity: 1;
  }

  .dc-energy-card__bar::after {
    animation: none;
  }
}


/* ================================================================
   HVAC DETAIL DASHBOARD
   Full-width HVAC sensor monitoring view (SCADA / BMS style)
   ================================================================ */

/* ========================
   LAYOUT — Full-width single column
   ======================== */
.hvac-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
}

/* ========================
   HEADER
   ======================== */
.hvac-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hvac-detail-header__left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hvac-detail-header__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.hvac-detail-header__location {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.hvac-detail-header__right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hvac-detail-header__badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hvac-detail-header__badge--ok {
  color: var(--color-success);
  background: rgba(0, 255, 157, 0.1);
  border: 1px solid rgba(0, 255, 157, 0.25);
  box-shadow: 0 0 10px rgba(0, 255, 157, 0.15);
}

.hvac-detail-header__badge--warn {
  color: var(--color-warning);
  background: rgba(255, 176, 0, 0.1);
  border: 1px solid rgba(255, 176, 0, 0.25);
  box-shadow: 0 0 10px rgba(255, 176, 0, 0.15);
}

.hvac-detail-header__badge--alarm {
  color: var(--color-danger);
  background: rgba(255, 0, 85, 0.1);
  border: 1px solid rgba(255, 0, 85, 0.25);
  box-shadow: 0 0 10px rgba(255, 0, 85, 0.15);
  animation: pulse-alarm 1.5s ease-in-out infinite;
}

.hvac-detail-header__pue {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-accent);
  padding: 4px 12px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 6px;
}

/* ========================
   SECTIONS — Colored left border
   ======================== */
.hvac-section {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  animation: fade-in-up 0.4s ease both;
  position: relative;
  overflow: hidden;
}

.hvac-section--clima {
  border-left: 4px solid #00F0FF;
}

.hvac-section--energia {
  border-left: 4px solid #FFB000;
}

.hvac-section--seguridad {
  border-left: 4px solid #FF0055;
}

.hvac-section__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hvac-section__icon {
  font-size: 1rem;
  line-height: 1;
}

.hvac-section__body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================
   KPI ROW (3 columns of radial gauges)
   ======================== */
.hvac-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ========================
   ENVIRONMENTAL GRID (4 columns)
   ======================== */
.hvac-env-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ========================
   SENSOR CARD
   ======================== */
.hvac-sensor-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 18px;
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast);
}

.hvac-sensor-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
}

.hvac-sensor-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hvac-sensor-card__name {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hvac-sensor-card__model {
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--color-muted);
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  white-space: nowrap;
}

/* ========================
   STATUS INDICATORS (Detection sensors)
   ======================== */
.hvac-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.hvac-sensor-card--detection {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hvac-sensor-card--detection .hvac-sensor-card__header {
  width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hvac-sensor-card__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 0 8px;
}

.hvac-sensor-card__status-dot {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.hvac-sensor-card__status-text {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* OK state */
.hvac-sensor-card__status--ok .hvac-sensor-card__status-dot {
  background: var(--color-success);
  box-shadow:
    0 0 12px rgba(0, 255, 157, 0.5),
    0 0 30px rgba(0, 255, 157, 0.2),
    inset 0 0 8px rgba(255, 255, 255, 0.15);
}

.hvac-sensor-card__status--ok .hvac-sensor-card__status-text {
  color: var(--color-success);
}

/* Warning state */
.hvac-sensor-card__status--warn .hvac-sensor-card__status-dot {
  background: var(--color-warning);
  box-shadow:
    0 0 12px rgba(255, 176, 0, 0.5),
    0 0 30px rgba(255, 176, 0, 0.2),
    inset 0 0 8px rgba(255, 255, 255, 0.15);
  animation: pulse-alarm 2s ease-in-out infinite;
}

.hvac-sensor-card__status--warn .hvac-sensor-card__status-text {
  color: var(--color-warning);
}

/* Alarm state — pulsing */
.hvac-sensor-card__status--alarm .hvac-sensor-card__status-dot {
  background: var(--color-danger);
  box-shadow:
    0 0 16px rgba(255, 0, 85, 0.6),
    0 0 40px rgba(255, 0, 85, 0.3),
    inset 0 0 8px rgba(255, 255, 255, 0.15);
  animation: pulse-alarm 1s ease-in-out infinite;
}

.hvac-sensor-card__status--alarm .hvac-sensor-card__status-text {
  color: var(--color-danger);
}

/* ========================
   AIR QUALITY BADGE
   ======================== */
.hvac-aq-badge {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: center;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}

/* ========================
   HVAC UNIT DETAIL CARD
   ======================== */
.hvac-unit-detail {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 18px;
}

.hvac-unit-detail__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hvac-unit-detail__badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hvac-unit-detail__badge--ok {
  color: var(--color-success);
  background: rgba(0, 255, 157, 0.1);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.hvac-unit-detail__badge--warn {
  color: var(--color-warning);
  background: rgba(255, 176, 0, 0.1);
  border: 1px solid rgba(255, 176, 0, 0.2);
}

.hvac-unit-detail__badge--alarm {
  color: var(--color-danger);
  background: rgba(255, 0, 85, 0.1);
  border: 1px solid rgba(255, 0, 85, 0.2);
}

.hvac-unit-detail__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.hvac-unit-detail__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
}

.hvac-unit-detail__label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hvac-unit-detail__val {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-accent);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

/* ========================
   PHASE TABLE
   ======================== */
.hvac-phase-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  font-size: 0.8125rem;
}

.hvac-phase-table th {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: right;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hvac-phase-table th:first-child {
  text-align: center;
  width: 60px;
}

.hvac-phase-table td {
  padding: 10px 12px;
  text-align: right;
  color: var(--color-text-2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.8125rem;
}

.hvac-phase-table td:first-child {
  text-align: center;
}

.hvac-phase-table tr:last-child td {
  border-bottom: none;
}

.hvac-phase-table tr:hover td {
  background: rgba(255, 255, 255, 0.03);
}

.hvac-phase-table__highlight {
  color: var(--color-text) !important;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

/* Phase tags */
.hvac-phase-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

.hvac-phase-tag--l1 {
  color: var(--color-accent);
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

.hvac-phase-tag--l2 {
  color: var(--color-success);
  background: rgba(0, 255, 157, 0.12);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.hvac-phase-tag--l3 {
  color: var(--color-warning);
  background: rgba(255, 176, 0, 0.12);
  border: 1px solid rgba(255, 176, 0, 0.2);
}

/* ========================
   ENERGY TOTALS
   ======================== */
.hvac-energy-totals {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0 0;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8125rem;
  color: var(--color-text-2);
  flex-wrap: wrap;
}

.hvac-energy-totals strong {
  color: var(--color-text);
  font-weight: 700;
}

.hvac-energy-totals__phase-loss {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 12px;
}

.hvac-energy-totals__phase-loss--ok {
  color: var(--color-success);
  background: rgba(0, 255, 157, 0.08);
  border: 1px solid rgba(0, 255, 157, 0.15);
}

.hvac-energy-totals__phase-loss--alarm {
  color: var(--color-danger);
  background: rgba(255, 0, 85, 0.1);
  border: 1px solid rgba(255, 0, 85, 0.2);
  animation: pulse-alarm 1.5s ease-in-out infinite;
}

/* ========================
   CT CURRENT BARS
   ======================== */
.hvac-ct-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hvac-ct-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hvac-ct-row__label {
  flex-shrink: 0;
  width: 36px;
}

.hvac-ct-bar {
  flex: 1;
  height: 22px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  position: relative;
}

.hvac-ct-bar__fill {
  height: 100%;
  border-radius: 11px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  opacity: 0.8;
  box-shadow: 0 0 10px currentColor;
}

/* Animated shine on CT bar */
.hvac-ct-bar__fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmer-border 3s ease-in-out infinite;
}

.hvac-ct-row__val {
  flex-shrink: 0;
  width: 70px;
  text-align: right;
  font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
}

/* ========================
   FLOAT LEVEL INDICATOR
   ======================== */
.hvac-float-indicator {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0;
}

.hvac-float-indicator__tank {
  width: 60px;
  height: 80px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px 6px 10px 10px;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.hvac-float-indicator__level {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 0 0 8px 8px;
  transition: height 0.6s ease;
}

.hvac-float-indicator__level--normal {
  height: 50%;
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.6) 0%, rgba(0, 240, 255, 0.3) 100%);
  box-shadow: 0 -2px 12px rgba(0, 240, 255, 0.3);
}

.hvac-float-indicator__level--high {
  height: 85%;
  background: linear-gradient(180deg, rgba(255, 176, 0, 0.6) 0%, rgba(255, 176, 0, 0.3) 100%);
  box-shadow: 0 -2px 12px rgba(255, 176, 0, 0.3);
}

.hvac-float-indicator__level--low {
  height: 20%;
  background: linear-gradient(180deg, rgba(255, 0, 85, 0.6) 0%, rgba(255, 0, 85, 0.3) 100%);
  box-shadow: 0 -2px 12px rgba(255, 0, 85, 0.3);
}

.hvac-float-indicator__label {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hvac-float-indicator--ok .hvac-float-indicator__label {
  color: var(--color-success);
}

.hvac-float-indicator--warn .hvac-float-indicator__label {
  color: var(--color-warning);
}

/* ========================
   HVAC RESPONSIVE
   ======================== */
@media (max-width: 1366px) {
  .hvac-kpi-row {
    gap: 12px;
  }

  .hvac-env-grid {
    gap: 12px;
  }

  .hvac-status-grid {
    gap: 12px;
  }

  .hvac-section {
    padding: 20px;
  }
}

@media (max-width: 1024px) {
  .hvac-detail-header__name {
    font-size: 1.25rem;
  }

  .hvac-env-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hvac-unit-detail__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hvac-status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hvac-kpi-row {
    grid-template-columns: 1fr;
  }

  .hvac-env-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hvac-status-grid {
    grid-template-columns: 1fr;
  }

  .hvac-unit-detail__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hvac-detail-header {
    flex-direction: column;
    gap: 12px;
  }

  .hvac-section {
    padding: 16px;
    margin-bottom: 16px;
  }
}

/* --- HVAC Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .hvac-section {
    animation: none;
  }

  .hvac-sensor-card__status--alarm .hvac-sensor-card__status-dot,
  .hvac-sensor-card__status--warn .hvac-sensor-card__status-dot {
    animation: none;
    opacity: 1;
  }

  .hvac-detail-header__badge--alarm {
    animation: none;
    opacity: 1;
  }

  .hvac-energy-totals__phase-loss--alarm {
    animation: none;
    opacity: 1;
  }

  .hvac-ct-bar__fill::after {
    animation: none;
  }
}


/* ================================================================
   ROOM DETAIL VIEW
   Full-width room overview with HVAC grid, energy, and safety
   ================================================================ */

/* ========================
   ROOM DETAIL LAYOUT
   ======================== */
.room-detail-layout {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========================
   ROOM HEADER
   ======================== */
.room-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.room-detail-header__left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.room-detail-header__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.room-detail-header__location {
  font-size: 0.875rem;
  color: var(--color-muted);
}

.room-detail-header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ========================
   ROOM SECTION — Glass card with colored left border
   ======================== */
.room-section {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  animation: fade-in-up 0.4s ease both;
}

.room-section__title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  padding-left: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Section accent variants */
.room-section--clima {
  border-left: 4px solid #00F0FF;
}

.room-section--clima .room-section__title {
  border-left: none;
  color: #00F0FF;
}

.room-section--energia {
  border-left: 4px solid #FFB000;
}

.room-section--energia .room-section__title {
  border-left: none;
  color: #FFB000;
}

.room-section--seguridad {
  border-left: 4px solid #FF0055;
}

.room-section--seguridad .room-section__title {
  border-left: none;
  color: #FF0055;
}

.room-section--hvac {
  border-left: 4px solid #00F0FF;
}

.room-section--hvac .room-section__title {
  border-left: none;
  color: #00F0FF;
}

/* ========================
   HVAC CARD GRID
   ======================== */
.room-hvac-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.room-hvac-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

/* Top accent line */
.room-hvac-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 240, 255, 0.3), transparent);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.room-hvac-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.1), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.room-hvac-card:hover::before {
  opacity: 1;
}

.room-hvac-card__title {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text);
}

.room-hvac-card__temp {
  font-family: 'SF Mono', 'Consolas', monospace;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.room-hvac-card__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.room-hvac-card__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Status dot colors — OK */
.room-hvac-card--ok .room-hvac-card__status-dot {
  background: var(--color-success);
  box-shadow: 0 0 6px rgba(0, 255, 157, 0.5);
}

.room-hvac-card--ok .room-hvac-card__status-text {
  color: var(--color-success);
}

/* Status dot colors — Warning */
.room-hvac-card--warn .room-hvac-card__status-dot {
  background: var(--color-warning);
  box-shadow: 0 0 6px rgba(255, 176, 0, 0.5);
}

.room-hvac-card--warn .room-hvac-card__status-text {
  color: var(--color-warning);
}

/* Status dot colors — Alarm */
.room-hvac-card--alarm .room-hvac-card__status-dot {
  background: var(--color-danger);
  box-shadow: 0 0 8px rgba(255, 0, 85, 0.6);
  animation: pulse-alarm 1.5s ease-in-out infinite;
}

.room-hvac-card--alarm .room-hvac-card__status-text {
  color: var(--color-danger);
}

/* Arrow icon for clickable cards */
.room-hvac-card__arrow {
  position: absolute;
  top: 16px;
  right: 14px;
  font-size: 1rem;
  color: var(--color-muted);
  transition: color 0.15s ease, transform 0.15s ease;
}

.room-hvac-card:hover .room-hvac-card__arrow {
  color: var(--color-accent);
  transform: translateX(3px);
}

/* ========================
   ROOM KPI ROW (3 columns for radial gauges)
   ======================== */
.room-kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 4px;
}

/* ========================
   ROOM VIEW — RESPONSIVE
   ======================== */
@media (max-width: 1024px) {
  .room-hvac-grid {
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  }

  .room-kpi-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .room-hvac-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .room-kpi-row {
    grid-template-columns: 1fr;
  }

  .room-detail-header {
    flex-direction: column;
    gap: 12px;
  }

  .room-section {
    padding: 16px;
  }
}

/* --- Room Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .room-section {
    animation: none;
  }

  .room-hvac-card--alarm .room-hvac-card__status-dot {
    animation: none;
    opacity: 1;
  }
}


/* ================================================================
   LIGHT THEME OVERRIDES
   ISA-101 industrial gray palette
   Background: #C8CCD0 | Surface: rgba(212,216,220,0.92)
   Text: #1A1A1A / #333333 | Muted: #555555
   Borders: rgba(0,0,0,0.15)
   ================================================================ */

@media (prefers-color-scheme: light) {

  /* --- DC Monitor KPI Cards --- */
  .dc-kpi-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .dc-kpi-card::before {
    background: linear-gradient(
      90deg,
      transparent 0%,
      rgba(0, 82, 204, 0.3) 20%,
      var(--color-accent) 50%,
      rgba(0, 82, 204, 0.3) 80%,
      transparent 100%
    );
  }

  .dc-kpi-card::after {
    background: radial-gradient(circle, rgba(0, 82, 204, 0.04) 0%, transparent 70%);
  }

  .dc-kpi-card:hover {
    border-color: rgba(0, 82, 204, 0.3);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 12px rgba(0, 82, 204, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  }

  .dc-kpi-card__gauge {
    filter: none;
  }

  .dc-kpi-card__value {
    text-shadow: none;
  }

  /* --- DC Monitor Environmental Cards --- */
  .dc-env-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .dc-env-card::before {
    background: linear-gradient(90deg, transparent, rgba(0, 82, 204, 0.2), transparent);
  }

  .dc-env-card:hover {
    border-color: rgba(0, 82, 204, 0.25);
  }

  .dc-env-card__ring {
    filter: none;
  }

  .dc-env-card__value {
    text-shadow: none;
  }

  /* --- DC Monitor Status Groups --- */
  .dc-status-group {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .dc-status-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
  }

  .dc-status-item:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
  }

  .dc-status-item--ok {
    background: rgba(22, 163, 74, 0.06);
    border-color: rgba(22, 163, 74, 0.15);
  }

  .dc-status-item--warn {
    background: rgba(202, 138, 4, 0.06);
    border-color: rgba(202, 138, 4, 0.15);
  }

  .dc-status-item--alarm {
    background: rgba(220, 38, 38, 0.06);
    border-color: rgba(220, 38, 38, 0.15);
  }

  /* --- DC Monitor Chart Panels --- */
  .dc-chart-panel {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .dc-chart-panel__title {
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }

  /* --- DC Monitor Energy Cards --- */
  .dc-energy-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .dc-energy-card__bar-wrap {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
  }

  .dc-energy-card__bar {
    box-shadow: none;
  }

  .dc-energy-card__value {
    text-shadow: none;
  }

  /* --- DC Meter Readings --- */
  .dc-meter-reading {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
  }

  .dc-meter-reading:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .dc-meter-reading__phase--l1 {
    color: #0052CC;
    background: rgba(0, 82, 204, 0.08);
    border-color: rgba(0, 82, 204, 0.2);
  }

  .dc-meter-reading__phase--l2 {
    color: #16A34A;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.2);
  }

  .dc-meter-reading__phase--l3 {
    color: #CA8A04;
    background: rgba(202, 138, 4, 0.08);
    border-color: rgba(202, 138, 4, 0.2);
  }

  .dc-meter-reading__val--highlight {
    text-shadow: none;
  }

  /* --- Legacy Dashboard Cards --- */
  .dashboard-card {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .dashboard-card__value {
    text-shadow: none;
  }

  .dashboard-card-large {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  /* --- HVAC Sections --- */
  .hvac-section {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .hvac-section--clima {
    border-left-color: #0052CC;
  }

  .hvac-section--energia {
    border-left-color: #CA8A04;
  }

  .hvac-section--seguridad {
    border-left-color: #DC2626;
  }

  /* --- HVAC Sensor Cards --- */
  .hvac-sensor-card {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
  }

  .hvac-sensor-card:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .hvac-sensor-card__header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }

  .hvac-sensor-card__model {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
  }

  /* --- HVAC Status Dots (light adjustments for glow) --- */
  .hvac-sensor-card__status--ok .hvac-sensor-card__status-dot {
    box-shadow: 0 0 8px rgba(22, 163, 74, 0.3), 0 0 20px rgba(22, 163, 74, 0.1);
  }

  .hvac-sensor-card__status--warn .hvac-sensor-card__status-dot {
    box-shadow: 0 0 8px rgba(202, 138, 4, 0.3), 0 0 20px rgba(202, 138, 4, 0.1);
  }

  .hvac-sensor-card__status--alarm .hvac-sensor-card__status-dot {
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.4), 0 0 24px rgba(220, 38, 38, 0.15);
  }

  /* --- HVAC Detail Header --- */
  .hvac-detail-header__badge--ok {
    color: #16A34A;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.2);
    box-shadow: none;
  }

  .hvac-detail-header__badge--warn {
    color: #CA8A04;
    background: rgba(202, 138, 4, 0.08);
    border-color: rgba(202, 138, 4, 0.2);
    box-shadow: none;
  }

  .hvac-detail-header__badge--alarm {
    color: #DC2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
    box-shadow: none;
  }

  .hvac-detail-header__pue {
    color: #0052CC;
    background: rgba(0, 82, 204, 0.06);
    border-color: rgba(0, 82, 204, 0.15);
  }

  /* --- HVAC Air Quality Badge --- */
  .hvac-aq-badge {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
  }

  /* --- HVAC Unit Detail --- */
  .hvac-unit-detail {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.08);
  }

  .hvac-unit-detail__header {
    border-bottom-color: rgba(0, 0, 0, 0.08);
  }

  .hvac-unit-detail__badge--ok {
    color: #16A34A;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.2);
  }

  .hvac-unit-detail__badge--warn {
    color: #CA8A04;
    background: rgba(202, 138, 4, 0.08);
    border-color: rgba(202, 138, 4, 0.2);
  }

  .hvac-unit-detail__badge--alarm {
    color: #DC2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
  }

  .hvac-unit-detail__item {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.06);
  }

  .hvac-unit-detail__val {
    text-shadow: none;
  }

  /* --- HVAC Phase Table --- */
  .hvac-phase-table th {
    border-bottom-color: rgba(0, 0, 0, 0.12);
  }

  .hvac-phase-table td {
    border-bottom-color: rgba(0, 0, 0, 0.06);
  }

  .hvac-phase-table tr:hover td {
    background: rgba(0, 0, 0, 0.03);
  }

  .hvac-phase-table__highlight {
    text-shadow: none;
  }

  /* --- HVAC Phase Tags --- */
  .hvac-phase-tag--l1 {
    color: #0052CC;
    background: rgba(0, 82, 204, 0.08);
    border-color: rgba(0, 82, 204, 0.2);
  }

  .hvac-phase-tag--l2 {
    color: #16A34A;
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.2);
  }

  .hvac-phase-tag--l3 {
    color: #CA8A04;
    background: rgba(202, 138, 4, 0.08);
    border-color: rgba(202, 138, 4, 0.2);
  }

  /* --- HVAC Energy Totals --- */
  .hvac-energy-totals {
    border-top-color: rgba(0, 0, 0, 0.08);
  }

  .hvac-energy-totals__phase-loss--ok {
    color: #16A34A;
    background: rgba(22, 163, 74, 0.06);
    border-color: rgba(22, 163, 74, 0.15);
  }

  .hvac-energy-totals__phase-loss--alarm {
    color: #DC2626;
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.2);
  }

  /* --- HVAC CT Bars --- */
  .hvac-ct-bar {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
  }

  .hvac-ct-bar__fill {
    opacity: 0.7;
    box-shadow: none;
  }

  /* --- HVAC Float Indicator Tank --- */
  .hvac-float-indicator__tank {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.04);
  }

  /* --- Room Section --- */
  .room-section {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  }

  .room-section--clima {
    border-left-color: #0052CC;
  }

  .room-section--clima .room-section__title {
    color: #0052CC;
  }

  .room-section--energia {
    border-left-color: #CA8A04;
  }

  .room-section--energia .room-section__title {
    color: #CA8A04;
  }

  .room-section--seguridad {
    border-left-color: #DC2626;
  }

  .room-section--seguridad .room-section__title {
    color: #DC2626;
  }

  .room-section--hvac {
    border-left-color: #0052CC;
  }

  .room-section--hvac .room-section__title {
    color: #0052CC;
  }

  /* --- Room HVAC Cards --- */
  .room-hvac-card {
    background: rgba(0, 0, 0, 0.02);
  }

  .room-hvac-card::before {
    background: linear-gradient(90deg, transparent, rgba(0, 82, 204, 0.25), transparent);
  }

  .room-hvac-card:hover {
    border-color: rgba(0, 82, 204, 0.3);
    box-shadow: 0 8px 24px rgba(0, 82, 204, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .room-hvac-card__temp {
    text-shadow: none;
  }

  .room-hvac-card--ok .room-hvac-card__status-dot {
    box-shadow: 0 0 4px rgba(22, 163, 74, 0.3);
  }

  .room-hvac-card--warn .room-hvac-card__status-dot {
    box-shadow: 0 0 4px rgba(202, 138, 4, 0.3);
  }

  .room-hvac-card--alarm .room-hvac-card__status-dot {
    box-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
  }

  /* --- Glow Breathe keyframe toned down --- */
  @keyframes glow-breathe {
    0%, 100% {
      box-shadow: 0 0 4px rgba(0, 82, 204, 0.08);
    }
    50% {
      box-shadow: 0 0 10px rgba(0, 82, 204, 0.15);
    }
  }
}

/* ---- body.light-theme selector (mirrors above) ---- */

body.light-theme .dc-kpi-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .dc-kpi-card::before {
  background: linear-gradient(90deg, transparent 0%, rgba(0, 82, 204, 0.3) 20%, var(--color-accent) 50%, rgba(0, 82, 204, 0.3) 80%, transparent 100%);
}

body.light-theme .dc-kpi-card::after {
  background: radial-gradient(circle, rgba(0, 82, 204, 0.04) 0%, transparent 70%);
}

body.light-theme .dc-kpi-card:hover {
  border-color: rgba(0, 82, 204, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1), 0 0 12px rgba(0, 82, 204, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

body.light-theme .dc-kpi-card__gauge {
  filter: none;
}

body.light-theme .dc-kpi-card__value {
  text-shadow: none;
}

body.light-theme .dc-env-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .dc-env-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 82, 204, 0.2), transparent);
}

body.light-theme .dc-env-card:hover {
  border-color: rgba(0, 82, 204, 0.25);
}

body.light-theme .dc-env-card__ring {
  filter: none;
}

body.light-theme .dc-env-card__value {
  text-shadow: none;
}

body.light-theme .dc-status-group {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .dc-status-item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .dc-status-item:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .dc-status-item--ok {
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.15);
}

body.light-theme .dc-status-item--warn {
  background: rgba(202, 138, 4, 0.06);
  border-color: rgba(202, 138, 4, 0.15);
}

body.light-theme .dc-status-item--alarm {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.15);
}

body.light-theme .dc-chart-panel {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .dc-chart-panel__title {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .dc-energy-card {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .dc-energy-card__bar-wrap {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .dc-energy-card__bar {
  box-shadow: none;
}

body.light-theme .dc-energy-card__value {
  text-shadow: none;
}

body.light-theme .dc-meter-reading {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .dc-meter-reading:hover {
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme .dc-meter-reading__phase--l1 {
  color: #0052CC;
  background: rgba(0, 82, 204, 0.08);
  border-color: rgba(0, 82, 204, 0.2);
}

body.light-theme .dc-meter-reading__phase--l2 {
  color: #16A34A;
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.2);
}

body.light-theme .dc-meter-reading__phase--l3 {
  color: #CA8A04;
  background: rgba(202, 138, 4, 0.08);
  border-color: rgba(202, 138, 4, 0.2);
}

body.light-theme .dc-meter-reading__val--highlight {
  text-shadow: none;
}

body.light-theme .dashboard-card {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .dashboard-card__value {
  text-shadow: none;
}

body.light-theme .dashboard-card-large {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .hvac-section {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .hvac-section--clima {
  border-left-color: #0052CC;
}

body.light-theme .hvac-section--energia {
  border-left-color: #CA8A04;
}

body.light-theme .hvac-section--seguridad {
  border-left-color: #DC2626;
}

body.light-theme .hvac-sensor-card {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hvac-sensor-card:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .hvac-sensor-card__header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hvac-sensor-card__model {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.1);
}

body.light-theme .hvac-sensor-card__status--ok .hvac-sensor-card__status-dot {
  box-shadow: 0 0 8px rgba(22, 163, 74, 0.3), 0 0 20px rgba(22, 163, 74, 0.1);
}

body.light-theme .hvac-sensor-card__status--warn .hvac-sensor-card__status-dot {
  box-shadow: 0 0 8px rgba(202, 138, 4, 0.3), 0 0 20px rgba(202, 138, 4, 0.1);
}

body.light-theme .hvac-sensor-card__status--alarm .hvac-sensor-card__status-dot {
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.4), 0 0 24px rgba(220, 38, 38, 0.15);
}

body.light-theme .hvac-detail-header__badge--ok {
  color: #16A34A;
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.2);
  box-shadow: none;
}

body.light-theme .hvac-detail-header__badge--warn {
  color: #CA8A04;
  background: rgba(202, 138, 4, 0.08);
  border-color: rgba(202, 138, 4, 0.2);
  box-shadow: none;
}

body.light-theme .hvac-detail-header__badge--alarm {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
  box-shadow: none;
}

body.light-theme .hvac-detail-header__pue {
  color: #0052CC;
  background: rgba(0, 82, 204, 0.06);
  border-color: rgba(0, 82, 204, 0.15);
}

body.light-theme .hvac-aq-badge {
  background: rgba(0, 0, 0, 0.03);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hvac-unit-detail {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hvac-unit-detail__header {
  border-bottom-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hvac-unit-detail__badge--ok {
  color: #16A34A;
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.2);
}

body.light-theme .hvac-unit-detail__badge--warn {
  color: #CA8A04;
  background: rgba(202, 138, 4, 0.08);
  border-color: rgba(202, 138, 4, 0.2);
}

body.light-theme .hvac-unit-detail__badge--alarm {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
}

body.light-theme .hvac-unit-detail__item {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hvac-unit-detail__val {
  text-shadow: none;
}

body.light-theme .hvac-phase-table th {
  border-bottom-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .hvac-phase-table td {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

body.light-theme .hvac-phase-table tr:hover td {
  background: rgba(0, 0, 0, 0.03);
}

body.light-theme .hvac-phase-table__highlight {
  text-shadow: none;
}

body.light-theme .hvac-phase-tag--l1 {
  color: #0052CC;
  background: rgba(0, 82, 204, 0.08);
  border-color: rgba(0, 82, 204, 0.2);
}

body.light-theme .hvac-phase-tag--l2 {
  color: #16A34A;
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.2);
}

body.light-theme .hvac-phase-tag--l3 {
  color: #CA8A04;
  background: rgba(202, 138, 4, 0.08);
  border-color: rgba(202, 138, 4, 0.2);
}

body.light-theme .hvac-energy-totals {
  border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hvac-energy-totals__phase-loss--ok {
  color: #16A34A;
  background: rgba(22, 163, 74, 0.06);
  border-color: rgba(22, 163, 74, 0.15);
}

body.light-theme .hvac-energy-totals__phase-loss--alarm {
  color: #DC2626;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.2);
}

body.light-theme .hvac-ct-bar {
  background: rgba(0, 0, 0, 0.04);
  border-color: rgba(0, 0, 0, 0.08);
}

body.light-theme .hvac-ct-bar__fill {
  opacity: 0.7;
  box-shadow: none;
}

body.light-theme .hvac-float-indicator__tank {
  border-color: rgba(0, 0, 0, 0.15);
  background: rgba(0, 0, 0, 0.04);
}

body.light-theme .room-section {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

body.light-theme .room-section--clima {
  border-left-color: #0052CC;
}

body.light-theme .room-section--clima .room-section__title {
  color: #0052CC;
}

body.light-theme .room-section--energia {
  border-left-color: #CA8A04;
}

body.light-theme .room-section--energia .room-section__title {
  color: #CA8A04;
}

body.light-theme .room-section--seguridad {
  border-left-color: #DC2626;
}

body.light-theme .room-section--seguridad .room-section__title {
  color: #DC2626;
}

body.light-theme .room-section--hvac {
  border-left-color: #0052CC;
}

body.light-theme .room-section--hvac .room-section__title {
  color: #0052CC;
}

body.light-theme .room-hvac-card {
  background: rgba(0, 0, 0, 0.02);
}

body.light-theme .room-hvac-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 82, 204, 0.25), transparent);
}

body.light-theme .room-hvac-card:hover {
  border-color: rgba(0, 82, 204, 0.3);
  box-shadow: 0 8px 24px rgba(0, 82, 204, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
}

body.light-theme .room-hvac-card__temp {
  text-shadow: none;
}

body.light-theme .room-hvac-card--ok .room-hvac-card__status-dot {
  box-shadow: 0 0 4px rgba(22, 163, 74, 0.3);
}

body.light-theme .room-hvac-card--warn .room-hvac-card__status-dot {
  box-shadow: 0 0 4px rgba(202, 138, 4, 0.3);
}

body.light-theme .room-hvac-card--alarm .room-hvac-card__status-dot {
  box-shadow: 0 0 6px rgba(220, 38, 38, 0.4);
}

/* ============================================================
   RESPONSIVE ADDENDA — phone breakpoints
   All additions are BELOW the existing 768px rules above.
   ============================================================ */

/* --- 480 px: env cards go single-column, chart heights trim --- */
@media (max-width: 480px) {
  .dc-monitor__env-row {
    grid-template-columns: 1fr;
  }

  .dc-chart-panel__body {
    height: 130px;
  }

  .dc-chart-panel__body--tall {
    height: 170px;
  }

  .dc-kpi-card__gauge canvas {
    width: 110px;
    height: 110px;
  }

  .dc-kpi-card__value {
    font-size: 1.25rem;
  }

  /* Meter readings: keep only phase + voltage + ampere columns */
  .dc-meter-reading {
    grid-template-columns: 36px 1fr 1fr;
    gap: 6px;
  }

  /* Hide PF and reactive columns beyond the first three */
  .dc-meter-reading__val:nth-child(n+4) {
    display: none;
  }

  /* Status items: allow text truncation */
  .dc-status-item__name {
    font-size: 0.6875rem;
  }

  .dc-status-item__val {
    font-size: 0.625rem;
  }

  /* Energy card value */
  .dc-energy-card__value {
    font-size: 1.25rem;
  }

  /* HVAC detail layout tighter */
  .hvac-section {
    padding: 14px;
    margin-bottom: 12px;
  }

  .hvac-kpi-row {
    grid-template-columns: 1fr;
  }

  .hvac-env-grid {
    grid-template-columns: 1fr;
  }

  .hvac-status-grid {
    grid-template-columns: 1fr;
  }

  /* Phase table: make it horizontally scrollable */
  .hvac-sensor-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .hvac-phase-table {
    font-size: 0.75rem;
    min-width: 300px;
  }

  /* HVAC unit detail */
  .hvac-unit-detail__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Room HVAC grid: 1 column */
  .room-hvac-grid {
    grid-template-columns: 1fr;
  }
}

/* --- 360 px: tightest fit --- */
@media (max-width: 360px) {
  .dc-kpi-card__gauge canvas {
    width: 90px;
    height: 90px;
  }

  .dc-kpi-card {
    padding: 12px 8px 10px;
  }

  .dc-kpi-card__value {
    font-size: 1.125rem;
  }

  .dc-chart-panel__body {
    height: 110px;
  }

  .dc-env-card {
    padding: 12px 8px 10px;
  }

  .dc-env-card__value {
    font-size: 1rem;
  }

  .hvac-section {
    padding: 12px;
  }

  .hvac-detail-header__name {
    font-size: 1rem;
  }

  .hvac-unit-detail__grid {
    grid-template-columns: 1fr;
  }

  .room-section {
    padding: 12px;
  }

  .room-detail-header__name {
    font-size: 1.125rem;
  }
}

/* ============================================================
   HVAC Sidebar Navigation
   ============================================================ */
.hvac-page-layout {
  display: flex;
  gap: 0;
  min-height: calc(100vh - 64px);
  align-items: flex-start;
}

.hvac-sidebar {
  width: 160px;
  flex-shrink: 0;
  background: var(--surface-glass, rgba(15, 23, 42, 0.7));
  border-right: 1px solid var(--border-subtle, rgba(0, 240, 255, 0.1));
  padding: 16px 0;
  position: sticky;
  top: 64px;
  max-height: calc(100vh - 64px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.hvac-sidebar__title {
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted, #64748B);
  padding: 0 16px 12px;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 240, 255, 0.08));
  margin-bottom: 8px;
}

.hvac-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.hvac-sidebar__item { margin: 0; }

.hvac-sidebar__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #94A3B8);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.hvac-sidebar__link:hover {
  background: rgba(0, 240, 255, 0.06);
  color: var(--text-primary, #E2E8F0);
}

.hvac-sidebar__item--active .hvac-sidebar__link {
  background: rgba(0, 240, 255, 0.12);
  color: #00F0FF;
  font-weight: 700;
}

.hvac-sidebar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: 0.7;
}

.hvac-detail-layout,
.room-detail-layout {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

body.light-theme .hvac-sidebar {
  background: rgba(248, 250, 252, 0.95);
  border-right-color: rgba(0, 0, 0, 0.08);
}
body.light-theme .hvac-sidebar__link { color: #475569; }
body.light-theme .hvac-sidebar__item--active .hvac-sidebar__link {
  background: rgba(37, 99, 235, 0.1);
  color: #2563EB;
}

/* ============================================================
   HVAC Sidebar — phone responsive (768 px and below)
   Sidebar collapses from vertical rail to horizontal scroll tab bar
   ============================================================ */
@media (max-width: 768px) {
  .hvac-page-layout {
    flex-direction: column;
  }

  .hvac-sidebar {
    width: 100%;
    max-width: 100%;
    position: static;
    top: auto;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--color-border);
    padding: 8px 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;           /* Firefox: hide scrollbar */
  }

  .hvac-sidebar::-webkit-scrollbar {
    display: none;                   /* Chrome/Safari: hide scrollbar */
  }

  /* Title becomes a compact label inside the scroll row */
  .hvac-sidebar__title {
    display: none;
  }

  /* List becomes a single horizontal row */
  .hvac-sidebar__list {
    display: flex;
    flex-direction: row;
    gap: 4px;
    padding: 0 12px;
    white-space: nowrap;
  }

  .hvac-sidebar__item {
    flex-shrink: 0;
  }

  .hvac-sidebar__link {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
  }

  /* Dot becomes tiny beside text */
  .hvac-sidebar__dot {
    width: 5px;
    height: 5px;
  }

  /* Content area regains full width */
  .hvac-detail-layout,
  .room-detail-layout {
    overflow: visible;
  }
}

/* Light-theme overrides for the phone sidebar */
@media (max-width: 768px) {
  body.light-theme .hvac-sidebar {
    border-bottom-color: rgba(0, 0, 0, 0.1);
    border-right: none;
  }
}

/* ============================================================
   C3NTRO Telecom | Data Center Explorer
   map.css — Interactive location map view styles
   ============================================================ */

/* --- MAP VIEW LAYOUT --- */
.view-map {
  max-width: 1400px;
  padding-bottom: 40px;
}

.map-header {
  text-align: center;
  padding: 48px 32px 32px;
  position: relative;
}

.map-header::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.map-header__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-lighter);
  border: 1px solid var(--color-accent-light);
  padding: 8px 18px;
  border-radius: 100px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.map-header__title {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
  animation: slideInUp 500ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 80ms;
}

.map-header__sub {
  font-size: 1rem;
  color: var(--color-muted);
  position: relative;
  z-index: 1;
  animation: fadeIn 500ms ease both;
  animation-delay: 180ms;
}

/* --- MAIN LAYOUT: sidebar + map --- */
.map-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  padding: 0 24px;
  animation: fadeIn 400ms ease both;
  animation-delay: 200ms;
}

/* --- SIDEBAR --- */
.map-sidebar {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
}

.map-sidebar__section {
  margin-bottom: 20px;
}

.map-sidebar__section:last-child {
  margin-bottom: 0;
}

.map-sidebar__country-title {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-2);
  padding-bottom: 10px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-sidebar__flag {
  font-size: 1rem;
  line-height: 1;
}

.map-sidebar__city {
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 14px;
  margin-bottom: 4px;
  padding-left: 4px;
}

.map-sidebar__dc {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.map-sidebar__dc:hover {
  background: var(--color-accent-lighter);
}

/* --- MAP CANVAS --- */
.map-canvas {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-svg {
  display: block;
  width: 100%;
  height: auto;
}

/* --- CITY DOTS --- */
.map-city-pulse {
  animation: mapPulse 2.5s ease-in-out infinite;
}

@keyframes mapPulse {
  0%, 100% {
    r: 10;
    opacity: 0.25;
  }
  50% {
    r: 16;
    opacity: 0;
  }
}

.map-city-group:hover .map-city-dot {
  filter: drop-shadow(0 0 6px #00F0FF);
}

.map-city-group:hover .map-city-label {
  fill: #F8FAFC;
}

/* --- HOVER TOOLTIP --- */
.map-tooltip {
  position: fixed;
  z-index: 1000;
  background: rgba(12, 16, 33, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  pointer-events: none;
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: opacity 150ms ease;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.map-tooltip.visible {
  opacity: 1;
}

.map-tooltip__city {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.map-tooltip__count {
  font-size: 0.75rem;
  color: var(--color-accent);
  margin-bottom: 4px;
}

.map-tooltip__hint {
  font-size: 0.6875rem;
  color: var(--color-muted);
}

/* --- DC POPUP (multi-DC cities) --- */
.map-dc-popup {
  position: fixed;
  z-index: 1001;
  background: rgba(12, 16, 33, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--color-border-focus);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  min-width: 220px;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 150ms ease;
  box-shadow: var(--shadow-lg);
}

.map-dc-popup.visible {
  opacity: 1;
}

.map-dc-popup__title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-2);
  padding: 4px 10px 8px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 4px;
}

.map-dc-popup__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  color: var(--color-text-2);
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.map-dc-popup__item:hover {
  background: var(--color-accent-lighter);
  color: var(--color-accent);
}

.map-dc-popup__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}

/* --- CERTIFICATION BADGES --- */
.map-certs {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 28px 24px 0;
  animation: fadeIn 500ms ease both;
  animation-delay: 400ms;
}

.map-cert-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 6px 14px;
  border-radius: 100px;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.map-cert-badge:hover {
  border-color: var(--color-border-focus);
  color: var(--color-text-2);
}

/* --- LOCATION BANNER (shown in floorplan when arriving from map) --- */
.location-banner {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-left: 4px solid var(--color-accent);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: fadeIn 0.3s ease;
}

.location-banner__name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.location-banner__detail {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .map-layout {
    grid-template-columns: 1fr;
  }

  /* When stacked, show the MAP first, then the sidebar (stats + DC list). */
  .map-canvas {
    order: -1;
  }

  .map-sidebar {
    max-height: none;
  }

  /* Distribute the DC list across columns instead of one long column.
     Country/city headings span the full row; DC cards fill the grid. */
  .map-sidebar__section {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 16px;
    align-items: start;
  }

  .map-sidebar__country-title,
  .map-sidebar__city {
    grid-column: 1 / -1;
  }

  .map-header__title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .map-header {
    padding: 32px 16px 24px;
  }

  .map-certs {
    gap: 8px;
  }
}

/* --- Phone: 600 px --- */
@media (max-width: 600px) {
  .view-map {
    /* Remove rigid max-width so map fills the viewport */
    max-width: 100%;
    padding-bottom: 24px;
  }

  .map-header {
    padding: 24px 12px 16px;
  }

  .map-header__title {
    font-size: 1.375rem;
  }

  .map-layout {
    padding: 0 12px;
    gap: 16px;
  }

  /* Phone: two DC columns (tablet uses three) */
  .map-sidebar__section {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 10px;
  }

  .map-sidebar__dc {
    padding: 6px 8px;
    gap: 8px;
  }

  .map-certs {
    padding: 16px 12px 0;
    gap: 6px;
  }

  .map-cert-badge {
    font-size: 0.625rem;
    padding: 4px 10px;
  }
}

/* --- Phone: 480 px --- */
@media (max-width: 480px) {
  /* Tooltip can overflow on very narrow screens — clamp it */
  .map-tooltip {
    max-width: calc(100vw - 24px);
    white-space: normal;
  }

  /* DC popup: don't let translate(-50%) push it off the left edge */
  .map-dc-popup {
    max-width: calc(100vw - 32px);
    white-space: normal;
  }

  .map-header__sub {
    font-size: 0.875rem;
  }
}

/* --- Phone: 360 px --- */
@media (max-width: 360px) {
  .map-header {
    padding: 16px 10px 12px;
  }

  .map-sidebar__summary-stats {
    flex-wrap: wrap;
  }

  .map-sidebar__summary-stat {
    min-width: 60px;
  }
}

/* --- DC STATUS SUMMARY BANNER --- */
.map-sidebar__summary {
  background: rgba(0, 240, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 16px;
}

.map-sidebar__summary-title {
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 10px;
}

.map-sidebar__summary-stats {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.map-sidebar__summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.map-sidebar__summary-value {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--color-text);
  line-height: 1.2;
}

.map-sidebar__summary-value--green {
  color: #10B981;
}

.map-sidebar__summary-label {
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--color-muted);
  letter-spacing: 0.02em;
  margin-top: 2px;
}

/* --- DC STATUS ENTRY --- */

.map-sidebar__status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  box-shadow: 0 0 6px currentColor;
  transition: box-shadow var(--transition-fast);
}

.map-sidebar__dc:hover .map-sidebar__status-dot {
  box-shadow: 0 0 10px currentColor;
}

.map-sidebar__dc-info {
  flex: 1;
  min-width: 0;
}

.map-sidebar__dc-name {
  font-size: 0.8125rem;
  color: var(--color-text-2);
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.map-sidebar__dc:hover .map-sidebar__dc-name {
  color: var(--color-accent);
}

.map-sidebar__dc-metrics {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.map-sidebar__metric {
  font-family: var(--font-mono, 'DM Mono', monospace);
  font-size: 0.6875rem;
  color: var(--color-muted);
  letter-spacing: 0.01em;
}

.map-sidebar__metric-sep {
  font-size: 0.6875rem;
  color: rgba(148, 163, 184, 0.35);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  .map-city-pulse {
    animation: none;
  }
  .map-dc-popup.visible {
    transition: none;
  }
  .location-banner {
    animation: none;
  }
}

/* --- Light Theme (ISA-101 Industrial Gray) Map Overrides --- */
@media (prefers-color-scheme: light) {
  .view-map {
    background: transparent;
  }

  .map-svg polygon {
    fill: #9EA8B4 !important;
    fill-opacity: 0.5 !important;
    stroke: rgba(43, 108, 176, 0.25) !important;
  }

  .map-city-dot {
    fill: #2B6CB0 !important;
    stroke: #C8CCD0 !important;
  }

  .map-city-pulse {
    stroke: #2B6CB0 !important;
  }

  .map-city-label {
    fill: #333333 !important;
  }

  .map-tooltip {
    background: rgba(212, 216, 220, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1A1A1A !important;
  }

  .map-sidebar {
    background: rgba(200, 204, 210, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
  }

  .map-sidebar__summary {
    background: rgba(188, 192, 198, 0.8);
    border-color: rgba(43, 108, 176, 0.2);
  }

  .map-sidebar__summary-title {
    color: #1A1A1A;
  }

  .map-sidebar__summary-value {
    color: #1A1A1A;
  }

  .map-sidebar__summary-label {
    color: #555555;
  }

  .map-sidebar__country-title {
    color: #1A1A1A;
  }

  .map-sidebar__city {
    color: #333333;
  }

  .map-sidebar__dc-name {
    color: #1A1A1A;
  }

  .map-sidebar__metric {
    color: #555555;
  }

  .map-dc-popup {
    background: rgba(212, 216, 220, 0.95) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
  }

  .map-dc-popup__title {
    color: #1A1A1A !important;
  }

  .map-dc-popup__item {
    color: #333333 !important;
  }
}

body.light-theme .view-map {
  background: transparent;
}

body.light-theme .map-svg polygon {
  fill: #9EA8B4 !important;
  fill-opacity: 0.5 !important;
  stroke: rgba(43, 108, 176, 0.25) !important;
}

body.light-theme .map-city-dot {
  fill: #2B6CB0 !important;
  stroke: #C8CCD0 !important;
}

body.light-theme .map-city-pulse {
  stroke: #2B6CB0 !important;
}

body.light-theme .map-city-label {
  fill: #333333 !important;
}

body.light-theme .map-tooltip {
  background: rgba(212, 216, 220, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
  color: #1A1A1A !important;
}

body.light-theme .map-sidebar {
  background: rgba(200, 204, 210, 0.9);
  border-color: rgba(0, 0, 0, 0.12);
}

body.light-theme .map-sidebar__summary {
  background: rgba(188, 192, 198, 0.8);
  border-color: rgba(43, 108, 176, 0.2);
}

body.light-theme .map-sidebar__summary-title,
body.light-theme .map-sidebar__summary-value,
body.light-theme .map-sidebar__country-title {
  color: #1A1A1A;
}

body.light-theme .map-sidebar__summary-label,
body.light-theme .map-sidebar__metric {
  color: #555555;
}

body.light-theme .map-sidebar__city {
  color: #333333;
}

body.light-theme .map-sidebar__dc-name {
  color: #1A1A1A;
}

body.light-theme .map-dc-popup {
  background: rgba(212, 216, 220, 0.95) !important;
  border-color: rgba(0, 0, 0, 0.15) !important;
}

body.light-theme .map-dc-popup__title {
  color: #1A1A1A !important;
}

body.light-theme .map-dc-popup__item {
  color: #333333 !important;
}

/* ============================================================
   C3NTRO Telecom | Data Center Explorer
   transitions.css — Page transitions, micro-animations,
                     keyframes, hover effects
   Premium redesign with enhanced motion
   ============================================================ */

/* ========================
   KEYFRAMES
   ======================== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-20px);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulseSubtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes canvasReveal {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 82, 204, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(0, 82, 204, 0.1);
  }
}

/* ========================
   PAGE TRANSITIONS
   ======================== */
.page-enter {
  animation: fadeIn var(--transition-page) ease both;
}

.page-leave {
  animation: fadeOut var(--transition-page) ease both;
}

.page-enter-right {
  animation: slideInRight var(--transition-page) ease both;
}

.page-leave-left {
  animation: slideOutLeft var(--transition-page) ease both;
}

.page-enter-left {
  animation: slideInLeft var(--transition-page) ease both;
}

.page-leave-right {
  animation: slideOutRight var(--transition-page) ease both;
}

/* ========================
   CONFIG CARD TRANSITIONS
   ======================== */
.config-card {
  transition:
    transform var(--transition-base),
    box-shadow var(--transition-base),
    border-color var(--transition-base);
}

.config-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.config-card__arrow span {
  transition: transform var(--transition-base), background var(--transition-base);
}

.config-card:hover .config-card__arrow span {
  transform: translateX(3px);
}

/* Staggered entrance for cards */
.config-card:nth-child(1) {
  animation: slideInUp 450ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 80ms;
}

.config-card:nth-child(2) {
  animation: slideInUp 450ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 160ms;
}

.config-card:nth-child(3) {
  animation: slideInUp 450ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 240ms;
}

/* ========================
   STAT CARD ENTRANCE
   ======================== */
.stat-card {
  animation: scaleIn 250ms ease both;
}

.stat-card:nth-child(1) { animation-delay: 30ms; }
.stat-card:nth-child(2) { animation-delay: 60ms; }
.stat-card:nth-child(3) { animation-delay: 90ms; }
.stat-card:nth-child(4) { animation-delay: 120ms; }

/* ========================
   RACK HOVER IN SVG
   ======================== */
.rack-rect {
  transition:
    filter var(--transition-fast),
    stroke-width var(--transition-fast),
    transform var(--transition-fast);
  transform-origin: center center;
}

.rack-rect:hover {
  filter: brightness(0.92);
  stroke-width: 2.5;
}

/* ========================
   RACK UNIT HOVER
   ======================== */
.rack-unit {
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.rack-unit:not(.empty):hover {
  filter: brightness(1.15);
  cursor: pointer;
}

/* ========================
   TAB TRANSITION
   ======================== */
.config-tab {
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast);
}

/* ========================
   STATUS BADGE ENTRANCE
   ======================== */
.status-badge {
  animation: fadeIn 200ms ease both;
}

/* ========================
   TOOLTIP TRANSITION
   ======================== */
.rack-tooltip {
  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

/* ========================
   BREADCRUMB LINK HOVER
   ======================== */
.breadcrumb__link {
  transition: color var(--transition-fast);
  position: relative;
}

.breadcrumb__link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--transition-base);
}

.breadcrumb__link:hover::after {
  width: 100%;
}

/* ========================
   BUTTON HOVER EFFECTS
   ======================== */
.rack-nav__btn {
  transition:
    background var(--transition-fast),
    border-color var(--transition-fast),
    color var(--transition-fast),
    transform var(--transition-fast);
}

.rack-nav__btn:active:not(:disabled) {
  transform: scale(0.95);
}

/* ========================
   ALERT ENTRANCE
   ======================== */
.alert-item {
  animation: slideInUp 250ms ease both;
}

.alert-item:nth-child(1) { animation-delay: 40ms; }
.alert-item:nth-child(2) { animation-delay: 80ms; }
.alert-item:nth-child(3) { animation-delay: 120ms; }

/* ========================
   OCCUPANCY BAR FILL
   ======================== */
.occupancy-bar__fill {
  transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ========================
   GAUGE FILL ANIMATION
   ======================== */
.temp-gauge-svg .gauge-fill {
  transition:
    stroke-dashoffset 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    stroke 0.4s ease;
}

/* ========================
   LOADING PULSE
   ======================== */
.loading-state {
  animation: fadeIn 300ms ease both;
}

/* ========================
   THREE.JS CANVAS ENTRANCE
   ======================== */
.three-canvas-container {
  animation: canvasReveal 500ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* ========================
   FLOORPLAN ENTRANCE
   ======================== */
.floorplan-wrapper {
  animation: fadeIn 300ms ease both;
}

/* ========================
   VIEW CONTROLS ENTRANCE
   ======================== */
.view-controls {
  animation: floatIn 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 200ms;
}

.view-btn {
  transition:
    background var(--transition-fast),
    color var(--transition-fast),
    box-shadow var(--transition-fast),
    transform var(--transition-fast);
}

.view-btn:active {
  transform: scale(0.97);
}

/* ========================
   FLOATING PANELS ENTRANCE
   ======================== */
.three-legend {
  animation: floatIn 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 300ms;
}

.three-hint {
  animation: floatIn 400ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 400ms;
}

/* ========================
   HERO ENTRANCE
   ======================== */
.home-hero__label {
  animation: fadeIn 500ms ease both;
  animation-delay: 0ms;
}

.home-hero__title {
  animation: slideInUp 500ms cubic-bezier(0.4, 0, 0.2, 1) both;
  animation-delay: 80ms;
}

.home-hero__subtitle {
  animation: fadeIn 500ms ease both;
  animation-delay: 180ms;
}

/* ========================
   FEATURES STRIP ENTRANCE
   ======================== */
.home-feature {
  animation: fadeIn 400ms ease both;
}

.home-feature:nth-child(1) { animation-delay: 200ms; }
.home-feature:nth-child(2) { animation-delay: 260ms; }
.home-feature:nth-child(3) { animation-delay: 320ms; }

/* ========================
   REDUCED MOTION
   ======================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .config-card:hover {
    transform: none;
  }

  .config-card:hover .config-card__arrow span {
    transform: none;
  }

  .rack-nav__btn:active:not(:disabled) {
    transform: none;
  }

  .view-btn:active {
    transform: none;
  }

  .page-enter,
  .page-leave {
    animation: none;
  }
}

