:root {
  --bg: #070e18;
  --bg-2: #0e1a2b;
  --bg-3: #132840;
  --surface: rgba(11, 24, 40, 0.56);
  --surface-strong: rgba(16, 34, 56, 0.82);
  --line: rgba(143, 192, 255, 0.28);
  --line-soft: rgba(143, 192, 255, 0.16);
  --text: #ecf4ff;
  --muted: #a7b8ce;
  --accent: #30d5c8;
  --accent-2: #ff8f5b;
  --accent-3: #7cb2ff;
  --danger: #ff5d7d;
  --ok: #2ad19a;
  --font-display: "Sora", "Trebuchet MS", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --radius-xl: 24px;
  --radius-lg: 16px;
  --radius-sm: 10px;
  --shadow: 0 26px 65px rgba(0, 4, 15, 0.55);
  --shadow-soft: 0 12px 30px rgba(2, 7, 18, 0.35);
  --shine: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.18),
    rgba(255, 255, 255, 0.05) 28%,
    rgba(255, 255, 255, 0) 55%
  );
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 8% 12%, rgba(48, 213, 200, 0.22), transparent 35%),
    radial-gradient(circle at 89% 6%, rgba(255, 143, 91, 0.2), transparent 42%),
    radial-gradient(circle at 48% 110%, rgba(124, 178, 255, 0.22), transparent 48%),
    linear-gradient(145deg, var(--bg), var(--bg-2) 52%, var(--bg-3));
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(255, 255, 255, 0.014) 0px,
      rgba(255, 255, 255, 0.014) 1px,
      transparent 1px,
      transparent 3px
    );
  opacity: 0.7;
}

.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(70px);
  opacity: 0.55;
  animation: drift 18s ease-in-out infinite;
}

.orb-a {
  width: 320px;
  height: 320px;
  background: rgba(48, 213, 200, 0.45);
  top: -70px;
  left: -40px;
}

.orb-b {
  width: 290px;
  height: 290px;
  background: rgba(255, 143, 91, 0.38);
  right: -70px;
  top: 12%;
  animation-delay: 4s;
}

.orb-c {
  width: 360px;
  height: 360px;
  background: rgba(96, 158, 255, 0.35);
  bottom: -180px;
  left: 30%;
  animation-delay: 9s;
}

.grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(164, 201, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 201, 255, 0.05) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.78) 20%, transparent 80%);
}

.shell,
.dashboard {
  position: relative;
  z-index: 1;
  padding: 28px;
}

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

.auth-card {
  width: min(520px, 94vw);
  background:
    var(--shine),
    linear-gradient(155deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 35%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  padding: 32px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  padding: 1px;
  opacity: 0.55;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.auth-sub {
  margin: 12px 0 24px;
  color: var(--muted);
}

.stacked-form {
  display: grid;
  gap: 14px;
}

.stacked-form.compact {
  gap: 10px;
}

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

input,
select,
button,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(152, 202, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01) 45%),
    rgba(7, 16, 28, 0.62);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 12px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(48, 213, 200, 0.22), 0 10px 20px rgba(8, 17, 30, 0.35);
  outline: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02) 45%),
    rgba(9, 20, 35, 0.7);
}

.btn {
  border-radius: 12px;
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease, box-shadow 160ms ease;
  box-shadow: var(--shadow-soft);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #051018;
  font-weight: 600;
  background: linear-gradient(120deg, var(--accent), #7dfce9 56%, #c6fff7);
  box-shadow:
    0 16px 30px rgba(48, 213, 200, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn-outline {
  color: var(--text);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--line-soft);
}

.btn-ghost {
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01) 45%),
    rgba(18, 36, 59, 0.45);
  border: 1px solid var(--line-soft);
}

.btn-compact {
  padding: 6px 10px;
  font-size: 0.75rem;
  border-radius: 10px;
}

.message {
  min-height: 20px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: var(--ok);
}

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

.sidebar,
.topbar,
.panel,
.tool-card,
.metric {
  background:
    var(--shine),
    linear-gradient(155deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.01) 36%),
    var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  position: relative;
  overflow: hidden;
}

.sidebar::before,
.topbar::before,
.panel::before,
.tool-card::before,
.metric::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.14),
    rgba(255, 255, 255, 0.04) 22%,
    rgba(255, 255, 255, 0)
  );
  mix-blend-mode: screen;
  opacity: 0.55;
}

.sidebar {
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.quick-links {
  display: grid;
  gap: 8px;
}

.quick-link {
  display: block;
  text-decoration: none;
  color: #d8e7ff;
  font-size: 0.84rem;
  border: 1px solid rgba(129, 173, 233, 0.32);
  border-radius: 11px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.01) 40%),
    rgba(10, 20, 34, 0.58);
  padding: 10px 12px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.quick-link:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 248, 224, 0.55);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 40%),
    rgba(21, 37, 58, 0.84);
  box-shadow: 0 14px 24px rgba(6, 15, 30, 0.35);
}

