/* ── HEAVY METAL THEME ── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Barlow+Condensed:wght@400;500;600;700&display=swap');

[x-cloak] { display: none !important; }

/* ── SCROLLBARS ── */
* { scrollbar-width: thin; scrollbar-color: rgba(150,165,180,.5) #0d1017; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #4b5563 0%, #1f2937 100%);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
}
*::-webkit-scrollbar-track { background: #0d1017; }

/* ── BASE ── */
html { text-rendering: optimizeLegibility; }
body {
  font-family: 'Barlow Condensed', 'Rajdhani', ui-sans-serif, sans-serif;
  letter-spacing: 0.01em;
  background: #0d1017;
  /* fine horizontal scan-lines — subtle brushed metal texture */
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 3px,
      rgba(255,255,255,0.015) 3px,
      rgba(255,255,255,0.015) 4px
    ),
    radial-gradient(ellipse 140% 80% at 50% -10%,
      rgba(120,140,160,.07) 0%,
      transparent 60%);
}

/* ── BRUSHED METAL SURFACE ── */
.metal-surface {
  background: linear-gradient(160deg,
    #2a2e38 0%,
    #1c1f28 25%,
    #232730 55%,
    #181b23 80%,
    #1f2330 100%
  );
}

.glass { backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

/* ══════════════════════════════════════════
   FIELDS
══════════════════════════════════════════ */
.field {
  width: 100%;
  border-radius: 6px;
  border: 1px solid rgba(160,175,195,.2);
  background:
    linear-gradient(180deg,
      rgba(18,21,30,0.97) 0%,
      rgba(14,16,24,0.99) 100%);
  padding: .72rem .9rem;
  color: #d8e2f0;
  font-family: inherit;
  font-size: .93rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,.55),
    inset 0 -1px 0 rgba(255,255,255,.04),
    inset 1px 0 0 rgba(255,255,255,.025),
    inset -1px 0 0 rgba(255,255,255,.025);
}
.field::placeholder { color: #4b5563; }
.field:focus {
  border-color: rgba(160,175,200,.45);
  box-shadow:
    inset 0 2px 5px rgba(0,0,0,.55),
    0 0 0 3px rgba(148,163,184,.1),
    0 0 16px rgba(148,163,184,.07);
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: 6px;
  /* polished steel gradient */
  background: linear-gradient(180deg,
    #5a6270 0%,
    #3a404d 20%,
    #252930 50%,
    #1c1f28 80%,
    #141720 100%
  );
  border: 1px solid rgba(255,255,255,.22);
  border-bottom-color: rgba(0,0,0,.5);
  color: #f0f4fb;
  font-family: inherit;
  font-weight: 700;
  font-size: .93rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .65rem 1.1rem;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),    /* top-bevel */
    inset 0 -2px 0 rgba(0,0,0,.45),         /* bottom-bevel */
    inset 2px 0 0 rgba(255,255,255,.05),    /* left-bevel */
    inset -2px 0 0 rgba(0,0,0,.25),         /* right-bevel */
    0 4px 14px rgba(0,0,0,.6),
    0 1px 3px rgba(0,0,0,.4);
  text-shadow: 0 1px 3px rgba(0,0,0,.6);
}
.btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg,
    #6b7585 0%,
    #484f5e 20%,
    #32363f 50%,
    #252830 80%,
    #1c1f28 100%
  );
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    inset 0 -2px 0 rgba(0,0,0,.45),
    0 6px 20px rgba(0,0,0,.7),
    0 0 24px rgba(160,175,200,.1);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .4; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  border-radius: 6px;
  border: 1px solid rgba(160,175,195,.18);
  border-bottom-color: rgba(0,0,0,.4);
  color: #94a3b8;
  font-family: inherit;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .03em;
  padding: .62rem .9rem;
  background: linear-gradient(180deg,
    rgba(38,42,52,.85) 0%,
    rgba(22,25,34,.95) 100%);
  transition: background .14s, color .14s, border-color .14s, box-shadow .14s;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    inset 0 -1px 0 rgba(0,0,0,.3);
}
.btn-secondary:hover {
  background: linear-gradient(180deg,
    rgba(55,60,74,.9) 0%,
    rgba(32,36,48,.98) 100%);
  color: #e2e8f0;
  border-color: rgba(160,175,195,.32);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 -1px 0 rgba(0,0,0,.35),
    0 2px 8px rgba(0,0,0,.4);
}

