:root {
  color-scheme: dark;
  --bg: #071019;
  --bg-soft: #0e1725;
  --panel: rgba(11, 18, 31, 0.84);
  --panel-strong: rgba(14, 24, 40, 0.96);
  --panel-border: rgba(163, 196, 255, 0.14);
  --panel-border-strong: rgba(163, 196, 255, 0.24);
  --text: #eef5ff;
  --muted: #90a0b9;
  --muted-strong: #b3c1d7;
  --accent: #78d8c2;
  --accent-strong: #79b8ff;
  --accent-deep: #122638;
  --success: #8af0c1;
  --warning: #ffd48a;
  --danger: #ff8ca2;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(120, 216, 194, 0.18), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(121, 184, 255, 0.16), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(59, 89, 152, 0.14), transparent 28%),
    linear-gradient(180deg, #09121d 0%, #050b12 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, 0.04), transparent 20%, transparent 82%, rgba(120, 216, 194, 0.05)),
    radial-gradient(circle at center, transparent 0 62%, rgba(255, 255, 255, 0.02) 100%);
  mask-image: radial-gradient(circle at center, black, transparent 85%);
}

code,
pre {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

a {
  color: inherit;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(120, 216, 194, 0.16);
}

.shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  display: grid;
  gap: 1.5rem;
}

.shell-home {
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.hero-panel,
.card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 20%, transparent 76%, rgba(120, 216, 194, 0.08));
}

.hero-panel {
  padding: 2.35rem;
}

.card {
  padding: 1.75rem;
}

.workspace-stack {
  display: grid;
  gap: 2rem;
}

.hero-home {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.9fr);
  gap: 1.25rem;
  align-items: stretch;
}

.hero-copy,
.hero-aside {
  position: relative;
  z-index: 1;
}

.hero-aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.hero-metrics,
.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
}

.hero-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card,
.result-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.metric-card {
  display: grid;
  gap: 0.45rem;
  min-height: 110px;
}

.metric-label,
.result-label,
.eyebrow,
.section-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metric-label,
.result-label,
.section-copy,
.field span,
.support-text,
.muted-text,
.eyebrow,
.section-kicker {
  color: var(--muted);
}

.status-pill,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 40px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
}

.status-pill.ok,
.status-chip.ok {
  color: var(--success);
  border-color: rgba(138, 240, 193, 0.2);
}

.status-pill.warn,
.status-chip.warn {
  color: var(--warning);
  border-color: rgba(255, 212, 138, 0.2);
}

