:root {
  --bg-base: #F4F5F8;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #F1F3F7;
  --border: #E2E5EC;
  --border-soft: #EBEDF2;

  --text-primary: #171B24;
  --text-secondary: #4B5468;
  --text-muted: #8992A6;

  --accent: #2F6FED;
  --accent-soft: rgba(47, 111, 237, 0.09);
  --signature: #0EA5A0;
  --signature-soft: rgba(14, 165, 160, 0.09);

  --ok: #16A34A;
  --ok-soft: rgba(22, 163, 74, 0.09);
  --warn: #D97706;
  --warn-soft: rgba(217, 119, 6, 0.09);
  --critical: #DC2626;
  --critical-soft: rgba(220, 38, 38, 0.09);

  --shadow-soft: 0 1px 2px rgba(20, 24, 35, 0.04), 0 8px 24px rgba(20, 24, 35, 0.06);

  --font-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Consolas', monospace;

  --navbar-height: 108px;
  --radius: 8px;
  --radius-sm: 5px;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg-base: #0A0D13;
  --bg-elevated: #0F131B;
  --surface: #141924;
  --surface-hover: #1A2130;
  --border: #232A3A;
  --border-soft: #1A202C;

  --text-primary: #E7EAF0;
  --text-secondary: #A3ACC2;
  --text-muted: #6B7387;

  --accent: #4C8DFF;
  --accent-soft: rgba(76, 141, 255, 0.12);
  --signature: #35D0C1;
  --signature-soft: rgba(53, 208, 193, 0.12);

  --ok: #34D399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #F5B72F;
  --warn-soft: rgba(245, 183, 47, 0.12);
  --critical: #FB4B4B;
  --critical-soft: rgba(251, 75, 75, 0.12);

  --shadow-soft: 0 1px 2px rgba(0,0,0,0.3), 0 8px 24px rgba(0,0,0,0.35);

  color-scheme: dark;
}

html, body { background: var(--bg-base); }
body { transition: background-color .15s ease, color .15s ease; }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.rack-ticks {
  background-image: repeating-linear-gradient(
    to bottom,
    var(--border) 0px,
    var(--border) 1px,
    transparent 1px,
    transparent 8px
  );
  background-position: left top;
  background-size: 3px 8px;
  background-repeat: repeat-y;
}

.rack-ticks-horizontal {
  height: 6px;
  width: 100%;
  background-image: repeating-linear-gradient(
    to right,
    var(--border-soft) 0px,
    var(--border-soft) 2px,
    transparent 2px,
    transparent 10px
  );
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.login-screen {
  --bg-base: #0A0D13;
  --bg-elevated: #0F131B;
  --surface: #141924;
  --surface-hover: #1A2130;
  --border: #232A3A;
  --border-soft: #1A202C;
  --text-primary: #E7EAF0;
  --text-secondary: #A3ACC2;
  --text-muted: #6B7387;
  --accent: #4C8DFF;
  --accent-soft: rgba(76, 141, 255, 0.12);
  --signature: #35D0C1;
  --signature-soft: rgba(53, 208, 193, 0.12);
  --ok: #34D399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #F5B72F;
  --warn-soft: rgba(245, 183, 47, 0.12);
  --critical: #FB4B4B;
  --critical-soft: rgba(251, 75, 75, 0.12);
  color-scheme: dark;

  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(76,141,255,0.06), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(53,208,193,0.05), transparent 40%),
    var(--bg-base);
}

.login-rackframe {
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 64px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border-soft);
}
.login-rackframe.right { left: auto; right: 0; border-right: none; border-left: 1px solid var(--border-soft); }

.login-rackframe .u-slot {
  height: 22px;
  margin: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 2px;
  position: relative;
}
.login-rackframe .u-slot::before,
.login-rackframe .u-slot::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 3px; height: 3px;
  background: var(--border);
  border-radius: 50%;
  transform: translateY(-50%);
}
.login-rackframe .u-slot::before { left: 4px; }
.login-rackframe .u-slot::after { right: 4px; }

.login-card {
  width: 380px;
  max-width: calc(100vw - 48px);
  background: #FFFFFF;
  border-radius: 16px;
  padding: 38px 34px 30px;
  z-index: 2;
  box-shadow: 0 24px 60px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.18);
  /* Bu kart daima acik/light tema ile render edilir - gunduz/gece toggle'indan bagimsiz,
     asagidaki degisken override'lari sayesinde ic bilesenler (.field/.btn/.alert vb.)
     otomatik olarak dogru renklerle gorunur. */
  --bg-base: #F4F5F8;
  --bg-elevated: #FFFFFF;
  --surface: #FFFFFF;
  --surface-hover: #F1F3F7;
  --border: #E2E5EC;
  --border-soft: #EBEDF2;
  --text-primary: #171B24;
  --text-secondary: #4B5468;
  --text-muted: #8992A6;
  --accent: #2F6FED;
  --accent-soft: rgba(47, 111, 237, 0.09);
  --signature: #0EA5A0;
  --signature-soft: rgba(14, 165, 160, 0.09);
  --ok: #16A34A;
  --ok-soft: rgba(22, 163, 74, 0.09);
  --warn: #D97706;
  --warn-soft: rgba(217, 119, 6, 0.09);
  --critical: #DC2626;
  --critical-soft: rgba(220, 38, 38, 0.09);
  color: var(--text-primary);
}

.login-sub {
  color: var(--text-muted);
  font-size: 13px;
  margin: 0 0 28px;
}

/* ===== Split-screen login shell (login.php) ===== */
.login-shell {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(400px, 1fr);
  background:
    radial-gradient(circle at 12% 8%, rgba(76,141,255,0.30), transparent 40%),
    radial-gradient(circle at 80% 14%, rgba(53,208,193,0.18), transparent 38%),
    radial-gradient(circle at 88% 90%, rgba(76,141,255,0.22), transparent 44%),
    radial-gradient(circle at 10% 94%, rgba(53,208,193,0.17), transparent 42%),
    linear-gradient(160deg, #1E273C 0%, #161D2E 100%);
}
.login-shell-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 45%, black, transparent 80%);
  mask-image: radial-gradient(circle at 50% 45%, black, transparent 80%);
  pointer-events: none;
}

