:root {
  --bg: #0a0d14;
  --panel: #131927;
  --panel-soft: #182033;
  --stroke: rgba(255, 255, 255, 0.08);
  --text: #edf2ff;
  --muted: #94a0c0;
  --cyan: #44e2ff;
  --cyan-strong: #18c8ff;
  --pink: #ff4cd7;
  --green: #31e38f;
  --amber: #ffc75e;
  --red: #ff6c87;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Aptos", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(68, 226, 255, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 76, 215, 0.06), transparent 20%),
    linear-gradient(180deg, #090b11 0%, #0d111b 100%);
  color: var(--text);
}

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

.page-shell {
  min-height: 100vh;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(9, 12, 18, 0.92);
  border-right: 1px solid var(--stroke);
  padding: 28px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: conic-gradient(from 30deg, var(--cyan), #7b5cff, var(--pink), var(--cyan));
  box-shadow: 0 0 18px rgba(68, 226, 255, 0.45);
}

.brand strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.05em;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.nav-label {
  color: #5a6586;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  margin: 24px 8px 12px;
}

.nav-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  color: #b6c2e1;
  margin-bottom: 6px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(68, 226, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(68, 226, 255, 0.16);
  color: white;
}

.content {
  padding: 24px 28px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.topbar h1 {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.pill,
.button,
.button-secondary {
  border-radius: 999px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  border: 0;
}

.button {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-strong));
  color: #07111d;
  box-shadow: 0 12px 28px rgba(24, 200, 255, 0.28);
  cursor: pointer;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border: 1px solid var(--stroke);
  cursor: pointer;
}

.pill {
  background: rgba(68, 226, 255, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(68, 226, 255, 0.2);
}

.grid {
  display: grid;
  gap: 18px;
}

.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.card {
  background: linear-gradient(180deg, rgba(19, 25, 39, 0.96), rgba(15, 20, 32, 0.98));
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card.callout {
  background: linear-gradient(135deg, rgba(68, 226, 255, 0.12), rgba(255, 76, 215, 0.08));
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-head h2,
.section-head h3 { margin: 0; }

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 10px;
}

.metric-value {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-value.small { font-size: 28px; }

.delta { margin-top: 10px; color: var(--green); font-weight: 700; font-size: 13px; }
.delta.down { color: var(--red); }

.profile {
  display: flex;
  gap: 18px;
}

.avatar {
  width: 76px;
  height: 76px;
  border-radius: 24px;
  background: linear-gradient(135deg, #7c3aed, #ec4899);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 28px;
  box-shadow: 0 18px 44px rgba(124, 58, 237, 0.36);
  background-size: cover;
  background-position: center;
}

.muted { color: var(--muted); }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  font-size: 12px;
  font-weight: 700;
}

.badge.cyan {
  background: rgba(68, 226, 255, 0.14);
  color: var(--cyan);
}

.badge.green {
  background: rgba(49, 227, 143, 0.14);
  color: var(--green);
}

.badge.amber {
  background: rgba(255, 199, 94, 0.14);
  color: var(--amber);
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-chip {
  min-width: 132px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 14px;
}

.stat-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-chip strong {
  font-size: 22px;
}

.progress {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
}

.split {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.mini-kpi {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--stroke);
}

.mini-kpi:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 14px 10px;
  border-bottom: 1px solid var(--stroke);
  font-size: 14px;
}

th {
  color: var(--muted);
  font-weight: 600;
}

tr:last-child td { border-bottom: 0; }

.tag {
  display: inline-flex;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(68, 226, 255, 0.12);
  color: var(--cyan);
}

.tag.warn {
  background: rgba(255, 199, 94, 0.12);
  color: var(--amber);
}

.tag.red {
  background: rgba(255, 108, 135, 0.12);
  color: var(--red);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field,
.input,
.textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
  color: white;
}

.field {
  padding: 14px 16px;
}

.field label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.field strong {
  display: block;
}

.input,
.textarea {
  padding: 14px 16px;
  font-size: 14px;
}

.textarea {
  min-height: 112px;
  resize: vertical;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.login-hero {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.login-box-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-box {
  width: 100%;
  max-width: 440px;
}

.helper {
  color: var(--muted);
  font-size: 13px;
}

.message {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.04);
}

.message.error {
  border-color: rgba(255, 108, 135, 0.24);
  color: #ffd3db;
  background: rgba(255, 108, 135, 0.08);
}

.message.success {
  border-color: rgba(49, 227, 143, 0.22);
  color: #d5ffe8;
  background: rgba(49, 227, 143, 0.08);
}

.hidden { display: none !important; }

.footer-note {
  margin-top: 24px;
  color: #66718f;
  font-size: 12px;
}

@media (max-width: 1180px) {
  .layout,
  .login-shell,
  .split,
  .cols-4,
  .cols-3,
  .cols-2,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }
}