/* ══════════════════════════════════════════
   CHIPS
══════════════════════════════════════════ */
.chip {
  border-radius: 5px;
  border: 1px solid rgba(160,175,195,.18);
  padding: .4rem .7rem;
  color: #94a3b8;
  font-family: inherit;
  font-size: .88rem;
  font-weight: 600;
  letter-spacing: .03em;
  background: linear-gradient(180deg,
    rgba(36,40,50,.88) 0%,
    rgba(22,25,34,.93) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
  transition: background .14s, color .14s, border-color .14s;
}
.chip:hover {
  background: linear-gradient(180deg,
    rgba(58,63,76,.93) 0%,
    rgba(36,40,52,.97) 100%);
  color: #e2e8f0;
  border-color: rgba(160,175,195,.3);
}

/* ══════════════════════════════════════════
   NAV / SIDEBAR
══════════════════════════════════════════ */
.nav-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  border-radius: 7px;
  padding: .58rem .72rem;
  font-family: inherit;
  font-size: .93rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
.nav-item:hover { transform: translateX(2px); }
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
}
.nav-icon svg { width: 1.1rem; height: 1.1rem; display: block; }

.nav-active {
  background: linear-gradient(135deg,
    #3a404e 0%,
    #272c38 40%,
    #1a1e2a 100%);
  color: #eef2fb;
  border: 1px solid rgba(255,255,255,.14);
  border-bottom-color: rgba(0,0,0,.35);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.12),
    inset 0 -1px 0 rgba(0,0,0,.3),
    0 2px 8px rgba(0,0,0,.5);
}
.nav-idle { color: #5a6272; }
.nav-idle:hover {
  background: linear-gradient(135deg,
    rgba(42,46,58,.82) 0%,
    rgba(26,30,42,.9) 100%);
  color: #c8d0e2;
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.panel,
.metric-card,
.info-card,
.table-card {
  border: 1px solid rgba(165,180,200,.15);
  border-bottom-color: rgba(0,0,0,.45);
  background: linear-gradient(160deg,
    #23262f 0%,
    #171a22 40%,
    #1c1f28 100%
  );
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),   /* top-bevel */
    inset 0 -1px 0 rgba(0,0,0,.35),        /* bottom-bevel */
    inset 1px 0 0 rgba(255,255,255,.03),   /* left-bevel */
    inset -1px 0 0 rgba(0,0,0,.2),         /* right-bevel */
    0 4px 24px rgba(0,0,0,.55),
    0 1px 6px rgba(0,0,0,.3);
  position: relative;
  overflow: hidden; /* clip the ::before highlight */
}
/* top-edge sheen — simulates polished top face */
.panel::before,
.metric-card::before,
.info-card::before,
.table-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,.18) 30%,
    rgba(255,255,255,.28) 50%,
    rgba(255,255,255,.18) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.metric-card { padding: 1.15rem; }
.metric-label {
  font-size: .72rem;
  color: #5a6272;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
}
.metric-value {
  margin-top: .5rem;
  font-size: 2.1rem;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -.03em;
  color: #e8edf8;
}