.status-pill.danger,
.status-chip.danger {
  color: var(--danger);
  border-color: rgba(255, 140, 162, 0.2);
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.65rem;
  color: var(--accent);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5.5vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

h1 span,
.accent-text {
  color: var(--accent);
}

h2 {
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.08;
}

h3 {
  font-size: 1.1rem;
}

.lead {
  margin-top: 1rem;
  max-width: 62ch;
  color: var(--muted-strong);
  font-size: 1.03rem;
  line-height: 1.7;
}

.section-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-copy {
  max-width: 38ch;
  line-height: 1.6;
}

.stack {
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.field-help {
  margin: -0.2rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

input,
select {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 0.95rem 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input::placeholder {
  color: #677994;
}

input:focus,
select:focus {
  border-color: rgba(120, 216, 194, 0.44);
  background: rgba(255, 255, 255, 0.06);
}

.actions,
.card-actions,
.action-shell-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.action-shell-buttons {
  justify-content: flex-end;
  align-items: center;
}

.primary-button,
.secondary-button,
.copy-button,
.open-button,
.icon-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.2rem;
  cursor: pointer;
  transition: transform 180ms ease, opacity 180ms ease, background 180ms ease, border-color 180ms ease;
}

.primary-button,
.open-button {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #051521;
  font-weight: 700;
}

.secondary-button,
.copy-button,
.icon-button {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost-button {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted-strong);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.open-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-button:hover,
.secondary-button:hover,
.copy-button:hover,
.open-button:hover,
.icon-button:hover {
  transform: translateY(-1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.copy-button:disabled,
.icon-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.message-panel,
.result-panel {
  position: relative;
  z-index: 1;
  margin-top: 1.2rem;
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-panel {
  display: grid;
  gap: 0.85rem;
  color: var(--muted-strong);
}

.progress-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.progress-meta {
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

.spinner {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent);
  animation: spin 900ms linear infinite;
}

.message-panel.success {
  color: var(--success);
  border-color: rgba(138, 240, 193, 0.22);
}

.message-panel.error {
  color: var(--danger);
  border-color: rgba(255, 140, 162, 0.22);
}

.message-panel.notice {
  color: var(--warning);
  border-color: rgba(255, 212, 138, 0.2);
}

.info-card,
.access-card,
.action-card,
.history-card,
.locked-state-card {
  background: linear-gradient(180deg, rgba(13, 23, 38, 0.92), rgba(8, 14, 24, 0.92));
}

.locked-state {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
}

.locked-state h2 {
  max-width: 18ch;
}

.locked-state .section-copy {
  max-width: 54ch;
}

.identity-banner,
.action-shell,
.result-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.action-shell {
  gap: 2.5rem;
  align-items: center;
  padding-top: 0.85rem;
}

.identity-name {
  font-size: clamp(1.3rem, 2.4vw, 2rem);
  letter-spacing: -0.03em;
}

.identity-subtitle,
.action-copy {
  margin-top: 0.45rem;
  color: var(--muted-strong);
  line-height: 1.6;
}

.cooldown-inline {
  color: var(--muted-strong);
  text-align: right;
}

.compact-card {
  min-height: 172px;
}

.result-card {
  display: grid;
  gap: 0.85rem;
  min-width: 0;
}

.result-value {
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.45;
  overflow-wrap: anywhere;
  min-width: 0;
}

.link-preview {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.support-text {
  line-height: 1.5;
}

.action-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.result-meta {
  display: grid;
  gap: 0.25rem;
  text-align: right;
  color: var(--muted-strong);
}

.grid-two,
.grid-three,
.detail-grid {
  display: grid;
  gap: 1rem;
}

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

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

.detail-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1.2rem;
}

.detail-block {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.7rem;
}

.detail-block pre,
.json-block {
  margin: 0;
  padding: 0.95rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  color: #d3e5ff;
  white-space: pre-wrap;
  word-break: break-word;
}

.detail-list {
  display: grid;
  gap: 0.65rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  position: relative;
  z-index: 1;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

.table-toolbar {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1rem;
}

.filter-tabs {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted-strong);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.filter-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.16);
}

.filter-tab.active {
  color: #071019;
  border-color: rgba(120, 216, 194, 0.4);
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  font-weight: 700;
}

.search-field {
  flex: 1 1 420px;
}

.compact-filter-field {
  min-width: 180px;
  flex: 0 0 180px;
}

.filter-reset-button {
  align-self: end;
}

.search-field input[type="search"] {
  min-height: 48px;
}

.table-meta,
.pagination-status {
  color: var(--muted-strong);
  line-height: 1.5;
}

.table-meta {
  min-width: 220px;
  text-align: right;
}

.table-pagination {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.data-table th,
.data-table td {
  padding: 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.data-table th {
  position: sticky;
  top: 0;
  background: rgba(8, 14, 24, 0.96);
  color: var(--muted);
  z-index: 1;
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.table-subtext {
  margin-top: 0.35rem;
  color: var(--muted-strong);
  line-height: 1.5;
}

.inline-edit-form {
  display: grid;
  gap: 0.5rem;
}

.inline-edit-form input {
  min-height: 40px;
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted-strong);
}

.inline-check input {
  width: auto;
  min-height: auto;
  margin: 0;
}

.inline-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.request-status-note {
  color: var(--muted-strong);
  line-height: 1.5;
}

.admin-page {
  --bg: #080d14;
  --bg-soft: #101722;
  --panel: rgba(14, 20, 30, 0.92);
  --panel-strong: rgba(17, 25, 37, 0.98);
  --panel-border: rgba(174, 190, 214, 0.12);
  --panel-border-strong: rgba(174, 190, 214, 0.2);
  --accent: #72d8bd;
  --accent-strong: #a9c7ff;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
  background:
    linear-gradient(180deg, #090f17 0%, #070b11 100%);
}

.admin-page::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 18%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: auto, 72px 72px, 72px 72px;
  mask-image: linear-gradient(180deg, black, transparent 88%);
}

.admin-shell {
  width: min(1440px, calc(100% - 2rem));
  gap: 1rem;
}

.admin-shell .hero-panel,
.admin-shell .card {
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.admin-shell .hero-panel::after,
.admin-shell .card::after,
.admin-shell .hero-panel::before {
  display: none;
}

.admin-shell .card {
  padding: 1.1rem;
}

.admin-entry {
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
}

.admin-entry-header {
  align-items: center;
  margin-bottom: 0;
}

.admin-entry h1 {
  max-width: none;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.admin-entry .lead {
  max-width: 64ch;
  margin-top: 0.6rem;
  font-size: 0.98rem;
  line-height: 1.55;
}

.admin-auth-card {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 0.85rem;
  align-items: end;
  padding-top: 0.2rem;
}

.admin-token-field {
  max-width: 620px;
}

.admin-auth-actions {
  justify-content: flex-end;
}

.admin-dashboard-content {
  display: grid;
  gap: 1rem;
}

.admin-overview-card {
  padding: 1rem;
}

.admin-section-header {
  align-items: center;
  margin-bottom: 1rem;
}

.admin-section-header h2 {
  font-size: clamp(1.1rem, 1.7vw, 1.45rem);
  line-height: 1.15;
}

.admin-jump-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.admin-jump-nav a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: var(--muted-strong);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.admin-jump-nav a:hover {
  color: var(--text);
  border-color: rgba(114, 216, 189, 0.24);
}

.admin-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 1rem;
  align-items: start;
}

.admin-main-stack,
.admin-side-stack {
  display: grid;
  gap: 1rem;
}

.admin-side-stack {
  position: sticky;
  top: 1rem;
}

.admin-filter-row {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.admin-create-card .grid-two,
.admin-create-card .grid-three {
  grid-template-columns: 1fr;
}

.admin-form-grid {
  gap: 0.8rem;
}

.admin-status-card .section-header,
.admin-create-card .section-header {
  margin-bottom: 0.9rem;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 1rem;
}

.subtle-card {
  position: relative;
  z-index: 1;
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
}

.history-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.25rem;
}

.history-item {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.history-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.history-owner {
  color: var(--muted-strong);
}

.history-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem 1.5rem;
  margin-top: 0.2rem;
}

.history-field {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 0.7rem;
}

.action-card .section-header,
.history-card .section-header {
  margin-bottom: 2rem;
}

.action-card .section-copy,
.history-card .section-copy {
  max-width: 28ch;
}

.break-all {
  overflow-wrap: anywhere;
}

.admin-shell .result-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-shell .result-card {
  min-height: 104px;
  padding: 0.85rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.075);
}

.admin-shell .result-label,
.admin-shell .section-kicker,
.admin-shell .field span {
  letter-spacing: 0.08em;
}

.admin-shell .section-kicker {
  margin-bottom: 0.35rem;
}

.admin-shell .result-value {
  color: var(--text);
  background-image: none;
  font-size: clamp(1.45rem, 2.8vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  animation: none;
  -webkit-text-fill-color: currentColor;
}

.admin-shell #worker-health-value {
  font-size: clamp(1.15rem, 2vw, 1.55rem);
}

.admin-shell input,
.admin-shell select {
  min-height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-shell .primary-button,
.admin-shell .secondary-button,
.admin-shell .copy-button,
.admin-shell .open-button,
.admin-shell .icon-button {
  min-height: 42px;
  border-radius: 10px;
  padding: 0.72rem 0.95rem;
}

.admin-shell .primary-button {
  box-shadow: none;
}

.admin-shell .primary-button:hover:not(:disabled),
.admin-shell .secondary-button:hover:not(:disabled),
.admin-shell .result-card:hover,
.admin-shell .card:hover {
  transform: none;
  box-shadow: none;
}

.admin-shell .primary-button::before,
.admin-shell .primary-button::after,
.admin-shell .secondary-button::before,
.admin-shell .secondary-button::after {
  display: none;
}

.admin-shell .table-toolbar {
  align-items: end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.admin-shell .filter-tabs {
  gap: 0.45rem;
  margin-bottom: 0;
}

.admin-shell .filter-tab {
  min-height: 36px;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
}

.admin-shell .filter-tab.active {
  background: rgba(114, 216, 189, 0.15);
  border-color: rgba(114, 216, 189, 0.36);
  color: var(--accent);
}

.admin-shell .table-meta {
  min-width: 0;
  max-width: 340px;
  text-align: right;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-shell .table-wrap {
  border-radius: 10px;
  background: rgba(4, 8, 13, 0.34);
  border-color: rgba(255, 255, 255, 0.075);
}

.admin-shell .data-table {
  min-width: 920px;
  font-size: 0.92rem;
}

.admin-shell .data-table th,
.admin-shell .data-table td {
  padding: 0.75rem 0.85rem;
}

.admin-shell .data-table th {
  background: rgba(12, 18, 27, 0.98);
  color: #a9b7cc;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.admin-shell .data-table tbody tr:hover {
  background: rgba(114, 216, 189, 0.045);
}

#requests-panel .data-table {
  min-width: 860px;
}

#requests-panel .data-table th:nth-child(2),
#requests-panel .data-table td:nth-child(2) {
  width: 34%;
}

#requests-panel .data-table th:nth-child(5),
#requests-panel .data-table td:nth-child(5) {
  width: 180px;
}

.admin-shell .table-subtext,
.admin-shell .request-status-note {
  font-size: 0.86rem;
}

.admin-shell .inline-form-actions {
  margin-top: 0.55rem;
}

.admin-shell .inline-form-actions .secondary-button,
.admin-shell .inline-edit-form .secondary-button {
  min-height: 36px;
  padding: 0.55rem 0.7rem;
}

.admin-shell .secondary-button.danger-button,
.danger-button {
  color: #ff8ca2;
  border-color: rgba(255, 140, 162, 0.35);
  background: rgba(255, 140, 162, 0.08);
}

.admin-shell .secondary-button.danger-button:hover:not(:disabled),
.danger-button:hover:not(:disabled) {
  color: #ffffff;
  border-color: #ff8ca2;
  background: rgba(255, 140, 162, 0.28);
}

.admin-shell .inline-edit-form {
  grid-template-columns: repeat(2, minmax(104px, 1fr));
  gap: 0.45rem;
  min-width: 250px;
}

.admin-shell .inline-edit-form input {
  min-height: 36px;
  border-radius: 8px;
}

.admin-shell .inline-edit-form .inline-check,
.admin-shell .inline-edit-form button {
  grid-column: span 2;
}

.admin-shell .detail-list {
  gap: 0;
}

.admin-shell .detail-row {
  padding: 0.72rem 0;
}

.admin-shell .detail-row:first-child {
  padding-top: 0;
}

.admin-shell .detail-row strong {
  text-align: right;
  color: var(--text);
}

details > summary {
  cursor: pointer;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ==========================================================================
   ENHANCED ADMIN DASHBOARD UI/UX STYLES
   ========================================================================== */

/* Top Sticky Navigation Bar */
.admin-nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 13, 20, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(174, 190, 214, 0.12);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  gap: 1rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(114, 216, 189, 0.2), rgba(169, 199, 255, 0.2));
  border: 1px solid rgba(114, 216, 189, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 14px rgba(114, 216, 189, 0.2);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.nav-status-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Live Status Pulse Indicator */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted-strong);
  transition: all 0.25s ease;
}

.live-pill.online {
  background: rgba(138, 240, 193, 0.12);
  border-color: rgba(138, 240, 193, 0.35);
  color: #8af0c1;
}

.live-pill.warn {
  background: rgba(255, 212, 138, 0.12);
  border-color: rgba(255, 212, 138, 0.35);
  color: #ffd48a;
}

.live-pill.offline {
  background: rgba(255, 140, 162, 0.12);
  border-color: rgba(255, 140, 162, 0.35);
  color: #ff8ca2;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* Auto Refresh Select Control */
.auto-refresh-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}

.auto-refresh-control select {
  min-height: auto !important;
  padding: 0.2rem 0.4rem;
  background: transparent !important;
  border: none !important;
  color: var(--text);
  font-size: 0.78rem;
  cursor: pointer;
}

.icon-only-btn {
  padding: 0.5rem !important;
  min-height: 36px !important;
}

/* Glowing Primary Action Buttons */
.glowing-btn {
  background: linear-gradient(135deg, rgba(114, 216, 189, 0.9), rgba(121, 184, 255, 0.85)) !important;
  color: #060c14 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 0 16px rgba(114, 216, 189, 0.25);
  transition: all 0.2s ease !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.glowing-btn:hover:not(:disabled) {
  box-shadow: 0 0 24px rgba(114, 216, 189, 0.45) !important;
  transform: translateY(-1px) !important;
}

/* Inputs with inline action buttons */
.input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-action input {
  padding-right: 2.8rem;
  width: 100%;
}

.btn-token-toggle {
  position: absolute;
  right: 0.5rem;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  border-radius: 6px;
}

.btn-token-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

/* Upgraded KPI Metric Cards */
.kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.1rem !important;
  background: rgba(16, 23, 34, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.8;
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(114, 216, 189, 0.25) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
}

.kpi-worker { color: #72d8bd; }
.kpi-success { color: #8af0c1; }
.kpi-failed { color: #ff8ca2; }
.kpi-blocked { color: #ffd48a; }

.kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.kpi-icon {
  font-size: 1.25rem;
}

.kpi-subtext {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

/* Search input wrapper with icon */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 0.8rem;
  color: var(--muted);
  pointer-events: none;
}

.search-input-wrap input {
  padding-left: 2.2rem !important;
  width: 100%;
}

/* Tab Pill Badges */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  margin-left: 0.35rem;
}

.filter-tab.active .tab-badge {
  background: rgba(114, 216, 189, 0.3);
  color: #ffffff;
}

/* Provision Code Quick Presets */
.preset-section {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.preset-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted-strong);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preset-chip:hover {
  background: rgba(114, 216, 189, 0.15);
  border-color: rgba(114, 216, 189, 0.35);
  color: var(--text);
}

.input-with-btn {
  display: flex;
  gap: 0.35rem;
}

.input-with-btn input {
  flex: 1;
}

.sm-btn {
  min-height: 44px !important;
  padding: 0 0.8rem !important;
}

/* Contact Details & Copy Action Buttons */
.contact-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(114, 216, 189, 0.2), rgba(169, 199, 255, 0.2));
  border: 1px solid rgba(114, 216, 189, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  flex-shrink: 0;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.btn-copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-strong);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.btn-copy-chip:hover {
  background: rgba(114, 216, 189, 0.15);
  border-color: rgba(114, 216, 189, 0.3);
  color: var(--text);
}

.btn-copy-chip.copied {
  background: rgba(138, 240, 193, 0.2) !important;
  border-color: rgba(138, 240, 193, 0.4) !important;
  color: #8af0c1 !important;
}

/* Modal Drawer for Code Editing */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 7, 12, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: min(560px, 100%);
  background: rgba(14, 20, 30, 0.96);
  border: 1px solid rgba(174, 190, 214, 0.2);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.btn-icon-close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}

.btn-icon-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.modal-body {
  padding: 1.5rem;
  gap: 1.2rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.2);
}

/* Toggle Switch Widget */
.toggle-switch-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  min-height: 44px;
}

.toggle-switch-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-slider {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.25s ease;
}

.toggle-switch-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-switch-wrap input:checked + .toggle-switch-slider {
  background: var(--accent);
}

.toggle-switch-wrap input:checked + .toggle-switch-slider::before {
  transform: translateX(20px);
}

.toggle-label-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

/* Toast Notifications Container */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  background: rgba(16, 23, 34, 0.94);
  border: 1px solid rgba(174, 190, 214, 0.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-item.success { border-color: rgba(138, 240, 193, 0.4); }
.toast-item.error { border-color: rgba(255, 140, 162, 0.4); }

@keyframes toast-slide-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}


@media (max-width: 960px) {
  .hero-home,
  .overview-grid,
  .grid-two,
  .grid-three {
    grid-template-columns: 1fr;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-header,
  .filter-tabs,
  .table-toolbar,
  .identity-banner,
  .action-shell,
  .result-header,
  .history-head {
    flex-direction: column;
  }

  .result-meta,
  .table-meta,
  .cooldown-inline,
  .history-owner {
    text-align: left;
  }

  .admin-auth-card,
  .admin-workspace-grid {
    grid-template-columns: 1fr;
  }

  .admin-side-stack {
    position: static;
  }

  .admin-shell .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-entry-header,
  .admin-section-header {
    align-items: flex-start;
  }

  .admin-jump-nav {
    justify-content: flex-start;
  }

  .admin-shell .table-meta {
    text-align: left;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 1rem, 1180px);
    padding: 1rem 0 2.4rem;
  }

  .shell-home,
  .workspace-stack {
    gap: 1.25rem;
  }

  .hero-panel,
  .card {
    border-radius: 22px;
    padding: 1.25rem;
  }

  .input-shell {
    grid-template-columns: 1fr;
  }

  .hero-metrics,
  .result-grid,
  .detail-grid,
  .history-fields {
    grid-template-columns: 1fr;
  }

  .table-pagination {
    justify-content: stretch;
    flex-direction: column;
    align-items: stretch;
  }

  .actions,
  .action-shell-buttons,
  .card-actions,
  .history-actions,
  .table-pagination {
    width: 100%;
  }

  .primary-button,
  .secondary-button,
  .copy-button,
  .open-button,
  .icon-button {
    width: 100%;
    justify-content: center;
  }

  .admin-shell {
    width: min(100% - 0.75rem, 1440px);
    gap: 0.75rem;
  }

  .admin-entry,
  .admin-shell .card {
    padding: 0.95rem;
  }

  .admin-shell .result-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell .table-toolbar {
    align-items: stretch;
  }

  .admin-shell .search-field,
  .admin-shell .compact-filter-field {
    flex: 1 1 auto;
    min-width: 0;
  }

  .admin-auth-actions {
    width: 100%;
  }

  .admin-shell .inline-edit-form {
    grid-template-columns: 1fr;
  }

  .admin-shell .inline-edit-form .inline-check,
  .admin-shell .inline-edit-form button {
    grid-column: auto;
  }
}

/* ===== Motion layer (app) ===== */

.aurora {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.aurora-blob {
  position: absolute;
  width: 52vmax;
  height: 52vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.4;
  mix-blend-mode: screen;
  will-change: transform;
}
.aurora-blob.a {
  top: -18vmax;
  left: -14vmax;
  background: radial-gradient(circle, rgba(120, 216, 194, 0.55), transparent 62%);
  animation: drift-a 22s ease-in-out infinite;
}
.aurora-blob.b {
  top: 12vmax;
  right: -22vmax;
  background: radial-gradient(circle, rgba(121, 184, 255, 0.48), transparent 62%);
  animation: drift-b 28s ease-in-out infinite;
}
.aurora-blob.c {
  bottom: -24vmax;
  left: 18vmax;
  background: radial-gradient(circle, rgba(138, 240, 193, 0.32), transparent 62%);
  animation: drift-c 32s ease-in-out infinite;
}

@keyframes drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(8vmax, 6vmax, 0) scale(1.12); }
}
@keyframes drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(-10vmax, 8vmax, 0) scale(0.9); }
}
@keyframes drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(12vmax, -10vmax, 0) scale(1.1); }
}

/* Staggered card entrance */
.rise {
  opacity: 0;
  transform: translateY(18px);
  animation: app-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.rise-d1 { animation-delay: 60ms; }
.rise-d2 { animation-delay: 160ms; }
.rise-d3 { animation-delay: 260ms; }
.rise-d4 { animation-delay: 360ms; }
.rise-d5 { animation-delay: 460ms; }

@keyframes app-rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Scroll reveal */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0) scale(0.986);
  filter: blur(8px);
  transition: opacity 760ms cubic-bezier(0.16, 1, 0.3, 1),
              transform 760ms cubic-bezier(0.16, 1, 0.3, 1),
              filter 760ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

.parallax-surface {
  --parallax-shift: 0px;
  transform: translate3d(0, var(--parallax-shift), 0);
  transition: transform 420ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

/* Hero panel — gradient glow halo + sheen */
.hero-panel {
  background-image:
    linear-gradient(135deg, rgba(120, 216, 194, 0.05), transparent 40%, transparent 60%, rgba(121, 184, 255, 0.05)),
    linear-gradient(180deg, var(--panel), var(--panel));
}
.hero-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(from 180deg at 50% 50%, transparent, rgba(120, 216, 194, 0.12), transparent 35%);
  opacity: 0;
  transition: opacity 800ms ease;
  z-index: 0;
  animation: halo-spin 18s linear infinite;
}
.hero-panel:hover::before { opacity: 1; }

@keyframes halo-spin {
  to { transform: rotate(360deg); }
}

/* Metric cards — float + glow on hover */
.metric-card {
  transition: transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
              border-color 320ms ease,
              background 320ms ease,
              box-shadow 320ms ease;
}
.metric-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: rgba(120, 216, 194, 0.32);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
}

/* Status pill — breathing glow */
.status-pill {
  position: relative;
  overflow: hidden;
}
.status-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: pill-sheen 4.8s ease-in-out infinite;
}
@keyframes pill-sheen {
  0%, 30%   { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* Status chip pulse */
.status-chip.ok {
  position: relative;
}
.status-chip.ok::after {
  content: "";
  position: absolute;
  left: 8px; top: 50%;
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  transform: translateY(-50%);
  animation: chip-pulse 1.8s ease-in-out infinite;
}
@keyframes chip-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

/* Cards — scroll-in lift */
.card {
  transition: transform 360ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 360ms ease, border-color 360ms ease;
}

.card:hover {
  box-shadow: 0 34px 86px rgba(0, 0, 0, 0.4);
  border-color: rgba(163, 196, 255, 0.18);
}

/* Result-card hover — gentle lift */
.result-card {
  transition: transform 280ms ease, border-color 280ms ease, background 280ms ease;
}
.result-card:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 216, 194, 0.28);
  background: rgba(255, 255, 255, 0.045);
}