.login-brand-panel {
  position: relative;
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-brand-orb {
  position: absolute;
  width: 560px; height: 560px;
  right: -180px; top: 14%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(76,141,255,0.16), rgba(53,208,193,0.05) 55%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}
.login-brand-watermark {
  position: absolute;
  right: -50px; bottom: -70px;
  width: 420px; height: 420px;
  color: rgba(255,255,255,0.04);
  pointer-events: none;
}

.login-brand-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; }
.login-brand-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: #fff; line-height: 1.15; }
.login-brand-tagline { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: #7D879B; margin-top: 3px; }

.login-brand-mid { position: relative; z-index: 1; max-width: 620px; }
.login-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6FD7CD; margin-bottom: 18px; }
.login-headline { font-family: var(--font-display); font-size: 38px; font-weight: 700; line-height: 1.18; color: #fff; margin: 0 0 20px; }
.login-headline-accent { width: 56px; height: 4px; border-radius: 2px; background: linear-gradient(90deg, #4C8DFF, #35D0C1); margin-bottom: 20px; }
.login-lede { font-size: 15px; line-height: 1.65; color: #A3ACC2; margin: 0; }

.login-features { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.login-feature { display: flex; flex-direction: column; gap: 10px; }
.login-feature .icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  color: #4C8DFF;
}
.login-feature span { font-size: 12px; color: #C7CCDA; line-height: 1.35; font-weight: 500; }

.login-form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

.login-lang-switch {
  position: absolute;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
}
.login-lang-switch a { color: var(--text-muted); text-decoration: none; }
.login-lang-switch a:hover { color: var(--text-primary); }
.login-lang-switch a.active { color: var(--accent); }
.login-lang-switch span { color: var(--border); }

.login-card-logo { display: flex; justify-content: center; margin-bottom: 18px; }
.login-card-logo .mark {
  width: 56px; height: 56px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2F6FED, #0EA5A0);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.login-card-logo img.brand-logo-img { height: 48px; max-width: 220px; object-fit: contain; }

.login-card-title { font-family: var(--font-display); font-size: 21px; font-weight: 700; text-align: center; margin: 0 0 6px; color: var(--text-primary); }
.login-card-sub { font-size: 13px; color: var(--text-muted); text-align: center; margin: 0 0 24px; }

.login-field-icon { position: relative; }
.login-field-icon .icon-left {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}
.login-field-icon input { padding-left: 40px !important; }
.login-field-icon input.has-toggle { padding-right: 40px !important; }
.login-field-icon .icon-toggle {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  padding: 7px;
  border-radius: var(--radius-sm);
}
.login-field-icon .icon-toggle:hover { color: var(--text-primary); background: var(--surface-hover); }

.login-turnstile-box { margin-bottom: 18px; min-height: 65px; display: flex; align-items: center; }

.login-submit-btn {
  background: linear-gradient(135deg, #2F6FED, #4C8DFF) !important;
  box-shadow: 0 10px 24px rgba(47,111,237,0.28);
}
.login-submit-btn:hover { filter: brightness(1.06); }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.login-divider::before, .login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-google-btn {
  width: 100%;
  background: #FFFFFF;
  color: #3C4043;
  border: 1px solid var(--border);
  gap: 10px;
}
.login-google-btn:hover { background: #F8F9FA; filter: none; }

.login-page-footer {
  margin-top: 24px;
  font-size: 12px;
  color: #6B7387;
  text-align: center;
}
.login-powered-by {
  margin-top: 10px;
  font-size: 10.5px;
  color: #4B5468;
  letter-spacing: .02em;
}

/* ===== Maksimum teknoloji efektleri (login.php) ===== */

@keyframes gridPan {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 44px 44px, 44px 44px; }
}
.login-shell-grid { animation: gridPan 6s linear infinite; }

.login-scanline {
  position: absolute;
  left: 0; right: 0;
  height: 140px;
  top: -140px;
  background: linear-gradient(180deg, transparent, rgba(108, 214, 255, 0.07) 45%, rgba(108, 214, 255, 0.13) 50%, rgba(108, 214, 255, 0.07) 55%, transparent);
  pointer-events: none;
  mix-blend-mode: screen;
  animation: scanSweep 7s linear infinite;
  z-index: 1;
}
@keyframes scanSweep {
  0% { top: -140px; }
  100% { top: 100%; }
}

.login-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.login-particle {
  position: absolute;
  bottom: -12px;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #6FD7CD;
  box-shadow: 0 0 6px 1px rgba(111, 215, 205, 0.75);
  opacity: 0;
  animation-name: particleRise;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
}
@keyframes particleRise {
  0% { transform: translateY(0) scale(0.8); opacity: 0; }
  8% { opacity: .8; }
  85% { opacity: .5; }
  100% { transform: translateY(-100vh) scale(1.1); opacity: 0; }
}

.login-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .09em;
  color: #6FD7CD;
  margin-bottom: 16px;
}
.login-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #35D0C1;
  box-shadow: 0 0 8px 2px rgba(53, 208, 193, 0.65);
  animation: statusPulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes statusPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .45; transform: scale(0.8); }
}

.login-eyebrow::after {
  content: '_';
  margin-left: 2px;
  animation: eyebrowBlink 1s step-end infinite;
}
@keyframes eyebrowBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.login-headline { text-shadow: 0 0 30px rgba(76, 141, 255, 0.35); }

.login-feature .icon { transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
.login-feature:hover .icon {
  border-color: rgba(76, 141, 255, 0.5);
  box-shadow: 0 0 16px rgba(76, 141, 255, 0.3);
  transform: translateY(-2px);
}

.tech-login-card-frame {
  position: relative;
  width: 380px;
  max-width: calc(100vw - 48px);
  z-index: 2;
  border-radius: 20px;
  padding: 1.5px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0,0,0,0.55);
}
.tech-login-card-frame::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 250%;
  padding-top: 250%;
  background: conic-gradient(from 0deg, #4C8DFF, #35D0C1, #6FD7CD, #4C8DFF);
  animation: spinBorder 6s linear infinite;
  z-index: 0;
}
@keyframes spinBorder {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.tech-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 18.5px;
  padding: 38px 34px 30px;
  background: rgba(13, 17, 26, 0.86);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  overflow: hidden;

  --bg-base: #0A0D13;
  --bg-elevated: #141924;
  --surface: #141924;
  --surface-hover: #1A2130;
  --border: #253047;
  --border-soft: #1A202C;
  --text-primary: #E7EAF0;
  --text-secondary: #A3ACC2;
  --text-muted: #6B7387;
  --accent: #4C8DFF;
  --accent-soft: rgba(76, 141, 255, 0.14);
  --signature: #35D0C1;
  --signature-soft: rgba(53, 208, 193, 0.14);
  --ok: #34D399;
  --ok-soft: rgba(52, 211, 153, 0.14);
  --warn: #F5B72F;
  --warn-soft: rgba(245, 183, 47, 0.14);
  --critical: #FB4B4B;
  --critical-soft: rgba(251, 75, 75, 0.14);
  color: var(--text-primary);
}

.tech-corner {
  position: absolute;
  width: 18px; height: 18px;
  border-color: rgba(111, 215, 205, 0.65);
  pointer-events: none;
}
.tech-corner.tl { top: 10px; left: 10px; border-top: 2px solid; border-left: 2px solid; border-top-left-radius: 6px; }
.tech-corner.tr { top: 10px; right: 10px; border-top: 2px solid; border-right: 2px solid; border-top-right-radius: 6px; }
.tech-corner.bl { bottom: 10px; left: 10px; border-bottom: 2px solid; border-left: 2px solid; border-bottom-left-radius: 6px; }
.tech-corner.br { bottom: 10px; right: 10px; border-bottom: 2px solid; border-right: 2px solid; border-bottom-right-radius: 6px; }

.tech-login-card .login-card-logo .mark { box-shadow: 0 0 22px rgba(76, 141, 255, 0.45); }
.tech-login-card .login-card-title { color: #fff; }

.tech-login-card .field input:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: #6FD7CD;
  box-shadow: 0 0 0 3px rgba(111, 215, 205, 0.16);
}

.tech-login-card .login-submit-btn {
  position: relative;
  overflow: hidden;
}
.tech-login-card .login-submit-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
}
.tech-login-card .login-submit-btn:hover::after { left: 130%; }

.tech-login-card .login-divider { color: var(--text-muted); }
.tech-login-card .login-divider::before, .tech-login-card .login-divider::after { background: var(--border); }

@media (prefers-reduced-motion: reduce) {
  .login-shell-grid, .login-scanline, .login-particle, .login-status-dot,
  .login-eyebrow::after, .tech-login-card-frame { animation: none !important; }
}

@media (max-width: 860px) {
  .login-scanline, .login-particles { display: none; }
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}
.field input:not([type="checkbox"]):not([type="radio"]), .field textarea, .field select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color .15s ease;
}
.field textarea { resize: vertical; }
.field select { cursor: pointer; }
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:not([type="checkbox"]):not([type="radio"]):focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  outline: none;
}
.field-hint { font-size: 11.5px; color: var(--text-muted); margin-top: 6px; }
.field input.mono, .field textarea.mono { font-family: var(--font-mono); font-size: 12.5px; }

.secret-field-lock { position: relative; }
.secret-field-lock input { padding-right: 86px !important; }
.secret-field-lock input[readonly] {
  background: var(--surface-hover);
  color: var(--text-muted);
  cursor: default;
}
.secret-field-unlock-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
}
.secret-field-unlock-btn:hover { color: var(--text-primary); border-color: var(--accent); }