.info-card { padding: 1.2rem; }
.info-card h4 { margin-top: .75rem; font-weight: 700; color: #d0d8ec; }
.info-card p  { margin-top: .4rem; color: #5a6272; font-size: .875rem; line-height: 1.55; }
.info-icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, #363c4a 0%, #1e2230 100%);
  border: 1px solid rgba(255,255,255,.12);
  border-bottom-color: rgba(0,0,0,.4);
  color: #d0d8ec;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    0 3px 8px rgba(0,0,0,.5);
}

/* ══════════════════════════════════════════
   SECTION HEADERS
══════════════════════════════════════════ */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.section-head h3 {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .01em;
  color: #cdd5e8;
  text-transform: uppercase;
}
.section-kicker {
  text-transform: uppercase;
  font-size: .65rem;
  letter-spacing: .12em;
  color: #5a6272;
  font-weight: 700;
  margin-bottom: .15rem;
}

/* ══════════════════════════════════════════
   TABLES
══════════════════════════════════════════ */
.table-card { overflow: hidden; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .9rem;
  font-family: inherit;
}
.data-table thead {
  background: linear-gradient(180deg,
    rgba(32,36,46,.98) 0%,
    rgba(20,23,32,1) 100%);
}
.data-table th {
  padding: .78rem 1rem;
  text-align: left;
  font-size: .68rem;
  font-weight: 700;
  color: #5a6272;
  text-transform: uppercase;
  letter-spacing: .1em;
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
/* horizontal bevel between header and body */
.data-table thead tr:last-child th {
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}
.data-table td {
  padding: .88rem 1rem;
  border-top: 1px solid rgba(255,255,255,.038);
  color: #c4cede;
}
.data-table tr:hover td {
  background: rgba(255,255,255,.027);
}
.muted { color: #3f4858; }

/* ══════════════════════════════════════════
   BADGES
══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  border-radius: 4px;
  background: linear-gradient(135deg,
    rgba(50,56,70,.95) 0%,
    rgba(28,32,44,.98) 100%);
  border: 1px solid rgba(255,255,255,.1);
  border-bottom-color: rgba(0,0,0,.4);
  color: #8a96ae;
  padding: .25rem .55rem;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.empty-cell {
  padding: 2.5rem 1rem !important;
  text-align: center;
  color: #3f4858;
}

/* ══════════════════════════════════════════
   LINKS
══════════════════════════════════════════ */
.link-action { color: #8a96ae; font-size: .78rem; font-weight: 700; letter-spacing: .03em; }
.link-action:hover { color: #dce4f5; text-decoration: underline; }
.link-danger { color: #dc4444; font-size: .78rem; font-weight: 700; }
.link-danger:hover { color: #f87171; text-decoration: underline; }

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(5px);
}
.modal-card {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(165,180,200,.18);
  border-bottom-color: rgba(0,0,0,.5);
  background: linear-gradient(160deg,
    #22252e 0%,
    #181b24 40%,
    #1c1f2c 100%
  );
  padding: 1.5rem;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.1),
    inset 0 -1px 0 rgba(0,0,0,.4),
    0 2px 0 rgba(255,255,255,.07),   /* outer top-edge sheen */
    0 40px 120px rgba(0,0,0,.8),
    0 8px 30px rgba(0,0,0,.5);
  position: relative;
  overflow: hidden;
}
.modal-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255,255,255,.22) 30%,
    rgba(255,255,255,.35) 50%,
    rgba(255,255,255,.22) 70%,
    transparent 100%
  );
  pointer-events: none;
}

/* ══════════════════════════════════════════
   CHROME ACCENT LINE (top of sidebar / header)
══════════════════════════════════════════ */
.chrome-line {
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(140,155,175,.2) 10%,
    rgba(185,200,220,.7) 35%,
    rgba(215,228,248,.95) 50%,
    rgba(185,200,220,.7) 65%,
    rgba(140,155,175,.2) 90%,
    transparent 100%
  );
  box-shadow: 0 0 10px rgba(185,200,220,.25);
}

/* ══════════════════════════════════════════
   RIVET ACCENTS (decorative — add class to sidebar)
══════════════════════════════════════════ */
.rivet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%,
    rgba(255,255,255,.55) 0%,
    rgba(140,155,175,.4) 40%,
    rgba(30,35,45,.8) 100%);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 3px rgba(0,0,0,.5);
}

/* ══════════════════════════════════════════
   KNURLING / GRIP TEXTURE (optional divider)
══════════════════════════════════════════ */
.grip {
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,.06) 0px,
    rgba(255,255,255,.06) 2px,
    transparent 2px,
    transparent 6px
  );
}

/* ══════════════════════════════════════════
   ANIMATION
══════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeIn .22s ease-out; }
.fade-in        { animation: fadeIn .22s ease-out; }

/* ══════════════════════════════════════════
   BASE RESET
══════════════════════════════════════════ */
html, body { background: #0d1017; color: #c4cede; }
