*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:          #1a8f7a;
  --teal-light:    #22b09a;
  --teal-glow:     rgba(26,143,122,0.18);
  --teal-dim:      rgba(26,143,122,0.08);
  --bg-dark:       #1a1a1a;
  --bg-sidebar:    #111111;
  --bg-content:    #c8c8c8;
  --bg-panel:      #080707;
  --bg-card:       #d8d8d8;
  --bg-input:      #cecece;
  --text-main:     #f0f0f0;
  --text-muted:    #888;
  --text-dark:     #222;
  --text-label:    #555;
  --border:        rgba(255,255,255,0.06);
  --border-panel:  #bbb;
  --accent-red:    #c0392b;
  --accent-yellow: #e6a817;
  --sidebar-w:     160px;
  --nav-w:         42px;
}

html, body { height: 100%; overflow: hidden; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-main);
  display: flex;
  flex-direction: column;
}

/* ── PAGE HEADER GLOBAL STYLES ── */
.page-header {
  background: #d0d0d0;
  border-bottom: 1px solid var(--border-panel);
  padding: 14px 24px 10px;
  flex-shrink: 0;
}
.page-header h1 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  letter-spacing: 0.5px;
}
.breadcrumb {
  font-size: 11px;
  color: var(--text-label);
  margin-top: 2px;
}
.breadcrumb span { color: var(--teal); }

/* ── NAVBAR ── */
.navbar {
  height: 44px;
  background: #0d0d0d;
  border-bottom: 1px solid #2a2a2a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  flex-shrink: 0;
  z-index: 100;
}
.navbar-logo { display: flex; align-items: center; gap: 8px; }
.logo-icon {
  width: 30px; height: 30px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.logo-icon::before {
  content: '';
  width: 8px; height: 8px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  position: absolute;
}
.logo-icon::after {
  content: '';
  width: 22px; height: 2px;
  background: var(--teal);
  position: absolute;
  transform: rotate(-45deg);
}
.logo-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: 1px; color: #fff;
}
.logo-name span { color: var(--teal); }
.navbar-login { display: flex; align-items: center; gap: 6px; }
.navbar-login input {
  background: #1e1e1e; border: 1px solid #333; color: #ccc;
  padding: 4px 8px; font-size: 12px; border-radius: 3px; width: 110px; outline: none;
}
.login-btn {
  background: var(--teal); color: #fff; border: none;
  padding: 5px 14px; font-size: 12px; font-weight: 600;
  border-radius: 3px; cursor: pointer;
  font-family: 'Rajdhani', sans-serif; letter-spacing: 0.5px;
}
.login-btn:hover { background: var(--teal-light); }

/* ── MAIN ── */
.main { display: flex; flex: 1; overflow: hidden; }

/* ── CONTENT ── */
.content {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; background: var(--bg-content);
}

/* ── SIDEBAR ── */
.sidebar {
  width: var(--nav-w);
  background: var(--bg-sidebar);
  border-right: 1px solid #2a2a2a;
  display: flex; flex-direction: column;
  transition: width 0.22s ease;
  overflow: hidden; flex-shrink: 0; z-index: 50;
}
.sidebar:hover { width: var(--sidebar-w); }

.nav-section { display: flex; flex-direction: column; height: 100%; }
.nav-upper { flex: 1; padding-top: 8px; }
.nav-lower { padding-bottom: 8px; border-top: 1px solid #222; }

.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; color: #999; text-decoration: none;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}
.nav-link:hover { background: rgba(255,255,255,0.04); color: #ddd; }
.nav-link.active {
  background: rgba(26,143,122,0.12);
  color: var(--teal-light); border-left-color: var(--teal);
}
.nav-icon {
  width: 22px; height: 22px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.nav-icon svg { width: 18px; height: 18px; }
.nav-text { 
  opacity: 0; 
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s; 
  font-size: 12px; 
}
.sidebar:hover .nav-text { 
  opacity: 1; 
  visibility: visible;
  transition: opacity 0.2s ease 0.05s, visibility 0s linear 0s;
}

.sub-nav { 
  max-height: 0;
  overflow: hidden;
  transform: translateY(-10px);
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}
.sub-nav.expanded { 
  max-height: 500px;
  transform: translateY(0);
  opacity: 1;
}
.sub-nav-link, .zone-sub-link {
  display: block; padding: 7px 12px 7px 36px;
  color: #777; font-size: 11px; text-decoration: none;
  white-space: nowrap; 
  transition: color 0.15s;
  opacity: 0;
  visibility: hidden;
}
.sidebar:hover .sub-nav-link, 
.sidebar:hover .zone-sub-link { 
  opacity: 1; 
  visibility: visible;
}
.sub-nav-link:hover, .zone-sub-link:hover { color: #ccc; }
.zone-sub-link.active { color: var(--teal-light); }
.zone-sub-nav { 
  max-height: 0;
  overflow: hidden;
  transform: translateY(-10px);
  opacity: 0;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.3s ease;
}
.zone-sub-nav.expanded { 
  max-height: 300px;
  transform: translateY(0);
  opacity: 1;
}
.zone-sub-link { padding-left: 48px; }
.filter-teal-light {
filter: brightness(0) saturate(100%) invert(54%) sepia(84%) saturate(407%) hue-rotate(121deg) brightness(91%) contrast(84%);
}
.filter-999 {
filter: brightness(0) saturate(100%) invert(68%) sepia(3%) saturate(0%) hue-rotate(5deg) brightness(91%) contrast(87%);}

/* ── WIDGET BAR ── */
.widget-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  background: #0a0a0a;
  border-bottom: 1px solid #1e1e1e;
  padding: 4px 10px;
  flex-shrink: 0;
  min-height: 30px;
}

.nb-widget {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 4px;
  padding: 3px 9px;
  font-size: 11px;
  color: #aaa;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.nb-w-icon { font-style: normal; font-size: 12px; line-height: 1; }
.nb-w-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  margin-right: 3px;
}
.nb-w-val { color: #ccc; font-weight: 500; }
.nb-w-big { font-size: 14px; font-weight: 700; color: var(--teal-light); }

/* Status pills */
.nb-w-pill {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
}
.nb-pill--up    { background: rgba(26,143,122,0.15); color: var(--teal-light); }
.nb-pill--maint { background: rgba(230,168,23,0.15);  color: var(--accent-yellow); }
.nb-pill--down  { background: rgba(192,57,43,0.15);   color: var(--accent-red); }

/* Quick link */
.nb-w-link {
  color: #aaa;
  text-decoration: none;
  font-size: 11px;
}
.nb-w-link:hover { color: var(--teal-light); }