/* Result value — shimmer when first rendered */
.result-value {
  background-image: linear-gradient(110deg, var(--text) 30%, var(--accent) 50%, var(--text) 70%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: result-shimmer 5s linear infinite;
}
@keyframes result-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Buttons — sheen sweep on hover */
.primary-button,
.secondary-button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 220ms ease, background-position 600ms ease, box-shadow 220ms ease, border-color 220ms ease;
}
.primary-button::before,
.secondary-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.32) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 700ms ease;
  pointer-events: none;
}
.primary-button::after,
.secondary-button::after {
  content: "";
  position: absolute;
  inset: -18%;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.16), transparent 58%);
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 260ms ease, transform 260ms ease;
}
.primary-button:hover:not(:disabled)::before,
.secondary-button:hover:not(:disabled)::before { transform: translateX(120%); }
.primary-button:hover:not(:disabled)::after,
.secondary-button:hover:not(:disabled)::after {
  opacity: 1;
  transform: scale(1);
}

.primary-button {
  background-size: 180% 180%;
  background-position: 0% 50%;
  box-shadow: 0 10px 28px rgba(120, 216, 194, 0.18);
}
.primary-button:hover:not(:disabled) {
  background-position: 100% 50%;
  box-shadow: 0 18px 44px rgba(120, 216, 194, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transform: translateY(-3px) scale(1.01);
}
.secondary-button:hover:not(:disabled) {
  transform: translateY(-2px);
}
.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled) {
  transform: translateY(0) scale(0.985);
}