.tab-nav {
  display: grid;
  gap: 8px;
}

.tab-btn {
  text-align: left;
  padding: 10px 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0) 42%),
    rgba(11, 22, 38, 0.45);
  color: var(--muted);
  border: 1px solid rgba(130, 174, 234, 0.16);
  border-radius: 12px;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(124, 248, 224, 0.35);
  color: #ddedff;
}

.tab-btn.active {
  color: var(--text);
  border-color: rgba(126, 247, 226, 0.45);
  background: linear-gradient(
    120deg,
    rgba(48, 213, 200, 0.2),
    rgba(126, 247, 226, 0.07)
  );
}

.main-content {
  display: grid;
  gap: 14px;
}

.topbar {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.78rem;
  background: linear-gradient(120deg, rgba(48, 213, 200, 0.24), rgba(124, 178, 255, 0.18));
  border: 1px solid rgba(104, 255, 232, 0.4);
  color: #b8fff4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pill.subtle {
  color: var(--muted);
  background: rgba(108, 159, 248, 0.14);
  border-color: rgba(145, 188, 255, 0.27);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.metric {
  border-radius: 14px;
  padding: 14px;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.metric:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(2, 9, 24, 0.45);
  border-color: rgba(140, 202, 255, 0.45);
}

.metric p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.metric strong {
  margin-top: 8px;
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
}

.panel {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.panel-content {
  display: grid;
  gap: 10px;
}

.data-card {
  border: 1px solid rgba(137, 189, 255, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.01) 38%),
    rgba(9, 19, 33, 0.64);
  padding: 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.data-card pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.8rem;
  line-height: 1.45;
}

.compare-card {
  margin-bottom: 2px;
}

.compare-card.active {
  border-color: rgba(124, 248, 224, 0.34);
}

.compare-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.compare-head h5 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.94rem;
}

.compare-head span {
  color: var(--muted);
  font-size: 0.82rem;
}

.compare-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.compare-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  border-radius: 10px;
  border: 1px solid rgba(131, 181, 243, 0.16);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01) 45%),
    rgba(8, 18, 31, 0.45);
  padding: 8px 10px;
}

.compare-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--dot, var(--accent));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--dot, var(--accent)) 18%, transparent);
}

.compare-label {
  color: var(--muted);
  font-size: 0.8rem;
}

.compare-item strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.95rem;
}

.analytics-toolbar {
  display: grid;
  gap: 10px;
}

.analytics-range-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-range-btn.active {
  border-color: rgba(124, 248, 224, 0.48);
  color: #e5fff8;
  background:
    linear-gradient(120deg, rgba(48, 213, 200, 0.24), rgba(121, 168, 255, 0.18)),
    rgba(8, 18, 31, 0.5);
}

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

.insight-card {
  display: grid;
  gap: 8px;
}

.insight-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.insight-card.highlight {
  border-color: rgba(124, 248, 224, 0.34);
  background:
    radial-gradient(circle at 90% 12%, rgba(124, 248, 224, 0.18), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 38%),
    rgba(9, 19, 33, 0.66);
}

.insight-list {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
}

.insight-list li strong {
  color: var(--text);
}

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

.funnel-card {
  display: grid;
  gap: 6px;
  align-content: start;
}

.funnel-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.funnel-card strong {
  font-size: 1.22rem;
  font-family: var(--font-display);
}

.funnel-card span {
  color: #b9f6e8;
  font-size: 0.77rem;
}

.warning-card {
  border-color: rgba(255, 196, 122, 0.34);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 196, 122, 0.16), transparent 38%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 38%),
    rgba(9, 19, 33, 0.66);
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.chart-card {
  padding: 12px;
}

.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.chart-head h5 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}

.chart-head span {
  color: #ccf5ed;
  font-size: 0.78rem;
}

.chart-canvas {
  width: 100%;
  height: 170px;
  display: block;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(7, 15, 27, 0.85), rgba(9, 20, 35, 0.68));
  border: 1px solid rgba(122, 180, 247, 0.18);
  cursor: crosshair;
}

.queue-canvas {
  height: 210px;
}

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

.queue-stat-card {
  border: 1px solid rgba(131, 181, 243, 0.2);
  border-radius: 12px;
  background: rgba(8, 18, 31, 0.68);
  padding: 10px;
}

.queue-stat-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.queue-stat-card strong {
  margin-top: 6px;
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.ops-overview-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 12px;
}

.ops-hero-card,
.ops-spotlight-card {
  border: 1px solid rgba(137, 189, 255, 0.24);
  border-radius: 14px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 35%),
    rgba(9, 19, 33, 0.68);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 16px 34px rgba(2, 8, 22, 0.28);
}