.field-checkbox {
  display: flex;
  align-items: center;
  gap: 9px;
}
.field-checkbox input[type="checkbox"], .field-checkbox input[type="radio"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  accent-color: var(--accent);
  cursor: pointer;
}
.field-checkbox label {
  margin: 0;
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
}
.code-sample {
  margin: 8px 0 0;
  padding: 10px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre;
}

.logo-current-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-base);
}
.logo-preview { height: 32px; max-width: 160px; object-fit: contain; }
.logo-current-label { font-size: 12px; color: var(--text-muted); }
.logo-remove-check { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--critical); margin-left: auto; cursor: pointer; white-space: nowrap; }

.current-ip-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.current-ip-label { font-size: 11.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.current-ip-value { font-size: 18px; font-weight: 600; color: var(--text-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: filter .15s ease, transform .1s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none !important; transform: none !important; }
.btn-primary {
  background: var(--accent);
  color: #FFFFFF;
  width: 100%;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--text-primary); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; }

.alert {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 18px;
  border: 1px solid transparent;
}
.alert-error {
  background: var(--critical-soft);
  border-color: var(--critical);
  color: var(--critical);
}
.alert-success {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ok);
}
.alert-info {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

#toastContainer {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 400;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}
.toast-item {
  margin-bottom: 0;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity .18s ease, transform .18s ease;
  cursor: pointer;
}
.toast-item.show {
  opacity: 1;
  transform: translateX(0);
}

.login-footer-note {
  margin-top: 22px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.access-denied-card { text-align: center; }
.access-denied-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--critical-soft);
  color: var(--critical);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.access-denied-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 8px;
}
.access-denied-card .login-sub { margin-bottom: 20px; }
.access-denied-ip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.access-denied-ip .mono { color: var(--text-primary); font-family: var(--font-mono); font-weight: 600; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.navbar-top {
  --bg-base: #1a1d23;
  --bg-elevated: #1a1d23;
  --surface: #22252c;
  --surface-hover: #282c34;
  --border: #3a3f4a;
  --border-soft: #2b2f38;
  --text-primary: #e9ecf2;
  --text-secondary: #aab2c5;
  --text-muted: #7d879b;
  --accent: #5b9bff;
  --accent-soft: rgba(91, 155, 255, 0.18);
  --signature: #35d0c1;
  --signature-soft: rgba(53, 208, 193, 0.18);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.18);
  --warn: #f5b72f;
  --warn-soft: rgba(245, 183, 47, 0.18);
  --critical: #fb4b4b;
  --critical-soft: rgba(251, 75, 75, 0.18);

  height: 56px;
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 110;
}
.navbar-top-inner {
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}

.navbar-sub {
  height: 52px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 56px;
  z-index: 100;
  box-shadow: var(--shadow-soft);
}
.navbar-sub-inner {
  height: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
}
.navbar-sub-right { display: flex; align-items: center; gap: 14px; margin-left: auto; flex-shrink: 0; height: 100%; }
.nav-settings-link { flex-shrink: 0; }

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
}
.navbar-brand .mark {
  width: 30px; height: 30px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--signature));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  color: #FFFFFF;
  flex-shrink: 0;
}
.navbar-brand .name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.navbar-brand .brand-logo-img {
  height: 30px;
  max-width: 140px;
  object-fit: contain;
  flex-shrink: 0;
}

.navbar-hamburger {
  display: none;
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
}
.navbar-hamburger:hover { background: var(--surface-hover); }
.navbar-hamburger .hamburger-icon-close { display: none; }
.navbar-hamburger[aria-expanded="true"] .hamburger-icon-open { display: none; }
.navbar-hamburger[aria-expanded="true"] .hamburger-icon-close { display: block; }

.navbar-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  height: 100%;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding: 0 12px;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color .12s ease, border-color .12s ease;
  position: relative;
}
.nav-link .icon { display: flex; align-items: center; opacity: .85; flex-shrink: 0; }
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.nav-link.active .icon { opacity: 1; }
.nav-link .count-pill {
  background: var(--critical);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 20px;
  font-weight: 700;
}