/* Spinner — keep, add glowing trail */
.spinner {
  box-shadow: 0 0 12px rgba(120, 216, 194, 0.3);
}

/* Progress panel — slide-in */
.progress-panel:not([hidden]) {
  animation: panel-in 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.result-panel:not([hidden]) {
  animation: panel-in 500ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.message-panel:not([hidden]) {
  animation: panel-in 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes panel-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Inputs — lift on focus */
.input-shell,
input[type="password"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  transition: border-color 220ms ease, background 220ms ease,
              box-shadow 220ms ease, transform 220ms ease;
}
.input-shell:focus-within,
input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
}

/* History items */
.history-grid > * {
  transition: transform 260ms ease, border-color 260ms ease, background 260ms ease;
}
.history-grid > *:hover {
  transform: translateY(-4px);
  border-color: rgba(120, 216, 194, 0.26);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* Reduced motion guard */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal],
  .rise {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .aurora { display: none; }
  .parallax-surface {
    transform: none !important;
  }
  .result-value {
    background-image: none;
    color: var(--text);
    -webkit-text-fill-color: currentColor;
  }
  .spinner {
    animation-duration: 900ms !important;
    animation-iteration-count: infinite !important;
  }
}

/* ==========================================================================
   ENTERPRISE SAAS DESIGN SYSTEM - ADMIN DASHBOARD (SCOPED TO .admin-page)
   ========================================================================== */

.admin-page {
  --admin-bg: #05050a;
  --admin-bg-soft: #0b0c14;
  --admin-panel: rgba(13, 14, 23, 0.75);
  --admin-panel-strong: rgba(20, 22, 36, 0.9);
  --admin-panel-border: rgba(255, 255, 255, 0.09);
  --admin-panel-border-glow: rgba(110, 86, 255, 0.3);
  --admin-text: #f3f4f6;
  --admin-muted: #9ca3af;
  --admin-muted-strong: #d1d5db;
  --admin-accent-grad: linear-gradient(135deg, #4F7CFF 0%, #6E56FF 50%, #7C4DFF 100%);
  --admin-accent-glow: rgba(110, 86, 255, 0.35);
  --admin-success: #10b981;
  --admin-warning: #f59e0b;
  --admin-danger: #f43f5e;
  --admin-info: #3b82f6;
  --admin-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);

  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  background-color: var(--admin-bg) !important;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 124, 255, 0.15), transparent 70%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px) !important;
  background-size: 100% 100%, 48px 48px, 48px 48px !important;
  color: var(--admin-text) !important;
  min-height: 100vh;
}