.ops-spotlight-card {
  border-color: rgba(48, 213, 200, 0.25);
  background:
    radial-gradient(circle at 90% 14%, rgba(48, 213, 200, 0.14), transparent 45%),
    radial-gradient(circle at 8% 88%, rgba(124, 178, 255, 0.14), transparent 40%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02) 35%),
    rgba(9, 19, 33, 0.72);
}

.ops-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.ops-card {
  border: 1px solid rgba(137, 189, 255, 0.22);
  border-radius: 14px;
  padding: 12px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01) 35%),
    rgba(7, 16, 28, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.ops-card-error {
  border-color: rgba(255, 93, 125, 0.25);
}

.ops-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ops-card-head h4,
.ops-card-head h5 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.ops-card-head h4 {
  font-size: 1rem;
}

.ops-card-head h5 {
  font-size: 0.93rem;
}

.ops-eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ops-sub {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
}

.ops-error {
  margin: 8px 0 0;
  color: #ffd1dc;
  font-size: 0.82rem;
}

.ops-meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(137, 189, 255, 0.12);
  overflow: hidden;
  display: flex;
  margin: 10px 0 12px;
}

.ops-meter-seg {
  display: block;
  height: 100%;
  background: var(--seg, var(--accent));
}

.ops-mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ops-mini-grid > div {
  border-radius: 10px;
  border: 1px solid rgba(129, 173, 233, 0.16);
  background: rgba(8, 18, 31, 0.5);
  padding: 8px;
}

.ops-mini-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.ops-mini-grid strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.96rem;
}

.ops-foot {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.worker-card {
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(137, 189, 255, 0.22);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01) 40%),
    rgba(8, 17, 30, 0.62);
}

.worker-card.is-running {
  border-color: rgba(42, 209, 154, 0.24);
}

.worker-card.is-stopped {
  border-color: rgba(255, 93, 125, 0.2);
}

.worker-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
}

.worker-card-head h5 {
  margin: 0;
  font-size: 0.9rem;
}

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

.worker-stats > div {
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid rgba(129, 173, 233, 0.16);
  padding: 8px;
  background: rgba(8, 18, 31, 0.45);
}

.worker-stats span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.worker-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.72rem;
  border: 1px solid rgba(129, 173, 233, 0.22);
  background: rgba(8, 18, 31, 0.62);
  color: var(--text);
  white-space: nowrap;
}

.status-pill.ok {
  border-color: rgba(42, 209, 154, 0.25);
  color: #cffff0;
}

.status-pill.warn {
  border-color: rgba(255, 143, 91, 0.24);
  color: #ffe2d3;
}

.status-pill.down {
  border-color: rgba(255, 93, 125, 0.25);
  color: #ffd1dc;
}

.ok-text {
  color: #bfffe9 !important;
}

.danger-text {
  color: #ffd1dc !important;
}

.queue-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
}

th,
td {
  text-align: left;
  font-size: 0.85rem;
  padding: 10px;
  border-bottom: 1px solid rgba(145, 187, 248, 0.2);
}

th {
  color: #cfe2ff;
  font-weight: 600;
}

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

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.tool-card {
  border-radius: var(--radius-lg);
  padding: 16px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 44px rgba(2, 10, 26, 0.42);
}

.tool-note {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.mono {
  font-family: "IBM Plex Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.9rem;
}

.sms-lookup-form {
  margin-bottom: 8px;
}

.user-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  align-items: end;
}

.sms-status-pre {
  margin-top: 10px;
  max-height: 160px;
  overflow: auto;
  border: 1px solid rgba(129, 173, 233, 0.22);
  border-radius: 10px;
  background: rgba(8, 18, 31, 0.64);
  padding: 10px;
  color: #dff2ff;
  font-size: 0.75rem;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.checkbox-pill {
  display: flex;
  gap: 8px;
  align-items: center;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.01) 40%),
    rgba(8, 18, 31, 0.58);
  border: 1px solid rgba(129, 173, 233, 0.26);
  border-radius: 10px;
  padding: 9px;
  font-size: 0.78rem;
  color: var(--muted);
}

.checkbox-pill input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.hidden {
  display: none !important;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 440ms ease forwards;
}

.delay-1 {
  animation-delay: 60ms;
}

.delay-2 {
  animation-delay: 120ms;
}

.delay-3 {
  animation-delay: 180ms;
}

.delay-4 {
  animation-delay: 240ms;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 20px, 0);
  }
}

@media (max-width: 1000px) {
  .dashboard {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .sidebar {
    position: sticky;
    top: 12px;
    z-index: 2;
  }

  .tab-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ops-overview-grid {
    grid-template-columns: 1fr;
  }

  .ops-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding: 22px;
  }

  .shell {
    padding: 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .tab-nav {
    grid-template-columns: 1fr;
  }

  .ops-mini-grid {
    grid-template-columns: 1fr;
  }
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 16, 28, 0.5);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(124, 178, 255, 0.7), rgba(48, 213, 200, 0.65));
  border-radius: 999px;
  border: 2px solid rgba(7, 16, 28, 0.55);
}
