:root {
  --bg: #04121a;
  --bg-soft: rgba(8, 23, 34, 0.84);
  --panel: rgba(7, 19, 29, 0.8);
  --panel-strong: rgba(7, 20, 30, 0.94);
  --text: #f3feff;
  --muted: #8eaab5;
  --line: rgba(123, 235, 255, 0.12);
  --accent: #8af7ff;
  --accent-strong: #29d2dc;
  --danger: #ff7d7d;
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 0% 0%, rgba(43, 210, 225, 0.22), transparent 26%),
    radial-gradient(circle at 82% 10%, rgba(138, 247, 255, 0.1), transparent 18%),
    linear-gradient(180deg, #06131b 0%, #061821 44%, #03090e 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 25%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 55% 60%, rgba(67, 239, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 15% 70%, rgba(67, 239, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 68%, rgba(255, 255, 255, 0.75) 0 2px, transparent 3px);
  opacity: 0.5;
}

.auth-page,
.dashboard-shell {
  position: relative;
  z-index: 1;
}

.auth-shell {
  min-height: 100vh;
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  padding: 30px 28px;
  align-items: center;
}

.brand-card,
.panel-card,
.stat-card {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(7, 26, 39, 0.88), rgba(5, 16, 25, 0.88));
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.brand-card,
.auth-card,
.panel-card,
.stat-card {
  border-radius: 22px;
}

.brand-card {
  min-height: 430px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(145deg, rgba(44, 222, 242, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(7, 21, 31, 0.74), rgba(5, 14, 20, 0.96));
}

.brand-mark {
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  margin-bottom: auto;
  font-size: 2.8rem;
  font-weight: 800;
  color: #041018;
  background: linear-gradient(135deg, #77fbff, #16cfde);
  box-shadow: 0 0 48px rgba(67, 239, 255, 0.34);
}

.brand-mark--image {
  padding: 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 25%, rgba(119, 252, 255, 0.28), transparent 40%),
    linear-gradient(135deg, rgba(119, 252, 255, 0.18), rgba(21, 205, 221, 0.28));
}

.brand-mark--image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.brand-card h1 {
  font-size: clamp(2rem, 3.2vw, 3.2rem);
  line-height: 1;
  max-width: 11ch;
  margin-bottom: 12px;
}

.brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.brand-pills span {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(138, 247, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.82rem;
}

.dashboard-shell {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 28px 30px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
  padding: 18px 0 10px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-brand__logo {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 0 30px rgba(67, 239, 255, 0.16);
}

.hero-brand__copy h1 {
  font-size: clamp(1.8rem, 2.3vw, 2.6rem);
  line-height: 1.02;
}

.hero h1,
.card-header h2 {
  margin: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  color: var(--accent);
  margin: 0 0 8px;
}

.muted,
.fine-print {
  color: var(--muted);
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.stats-grid--staff {
  grid-template-columns: minmax(180px, 240px);
}

.stat-card {
  padding: 16px 18px;
}

.stat-card span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.7rem;
}

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

.wide-card {
  grid-column: span 2;
}

.panel-card,
.auth-card {
  padding: 18px;
}

.card-header {
  margin-bottom: 14px;
}

.stack-form,
.inline-form {
  display: grid;
  gap: 10px;
}

.inline-form {
  grid-template-columns: 1.1fr 1.1fr 0.8fr auto;
  align-items: end;
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

input,
select,
button {
  border-radius: 14px;
  border: 1px solid rgba(67, 239, 255, 0.18);
  padding: 11px 13px;
  font: inherit;
}

input,
select {
  color: var(--text);
  background: rgba(3, 14, 22, 0.92);
}

button {
  cursor: pointer;
  color: #021117;
  font-weight: 700;
  background: linear-gradient(135deg, #79fcff, #15cddd);
}

button:hover {
  filter: brightness(1.04);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.ghost-button,
.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.ghost-button {
  min-width: 108px;
}

.flash {
  margin-bottom: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  color: var(--text);
  background: rgba(67, 239, 255, 0.12);
  border: 1px solid rgba(67, 239, 255, 0.18);
  font-size: 0.9rem;
}

.list-table,
.cases-table {
  display: grid;
  gap: 8px;
}

.list-row,
.cases-head,
.cases-row {
  display: grid;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.list-row {
  grid-template-columns: 1fr auto;
  padding: 12px 13px;
}

.cases-head,
.cases-row {
  grid-template-columns: 0.7fr 0.95fr 0.95fr 1.6fr 1.1fr;
  padding: 12px 13px;
}

.cases-head {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
}

.fine-print {
  margin-top: 10px;
  font-size: 0.78rem;
}

.restart-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.restart-card {
  max-width: 520px;
}

@media (max-width: 1080px) {
  .auth-shell,
  .content-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .wide-card {
    grid-column: span 1;
  }

  .inline-form,
  .cases-head,
  .cases-row {
    grid-template-columns: 1fr;
  }

  .dashboard-shell,
  .auth-shell {
    padding: 16px;
  }

  .hero,
  .hero-brand {
    flex-direction: column;
    align-items: flex-start;
  }
}