/* Linear Top Navigation Bar */
.admin-nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 10, 0.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid var(--admin-panel-border);
}

.admin-nav-bar .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.admin-nav-bar .nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.admin-nav-bar .brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 16px rgba(79, 124, 255, 0.2);
}

.admin-nav-bar .brand-text {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-nav-bar .brand-title {
  font-weight: 700;
  font-size: 1rem;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.admin-nav-bar .brand-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #a78bfa;
  background: rgba(110, 86, 255, 0.15);
  border: 1px solid rgba(110, 86, 255, 0.3);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  text-transform: uppercase;
}

.admin-nav-bar .env-pill {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--admin-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.admin-nav-bar .nav-status-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.admin-page .live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--admin-muted-strong);
}

.admin-page .live-pill.online {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--admin-success);
}

.admin-page .live-pill.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--admin-warning);
}

.admin-page .live-pill.offline {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(244, 63, 94, 0.3);
  color: var(--admin-danger);
}

.admin-page .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: pulse-glow 2s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

.admin-page .auto-refresh-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--admin-muted);
}

.admin-page .auto-refresh-control select {
  min-height: auto !important;
  padding: 0.15rem 0.3rem;
  background: transparent !important;
  border: none !important;
  color: var(--admin-text);
  font-size: 0.78rem;
  cursor: pointer;
}