.navbar-search {
  position: relative;
  flex: 1;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 7px 14px;
  color: var(--text-muted);
  font-size: 12.5px;
}
.search-results-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 420px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  z-index: 300;
  text-align: left;
}
.search-results-panel.open { display: block; }
.search-result-group-label {
  padding: 10px 14px 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: var(--text-primary);
  cursor: pointer;
}
.search-result-item:hover, .search-result-item.active { background: var(--surface-hover); }
.search-result-item .search-result-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-result-item .search-result-content { flex: 1; min-width: 0; }
.search-result-item .search-result-title {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-item .search-result-title mark { background: var(--accent-soft); color: var(--accent); border-radius: 2px; }
.search-result-item .search-result-meta {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-result-status, .search-result-empty, .search-result-hint {
  padding: 18px 14px;
  font-size: 12.5px;
  color: var(--text-muted);
  text-align: center;
}
.navbar-search input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12.5px;
}
.navbar-search input::placeholder { color: var(--text-muted); }
.navbar-search kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}

.icon-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text-primary); }
.icon-btn .dot {
  position: absolute;
  top: 6px; right: 6px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--critical);
  border: 2px solid var(--bg-elevated);
}
.icon-btn .theme-icon-dark { display: none; }
html[data-theme="dark"] .icon-btn .theme-icon-light { display: none; }
html[data-theme="dark"] .icon-btn .theme-icon-dark { display: flex; }

.navbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  border: 1px solid transparent;
}
.navbar-user:hover { background: var(--surface-hover); border-color: var(--border); }
.navbar-user .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-soft), var(--signature-soft));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.navbar-user .u-info { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.3; }
.navbar-user .u-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.navbar-user .u-role {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}
.navbar-user { border: 1px solid transparent; background: transparent; font-family: var(--font-body); }

.dropdown-wrap { position: relative; }
.dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  z-index: 150;
  overflow: hidden;
}
.dropdown-panel.open { display: block; }
.dropdown-panel-left { left: 0; right: auto; }

.nav-group-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.nav-group-toggle .chevron { opacity: .6; transition: transform .15s ease; margin-left: -2px; }
.nav-group-toggle[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.dropdown-menu-item .icon { display: flex; align-items: center; opacity: .75; flex-shrink: 0; }
.dropdown-menu-item.active { color: var(--accent); background: var(--accent-soft); }
.dropdown-menu-item.active .icon { opacity: 1; }
.dropdown-header {
  padding: 10px 14px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-soft);
}
.dropdown-empty { padding: 18px 14px; font-size: 12.5px; color: var(--text-muted); text-align: center; }
.dropdown-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  max-width: 320px;
}
.dropdown-alert-item:last-child { border-bottom: none; }
.dropdown-alert-item:hover { background: var(--surface-hover); }
.dropdown-alert-item .sev-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.dropdown-alert-item .sev-dot.critical { background: var(--critical); }
.dropdown-alert-item .sev-dot.warning { background: var(--warn); }
.dropdown-alert-item .sev-dot.info { background: var(--accent); }
.dropdown-alert-item .content { flex: 1; min-width: 0; }
.dropdown-alert-item .title {
  font-size: 12.5px;
  color: var(--text-primary);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-alert-item .meta { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }
.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}
.dropdown-menu-item:hover { background: var(--surface-hover); }

button.dropdown-menu-item {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.page-header-actions .dropdown-wrap .btn .chevron { opacity: .7; }

.mobile-drawer {
  display: none;
  flex-direction: column;
  position: fixed;
  inset: var(--navbar-height) 0 0 0;
  background: var(--bg-base);
  z-index: 99;
}

@media (min-width: 861px) {
  .mobile-drawer { display: none !important; }
}
.mobile-drawer.open { display: flex; }
body.drawer-lock { overflow: hidden; }
.mobile-drawer-links {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 10px 14px 24px;
}
.mobile-drawer .nav-link {
  height: auto;
  padding: 12px 14px;
  font-size: 14.5px;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
}
.mobile-drawer .nav-link .icon svg { width: 19px; height: 19px; }
.mobile-drawer-group-label {
  padding: 14px 14px 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}
.mobile-drawer .nav-link-indent { padding-left: 28px; }

.mobile-drawer-pwa {
  display: none;
  flex-direction: column;
  gap: 12px;
  flex-shrink: 0;
  position: relative;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(10, 13, 25, 0.18);
}
.pwa-card-row { display: flex; align-items: center; gap: 12px; }
.pwa-os-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  flex-shrink: 0;
}
.pwa-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pwa-install-title { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.pwa-install-text { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.mobile-drawer-pwa .btn { width: 100%; }

.main-content { padding: 22px 24px; flex: 1; max-width: 1400px; width: 100%; margin: 0 auto; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.stat-card .rack-ticks-horizontal { position: absolute; top: 0; left: 0; }
.stat-card .stat-label {
  font-size: 11.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  font-weight: 600;
  padding-right: 40px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-value .unit {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 4px;
}
.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 5px;
}
.stat-card .stat-sub.ok { color: var(--ok); }
.stat-card .stat-sub.warn { color: var(--warn); }
.stat-card .stat-sub.critical { color: var(--critical); }

.stat-card-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-card-icon.ic-blue { background: var(--accent-soft); color: var(--accent); }
.stat-card-icon.ic-ok { background: var(--ok-soft); color: var(--ok); }
.stat-card-icon.ic-warn { background: var(--warn-soft); color: var(--warn); }
.stat-card-icon.ic-critical { background: var(--critical-soft); color: var(--critical); }
.stat-card-icon.ic-teal { background: var(--signature-soft); color: var(--signature); }
.stat-card-icon.ic-purple { background: rgba(124, 58, 237, 0.09); color: #7C3AED; }
html[data-theme="dark"] .stat-card-icon.ic-purple { background: rgba(167, 139, 250, 0.14); color: #A78BFA; }

.stat-ring-row { display: flex; align-items: center; gap: 14px; }
.ring-box { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.ring-box .ring-svg { transform: rotate(-90deg); }
.ring-box .ring-track { fill: none; stroke: var(--border-soft); stroke-width: 6; }
.ring-box .ring-fill { fill: none; stroke-width: 6; stroke-linecap: round; transition: stroke-dashoffset .4s ease; }
.ring-box .ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.stat-ring-row .stat-sub { line-height: 1.4; }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.panel-header h3 {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0;
}
.panel-body { padding: 20px; }
.panel-body.no-pad { padding: 0; }

.content-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
table.data-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.data-table td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text-secondary);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-hover); }
.data-table tr.row-clickable { cursor: pointer; }
.data-table .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-primary); }

.hw-section { margin-bottom: 22px; }
.hw-section:last-child { margin-bottom: 0; }
.hw-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.hw-section-title .count-pill {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 2px 7px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}
.hw-section-title .hw-section-extra { margin-left: auto; font-weight: 500; font-size: 11.5px; color: var(--text-muted); text-transform: none; letter-spacing: 0; }

.hw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }

.cron-job-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 16px; }
.cron-job-card { margin-bottom: 0; }
.cron-job-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cron-job-card .table-scroll {
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.cron-job-card .table-scroll table.data-table { min-width: 0; table-layout: fixed; }
.cron-job-card .table-scroll td { white-space: normal; word-break: break-word; }
.cron-job-card .table-scroll::-webkit-scrollbar { width: 6px; }
.cron-job-card .table-scroll::-webkit-scrollbar-track { background: transparent; }
.cron-job-card .table-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
.cron-job-card .table-scroll::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.esxi-row-actions { display: flex; align-items: center; gap: 4px; }
.esxi-row-actions .icon-btn { width: 26px; height: 26px; flex-shrink: 0; }

.esxi-toolbar, .list-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.esxi-toolbar .navbar-search, .list-toolbar .navbar-search { flex-shrink: 0; }
.filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.filter-pill:hover { background: var(--surface-hover); }
.filter-pill.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.esxi-vm-row.hidden-by-search, .esxi-vm-row.hidden-by-filter,
.list-row.hidden-by-search, .list-row.hidden-by-filter { display: none; }
.esxi-vm-name, .list-item-name { display: flex; align-items: center; gap: 8px; }
.esxi-os-icon, .list-item-icon { flex-shrink: 0; display: flex; align-items: center; justify-content: center; opacity: 0.85; }

.zone-name-cell { display: flex; align-items: center; gap: 10px; }
.zone-type-icon {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.zone-type-icon.type-master { background: var(--accent-soft); color: var(--accent); }
.zone-type-icon.type-slave { background: var(--warn-soft); color: var(--warn); }
.zone-type-icon.type-native { background: var(--signature-soft); color: var(--signature); }
.record-name-cell { display: flex; align-items: center; gap: 8px; }
.record-name-cell .icon-btn-static { flex-shrink: 0; color: var(--text-muted); display: flex; }
.ttl-quick-picks { display: flex; gap: 6px; margin-top: 6px; }
.ttl-quick-pick {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
}
.ttl-quick-pick:hover { background: var(--surface-hover); }
.ttl-quick-pick.active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.record-name-preview {
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}
.record-name-preview .label { color: var(--text-muted); margin-right: 6px; }

.hw-card {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}
.hw-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.hw-card-label { font-size: 13px; font-weight: 600; color: var(--text-primary); word-break: break-word; }
.hw-card-details { font-size: 11.5px; color: var(--text-muted); line-height: 1.45; }
.hw-card-serial { font-size: 10.5px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 6px; }
.hw-card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.hw-card-actions .icon-btn { width: 22px; height: 22px; }
.hw-card-badges { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }

.raid-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}
.raid-card:last-child { margin-bottom: 0; }
.raid-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.raid-level-badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
  white-space: nowrap;
}
.raid-card-name { font-weight: 600; font-size: 13.5px; color: var(--text-primary); }
.raid-card-meta { font-size: 11.5px; color: var(--text-muted); }
.raid-card-actions { margin-left: auto; display: flex; gap: 4px; flex-shrink: 0; }
.raid-card-actions .icon-btn { width: 26px; height: 26px; }
.raid-disk-table { width: 100%; border-collapse: collapse; }
.raid-disk-table td, .raid-disk-table th { padding: 9px 14px; font-size: 12px; border-bottom: 1px solid var(--border-soft); }
.raid-disk-table th { color: var(--text-muted); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: .3px; }
.raid-disk-table tr:last-child td { border-bottom: none; }
.raid-disk-table .mono { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-secondary); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}
.badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-critical { background: var(--critical-soft); color: var(--critical); }
.badge-muted { background: var(--surface-hover); color: var(--text-muted); }
.badge-gateway { background: var(--signature-soft); color: var(--signature); }

.alert-list-item {
  display: flex;
  gap: 12px;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.alert-list-item:last-child { border-bottom: none; }
.alert-list-item .sev-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.alert-list-item .sev-dot.critical { background: var(--critical); box-shadow: 0 0 0 3px var(--critical-soft); }
.alert-list-item .sev-dot.warning { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.alert-list-item .sev-dot.info { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.alert-list-item .content { flex: 1; min-width: 0; }
.alert-list-item .title { font-size: 13px; color: var(--text-primary); font-weight: 500; margin-bottom: 2px; }
.alert-list-item .meta { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); }

.empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state .icon { font-size: 26px; margin-bottom: 10px; opacity: 0.6; }
.empty-state .msg { font-size: 13px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 4px 0;
}
.pager a.disabled { opacity: .4; pointer-events: none; }
.pager-info { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-header h1 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-primary);
}
.page-header .page-sub { color: var(--text-muted); font-size: 13px; margin: 0; }
.page-header-actions { display: flex; gap: 8px; flex-shrink: 0; }

.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--signature) 140%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.dash-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 2px, transparent 2px 26px);
  pointer-events: none;
}
.dash-hero-text { position: relative; z-index: 1; }
.dash-hero-eyebrow {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: rgba(255,255,255,.8);
  font-weight: 600;
  margin-bottom: 6px;
}
.dash-hero h1 {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
}
.dash-hero p { color: rgba(255,255,255,.85); font-size: 13px; margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dash-health-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(255,255,255,.16);
  color: #fff;
}
.dash-health-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.dash-health-chip.ok { background: rgba(52,211,153,.22); }
.dash-health-chip.warn { background: rgba(245,183,47,.25); }
.dash-health-chip.critical { background: rgba(251,75,75,.28); }
.dash-hero-actions { display: flex; gap: 10px; position: relative; z-index: 1; flex-shrink: 0; }
.dash-hero .btn-primary { background: #fff; color: var(--accent); }
.dash-hero .btn-primary:hover { filter: none; background: #eef2ff; }
.dash-hero .btn-ghost { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.35); color: #fff; }
.dash-hero .btn-ghost:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.6); color: #fff; }

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dash-main > .panel, .dash-side > .panel { flex: 1; display: flex; flex-direction: column; }
.dash-main > .panel > .panel-body, .dash-side > .panel > .panel-body { flex: 1; display: flex; flex-direction: column; }
.dash-side .empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }

.alert-severity-row {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
}
.alert-severity-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}
.alert-severity-chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.alert-severity-chip.critical { background: var(--critical-soft); color: var(--critical); }
.alert-severity-chip.warn { background: var(--warn-soft); color: var(--warn); }
.alert-severity-chip.info { background: var(--accent-soft); color: var(--accent); }