.admin-page .user-portal-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-decoration: none;
  transition: all 0.15s ease;
}

.admin-page .user-portal-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.22);
}

/* Shell Layout */
.admin-shell {
  width: min(1440px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 2rem 0 5rem;
  display: grid;
  gap: 1.5rem;
}

/* Linear Hero Header Panel */
.admin-hero {
  position: relative;
  overflow: hidden;
  background: var(--admin-panel);
  border: 1px solid var(--admin-panel-border);
  border-radius: 16px;
  padding: 2.25rem 2.5rem;
  box-shadow: var(--admin-shadow);
  backdrop-filter: blur(24px);
}

.admin-hero .hero-glow-layer {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(110, 86, 255, 0.25) 0%, rgba(79, 124, 255, 0.08) 50%, transparent 80%);
  pointer-events: none;
  filter: blur(40px);
}

.admin-hero .hero-content-wrap {
  position: relative;
  z-index: 2;
}

.admin-hero .eyebrow-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #a78bfa;
  background: rgba(110, 86, 255, 0.12);
  border: 1px solid rgba(110, 86, 255, 0.25);
  margin-bottom: 0.65rem;
}

.admin-hero h1 {
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
  color: #ffffff;
  background: linear-gradient(180deg, #ffffff 0%, #d1d5db 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-hero .lead {
  color: var(--admin-muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.6rem 0 0;
  max-width: 68ch;
}

/* Auth Section */
.admin-auth-card {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  margin-top: 1.5rem;
  padding: 1.25rem;
  background: rgba(5, 5, 10, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.admin-token-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-token-field span,
.admin-shell .search-field span,
.admin-shell .compact-filter-field span,
.admin-shell .admin-form-grid label.field span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--admin-muted);
}

.admin-shell .input-with-action {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-shell .input-with-action input {
  width: 100%;
  padding-right: 3rem;
}

.admin-shell .btn-token-toggle {
  position: absolute;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: var(--admin-muted);
  cursor: pointer;
  padding: 0.4rem;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.15s ease;
}

.admin-shell .btn-token-toggle:hover {
  color: #ffffff;
}

.admin-shell input[type="text"],
.admin-shell input[type="password"],
.admin-shell input[type="number"],
.admin-shell input[type="search"],
.admin-shell input[type="datetime-local"],
.admin-shell select {
  min-height: 42px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  transition: all 0.15s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-shell input:focus,
.admin-shell select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.07);
  border-color: #6E56FF;
  box-shadow: 0 0 0 3px rgba(110, 86, 255, 0.25);
}

.admin-auth-actions {
  display: flex;
  gap: 0.75rem;
}

/* Linear Gradient Primary Button */
.admin-shell .primary-button,
.glowing-btn {
  min-height: 42px;
  border-radius: 10px;
  padding: 0.65rem 1.4rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  background: var(--admin-accent-grad);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-shadow: 0 4px 20px var(--admin-accent-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-shell .primary-button:hover:not(:disabled),
.glowing-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(110, 86, 255, 0.5);
  filter: brightness(1.1);
}

.admin-shell .secondary-button {
  min-height: 42px;
  border-radius: 10px;
  padding: 0.65rem 1.15rem;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--admin-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}

.admin-shell .secondary-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.admin-shell .danger-button {
  background: rgba(244, 63, 94, 0.12) !important;
  border-color: rgba(244, 63, 94, 0.3) !important;
  color: var(--admin-danger) !important;
}

.admin-shell .danger-button:hover:not(:disabled) {
  background: rgba(244, 63, 94, 0.22) !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.3);
}

.admin-shell .sm-btn {
  min-height: 34px !important;
  padding: 0.35rem 0.75rem !important;
  font-size: 0.8rem !important;
  border-radius: 7px !important;
}

.admin-shell .width-full {
  width: 100%;
}

.admin-shell .icon-only-btn {
  padding: 0.5rem !important;
  min-height: 36px !important;
}

.admin-dashboard-content {
  display: grid;
  gap: 1.5rem;
}

/* Card Panel Base */
.admin-shell .card {
  position: relative;
  background: var(--admin-panel);
  border: 1px solid var(--admin-panel-border);
  border-radius: 16px;
  padding: 1.75rem;
  box-shadow: var(--admin-shadow);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 1rem;
}

.admin-shell .section-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #a78bfa;
  margin-bottom: 0.25rem;
}

.admin-section-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  color: #ffffff;
}

.admin-jump-nav {
  display: flex;
  gap: 0.4rem;
}

.admin-jump-nav a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--admin-muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: all 0.15s ease;
}

.admin-jump-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

/* KPI Telemetry Cards Grid */
.admin-shell .result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.admin-shell .kpi-card {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.4rem !important;
  background: rgba(20, 22, 36, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 135px;
  transition: all 0.2s ease;
}

.admin-shell .kpi-card:hover {
  border-color: rgba(110, 86, 255, 0.3) !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

.admin-shell .kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-shell .result-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--admin-muted);
}

.admin-shell .kpi-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.admin-shell .kpi-badge.ok {
  background: rgba(16, 185, 129, 0.15);
  color: var(--admin-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.admin-shell .kpi-badge.warn {
  background: rgba(245, 158, 11, 0.15);
  color: var(--admin-warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.admin-shell .kpi-badge.muted {
  background: rgba(255, 255, 255, 0.06);
  color: var(--admin-muted-strong);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-shell .result-value {
  font-size: clamp(1.75rem, 2.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  margin: 0.5rem 0 0.2rem;
  line-height: 1;
}

.admin-shell .kpi-subtext {
  font-size: 0.78rem;
  color: var(--admin-muted);
}

.admin-shell .kpi-sparkline {
  margin-top: 0.65rem;
  height: 24px;
  width: 100%;
}

.admin-shell .sparkline-svg {
  width: 100%;
  height: 100%;
}

/* Workspace 2-Column Grid (Analytics & Node Status) */
.admin-workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  gap: 1.5rem;
  align-items: start;
}

.chart-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chart-legend {
  display: flex;
  gap: 1rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--admin-muted);
}

.legend-item .leg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-item.success-leg .leg-dot { background: #4F7CFF; }
.legend-item.error-leg .leg-dot { background: var(--admin-danger); }

.chart-container {
  width: 100%;
  height: 180px;
  margin-top: 1rem;
}

.worker-visualizer-card .detail-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.admin-shell .detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
}

.admin-shell .detail-row:last-child {
  border-bottom: none;
}

.admin-shell .detail-row span {
  color: var(--admin-muted);
}

.admin-shell .detail-row strong {
  color: #ffffff;
  font-weight: 700;
}

/* Filter Toolbar & Tabs */
.admin-filter-row {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.admin-shell .filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-shell .filter-tab {
  min-height: 36px;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--admin-muted-strong);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  transition: all 0.15s ease;
}

.admin-shell .filter-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.admin-shell .filter-tab.active {
  background: rgba(110, 86, 255, 0.18);
  border-color: rgba(110, 86, 255, 0.35);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(110, 86, 255, 0.2);
}

.admin-shell .tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  margin-left: 0.45rem;
}

.admin-shell .table-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 0.85rem;
}

.admin-shell .search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-shell .search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.admin-shell .search-input-wrap .search-icon {
  position: absolute;
  left: 0.85rem;
  color: var(--admin-muted);
  pointer-events: none;
}

.admin-shell .search-input-wrap input {
  padding-left: 2.4rem !important;
  width: 100%;
}

.admin-shell .compact-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-shell .table-meta {
  font-size: 0.82rem;
  color: var(--admin-muted);
}

/* Linear Enterprise Tables */
.admin-shell .table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(10, 11, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-shell .data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.admin-shell .data-table th {
  padding: 0.85rem 1.1rem;
  background: rgba(20, 22, 36, 0.95);
  color: var(--admin-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.admin-shell .data-table td {
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.admin-shell .data-table tbody tr {
  transition: background 0.15s ease;
}

.admin-shell .data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.admin-shell .data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Status Chips & Toggle Button */
.admin-shell .status-toggle-btn {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  cursor: pointer;
  display: inline-flex;
  border-radius: 999px;
}

.admin-shell .status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.admin-shell .status-chip.ok {
  background: rgba(16, 185, 129, 0.12);
  color: var(--admin-success);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.admin-shell .status-chip.warn {
  background: rgba(245, 158, 11, 0.12);
  color: var(--admin-warning);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.admin-shell .status-chip.danger {
  background: rgba(244, 63, 94, 0.12);
  color: var(--admin-danger);
  border: 1px solid rgba(244, 63, 94, 0.28);
}

.admin-shell .chip-dot {
  font-size: 0.55rem;
}

.admin-shell .contact-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.admin-shell .contact-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79, 124, 255, 0.2), rgba(110, 86, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: #ffffff;
  flex-shrink: 0;
}

.admin-shell .contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.admin-shell .btn-copy-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.76rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: var(--admin-muted-strong);
  cursor: pointer;
  transition: all 0.15s ease;
}

.admin-shell .btn-copy-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.admin-shell .btn-copy-chip.copied {
  background: rgba(16, 185, 129, 0.2) !important;
  color: var(--admin-success) !important;
}

.admin-shell .table-subtext {
  font-size: 0.78rem;
  color: var(--admin-muted);
}

.admin-shell .inline-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.admin-shell .request-review-form input[type="text"] {
  min-height: 36px;
  font-size: 0.82rem;
  width: 100%;
  margin-bottom: 0.4rem;
}

.admin-shell .table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.admin-shell .pagination-status {
  font-size: 0.85rem;
  color: var(--admin-muted);
}

/* Preset Cards */
.preset-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.preset-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--admin-muted);
  font-weight: 700;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.preset-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-card:hover {
  background: rgba(110, 86, 255, 0.12);
  border-color: rgba(110, 86, 255, 0.3);
  transform: translateY(-1px);
}

.preset-icon {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.preset-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: #ffffff;
}

.preset-sub {
  font-size: 0.75rem;
  color: var(--admin-muted);
  margin-top: 0.15rem;
}

.admin-shell .stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-shell .grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.admin-shell .grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.admin-shell .input-with-btn {
  display: flex;
  gap: 0.45rem;
}

.admin-shell .input-with-btn input {
  flex: 1;
}

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  width: min(560px, 100%);
  background: rgba(20, 22, 36, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.btn-icon-close {
  background: transparent;
  border: none;
  color: var(--admin-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.btn-icon-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  background: rgba(5, 5, 10, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.toggle-switch-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  min-height: 42px;
}

.toggle-switch-wrap input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-slider {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.2s ease;
}

.toggle-switch-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-switch-wrap input:checked + .toggle-switch-slider {
  background: var(--admin-success);
}

.toggle-switch-wrap input:checked + .toggle-switch-slider::before {
  transform: translateX(20px);
}

.toggle-label-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  pointer-events: none;
}

.toast-item {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  background: rgba(20, 22, 36, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: var(--admin-shadow);
  backdrop-filter: blur(20px);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  animation: toast-fade 0.25s ease;
}

.toast-item.success { border-color: rgba(16, 185, 129, 0.4); }
.toast-item.error { border-color: rgba(244, 63, 94, 0.4); }

@keyframes toast-fade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1024px) {
  .admin-shell .result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-workspace-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .admin-shell .result-grid {
    grid-template-columns: 1fr;
  }

  .preset-grid {
    grid-template-columns: 1fr;
  }

  .admin-auth-card {
    grid-template-columns: 1fr;
  }
}