.dc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.dc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 18px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.dc-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.plugin-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .15s ease, box-shadow .15s ease;
}
.plugin-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.plugin-card-icon {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: var(--radius-sm);
}
.plugin-card-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--text-primary); }
.plugin-card-desc { font-size: 12.5px; color: var(--text-secondary); margin-top: 4px; line-height: 1.4; }
.plugin-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; font-size: 11.5px; color: var(--text-muted); }
.plugin-card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.plugin-card-actions form { display: inline-block; }
.dc-card-head { display:flex; align-items:center; justify-content:space-between; margin-bottom: 12px; }
.dc-card-head .dc-name { font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--text-primary); }
.dc-card-head .dc-code { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); background: var(--surface-hover); padding: 2px 7px; border-radius: 20px; }
.dc-card-stats { display:flex; gap: 16px; margin-bottom: 12px; }
.dc-card-stats .mini-stat .val { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text-primary); line-height:1; }
.dc-card-stats .mini-stat .lbl { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }

.dc-capacity-bar {
  display: flex;
  gap: 2px;
  height: 10px;
  margin-bottom: 6px;
}
.dc-capacity-bar .seg {
  flex: 1;
  border-radius: 1px;
  background: var(--border-soft);
}
.dc-capacity-bar .seg.filled { background: var(--accent); }
.dc-capacity-bar .seg.filled.warn { background: var(--warn); }
.dc-capacity-bar .seg.filled.critical { background: var(--critical); }

.progress-bar {
  height: 7px;
  background: var(--border-soft);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar .fill {
  height: 100%;
  border-radius: 20px;
  background: var(--accent);
  transition: width .3s ease;
}
.progress-bar .fill.warn { background: var(--warn); }
.progress-bar .fill.critical { background: var(--critical); }

.racks-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(260px, 1fr);
  gap: 16px;
  align-items: start;
}
.racks-overview-grid > * { min-width: 0; }
.racks-overview-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.dc-table th, .dc-table td { padding: 10px 12px; }
.dc-table td { vertical-align: middle; }
.dc-table-identity { display: flex; align-items: center; gap: 8px; }
.dc-table-photo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-hover);
  border: 1px solid var(--border);
}
.dc-table-name { font-weight: 600; font-size: 13.5px; color: var(--text-primary); display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.dc-table-meta { font-size: 11.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: inline-block; }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.status-dot.muted { background: var(--text-muted); }
.dc-table-toggle svg { transition: transform .15s ease; }
.dc-table-toggle.open svg { transform: rotate(90deg); }
.dc-table-expand-row.collapsed { display: none; }
.dc-table-expand-row td { padding: 16px 20px; background: var(--bg-base); }
.dc-table-expand-row:hover td { background: var(--bg-base); }

.world-map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-hover); }
.leaflet-map-el { width: 100%; height: 260px; }
.world-map-wrap:fullscreen .leaflet-map-el { height: 100vh; }
.world-map-wrap:-webkit-full-screen .leaflet-map-el { height: 100vh; }
html[data-theme="dark"] .leaflet-map-el .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(0.95) contrast(0.9); }
.map-dc-marker { background: var(--ok); width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.25); }
.world-map-fullscreen-btn {
  position: absolute; right: 10px; top: 10px; z-index: 500;
  width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.world-map-fullscreen-btn:hover { color: var(--text-primary); border-color: var(--accent); }
.donut-legend { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.donut-legend-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.donut-legend-item .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-item .lbl { color: var(--text-secondary); flex: 1; }
.donut-legend-item .val { font-family: var(--font-display); font-weight: 600; color: var(--text-primary); }
.donut-legend-item .pct { font-size: 11.5px; color: var(--text-muted); width: 36px; text-align: right; }
.donut-chart-row { display: flex; align-items: center; justify-content: center; padding: 8px 0 4px; }

@media (max-width: 980px) {
  .racks-overview-grid { grid-template-columns: 1fr; }
}
.progress-label { display:flex; justify-content:space-between; font-size: 11px; color: var(--text-muted); }

.rack-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.rack-toolbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
}

.rack-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(420px, 1fr) minmax(300px, 360px);
  gap: 16px;
  align-items: start;
}
.rack-layout > * { min-width: 0; }
.rack-left-col, .rack-right-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.rack-left-col { position: sticky; top: calc(var(--navbar-height) + 16px); }

.rack-info-panel .panel-body { padding: 6px 18px 14px; }
.info-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12.5px;
}
.info-row:last-child { border-bottom: none; }
.info-row .lbl { color: var(--text-muted); white-space: nowrap; }
.info-row .val { color: var(--text-primary); font-weight: 500; text-align: right; }

.rack-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: middle; flex-shrink: 0; }

.rack-legend-list { padding: 6px 18px 16px; }
.rack-legend-row {
  display: flex;
  align-items: center;
  padding: 7px 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-soft);
}
.rack-legend-row:last-child { border-bottom: none; }

.rack-pool-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  flex: 1;
  min-height: 0;
}
.rack-pool-panel .panel-header h3 { font-size: 13px; }

.rack-pool-search { padding: 10px 10px 0; position: relative; }
.rack-pool-search svg { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.rack-pool-search input {
  width: 100%;
  padding: 8px 10px 8px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12.5px;
}
.rack-pool-search input:focus { outline: none; border-color: var(--accent); }
.rack-pool-search input::placeholder { color: var(--text-muted); }

.rack-pool-list { max-height: 60vh; overflow-y: auto; padding: 10px; }

.pool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-base);
  margin-bottom: 8px;
  cursor: grab;
  font-size: 12px;
  transition: border-color .12s ease, transform .12s ease;
}
.pool-item:hover { border-color: var(--accent); transform: translateX(2px); }
.pool-item:active { cursor: grabbing; }
.pool-item.dragging { opacity: 0.4; }
.pool-item.hidden-by-search { display: none; }
.pool-item .u-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--surface-hover);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}
.pool-item-type-ic {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--accent-soft);
  color: var(--accent);
}
.pool-item-type-ic.type-vmblade_host { background: var(--signature-soft); color: var(--signature); }
.pool-item-type-ic.type-storage { background: rgba(181,101,245,.14); color: #b565f5; }
.pool-item-type-ic.type-network_device { background: rgba(236,72,153,.14); color: #ec4899; }
.pool-item-type-ic.type-colocation { background: rgba(239,127,58,.14); color: #ef7f3a; }
.pool-item-type-ic.type-other { background: var(--surface-hover); color: var(--text-muted); }
.pool-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pool-item-name { font-size: 12.5px; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-item-meta { font-size: 11px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rack-visual-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  max-width: 780px;
}
.rack-visual-header { display:flex; align-items:center; justify-content:space-between; margin-bottom: 14px; }
.rack-visual-header .rack-title { font-family: var(--font-display); font-size: 15px; font-weight:600; }
.rack-visual-header .rack-meta { font-size: 11.5px; color: var(--text-muted); font-family: var(--font-mono); }

.rack-frame {
  --bg-base: #1a1d23;
  --surface: #22252c;
  --surface-hover: #282c34;
  --border: #3a3f4a;
  --border-soft: #2b2f38;
  --text-primary: #e9ecf2;
  --text-secondary: #aab2c5;
  --text-muted: #7d879b;
  --accent: #5b9bff;
  --accent-soft: rgba(91, 155, 255, 0.18);
  --signature: #35d0c1;
  --signature-soft: rgba(53, 208, 193, 0.18);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.18);
  --warn: #f5b72f;
  --warn-soft: rgba(245, 183, 47, 0.18);
  --critical: #fb4b4b;
  --critical-soft: rgba(251, 75, 75, 0.18);

  background: linear-gradient(180deg, #23262e 0%, #16181d 100%);
  border: 3px solid #0a0b0e;
  border-radius: 6px;
  padding: 4px 15px;
  position: relative;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.55), 0 10px 26px rgba(0, 0, 0, 0.3);
}

.rack-frame::before,
.rack-frame::after {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  width: 13px;
  background-color: rgba(0, 0, 0, 0.3);
  background-image: radial-gradient(circle, rgba(0, 0, 0, 0.65) 1.4px, transparent 1.6px);
  background-size: 100% 22px;
  background-position: center 11px;
  background-repeat: repeat-y;
  pointer-events: none;
}
.rack-frame::before { left: 0; border-radius: 3px 0 0 3px; }
.rack-frame::after { right: 0; border-radius: 0 3px 3px 0; }

.rack-slot-row {
  display: flex;
  align-items: stretch;
  height: 22px;
  position: relative;
  border-bottom: 1px solid var(--border-soft);
}
.rack-slot-row:last-child { border-bottom: none; }
.rack-slot-row .u-label {
  width: 30px;
  flex-shrink: 0;
  display: flex; align-items:center; justify-content:center;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border-soft);
  background: rgba(0, 0, 0, 0.18);
}
.rack-slot-row.drop-ok { background: var(--ok-soft); }
.rack-slot-row.drop-bad { background: var(--critical-soft); }

.rack-server-block {
  position: absolute;

  left: 45px; right: 15px;
  border-radius: 3px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, transparent 40%),
    linear-gradient(180deg, var(--surface-hover) 0%, var(--surface) 100%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  font-size: 11.5px;
  color: var(--text-primary);
  cursor: grab;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 2px 5px rgba(0,0,0,0.4);
}
.rack-server-block:hover { border-color: var(--text-muted); }
.rack-server-block:active { cursor: grabbing; }
.rack-server-block.locked { cursor: not-allowed; }
.rack-server-block.locked:active { cursor: not-allowed; }
.rack-server-block.type-vmblade_host { border-left-color: var(--signature); }
.rack-server-block.type-storage { border-left-color: #b565f5; }
.rack-server-block.type-network_device { border-left-color: #ec4899; }
.rack-server-block.type-other { border-left-color: var(--text-muted); }

.rack-server-block.type-colocation { border-left-color: #ef7f3a; border-left-style: dashed; }
.rack-server-block.status-faulty { border-left-color: var(--critical); }
.rack-server-block.status-faulty .rsb-led { background: var(--critical) !important; box-shadow: 0 0 5px var(--critical) !important; animation: rsb-led-blink 1s step-start infinite !important; }
.rack-server-block.selected { box-shadow: 0 0 0 2px var(--accent); }
.rack-server-block.dragging { opacity: .5; }
.rack-server-block.power-off { opacity: .55; filter: grayscale(.6); }

.rack-server-block .rsb-led {
  flex-shrink: 0;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--critical);
  box-shadow: 0 0 3px var(--critical);
}
.rack-server-block:not(.power-off) .rsb-led {
  background: var(--ok);
  box-shadow: 0 0 5px var(--ok);
  animation: rsb-led-pulse 2.4s ease-in-out infinite;
}
@keyframes dcms-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.btn.is-syncing svg { animation: dcms-spin .8s linear infinite; }
@keyframes rsb-led-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes rsb-led-blink { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }

.rack-server-block .rsb-name {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
  font-family: var(--font-mono);
  letter-spacing: 0.2px;
  cursor: pointer;
}
.rack-server-block .rsb-lock,
.rack-server-block .rsb-power {
  flex-shrink: 0;
  width: 18px; height: 18px;
  display:flex; align-items:center; justify-content:center;
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
}
.rack-server-block .rsb-lock:hover,
.rack-server-block .rsb-power:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.rack-server-block .rsb-power { color: var(--ok); }
.rack-server-block.power-off .rsb-power { color: var(--critical); }

.colocation-frame {
  position: absolute;
  left: 45px; right: 15px;
  border-radius: 3px;
  background: rgba(239,127,58,.06);
  display: flex;
  align-items: flex-start;
  padding: 3px 10px;
  font-size: 10.5px;
  color: #ef7f3a;
  z-index: 1;
  pointer-events: none;
}
.colocation-frame-label {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 600;
}

.colocation-frame-border {
  position: absolute;
  left: 45px; right: 15px;
  border-radius: 3px;
  border: 1.5px dashed #ef7f3a;
  z-index: 3;
  pointer-events: none;
}

.colocation-frame-remove-form {
  position: absolute;
  right: 15px;
  transform: translate(45%, -55%);
  z-index: 4;
  pointer-events: auto;
}
.colocation-frame-remove {
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid #ef7f3a;
  background: var(--surface);
  color: #ef7f3a;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.colocation-frame-remove:hover { background: rgba(239,127,58,.25); }

.rd-field { padding: 10px 18px; border-bottom: 1px solid var(--border-soft); }
.rd-field:last-child { border-bottom: none; }
.rd-field .rd-label { font-size: 10.5px; text-transform:uppercase; letter-spacing:.4px; color: var(--text-muted); margin-bottom: 3px; font-weight:600; }
.rd-field .rd-value { font-size: 13px; color: var(--text-primary); }
.rd-field .rd-value.mono { font-family: var(--font-mono); font-size: 12px; }

.tenant-chip {
  display:flex; align-items:center; justify-content:space-between; gap: 10px;
  padding: 9px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 12px;
  line-height: 1.6;
}
.tenant-chip > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }

.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,13,19,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 420px;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-soft);
}
.modal-box .panel-header { position: sticky; top:0; background:var(--surface); z-index: 2; }

.modal-box-lg { width: 760px; }
@media (max-width: 860px) { .modal-box-lg { width: 100%; } }

.modal-tabs {
  display: flex;
  gap: 2px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  overflow-x: auto;
}
.modal-tab {
  border: none;
  background: none;
  cursor: pointer;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .12s ease, border-color .12s ease;
}
.modal-tab:hover { color: var(--text-primary); }
.modal-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.modal-tab-panel { display: none; padding: 18px 20px; }
.modal-tab-panel.active { display: block; }
.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border-soft);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.page-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.page-tabs::-webkit-scrollbar { display: none; }
.page-tab {
  border: none;
  background: none;
  cursor: pointer;
  padding: 10px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color .12s ease, border-color .12s ease;
}
.page-tab:hover { color: var(--text-primary); }
.page-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.page-tab-panel { display: none; }
.page-tab-panel.active { display: block; }

.sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 4px;
  width: fit-content;
}
.sub-tab {
  border: none;
  background: none;
  cursor: pointer;
  padding: 7px 16px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  transition: color .12s ease, background .12s ease;
}
.sub-tab:hover { color: var(--text-primary); }
.sub-tab.active { color: var(--text-primary); background: var(--surface); box-shadow: var(--shadow-soft); }
.sub-tab-panel { display: none; }
.sub-tab-panel.active { display: block; }

.server-detail-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.server-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: calc(var(--navbar-height) + 16px);
  min-width: 0;
}

.server-main { min-width: 0; }

.server-photo {
  margin-bottom: 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.server-photo svg, .server-photo img { width: 100%; height: auto; display: block; }

.server-sidebar-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 8px;
  word-break: break-word;
}

.server-sidebar-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }

.server-sidebar-status-select {
  width: 100%;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 12.5px;
  margin-bottom: 14px;
}

.server-sidebar-section { border-top: 1px solid var(--border-soft); margin-top: 14px; padding-top: 14px; }
.server-sidebar-section:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }

.server-specs-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.specs-chip {
  flex: 1 1 140px;
  min-width: 140px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}
.specs-chip-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
  color: var(--text-muted);
  margin-bottom: 3px;
  white-space: nowrap;
}
.specs-chip-value {
  font-size: 12.5px;
  color: var(--text-primary);
  overflow-wrap: break-word;
}

.server-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.status-summary-list { display: flex; flex-direction: column; gap: 8px; }
.status-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.sparkline-svg { width: 100%; height: auto; display: block; cursor: crosshair; }
.sparkline-empty {
  font-size: 11px;
  color: var(--text-muted);
  padding: 10px 0;
  text-align: center;
}

.chart-container { position: relative; margin-top: 6px; }
.chart-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--text-primary);
  color: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .1s ease;
  z-index: 5;
}

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .rack-layout { grid-template-columns: 1fr; }
  .rack-left-col { position: static; }
  .server-detail-layout { grid-template-columns: 1fr; }
  .server-sidebar { position: static; order: 2; }
  .server-main { order: 1; }
}

.settings-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.settings-nav.page-tabs {
  flex-direction: column;
  gap: 2px;
  border-bottom: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  position: sticky;
  top: calc(var(--navbar-height) + 16px);
  overflow: visible;
}
.settings-nav .page-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border-bottom: none;
  text-align: left;
  font-size: 13.5px;
}
.settings-nav .page-tab svg { flex-shrink: 0; opacity: .65; }
.settings-nav .page-tab:hover { background: var(--surface-hover); }
.settings-nav .page-tab.active {
  background: var(--accent-soft);
  color: var(--accent);
  border-bottom: none;
}
.settings-nav .page-tab.active svg { opacity: 1; }
.settings-content { min-width: 0; }

.alert-warning {
  background: var(--warn-soft);
  border-color: var(--warn);
  color: var(--warn);
}

@media (max-width: 860px) {
  :root { --navbar-height: 56px; }
  .navbar-sub { display: none; }
  .navbar-hamburger { display: flex; }
  .navbar-user .u-info { display: none; }

  .navbar-top-inner { padding: 0 12px; gap: 10px; position: relative; }

  .navbar-brand { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .navbar-brand .name { display: none; }
  .navbar-actions { gap: 2px; }
  .main-content { padding: 16px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dc-grid { grid-template-columns: 1fr; }
  .quick-actions-grid { grid-template-columns: 1fr; }
  .login-rackframe { display: none; }
  .login-shell { grid-template-columns: 1fr; }
  .login-brand-panel { display: none; }
  .login-form-panel { padding: 32px 20px; }
  .page-header { flex-direction: column; }
  .page-header-actions { width: 100%; flex-wrap: wrap; }
  .page-header-actions .btn { flex: 1 1 auto; min-width: 130px; }
  .page-header-actions .dropdown-wrap { flex: 1 1 auto; min-width: 130px; }
  .page-header-actions .dropdown-wrap .btn { width: 100%; }
  .dash-hero { flex-direction: column; align-items: flex-start; }
  .dash-hero-actions { width: 100%; flex-wrap: wrap; }
  .dash-hero-actions .btn { flex: 1 1 auto; min-width: 130px; }
  .rd-value, .rd-value.mono { overflow-wrap: anywhere; }
  .data-table th, .data-table td { padding: 10px 14px; }

  .panel-header { flex-wrap: wrap; row-gap: 8px; }
  .panel-header > div { flex-wrap: wrap; row-gap: 6px; }

  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav.page-tabs {
    flex-direction: row;
    overflow-x: auto;
    position: static;
    scrollbar-width: none;
  }
}

@media (max-width: 520px) {
  .stat-grid { grid-template-columns: 1fr; }
  .login-card { padding: 30px 20px 24px; }
}

.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  margin-right: 8px;
  vertical-align: middle;
}
.method-badge.get { background: var(--accent-soft); color: var(--accent); }
.method-badge.post { background: var(--ok-soft); color: var(--ok); }

.endpoint-block { padding: 18px 0; border-bottom: 1px solid var(--border-soft); }
.endpoint-block:first-child { padding-top: 0; }
.endpoint-block:last-child { border-bottom: none; padding-bottom: 0; }
.endpoint-path { font-family: var(--font-mono); font-size: 13.5px; color: var(--text-primary); vertical-align: middle; text-transform: none; }
.field-hint-inline { font-size: 10.5px; color: var(--text-muted); font-weight: 400; text-transform: none; letter-spacing: 0; }

.api-try { margin-top: 12px; }
.api-try-body {
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  background: var(--bg-base);
}
.api-try-body .field { margin-bottom: 10px; }
.api-try-body .field:last-of-type { margin-bottom: 0; }
.api-try-hint { font-size: 11px; color: var(--text-muted); margin: 0 0 12px; }
.api-try-result { margin-top: 12px; }
.api-try-status {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.api-try-status.ok { color: var(--ok); }
.api-try-status.error { color: var(--critical); }
.api-try-response { max-height: 340px; }

