:root {
  --bg: #f3efe7;
  --panel: rgba(255, 252, 245, 0.92);
  --panel-strong: #fffaf1;
  --ink: #17212b;
  --muted: #637181;
  --line: rgba(23, 33, 43, 0.12);
  --accent: #b14f1b;
  --accent-deep: #8d3514;
  --success: #186a3b;
  --danger: #b42318;
  --warning: #9a6700;
  --shadow: 0 22px 60px rgba(58, 38, 22, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 185, 129, 0.35), transparent 28%),
    radial-gradient(circle at top right, rgba(180, 79, 27, 0.12), transparent 22%),
    linear-gradient(180deg, #f9f5ee 0%, var(--bg) 100%);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: rgba(23, 33, 43, 0.94);
  color: #fffaf1;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

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

.nav-item {
  width: 100%;
  min-height: 44px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
  color: rgba(255, 250, 241, 0.72);
  text-align: left;
  text-decoration: none;
  border-radius: 14px;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 250, 241, 0.12);
  color: #fffaf1;
}

.nav-item.readonly {
  position: relative;
  padding-right: 76px;
}

.nav-item.readonly::after {
  content: attr(data-access-label);
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.14);
  color: rgba(255, 250, 241, 0.88);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 250, 241, 0.14);
  border-radius: 18px;
  color: rgba(255, 250, 241, 0.72);
  line-height: 1.55;
}

.sidebar-note strong {
  color: #fffaf1;
}

.page {
  max-width: 1520px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

.shell-bar {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr 1fr;
  gap: 16px;
}

.section-brief {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
}

.auth-gate-panel {
  margin-top: 16px;
}

.shell-card {
  min-height: 108px;
  padding: 18px 20px;
  display: grid;
  gap: 8px;
  align-content: start;
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brief-card {
  min-height: 148px;
  padding: 20px 22px;
  display: grid;
  gap: 12px;
  align-content: start;
  background: rgba(255, 252, 245, 0.82);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.brief-card h3 {
  margin: 0;
  font-size: 26px;
}

.brief-card p,
.brief-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.brief-subtext {
  padding-top: 2px;
  border-top: 1px dashed rgba(23, 33, 43, 0.12);
  color: var(--muted);
  line-height: 1.7;
}

.brief-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-gate-card,
.not-found-panel {
  min-height: 0;
}

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

.shell-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.shell-card strong {
  font-size: 18px;
}

.shell-card small {
  color: var(--muted);
  word-break: break-all;
}

.shell-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.shell-card-actions {
  align-content: space-between;
}

.shell-card-primary strong {
  font-size: 22px;
}

.shell-card-runtime p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: stretch;
}

.hero-console-copy {
  display: grid;
  align-content: start;
  gap: 18px;
}

.hero-console-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

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

.hero-console-card {
  min-height: 122px;
  padding: 18px 18px 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-console-card span,
.hero-console-card small {
  color: var(--muted);
  line-height: 1.65;
}

.hero-console-card strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

.hero h2 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.02;
}

.subtitle {
  max-width: 820px;
  margin: 16px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.hero-card,
.hero-console-card,
.hero-meta-card,
.filters,
.table-panel,
.detail-panel,
.metric-card,
.todo-card,
.placeholder-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero-card {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.hero-console-panel {
  align-content: start;
}

.hero-console-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.hero-console-panel-header > div {
  display: grid;
  gap: 6px;
}

.hero-console-panel-header strong {
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

.hero-meta-card {
  min-height: 102px;
  padding: 14px 16px;
  display: grid;
  gap: 8px;
  align-content: start;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.hero-meta-card span,
.hero-meta-card small {
  color: var(--muted);
  line-height: 1.6;
}

.hero-meta-card strong {
  font-size: 18px;
}

.section {
  display: none;
  margin-top: 24px;
}

.section.active {
  display: block;
}

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

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

.section-heading h3 {
  margin: 0;
  font-size: 28px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.badge.live {
  background: rgba(24, 106, 59, 0.12);
  color: var(--success);
}

.badge.planned {
  background: rgba(99, 113, 129, 0.14);
  color: var(--muted);
}

.badge.todo {
  background: rgba(154, 103, 0, 0.13);
  color: var(--warning);
}

.badge.neutral {
  background: rgba(23, 33, 43, 0.08);
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card {
  min-height: 188px;
  padding: 22px 20px 20px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.metric-card > span {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card-actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

.metric-card span,
.metric-card small {
  color: var(--muted);
}

.metric-card strong {
  font-size: 34px;
}

.metric-card small {
  max-width: 220px;
  line-height: 1.7;
}

.insight-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.insight-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.insight-card span,
.insight-card small {
  color: var(--muted);
}

.insight-card strong {
  font-size: 22px;
  letter-spacing: -0.02em;
}

.dashboard-status {
  margin-top: 14px;
  color: var(--muted);
}

.dashboard-alert-panel {
  margin-top: 18px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.panel-header h4 {
  margin: 0;
}

.panel-header small {
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-alert-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dashboard-alert-toolbar {
  margin-top: 16px;
  display: grid;
  gap: 14px;
}

.dashboard-alert-counters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dashboard-alert-counter {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.dashboard-alert-counter.active {
  border-color: rgba(23, 33, 43, 0.24);
  box-shadow: inset 0 0 0 1px rgba(23, 33, 43, 0.08);
}

.dashboard-alert-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-alert-filter-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
}

.alert-card {
  position: relative;
  padding: 20px 20px 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.5);
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.alert-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, rgba(18, 140, 255, 0.86), rgba(109, 84, 255, 0.76));
}

.alert-card-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.alert-card strong {
  font-size: 19px;
  line-height: 1.45;
}

.alert-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.alert-card.alert-critical {
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(254, 242, 242, 0.9);
}

.alert-card.alert-critical::before {
  background: linear-gradient(90deg, rgba(220, 51, 88, 0.92), rgba(255, 126, 95, 0.88));
}

.alert-card.alert-warning {
  border-color: rgba(154, 103, 0, 0.22);
  background: rgba(255, 251, 235, 0.92);
}

.alert-card.alert-warning::before {
  background: linear-gradient(90deg, rgba(255, 166, 0, 0.92), rgba(255, 205, 86, 0.88));
}

.alert-card.alert-positive {
  border-color: rgba(24, 106, 59, 0.22);
  background: rgba(240, 253, 244, 0.92);
}

.alert-card.alert-positive::before {
  background: linear-gradient(90deg, rgba(15, 159, 98, 0.92), rgba(52, 211, 153, 0.86));
}

.alert-card.alert-neutral {
  border-color: rgba(99, 113, 129, 0.16);
}

.alert-card.alert-workflow-resolved,
.alert-card.alert-workflow-ignored {
  opacity: 0.82;
}

.alert-card-meta {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.72;
}

.alert-card-note {
  padding: 12px 13px;
  border-radius: 14px;
  background: rgba(23, 33, 43, 0.05);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}

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

.alert-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.alert-card-actions .small-button {
  min-height: 34px;
}

.todo-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.todo-card,
.placeholder-panel {
  padding: 22px;
}

.admin-role-preview-board {
  display: grid;
  gap: 16px;
}

.admin-role-preview-select {
  min-width: 280px;
}

.admin-role-preview-table {
  margin-top: 0;
}

.admin-content .detail-panel pre {
  min-height: 120px;
}

.todo-card h4,
.placeholder-panel h4 {
  margin: 0 0 10px;
  font-size: 18px;
}

.todo-card p,
.placeholder-panel li {
  color: var(--muted);
  line-height: 1.7;
}

.placeholder-panel ul {
  margin: 0;
  padding-left: 20px;
}

.filters {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.52);
}

label {
  display: grid;
  gap: 8px;
}

label span {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
}

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

input,
select,
textarea {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(23, 33, 43, 0.14);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(177, 79, 27, 0.25);
  border-color: rgba(177, 79, 27, 0.4);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  grid-column: span 2;
}

button {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease;
}

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

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  color: #fff;
}

.secondary {
  background: rgba(23, 33, 43, 0.08);
  color: var(--ink);
}

.danger {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
}

.status-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.status {
  min-height: 52px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  border-radius: 18px;
  border: 1px solid rgba(58, 110, 210, 0.12);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  line-height: 1.65;
}

.status[data-kind='success'] {
  color: var(--success);
}

.status[data-kind='error'] {
  color: var(--danger);
}

.summary {
  min-height: 52px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-radius: 18px;
  border: 1px solid rgba(58, 110, 210, 0.1);
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  text-align: right;
  line-height: 1.65;
}

.content {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  align-items: start;
}

.issues-content {
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.9fr);
}

.version-log-content {
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
}

.table-panel {
  overflow: hidden;
}

.selected-row {
  background: rgba(37, 99, 235, 0.08);
}

.issue-title-cell {
  max-width: 360px;
  font-weight: 700;
}

.issue-version-cell {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.issue-feature-panel {
  margin-top: 18px;
  padding: 18px;
}

.switch-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-weight: 700;
}

.switch-field input {
  width: 44px;
  height: 24px;
  accent-color: #2563eb;
}

.markdown-preview {
  margin: 14px 0;
  padding: 14px;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--ink);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.issue-attachment-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.issue-attachment-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.52);
}

.issue-attachment-preview {
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(23, 33, 43, 0.06);
  color: var(--muted);
  overflow: hidden;
}

.issue-attachment-preview.is-previewable {
  cursor: zoom-in;
}

.issue-attachment-preview.is-previewable:hover {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
}

.issue-attachment-preview img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: contain;
}

.issue-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  padding: 28px;
}

.issue-image-lightbox[hidden] {
  display: none;
}

.issue-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.issue-image-lightbox__dialog {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.issue-image-lightbox__toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.issue-image-lightbox__toolbar strong,
.issue-image-lightbox__toolbar small {
  display: block;
}

.issue-image-lightbox__toolbar strong {
  color: var(--ink);
  font-size: 16px;
}

.issue-image-lightbox__toolbar small,
.issue-image-lightbox__caption {
  color: var(--muted);
  font-size: 12px;
}

.issue-image-lightbox__toolbar button,
.issue-image-lightbox__nav {
  border: 0;
  border-radius: 12px;
  padding: 9px 13px;
  background: rgba(239, 246, 255, 0.98);
  color: #1d4ed8;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.36);
}

.issue-image-lightbox__stage {
  min-height: 320px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border-radius: 16px;
  background: #f8fafc;
}

.issue-image-lightbox__stage img {
  width: 100%;
  max-height: calc(100vh - 190px);
  object-fit: contain;
}

.issue-image-lightbox__caption {
  min-height: 18px;
  text-align: center;
}

@media (max-width: 720px) {
  .issue-image-lightbox {
    padding: 12px;
  }

  .issue-image-lightbox__dialog {
    max-height: calc(100vh - 24px);
  }

  .issue-image-lightbox__stage {
    grid-template-columns: 1fr;
  }

  .issue-image-lightbox__nav {
    width: 100%;
  }
}

.issue-detail-panel label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.skeleton-row td {
  border-bottom: 1px solid var(--line);
}

.skeleton-cell {
  padding: 16px;
}

.skeleton-block {
  display: block;
  width: 100%;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(23, 33, 43, 0.08) 25%, rgba(23, 33, 43, 0.16) 50%, rgba(23, 33, 43, 0.08) 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.25s linear infinite;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

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

thead {
  background: rgba(23, 33, 43, 0.03);
}

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.35;
}

th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

tbody tr {
  cursor: pointer;
  transition: background 140ms ease;
}

tbody tr:hover {
  background: rgba(177, 79, 27, 0.06);
}

tbody tr.active {
  background: rgba(177, 79, 27, 0.11);
}

.pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill.ok {
  background: rgba(24, 106, 59, 0.12);
  color: var(--success);
}

.pill.error {
  background: rgba(180, 35, 24, 0.12);
  color: var(--danger);
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
}

.empty-state {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: center;
  padding: 18px 14px 10px;
}

.empty-state strong {
  font-size: 15px;
  color: var(--ink);
}

.empty-state::before {
  content: attr(data-label);
  min-width: 96px;
  min-height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.empty-state small {
  max-width: 420px;
  color: var(--muted);
  line-height: 1.7;
}

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

.pagination {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 18px;
  border-top: 1px solid rgba(58, 110, 210, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(58, 110, 210, 0.03));
}

.pagination > span {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  border-radius: 999px;
  border: 1px solid rgba(58, 110, 210, 0.1);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.detail-panel {
  padding: 22px;
  position: sticky;
  top: 24px;
}

.detail-panel h3 {
  margin: 0 0 18px;
}

.detail-meta {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--muted);
}

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

.trace-summary-grid {
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.trace-card {
  min-height: 88px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  align-content: start;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(23, 33, 43, 0.08);
}

.trace-card.accent {
  background: rgba(177, 79, 27, 0.08);
  border-color: rgba(177, 79, 27, 0.18);
}

.trace-card.warn {
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.18);
}

.trace-card.ok {
  background: rgba(24, 106, 59, 0.08);
  border-color: rgba(24, 106, 59, 0.18);
}

.trace-card.error {
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.18);
}

.trace-card.neutral {
  background: rgba(23, 33, 43, 0.05);
  border-color: rgba(23, 33, 43, 0.1);
}

.trace-card span,
.trace-card small {
  color: var(--muted);
  line-height: 1.55;
}

.trace-card strong {
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
}

.detail-summary-card {
  min-height: 76px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
  align-content: start;
  border-radius: 16px;
  background: rgba(23, 33, 43, 0.05);
  border: 1px solid rgba(23, 33, 43, 0.08);
}

.detail-summary-card.accent {
  background: rgba(177, 79, 27, 0.08);
  border-color: rgba(177, 79, 27, 0.16);
}

.detail-summary-key {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.detail-summary-card strong {
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.detail-panel section + section {
  margin-top: 22px;
}

.detail-hint {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(23, 33, 43, 0.05);
  border: 1px solid rgba(23, 33, 43, 0.08);
  color: var(--muted);
  line-height: 1.65;
}

.detail-panel h4 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.version-log-version-cell {
  display: grid;
  gap: 4px;
}

.version-log-version-cell small,
.version-log-artifact-card small,
.version-log-git-ref span {
  color: var(--muted);
}

.version-log-markdown {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(23, 33, 43, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 251, 252, 0.92));
  color: var(--text);
  line-height: 1.75;
}

.version-log-markdown h3,
.version-log-markdown h4,
.version-log-markdown h5,
.version-log-markdown h6 {
  margin: 14px 0 8px;
  color: #17212b;
  letter-spacing: 0;
  text-transform: none;
}

.version-log-markdown h3:first-child,
.version-log-markdown h4:first-child,
.version-log-markdown h5:first-child,
.version-log-markdown h6:first-child {
  margin-top: 0;
}

.version-log-markdown p {
  margin: 0 0 10px;
}

.version-log-markdown ul {
  margin: 0 0 12px;
  padding-left: 20px;
}

.version-log-markdown li + li {
  margin-top: 6px;
}

.version-log-artifacts,
.version-log-git-refs {
  display: grid;
  gap: 10px;
}

.version-log-artifact-card,
.version-log-git-ref {
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid rgba(58, 110, 210, 0.12);
  background: rgba(255, 255, 255, 0.84);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
}

.version-log-artifact-card:hover {
  border-color: rgba(58, 110, 210, 0.3);
  box-shadow: 0 14px 30px rgba(31, 48, 78, 0.1);
  transform: translateY(-1px);
}

.version-log-artifact-card span {
  width: fit-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(58, 110, 210, 0.08);
  color: #2f5fb5;
  font-size: 12px;
  font-weight: 800;
}

.version-log-artifact-card strong,
.version-log-git-ref strong {
  word-break: break-word;
}

.version-log-artifact-card small {
  line-height: 1.5;
  word-break: break-all;
}

.version-log-detail-panel .trace-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

pre {
  margin: 0;
  padding: 14px;
  border-radius: 18px;
  background: #171f26;
  color: #f5f7fa;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", "Menlo", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.detail-empty {
  position: relative;
  padding: 52px 18px 18px;
  border: 1px dashed rgba(23, 33, 43, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
  color: var(--muted);
  line-height: 1.65;
}

.detail-empty::before {
  content: '待补充详情';
  position: absolute;
  left: 18px;
  top: 16px;
  min-height: 28px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.admin-timeline {
  display: grid;
  gap: 12px;
}

.admin-timeline-item {
  position: relative;
  padding: 14px 14px 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(23, 33, 43, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.admin-timeline-item::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: linear-gradient(180deg, rgba(56, 213, 255, 0.7), rgba(124, 61, 255, 0.32));
  border-radius: 999px;
}

.admin-timeline-item strong,
.admin-timeline-item small,
.admin-timeline-item span {
  display: block;
}

.admin-timeline-item span,
.admin-timeline-item small {
  color: var(--muted);
  line-height: 1.6;
}

.admin-timeline-item strong {
  margin-bottom: 4px;
}

.hidden {
  display: none !important;
}

.toast-viewport {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 9999;
  width: min(360px, calc(100vw - 24px));
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.toast {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 245, 0.96);
  color: var(--ink);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.toast-info {
  border-color: rgba(23, 33, 43, 0.12);
}

.toast-success {
  border-color: rgba(24, 106, 59, 0.22);
  background: rgba(240, 253, 244, 0.96);
}

.toast-error {
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(254, 242, 242, 0.98);
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

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

  .hero,
  .shell-bar,
  .section-brief,
  .content,
  .provider-detail-content,
  .todo-grid,
  .dashboard-alert-grid {
    grid-template-columns: 1fr;
  }

  .hero-console-grid,
  .hero-console-meta {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .filters,
  .dashboard-alert-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .actions {
    grid-column: span 4;
    justify-content: stretch;
  }

  .filter-stack > .list-toolbar,
  .filter-stack > .filters,
  .filter-stack > .request-log-primary-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filter-stack > .compact-toolbar {
    grid-template-columns: minmax(220px, 1fr) auto;
  }

  .dashboard-alert-filter-actions {
    justify-content: stretch;
  }

  .dashboard-alert-filter-actions button {
    width: 100%;
  }

  .summary {
    text-align: left;
  }

  .actions button {
    flex: 1;
  }

  .detail-panel {
    position: static;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 20px 14px 32px;
  }

  .sidebar {
    padding: 20px 14px;
  }

  .nav,
  .metric-grid,
  .filters,
  .dashboard-alert-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section-heading,
  .status-row {
    grid-template-columns: 1fr;
  }

  .hero-console-panel-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-heading {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    grid-column: span 2;
    flex-direction: column;
  }

  .filter-stack > .list-toolbar,
  .filter-stack > .filters,
  .filter-stack > .compact-toolbar,
  .filter-stack > .request-log-primary-toolbar {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: stretch;
  }

  .summary {
    justify-content: flex-start;
    text-align: left;
  }

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

  .pagination > span,
  .pagination > button {
    justify-self: stretch;
    width: 100%;
  }

  th:nth-child(5),
  td:nth-child(5),
  th:nth-child(6),
  td:nth-child(6),
  th:nth-child(8),
  td:nth-child(8) {
    display: none;
  }
}

.list-toolbar {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  align-items: stretch;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.orders-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.filter-stack > .list-toolbar,
.filter-stack > .filters {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filter-stack > .unified-filter-toolbar {
  padding: 14px;
  border-radius: 22px;
  box-shadow: 0 16px 44px rgba(58, 38, 22, 0.09);
}

.filter-stack > .compact-toolbar,
.filter-stack > .request-log-primary-toolbar {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.filter-stack {
  display: grid;
  gap: 12px;
}

.request-log-primary-toolbar {
  margin-top: 0;
}

.list-toolbar > label,
.filters > label {
  min-width: 0;
  min-height: 76px;
  height: 100%;
  padding: 10px 12px;
  align-content: start;
  border-radius: 18px;
  border: 1px solid rgba(58, 110, 210, 0.1);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.list-toolbar > label:focus-within,
.filters > label:focus-within {
  border-color: rgba(18, 140, 255, 0.26);
  box-shadow: 0 0 0 4px rgba(18, 140, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

.list-toolbar > label > span,
.filters > label > span {
  min-height: 15px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.list-toolbar > label > input,
.list-toolbar > label > select,
.filters > label > input,
.filters > label > select {
  width: 100%;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  line-height: 1.2;
}

.list-toolbar > label > input[type='date'],
.filters > label > input[type='date'],
.list-toolbar > label > input[type='number'],
.filters > label > input[type='number'] {
  padding-right: 14px;
}

.list-toolbar > label > select,
.filters > label > select {
  padding-right: 40px;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(58, 110, 210, 0.8) 50%),
    linear-gradient(135deg, rgba(58, 110, 210, 0.8) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.list-toolbar > button {
  min-height: 48px;
  height: 48px;
  align-self: end;
}

.list-toolbar input,
.list-toolbar select,
.filters input,
.filters select {
  min-height: 48px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.9);
}

.list-toolbar .actions,
.filters .actions {
  min-height: 100%;
  justify-content: flex-end;
  align-items: flex-end;
  align-self: end;
  padding-top: 2px;
}

.compact-actions {
  grid-column: auto;
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  min-height: 44px;
  padding-top: 0;
  margin-top: -4px;
}

.simple-table {
  margin-top: 18px;
}

.queue-table-panel {
  overflow-x: auto;
}

.queue-table-panel table {
  min-width: 1080px;
}

.queue-table-panel th:last-child,
.queue-table-panel td:last-child {
  width: 96px;
  white-space: nowrap;
}

.pill.neutral {
  background: rgba(99, 113, 129, 0.14);
  color: var(--muted);
}

@media (max-width: 1200px) {
  .list-toolbar,
  .orders-toolbar,
  .insight-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}

@media (max-width: 720px) {
  .list-toolbar,
  .orders-toolbar,
  .insight-grid {
    grid-template-columns: 1fr;
  }
}

.compact-toolbar {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: stretch;
}

.compact-toolbar .actions {
  justify-content: flex-end;
}

.toolbar-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(23, 33, 43, 0.05);
  border: 1px solid rgba(58, 110, 210, 0.08);
  color: var(--muted);
  line-height: 1.65;
}

.quick-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-filter-row span {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.mono-like {
  font-family: "SFMono-Regular", "Menlo", monospace;
}

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

.table-actions .small-button {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.table-actions .row-action-primary {
  background: linear-gradient(135deg, rgba(18, 140, 255, 0.16), rgba(109, 84, 255, 0.14));
  color: var(--accent-deep);
  border: 1px solid rgba(58, 110, 210, 0.16);
}

.table-actions .row-action-danger {
  background: linear-gradient(135deg, rgba(220, 51, 88, 0.12), rgba(255, 126, 95, 0.1));
  color: var(--danger);
  border: 1px solid rgba(220, 51, 88, 0.14);
}

.nickname-cell {
  min-width: 176px;
  max-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nickname-cell__value,
.nickname-cell .muted {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nickname-cell__edit {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.nickname-inline-editor {
  min-width: 250px;
  display: grid;
  grid-template-columns: minmax(128px, 1fr) auto auto;
  gap: 6px;
  align-items: center;
}

.nickname-inline-editor input {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
}

.nickname-inline-editor .small-button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 720px) {
  .nickname-cell,
  .nickname-inline-editor {
    min-width: 0;
    max-width: none;
  }

  .nickname-inline-editor {
    grid-template-columns: 1fr;
  }
}

.history-list {
  display: grid;
  gap: 12px;
}

.subject-activity-panel h4 {
  margin: 0;
}

.subject-activity-panel {
  display: grid;
  gap: 12px;
}

.history-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(23, 33, 43, 0.05);
  border: 1px solid rgba(58, 110, 210, 0.08);
}

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

.history-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.history-top span {
  color: var(--muted);
  font-size: 12px;
}

.chip-list {
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 30px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.06);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.quick-filter-row {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quick-filter-row span {
  font-weight: 700;
}

.quick-filter-row .secondary.active {
  background: rgba(177, 79, 27, 0.12);
  color: var(--accent-deep);
}

.credit-ledger-overview {
  margin: 18px 0 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.credit-ledger-card {
  min-height: 116px;
  padding: 16px;
  border: 1px solid rgba(58, 110, 210, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(246, 248, 251, 0.72));
  box-shadow: 0 14px 32px rgba(25, 37, 52, 0.08);
  display: grid;
  gap: 8px;
  align-content: start;
}

.credit-ledger-card--danger {
  border-color: rgba(190, 36, 63, 0.18);
  background: linear-gradient(180deg, rgba(255, 248, 249, 0.92), rgba(255, 255, 255, 0.74));
}

.credit-ledger-card--income {
  border-color: rgba(28, 128, 88, 0.2);
  background: linear-gradient(180deg, rgba(240, 253, 246, 0.88), rgba(255, 255, 255, 0.72));
}

.credit-ledger-card__label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
}

.credit-ledger-card strong {
  color: var(--ink);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
  letter-spacing: 0;
}

.credit-ledger-card small {
  color: var(--muted);
  line-height: 1.45;
}

.credit-ledger-quick-row {
  margin: 0 0 12px;
  background: rgba(255, 255, 255, 0.62);
}

.credit-ledger-quick-row .small-button {
  min-height: 34px;
  padding: 0 12px;
}

.credit-user-cell {
  min-width: 138px;
  display: grid;
  gap: 4px;
}

.credit-user-cell strong,
.credit-note-cell,
.credit-ref-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.credit-user-cell small,
.credit-time-cell {
  color: var(--muted);
  font-size: 12px;
}

.credit-type-pill {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(99, 113, 129, 0.14);
  color: var(--muted);
}

.credit-type-pill--danger {
  background: rgba(190, 36, 63, 0.12);
  color: #b42318;
}

.credit-type-pill--ok {
  background: rgba(28, 128, 88, 0.12);
  color: #186a3b;
}

.credit-type-pill--warning {
  background: rgba(177, 79, 27, 0.13);
  color: var(--accent-deep);
}

.credit-amount {
  display: inline-flex;
  min-width: 92px;
  justify-content: flex-end;
  font-variant-numeric: tabular-nums;
}

.credit-balance-flow {
  display: inline-grid;
  grid-template-columns: minmax(78px, auto) auto minmax(78px, auto);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.credit-balance-flow b {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.credit-note-cell {
  display: inline-block;
  color: var(--muted);
}

@media (max-width: 1200px) {
  .credit-ledger-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .credit-ledger-overview {
    grid-template-columns: 1fr;
  }
}

.pricing-editor {
  margin-top: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(58, 110, 210, 0.1);
}

.editor-heading h4 {
  margin: 0;
  font-size: 22px;
}

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

.provider-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.provider-content {
  grid-template-columns: 1fr;
}

.provider-grid .metric-card {
  min-height: 118px;
  padding: 14px 16px;
  gap: 6px;
}

.provider-grid .metric-card strong {
  font-size: 30px;
}

.provider-grid .metric-card small {
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .provider-grid {
    grid-template-columns: 1fr;
  }
}

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

.provider-editor-content,
.provider-detail-content {
  grid-template-columns: 1.25fr 0.85fr;
}

.provider-editor-main {
  padding: 18px;
}

.provider-editor-side pre {
  margin-top: 10px;
}

.provider-detail-toolbar {
  padding: 18px 18px 4px;
  display: grid;
  gap: 14px;
  border-bottom: 1px solid rgba(58, 110, 210, 0.08);
}

.provider-detail-toolbar .detail-meta {
  margin-bottom: 0;
}

.provider-form textarea {
  min-height: 88px;
}

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

.checkbox-field {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-field input {
  min-height: auto;
  width: 18px;
  height: 18px;
}

.checkbox-field span {
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 4px;
}

.detail-actions {
  margin-bottom: 18px;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

@media (max-width: 1200px) {
  .pricing-form,
  .provider-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pricing-form,
  .provider-form,
  .wide-field {
    grid-column: auto;
  }

  .alert-card-form {
    grid-template-columns: 1fr;
  }

  .dashboard-alert-filters {
    grid-template-columns: 1fr;
  }

  .detail-summary-grid {
    grid-template-columns: 1fr;
  }

  .trace-summary-grid {
    grid-template-columns: 1fr;
  }

  .pricing-form {
    grid-template-columns: 1fr;
  }

  .provider-form {
    grid-template-columns: 1fr;
  }
}

.user-credit-editor {
  margin-top: 18px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.credit-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: stretch;
}

.credit-amount-row {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(360px, 1fr);
  gap: 12px;
  align-items: end;
}

.credit-amount-field {
  min-width: 0;
}

body.modal-open {
  overflow: hidden;
}

.credit-modal {
  position: fixed;
  inset: 0;
  z-index: 4800;
  display: grid;
  place-items: center;
  padding: 24px;
}

.credit-modal.hidden {
  display: none;
}

.credit-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(12, 22, 44, 0.46);
  backdrop-filter: none;
  cursor: pointer;
}

.credit-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  display: grid;
  gap: 16px;
  padding: 24px;
  overflow: auto;
  border-radius: 14px;
}

.credit-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
}

.credit-modal__dialog button,
.credit-presets .small-button {
  border-radius: 8px;
}

.credit-presets .small-button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(58, 110, 210, 0.16);
  background: rgba(42, 119, 255, 0.08);
  box-shadow: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.credit-editor-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
}

.credit-editor-actions #creditAuditButton {
  justify-self: start;
}

.danger-button {
  color: #b42318;
  box-shadow: inset 0 0 0 1px rgba(180, 35, 24, 0.2);
}

.quant-access-form {
  display: grid;
  gap: 16px;
}

.role-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 10px;
  margin-top: 10px;
  min-height: 140px;
}

.role-model-item {
  display: grid;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(134, 169, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.role-model-item.selected {
  border-color: rgba(37, 99, 235, 0.42);
  background: rgba(37, 99, 235, 0.06);
}

.role-model-item label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
}

.role-model-item strong,
.role-model-item small {
  display: block;
}

.role-model-item small {
  margin-top: 4px;
  color: var(--muted);
  word-break: break-all;
}

.role-model-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-left: 26px;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.role-management-layout {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.role-list-panel,
.role-model-editor-panel {
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.role-card-list {
  display: grid;
  gap: 10px;
}

.role-card {
  width: 100%;
  min-height: 92px;
  padding: 14px;
  text-align: left;
  border: 1px solid rgba(134, 169, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
  cursor: pointer;
  letter-spacing: 0;
  line-height: 1.35;
  white-space: normal;
}

.role-card:hover,
.role-card.active {
  border-color: rgba(42, 119, 255, 0.56);
  background: rgba(42, 119, 255, 0.08);
}

.role-card span,
.role-card strong,
.role-card small {
  display: block;
}

.role-card span {
  font-weight: 800;
}

.role-card strong {
  margin-top: 6px;
  color: var(--accent);
}

.role-card small {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}

.role-model-panel {
  margin: 16px 0;
}

@media (max-width: 720px) {
  .credit-modal {
    padding: 12px;
  }

  .credit-modal__dialog {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .credit-form {
    grid-template-columns: 1fr;
  }

  .credit-amount-row {
    grid-template-columns: 1fr;
  }

  .credit-presets {
    grid-template-columns: 1fr 1fr;
  }

  .credit-editor-actions {
    grid-template-columns: 1fr;
  }

  .credit-editor-actions #creditAuditButton {
    justify-self: stretch;
  }

  .credit-editor-actions button {
    width: 100%;
  }

  .role-model-grid {
    grid-template-columns: 1fr;
  }

  .role-management-layout {
    grid-template-columns: 1fr;
  }
}

.danger-hint {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(180, 35, 24, 0.1);
  border: 1px solid rgba(180, 35, 24, 0.22);
  color: var(--danger);
  line-height: 1.65;
}

.audit-content {
  grid-template-columns: 1.2fr 1fr;
}

.split-actions {
  gap: 8px;
}

.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 185, 129, 0.4), transparent 28%),
    rgba(243, 239, 231, 0.94);
  backdrop-filter: blur(10px);
}

.login-overlay.hidden {
  display: none;
}

.login-card {
  width: min(480px, 100%);
  padding: 30px;
  display: grid;
  gap: 18px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.login-card h2 {
  margin: 0;
  font-size: 34px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.login-notes {
  display: grid;
  gap: 10px;
}

.login-note {
  padding: 12px 14px;
  display: grid;
  gap: 4px;
  border-radius: 16px;
  background: rgba(23, 33, 43, 0.05);
  border: 1px solid rgba(23, 33, 43, 0.08);
}

.login-note strong {
  font-size: 13px;
}

.login-note small {
  color: var(--muted);
  line-height: 1.6;
}

.login-password-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(23, 33, 43, 0.08);
}

.login-actions {
  display: flex;
  gap: 10px;
}

.login-actions button {
  flex: 1;
}

.login-dev-panel {
  padding-top: 6px;
  display: grid;
  gap: 12px;
  border-top: 1px dashed rgba(58, 110, 210, 0.18);
}

.login-dev-header {
  display: grid;
  gap: 4px;
}

.login-dev-header small {
  color: var(--muted);
  line-height: 1.6;
}

.ghost {
  background: transparent;
  color: #48617f;
  border-color: rgba(58, 110, 210, 0.16);
}

.status.subtle {
  background: rgba(58, 110, 210, 0.06);
  color: #48617f;
}

.admin-session-card {
  min-height: 76px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 18px;
  background: rgba(23, 33, 43, 0.06);
}

.admin-session-card span,
.admin-session-card small {
  display: block;
  color: var(--muted);
}

.admin-session-card strong {
  display: block;
  margin: 4px 0;
  font-size: 18px;
}

/* Premium technology visual refresh */
:root {
  --bg: #070b18;
  --panel: rgba(10, 18, 38, 0.72);
  --panel-strong: rgba(15, 26, 52, 0.92);
  --ink: #eef6ff;
  --muted: #93a4bd;
  --line: rgba(134, 169, 255, 0.18);
  --accent: #38d5ff;
  --accent-deep: #7c3dff;
  --success: #42f59b;
  --danger: #ff5c7a;
  --warning: #ffd36a;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38), 0 0 42px rgba(56, 213, 255, 0.08);
  --glow: 0 0 28px rgba(56, 213, 255, 0.22);
  --glow-strong: 0 0 54px rgba(124, 61, 255, 0.28);
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% -8%, rgba(56, 213, 255, 0.28), transparent 28%),
    radial-gradient(circle at 88% 2%, rgba(124, 61, 255, 0.28), transparent 30%),
    radial-gradient(circle at 50% 105%, rgba(21, 104, 255, 0.18), transparent 36%),
    linear-gradient(135deg, #050711 0%, #0a1021 42%, #10172d 100%);
  font-family: Inter, "SF Pro Display", "Segoe UI", "PingFang SC", sans-serif;
  letter-spacing: -0.01em;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(134, 169, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(134, 169, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 72%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0%, rgba(56, 213, 255, 0.08) 18%, transparent 36%),
    linear-gradient(290deg, transparent 8%, rgba(124, 61, 255, 0.08) 30%, transparent 58%);
  opacity: 0.8;
}

.app-shell {
  grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
  padding: 30px 22px;
  background:
    linear-gradient(180deg, rgba(8, 15, 32, 0.96) 0%, rgba(8, 12, 24, 0.9) 100%);
  border-right: 1px solid rgba(134, 169, 255, 0.16);
  box-shadow: 22px 0 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(26px);
}

.brand {
  position: relative;
  padding: 18px 16px 20px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(56, 213, 255, 0.13), rgba(124, 61, 255, 0.14)),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(134, 169, 255, 0.16);
  overflow: hidden;
}

.brand::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -52px;
  top: -52px;
  border-radius: 999px;
  background: rgba(56, 213, 255, 0.24);
  filter: blur(4px);
}

.brand h1 {
  position: relative;
  font-size: 28px;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #fff 0%, #8be9ff 48%, #b6a1ff 100%);
  -webkit-background-clip: text;
  color: transparent;
}

.nav {
  gap: 10px;
}

.nav-item {
  position: relative;
  min-height: 48px;
  padding: 0 18px 0 20px;
  color: rgba(220, 234, 255, 0.72);
  border: 1px solid transparent;
  border-radius: 16px;
}

.nav-item::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 12px;
  border-radius: 999px;
  background: rgba(147, 164, 189, 0.48);
  box-shadow: 0 0 0 rgba(56, 213, 255, 0);
  transition: background 160ms ease, box-shadow 160ms ease;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(135deg, rgba(56, 213, 255, 0.14), rgba(124, 61, 255, 0.14));
  border-color: rgba(134, 169, 255, 0.22);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), var(--glow);
}

.nav-item:hover::before,
.nav-item.active::before {
  background: #42e8ff;
  box-shadow: 0 0 14px rgba(56, 213, 255, 0.9);
}

.page {
  max-width: 1600px;
  padding: 34px 30px 56px;
}

.hero {
  position: relative;
  min-height: 220px;
  padding: 30px;
  border: 1px solid rgba(134, 169, 255, 0.16);
  border-radius: 34px;
  background:
    radial-gradient(circle at 8% 10%, rgba(56, 213, 255, 0.16), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(124, 61, 255, 0.2), transparent 38%),
    linear-gradient(135deg, rgba(13, 26, 56, 0.84), rgba(10, 18, 38, 0.62));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -42% 38%;
  height: 190px;
  background: linear-gradient(90deg, transparent, rgba(56, 213, 255, 0.18), rgba(124, 61, 255, 0.2), transparent);
  transform: rotate(-8deg);
  filter: blur(8px);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h2 {
  max-width: 760px;
  font-size: clamp(46px, 5.2vw, 74px);
  letter-spacing: -0.07em;
  background: linear-gradient(135deg, #fff 0%, #dff7ff 34%, #6de6ff 66%, #b6a1ff 100%);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: 0 0 34px rgba(56, 213, 255, 0.16);
}

.subtitle {
  max-width: 760px;
  color: #a9bad2;
}

.eyebrow {
  color: #5ce8ff;
  letter-spacing: 0.18em;
  text-shadow: 0 0 16px rgba(56, 213, 255, 0.36);
}

.hero-card,
.filters,
.table-panel,
.detail-panel,
.metric-card,
.todo-card,
.placeholder-panel,
.shell-card,
.brief-card,
.list-toolbar,
.pricing-editor,
.provider-editor-panel,
.user-credit-editor,
.credit-modal__dialog,
.login-card {
  background:
    linear-gradient(145deg, rgba(16, 29, 58, 0.78), rgba(9, 16, 35, 0.72)),
    rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(134, 169, 255, 0.18);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(1.25);
}

.hero-card {
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(10, 18, 38, 0.68);
}

.shell-card,
.brief-card,
.metric-card,
.insight-card,
.hero-console-card,
.hero-meta-card,
.trace-card,
.alert-card,
.detail-summary-card,
.login-note,
.admin-session-card,
.toolbar-note,
.detail-hint,
.danger-hint {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
  border-color: rgba(134, 169, 255, 0.16);
}

.shell-bar {
  margin-top: 22px;
}

.shell-card {
  min-height: 112px;
  border-radius: 22px;
}

.shell-card strong,
.metric-card strong,
.insight-card strong,
.hero-console-card strong,
.hero-meta-card strong,
.detail-summary-card strong,
.trace-card strong {
  color: #f4fbff;
}

.section-heading {
  padding: 4px 4px 0;
}

.section-heading h3 {
  font-size: 32px;
  letter-spacing: -0.045em;
  color: #f5fbff;
}

.badge,
.pill,
.chip {
  border: 1px solid rgba(134, 169, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.badge.live,
.pill.ok,
.trace-card.ok {
  background: rgba(66, 245, 155, 0.12);
  color: #62ffb0;
  border-color: rgba(66, 245, 155, 0.22);
}

.badge.planned,
.badge.neutral,
.pill.neutral {
  background: rgba(134, 169, 255, 0.12);
  color: #b8c8e4;
}

.badge.todo,
.trace-card.warn {
  background: rgba(255, 211, 106, 0.12);
  color: #ffe09a;
  border-color: rgba(255, 211, 106, 0.22);
}

.pill.error,
.trace-card.error {
  background: rgba(255, 92, 122, 0.12);
  color: #ff8ca0;
  border-color: rgba(255, 92, 122, 0.24);
}

.metric-card,
.insight-card,
.trace-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before,
.insight-card::before,
.trace-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 213, 255, 0.72), rgba(124, 61, 255, 0.58), transparent);
}

.metric-card strong {
  font-size: 40px;
  letter-spacing: -0.065em;
  background: linear-gradient(135deg, #fff, #6de6ff);
  -webkit-background-clip: text;
  color: transparent;
}

.metric-card:hover,
.insight-card:hover,
.trace-card:hover,
.table-panel:hover,
.detail-panel:hover {
  border-color: rgba(56, 213, 255, 0.28);
  box-shadow: var(--shadow), var(--glow);
}

input,
select,
textarea {
  background: rgba(5, 10, 24, 0.62);
  border-color: rgba(134, 169, 255, 0.18);
  color: #edf7ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

input::placeholder,
textarea::placeholder {
  color: rgba(147, 164, 189, 0.62);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(56, 213, 255, 0.24);
  border-color: rgba(56, 213, 255, 0.62);
  box-shadow: 0 0 0 4px rgba(56, 213, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

button {
  font-weight: 760;
  letter-spacing: -0.01em;
}

.primary {
  background: linear-gradient(135deg, #28d9ff 0%, #3978ff 46%, #8a5cff 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(56, 125, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.secondary {
  background: rgba(134, 169, 255, 0.12);
  color: #d9e7ff;
  border: 1px solid rgba(134, 169, 255, 0.16);
}

.secondary:hover,
.primary:hover {
  box-shadow: var(--glow);
}

thead {
  background: linear-gradient(90deg, rgba(56, 213, 255, 0.08), rgba(124, 61, 255, 0.08));
}

th {
  color: #91bfff;
}

td {
  border-bottom-color: rgba(134, 169, 255, 0.12);
}

tbody tr:hover {
  background: rgba(56, 213, 255, 0.07);
}

tbody tr.active {
  background: linear-gradient(90deg, rgba(56, 213, 255, 0.13), rgba(124, 61, 255, 0.1));
}

pre {
  background: rgba(2, 8, 18, 0.82);
  border: 1px solid rgba(134, 169, 255, 0.14);
  color: #d9f7ff;
  box-shadow: inset 0 0 34px rgba(56, 213, 255, 0.04);
}

.empty-state::before {
  background: rgba(56, 213, 255, 0.12);
  color: #8eefff;
}

.login-overlay {
  background:
    radial-gradient(circle at top left, rgba(56, 213, 255, 0.28), transparent 32%),
    radial-gradient(circle at bottom right, rgba(124, 61, 255, 0.28), transparent 34%),
    rgba(5, 8, 18, 0.88);
}

.login-card {
  border-radius: 32px;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.52), var(--glow-strong);
}

.login-card h2 {
  font-size: 38px;
  letter-spacing: -0.05em;
  background: linear-gradient(135deg, #fff, #66e7ff, #b6a1ff);
  -webkit-background-clip: text;
  color: transparent;
}

.status[data-kind='success'] {
  color: #62ffb0;
}

.status[data-kind='error'] {
  color: #ff8ca0;
}

.toast {
  background: rgba(10, 18, 38, 0.94);
  border-color: rgba(134, 169, 255, 0.18);
  color: #eef6ff;
}

.toast-success {
  border-color: rgba(66, 245, 155, 0.26);
  background: rgba(8, 34, 28, 0.94);
}

.toast-error {
  border-color: rgba(255, 92, 122, 0.28);
  background: rgba(42, 12, 24, 0.94);
}

@media (max-width: 1200px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid rgba(134, 169, 255, 0.16);
  }
}

/* Bright premium technology refinement */
:root {
  --bg: #edf5ff;
  --panel: rgba(255, 255, 255, 0.78);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --ink: #10223f;
  --muted: #62758f;
  --line: rgba(58, 110, 210, 0.18);
  --accent: #128cff;
  --accent-deep: #6d54ff;
  --success: #0f9f62;
  --danger: #dc3358;
  --warning: #b77900;
  --shadow: 0 24px 70px rgba(45, 83, 140, 0.16), 0 0 36px rgba(18, 140, 255, 0.08);
  --glow: 0 0 26px rgba(18, 140, 255, 0.2);
  --glow-strong: 0 0 48px rgba(109, 84, 255, 0.22);
}

html {
  background: #edf5ff;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -8%, rgba(18, 140, 255, 0.22), transparent 30%),
    radial-gradient(circle at 86% 0%, rgba(109, 84, 255, 0.18), transparent 30%),
    radial-gradient(circle at 52% 108%, rgba(40, 211, 255, 0.18), transparent 38%),
    linear-gradient(135deg, #f8fbff 0%, #edf5ff 42%, #e8efff 100%);
}

body::before {
  background-image:
    linear-gradient(rgba(58, 110, 210, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(58, 110, 210, 0.08) 1px, transparent 1px);
  mask-image: radial-gradient(circle at 50% 22%, #000 0%, transparent 78%);
}

body::after {
  background:
    linear-gradient(120deg, transparent 0%, rgba(18, 140, 255, 0.1) 18%, transparent 38%),
    linear-gradient(290deg, transparent 8%, rgba(109, 84, 255, 0.08) 30%, transparent 60%);
  opacity: 0.7;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(246, 250, 255, 0.94) 0%, rgba(228, 238, 255, 0.86) 100%);
  color: #10223f;
  border-right-color: rgba(58, 110, 210, 0.16);
  box-shadow: 18px 0 70px rgba(58, 110, 210, 0.12);
}

.brand {
  background:
    linear-gradient(135deg, rgba(18, 140, 255, 0.12), rgba(109, 84, 255, 0.11)),
    rgba(255, 255, 255, 0.72);
  border-color: rgba(58, 110, 210, 0.18);
}

.brand h1 {
  background: linear-gradient(135deg, #10223f 0%, #0879e8 48%, #654eff 100%);
  -webkit-background-clip: text;
  color: transparent;
}

.nav-item {
  color: rgba(16, 34, 63, 0.72);
}

.nav-item::before {
  background: rgba(98, 117, 143, 0.42);
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(135deg, rgba(18, 140, 255, 0.12), rgba(109, 84, 255, 0.1));
  border-color: rgba(18, 140, 255, 0.24);
  color: #0b1f3d;
  box-shadow: 0 16px 34px rgba(58, 110, 210, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.nav-item:hover::before,
.nav-item.active::before {
  background: #128cff;
  box-shadow: 0 0 12px rgba(18, 140, 255, 0.7);
}

.hero {
  background:
    radial-gradient(circle at 8% 10%, rgba(18, 140, 255, 0.16), transparent 36%),
    radial-gradient(circle at 82% 18%, rgba(109, 84, 255, 0.14), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(236, 244, 255, 0.72));
  border-color: rgba(58, 110, 210, 0.18);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.hero::after {
  background: linear-gradient(90deg, transparent, rgba(18, 140, 255, 0.18), rgba(109, 84, 255, 0.16), transparent);
}

.hero h2 {
  background: linear-gradient(135deg, #0e2445 0%, #147fff 46%, #705bff 100%);
  -webkit-background-clip: text;
  color: transparent;
  text-shadow: none;
}

.subtitle {
  color: #647792;
}

.eyebrow {
  color: #0879e8;
  text-shadow: none;
}

.hero-card,
.hero-console-card,
.hero-meta-card,
.filters,
.table-panel,
.detail-panel,
.metric-card,
.todo-card,
.placeholder-panel,
.shell-card,
.brief-card,
.list-toolbar,
.pricing-editor,
.provider-editor-panel,
.user-credit-editor,
.credit-modal__dialog,
.login-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(238, 246, 255, 0.68)),
    rgba(255, 255, 255, 0.72);
  border-color: rgba(58, 110, 210, 0.16);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.hero-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(239, 247, 255, 0.74)),
    rgba(255, 255, 255, 0.76);
}

.shell-card,
.brief-card,
.metric-card,
.insight-card,
.hero-console-card,
.hero-meta-card,
.trace-card,
.alert-card,
.detail-summary-card,
.login-note,
.admin-session-card,
.toolbar-note,
.detail-hint,
.danger-hint {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(234, 243, 255, 0.62));
  border-color: rgba(58, 110, 210, 0.14);
}

.shell-card strong,
.metric-card strong,
.insight-card strong,
.hero-console-card strong,
.hero-meta-card strong,
.detail-summary-card strong,
.trace-card strong,
.section-heading h3,
.empty-state strong,
.alert-card strong,
.checkbox-field span {
  color: #10223f;
}

.metric-card strong {
  background: linear-gradient(135deg, #10223f, #128cff);
  -webkit-background-clip: text;
  color: transparent;
}

.badge.live,
.pill.ok,
.trace-card.ok {
  background: rgba(15, 159, 98, 0.1);
  color: #0f8c57;
  border-color: rgba(15, 159, 98, 0.22);
}

.badge.planned,
.badge.neutral,
.pill.neutral {
  background: rgba(58, 110, 210, 0.1);
  color: #48617f;
}

.badge.todo,
.trace-card.warn {
  background: rgba(183, 121, 0, 0.1);
  color: #936406;
  border-color: rgba(183, 121, 0, 0.2);
}

.pill.error,
.trace-card.error {
  background: rgba(220, 51, 88, 0.1);
  color: #c3294e;
  border-color: rgba(220, 51, 88, 0.22);
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(58, 110, 210, 0.18);
  color: #10223f;
}

input::placeholder,
textarea::placeholder {
  color: rgba(98, 117, 143, 0.7);
}

input:focus,
select:focus,
textarea:focus {
  outline-color: rgba(18, 140, 255, 0.22);
  border-color: rgba(18, 140, 255, 0.52);
  box-shadow: 0 0 0 4px rgba(18, 140, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.primary {
  background: linear-gradient(135deg, #22b8ff 0%, #2878ff 48%, #765dff 100%);
  color: #fff;
  box-shadow: 0 14px 34px rgba(40, 120, 255, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.secondary {
  background: rgba(58, 110, 210, 0.1);
  color: #183a68;
  border-color: rgba(58, 110, 210, 0.16);
}

thead {
  background: linear-gradient(90deg, rgba(18, 140, 255, 0.08), rgba(109, 84, 255, 0.07));
}

th {
  color: #3f6db4;
}

td {
  border-bottom-color: rgba(58, 110, 210, 0.11);
}

tbody tr:hover {
  background: rgba(18, 140, 255, 0.055);
}

tbody tr.active {
  background: linear-gradient(90deg, rgba(18, 140, 255, 0.1), rgba(109, 84, 255, 0.08));
}

pre {
  background: rgba(12, 26, 52, 0.94);
  border-color: rgba(58, 110, 210, 0.18);
  color: #dff6ff;
}

.login-overlay {
  background:
    radial-gradient(circle at top left, rgba(18, 140, 255, 0.2), transparent 32%),
    radial-gradient(circle at bottom right, rgba(109, 84, 255, 0.16), transparent 34%),
    rgba(237, 245, 255, 0.9);
}

.login-card h2 {
  background: linear-gradient(135deg, #10223f, #0879e8, #6d54ff);
  -webkit-background-clip: text;
  color: transparent;
}

.toast {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(58, 110, 210, 0.18);
  color: #10223f;
}

.login-overlay {
  padding: 28px;
  place-items: start center;
  overflow-y: auto;
  background: linear-gradient(135deg, #eef2ef 0%, #fbfcfb 48%, #e5ece8 100%);
}

.login-card {
  width: min(980px, 100%);
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(31, 41, 35, 0.12);
  background: #ffffff;
  box-shadow: 0 30px 80px rgba(32, 44, 37, 0.18);
}

.login-card h2 {
  background: none;
  -webkit-background-clip: initial;
  color: inherit;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.88fr) minmax(420px, 1.12fr);
  min-height: 620px;
}

.login-brand-panel {
  position: relative;
  padding: 34px 32px 30px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  background: #18211e;
  color: #f7faf7;
}

.login-brand-panel::after {
  content: none;
}

.login-brand-top,
.login-brand-copy,
.login-brand-footer {
  position: relative;
  z-index: 1;
}

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

.login-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  color: #173129;
  background: #d9f3e6;
}

.login-brand-meta {
  display: grid;
  gap: 4px;
}

.login-brand-meta strong {
  font-size: 15px;
  letter-spacing: 0;
}

.login-brand-meta small {
  color: rgba(235, 242, 237, 0.72);
}

.login-brand-copy {
  margin-top: 42px;
  display: grid;
  gap: 16px;
}

.login-brand-copy .eyebrow {
  margin: 0;
  color: #9fd8bc;
}

.login-brand-copy h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: 0;
}

.login-lead {
  margin: 0;
  max-width: 420px;
  color: rgba(240, 246, 242, 0.8);
  font-size: 16px;
  line-height: 1.78;
}

.login-brand-badges,
.login-brand-grid {
  display: none;
}

.login-brand-footer {
  margin-top: auto;
  padding-top: 22px;
  display: grid;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.login-brand-footer div {
  display: grid;
  gap: 5px;
}

.login-brand-footer span {
  font-size: 12px;
  color: rgba(235, 242, 237, 0.62);
}

.login-brand-footer strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  color: #ffffff;
}

.login-form-panel {
  padding: 42px 40px 34px;
  display: grid;
  align-content: start;
  gap: 18px;
  background: #ffffff;
}

.login-form-head {
  display: grid;
  gap: 10px;
}

.login-form-head .eyebrow {
  margin: 0;
  color: #25845b;
}

.login-form-head h3 {
  margin: 0;
  font-size: 32px;
  line-height: 1.12;
  letter-spacing: 0;
  color: #17201d;
}

.login-form-head p {
  margin: 0;
  color: #66736c;
  line-height: 1.65;
}

.login-identity-panel,
.login-otp-panel {
  display: grid;
  gap: 14px;
}

.login-identity-panel[hidden],
.login-otp-panel[hidden] {
  display: none;
}

.login-identity-panel {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(37, 132, 91, 0.18);
  background: #f6faf8;
}

.login-otp-panel {
  padding: 18px;
  border-radius: 8px;
  border: 1px solid rgba(37, 132, 91, 0.18);
  background: #f6faf8;
}

.login-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: #eef5f1;
  border: 1px solid #d5e0da;
}

.login-method-tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #43514a;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.login-method-tab[aria-selected="true"] {
  background: #237a55;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(35, 122, 85, 0.18);
}

.login-method-tab:focus-visible {
  outline: 3px solid rgba(37, 132, 91, 0.22);
  outline-offset: 2px;
}

.login-form-panel label span {
  color: #394640;
}

.login-form-panel input,
.login-form-panel textarea {
  border-radius: 8px;
  min-height: 50px;
  padding: 13px 14px;
  background: #ffffff;
  border: 1px solid #cfdad4;
  box-shadow: none;
}

.login-form-panel input:focus,
.login-form-panel textarea:focus {
  border-color: #25845b;
  box-shadow: 0 0 0 3px rgba(37, 132, 91, 0.14);
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 12px;
  align-items: end;
}

.login-code-field {
  min-width: 0;
}

.login-code-button {
  min-height: 50px;
}

.login-actions {
  display: flex;
  gap: 12px;
}

.login-actions button {
  flex: 1;
}

.login-form-panel .primary {
  border-color: #237a55;
  background: #237a55;
  color: #ffffff;
  box-shadow: none;
}

.login-form-panel .primary:hover:not(:disabled) {
  border-color: #1c6848;
  background: #1c6848;
  transform: translateY(-1px);
}

.login-form-panel .secondary {
  border-color: #cfdad4;
  background: #eef5f1;
  color: #1f4d3a;
  box-shadow: none;
}

.login-form-panel .secondary:hover:not(:disabled) {
  border-color: #b7c8bf;
  background: #e3eee8;
  transform: translateY(-1px);
}

.login-actions-split {
  justify-content: stretch;
}

.login-status {
  min-height: 22px;
  padding-left: 0;
}

.login-dev-panel {
  margin-top: 0;
  padding: 0;
  border-top: 1px dashed #d2ddd7;
  border-radius: 8px;
  background: #f7faf8;
}

.login-dev-disclosure {
  border-radius: 8px;
}

.login-dev-summary {
  list-style: none;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.login-dev-summary::-webkit-details-marker {
  display: none;
}

.login-dev-summary-copy {
  display: grid;
  gap: 4px;
}

.login-dev-summary-badge {
  min-height: 28px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(37, 132, 91, 0.1);
  color: #1d6847;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.login-dev-body {
  padding: 0 16px 16px;
  display: grid;
  gap: 14px;
  border-top: 1px dashed #d2ddd7;
}

.login-dev-summary-copy strong {
  color: #17201d;
}

.login-dev-summary-copy small {
  color: #64716a;
}

@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    order: 2;
    min-height: 260px;
  }

  .login-form-panel {
    order: 1;
  }

  .login-brand-copy {
    margin-top: 12px;
  }

  .login-brand-panel,
  .login-form-panel {
    padding: 30px 28px;
  }
}

@media (max-width: 640px) {
  .login-overlay {
    padding: 12px;
  }

  .login-shell {
    min-height: 0;
  }

  .login-brand-panel,
  .login-form-panel {
    padding: 24px 18px;
  }

  .login-brand-copy h2,
  .login-form-head h3 {
    font-size: 28px;
  }

  .login-code-row,
  .login-brand-footer {
    grid-template-columns: 1fr;
  }

  .login-code-button,
  .login-actions button,
  .login-actions-split button {
    width: 100%;
  }

  .login-dev-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

.toast-success {
  background: rgba(239, 255, 248, 0.96);
  border-color: rgba(15, 159, 98, 0.22);
}

.toast-error {
  background: rgba(255, 241, 245, 0.96);
  border-color: rgba(220, 51, 88, 0.24);
}

.app-shell > .sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.app-shell > .sidebar .nav {
  min-height: 0;
  padding-bottom: 24px;
}

@media (max-width: 1200px) {
  .app-shell > .sidebar {
    position: static;
    min-height: 0;
    max-height: none;
    overflow: visible;
  }

  .app-shell > .sidebar .nav {
    overflow-x: auto;
    padding-bottom: 6px;
  }
}

/* Compact operations console redesign */
:root {
  --bg: #edf1f7;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --ink: #172033;
  --muted: #667085;
  --line: #d9e1ec;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --success: #15803d;
  --danger: #b42318;
  --warning: #a16207;
  --shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  --glow: 0 0 0 rgba(37, 99, 235, 0);
  --glow-strong: 0 0 0 rgba(37, 99, 235, 0);
}

html,
body {
  background: var(--bg);
}

body {
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

body::before,
body::after {
  content: none;
}

.app-shell {
  grid-template-columns: 236px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 76px minmax(0, 1fr);
}

.app-shell > .sidebar,
.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  max-height: 100vh;
  padding: 12px 10px;
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  background: #111827;
  border-right: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: none;
  color: #f8fafc;
}

.brand {
  min-height: 52px;
  padding: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: visible;
}

.brand::before {
  content: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 800;
}

.brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
}

.brand-copy small {
  color: rgba(226, 232, 240, 0.72);
  font-size: 11px;
}

.sidebar-toggle-button {
  margin-left: auto;
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 12px;
  box-shadow: none;
}

.nav {
  gap: 4px;
}

.nav-item {
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  color: rgba(226, 232, 240, 0.78);
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 700;
}

.nav-item::before {
  content: none;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(37, 99, 235, 0.2);
  border-color: rgba(96, 165, 250, 0.24);
  color: #ffffff;
  box-shadow: none;
}

.nav-item.readonly {
  padding-right: 60px;
}

.nav-item.readonly::after {
  right: 8px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(226, 232, 240, 0.82);
  font-size: 10px;
}

body.sidebar-collapsed .brand {
  min-height: 92px;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 8px 5px;
}

body.sidebar-collapsed .brand-copy {
  display: none;
}

body.sidebar-collapsed .sidebar-toggle-button {
  width: 44px;
  margin-left: 0;
  padding: 0;
  font-size: 11px;
}

body.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 0;
  font-size: 0;
}

body.sidebar-collapsed .nav-item::before {
  content: attr(data-short);
  margin: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

body.sidebar-collapsed .nav-item.readonly::after {
  display: none;
}

.support-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: stretch;
}

.support-card {
  min-width: 0;
}

.support-qr-preview {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fafc;
}

.support-qr-preview img {
  display: block;
  width: min(220px, 100%);
  height: auto;
  border-radius: 14px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.support-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.support-meta-grid div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.support-meta-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.support-meta-grid strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 13px;
  color: var(--ink);
}

.support-url {
  display: block;
  margin-top: 12px;
  padding: 10px 12px;
  overflow-wrap: anywhere;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--accent);
  background: #f8fbff;
  text-decoration: none;
}

.support-upload-toolbar,
.support-sms-toolbar {
  margin-top: 14px;
}

.support-checkbox {
  justify-content: flex-start;
  margin-bottom: 12px;
}

.support-sms-toolbar textarea {
  min-height: 120px;
  resize: vertical;
}

@media (max-width: 980px) {
  .support-settings-grid {
    grid-template-columns: 1fr;
  }
}

.page {
  max-width: none;
  margin: 0;
  padding: 16px 18px 24px;
}

.hero {
  min-height: 0;
  padding: 14px 16px;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 12px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero::after {
  content: none;
}

.hero h2 {
  max-width: none;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: 0;
  background: none;
  -webkit-background-clip: initial;
  color: var(--ink);
  text-shadow: none;
}

.hero-console-copy {
  gap: 8px;
}

.subtitle {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.eyebrow {
  margin: 0 0 4px;
  color: #2563eb;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-shadow: none;
}

.hero-console-badges,
.shell-badges,
.brief-status-row,
.section-actions {
  gap: 6px;
}

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

.hero-card,
.hero-console-card,
.hero-meta-card,
.filters,
.table-panel,
.detail-panel,
.metric-card,
.todo-card,
.placeholder-panel,
.shell-card,
.brief-card,
.list-toolbar,
.pricing-editor,
.provider-editor-panel,
.user-credit-editor,
.credit-modal__dialog,
.login-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: none;
}

.hero-card,
.shell-card,
.brief-card,
.metric-card,
.insight-card,
.hero-console-card,
.hero-meta-card,
.trace-card,
.alert-card,
.detail-summary-card,
.login-note,
.admin-session-card,
.toolbar-note,
.detail-hint,
.danger-hint {
  background: #ffffff;
  border-color: var(--line);
}

.hero-card {
  padding: 12px;
  gap: 10px;
}

.hero-console-card,
.hero-meta-card {
  min-height: 64px;
  padding: 9px 10px;
  gap: 4px;
  border-radius: 7px;
  box-shadow: none;
}

.hero-console-card strong,
.hero-meta-card strong,
.shell-card strong,
.metric-card strong,
.insight-card strong,
.detail-summary-card strong,
.trace-card strong,
.section-heading h3,
.empty-state strong,
.alert-card strong,
.checkbox-field span {
  color: var(--ink);
}

.hero-console-card strong,
.hero-meta-card strong {
  font-size: 15px;
  letter-spacing: 0;
  background: none;
  -webkit-background-clip: initial;
  color: var(--ink);
}

.hero-console-card span,
.hero-console-card small,
.hero-meta-card span,
.hero-meta-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.hero-console-meta {
  gap: 8px;
}

.shell-bar,
.section-brief {
  margin-top: 10px;
  gap: 10px;
}

.shell-card {
  min-height: 74px;
  padding: 10px 12px;
  gap: 5px;
  border-radius: 8px;
}

.shell-card-primary strong,
.shell-card strong {
  font-size: 15px;
}

.shell-card small,
.shell-card-runtime p {
  line-height: 1.45;
}

.brief-card {
  min-height: 0;
  padding: 12px;
  gap: 8px;
}

.brief-card h3 {
  font-size: 18px;
}

.brief-card p,
.brief-card small,
.brief-subtext {
  line-height: 1.5;
}

.section {
  margin-top: 12px;
}

.section-heading {
  margin-bottom: 10px;
  padding: 0;
  align-items: center;
}

.section-heading h3 {
  font-size: 20px;
  letter-spacing: 0;
}

.section-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge {
  min-height: 24px;
  padding: 0 8px;
  font-size: 11px;
  border: 1px solid transparent;
  box-shadow: none;
}

.badge.live,
.pill.ok,
.trace-card.ok {
  background: #dcfce7;
  color: var(--success);
  border-color: #bbf7d0;
}

.badge.planned,
.badge.neutral,
.pill.neutral {
  background: #eef2ff;
  color: #475569;
  border-color: #dbe4ff;
}

.badge.todo,
.trace-card.warn {
  background: #fef3c7;
  color: var(--warning);
  border-color: #fde68a;
}

.pill.error,
.trace-card.error {
  background: #fee2e2;
  color: var(--danger);
  border-color: #fecaca;
}

.metric-grid,
.insight-grid {
  gap: 10px;
}

.metric-card {
  min-height: 108px;
  padding: 12px;
  gap: 6px;
}

.metric-card::before,
.insight-card::before,
.trace-card::before {
  content: none;
}

.metric-card strong {
  font-size: 26px;
  letter-spacing: 0;
  background: none;
  -webkit-background-clip: initial;
  color: var(--ink);
}

.metric-card small {
  line-height: 1.45;
}

.insight-card,
.trace-card,
.alert-card,
.detail-summary-card {
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card:hover,
.insight-card:hover,
.trace-card:hover,
.table-panel:hover,
.detail-panel:hover {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

input,
select,
textarea {
  border-radius: 7px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--ink);
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  border-color: #2563eb;
  box-shadow: none;
}

button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
}

.primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: none;
}

.secondary {
  background: #f8fafc;
  color: #1f2937;
  border: 1px solid #cbd5e1;
  box-shadow: none;
}

.danger {
  background: #fff1f2;
  color: var(--danger);
  border: 1px solid #fecdd3;
}

.secondary:hover,
.primary:hover {
  box-shadow: none;
}

.status-row {
  margin-top: 8px;
  gap: 8px;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
}

.status,
.summary {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 7px;
  background: #ffffff;
  border: 1px solid var(--line);
  line-height: 1.45;
  font-size: 13px;
}

.content {
  margin-top: 10px;
  gap: 10px;
}

.table-panel {
  overflow: auto;
}

table {
  font-size: 13px;
}

thead {
  background: #f8fafc;
}

th,
td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: #475569;
  font-size: 11px;
  letter-spacing: 0.04em;
}

tbody tr:hover {
  background: #f8fafc;
}

tbody tr.active,
.selected-row {
  background: #eff6ff;
}

.list-toolbar {
  padding: 10px;
  gap: 8px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.filter-stack {
  gap: 8px;
}

.filter-stack > .list-toolbar,
.filter-stack > .filters {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 8px;
}

.filter-stack > .unified-filter-toolbar {
  padding: 10px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.list-toolbar > label,
.filters > label {
  min-height: 48px;
  padding: 6px 8px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.list-toolbar > label:focus-within,
.filters > label:focus-within {
  transform: none;
  box-shadow: none;
}

.list-toolbar > label > span,
.filters > label > span {
  min-height: 14px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
}

.list-toolbar > label > input,
.list-toolbar > label > select,
.filters > label > input,
.filters > label > select,
.list-toolbar input,
.list-toolbar select,
.filters input,
.filters select {
  min-height: 32px;
  height: 32px;
  padding: 0 9px;
  background: #ffffff;
}

.list-toolbar > button {
  min-height: 34px;
  height: 34px;
}

.filter-actions {
  grid-column: auto;
  min-height: 34px;
  margin-top: 0;
}

.list-toolbar .actions,
.filters .actions {
  min-height: auto;
  align-items: end;
  align-self: end;
  padding-top: 0;
}

.simple-table {
  margin-top: 0;
}

.pagination {
  padding: 10px;
}

.issue-feature-panel {
  margin-top: 8px;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
  gap: 8px;
  align-items: center;
}

.issue-feature-panel .panel-header {
  align-items: center;
}

.issue-feature-panel h4,
.compact-panel-header h4 {
  margin: 0;
  font-size: 14px;
}

.detail-hint {
  padding: 8px 10px;
  border-radius: 7px;
  font-size: 12px;
}

.issue-feature-panel .detail-hint {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

.issues-content {
  display: block;
}

.issue-list-table table {
  min-width: 980px;
}

.issue-row {
  cursor: pointer;
}

.issue-row:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: -2px;
}

.issue-title-cell {
  max-width: 520px;
  font-weight: 700;
}

.issue-version-cell {
  font-size: 12px;
}

.issue-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  border: 0;
  border-radius: 0;
  background: rgba(15, 23, 42, 0.34);
  cursor: default;
}

.issue-detail-panel {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(720px, calc(100vw - 72px));
  height: 100vh;
  margin: 0;
  padding: 14px;
  overflow-y: auto;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  transform: translateX(104%);
  transition: transform 180ms ease;
}

.issue-detail-panel.is-open {
  transform: translateX(0);
}

.issue-detail-drawer-header {
  position: sticky;
  top: -14px;
  z-index: 2;
  margin: -14px -14px 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.issue-detail-drawer-header h4 {
  margin: 0;
  font-size: 16px;
}

.issue-detail-panel label {
  gap: 4px;
  margin-top: 10px;
}

.issue-detail-panel textarea {
  min-height: 92px;
  padding: 9px 10px;
}

.detail-meta {
  gap: 6px;
}

.markdown-preview {
  padding: 10px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid var(--line);
  line-height: 1.55;
}

.issue-attachment-list {
  gap: 8px;
}

.issue-attachment-card {
  border-radius: 7px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.issue-detail-drawer-open {
  overflow: hidden;
}

.toast {
  border-radius: 8px;
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}

@media (max-width: 1200px) {
  .app-shell,
  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .app-shell > .sidebar,
  .sidebar {
    position: sticky;
    min-height: auto;
    max-height: 40vh;
    border-right: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
  }

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

  body.sidebar-collapsed .brand {
    min-height: 52px;
    flex-direction: row;
  }

  body.sidebar-collapsed .brand-copy {
    display: grid;
  }

  body.sidebar-collapsed .nav-item {
    font-size: 13px;
  }

  body.sidebar-collapsed .nav-item::before {
    content: none;
  }

  .hero,
  .shell-bar,
  .section-brief,
  .content,
  .provider-detail-content,
  .todo-grid,
  .dashboard-alert-grid {
    grid-template-columns: 1fr;
  }

  .filter-stack > .list-toolbar,
  .filter-stack > .filters,
  .filter-stack > .request-log-primary-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-panel {
    position: static;
  }

  .issue-detail-panel {
    position: fixed;
  }
}

@media (max-width: 720px) {
  .page {
    padding: 12px;
  }

  .nav,
  .metric-grid,
  .filters,
  .dashboard-alert-filters,
  .filter-stack > .list-toolbar,
  .filter-stack > .filters,
  .filter-stack > .compact-toolbar,
  .filter-stack > .request-log-primary-toolbar {
    grid-template-columns: 1fr;
  }

  .section-heading,
  .status-row {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-actions {
    justify-content: flex-start;
  }

  .issue-detail-panel {
    width: min(100vw, 620px);
  }
}

/* Viewport-fit compact layout layer */
html,
body {
  height: 100%;
  overflow: hidden;
}

.app-shell {
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.nav {
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.page {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hero {
  flex: 0 0 auto;
  min-height: 0;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: minmax(220px, 0.65fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.hero h2 {
  font-size: 16px;
}

.subtitle {
  display: none;
  line-height: 1.42;
}

.hero-console-grid,
.hero-console-meta {
  display: none;
}

.hero-console-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
}

.hero-console-badges {
  flex-wrap: nowrap;
}

.hero-card.hero-console-panel {
  min-height: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(220px, 360px);
  justify-content: end;
  gap: 8px;
  align-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.hero-console-panel-header {
  display: none;
}

.hero-card.hero-console-panel .api-base-url-field {
  display: none;
}

.hero-card.hero-console-panel label {
  margin: 0;
  min-height: 38px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid var(--line);
}

.hero-card.hero-console-panel label span {
  display: none;
}

.hero-card.hero-console-panel input {
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
}

.admin-session-card {
  min-height: 38px;
  padding: 4px 8px;
  border-radius: 7px;
  gap: 8px;
}

.admin-session-card small {
  display: none;
}

.shell-bar,
.section-brief {
  display: none;
}

.section {
  margin-top: 0;
}

.section.active {
  min-height: 0;
}

.section.active:not(#dashboard) {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#dashboard.active {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

#authGatePanel:not(.hidden) {
  flex: 0 0 auto;
}

.section.active:not(#dashboard) > .section-heading,
.section.active:not(#dashboard) > .metric-grid,
.section.active:not(#dashboard) > .insight-grid,
.section.active:not(#dashboard) > .filter-stack,
.section.active:not(#dashboard) > .list-toolbar,
.section.active:not(#dashboard) > .filters,
.section.active:not(#dashboard) > .status-row,
.section.active:not(#dashboard) > .provider-grid,
.section.active:not(#dashboard) > .credit-ledger-overview,
.section.active:not(#dashboard) > .issue-feature-panel {
  flex: 0 0 auto;
}

.section.active:not(#dashboard) > .content,
.section.active:not(#dashboard) > .table-panel,
.section.active:not(#dashboard) > .role-management-layout,
.section.active:not(#dashboard) > .provider-content,
.section.active:not(#dashboard) > .provider-editor-content,
.section.active:not(#dashboard) > .provider-detail-content,
.section.active:not(#dashboard) > .placeholder-panel:last-child {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.section-heading {
  min-height: 0;
  margin-bottom: 6px;
}

.section-heading h3 {
  font-size: 18px;
}

.section-actions {
  flex-wrap: nowrap;
}

.metric-grid,
.insight-grid,
.provider-grid,
.credit-ledger-overview {
  gap: 8px;
}

.metric-card,
.credit-ledger-card {
  min-width: 0;
  min-height: 92px;
  padding: 8px 10px;
  gap: 5px;
  overflow: visible;
  overflow-wrap: anywhere;
}

.metric-card strong,
.credit-ledger-card strong {
  font-size: 20px;
  line-height: 1.1;
}

.metric-card small,
.credit-ledger-card small {
  font-size: 11px;
  line-height: 1.25;
  max-width: none;
  overflow-wrap: anywhere;
}

#dashboard .metric-card {
  min-height: 104px;
}

.metric-card-actions {
  margin-top: 2px;
  min-width: 0;
}

.metric-card-actions .small-button {
  min-height: 26px;
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
  white-space: nowrap;
}

.hero,
.hero-card,
.shell-card,
.brief-card,
.placeholder-panel,
.alert-card,
.detail-panel,
.detail-summary-card,
.trace-card,
.toolbar-note,
.admin-session-card,
.pricing-editor,
.provider-editor-panel,
.user-credit-editor,
.credit-modal__dialog {
  min-width: 0;
  overflow-wrap: anywhere;
}

.detail-meta,
.chip-list,
.trace-summary-grid,
.dashboard-alert-grid,
.admin-timeline,
td,
th {
  min-width: 0;
  overflow-wrap: anywhere;
}

.insight-card,
.trace-card,
.alert-card,
.detail-summary-card {
  padding: 8px 10px;
}

.list-toolbar,
.filters,
.filter-stack > .unified-filter-toolbar {
  padding: 6px 8px;
  gap: 6px;
}

.filter-stack {
  gap: 6px;
}

.filter-stack > .list-toolbar,
.filter-stack > .filters,
.filter-stack > .request-log-primary-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 6px;
  align-items: end;
}

.list-toolbar > label,
.filters > label {
  min-height: 36px;
  padding: 3px 6px;
}

.list-toolbar > label > span,
.filters > label > span {
  min-height: 12px;
  font-size: 10px;
}

.list-toolbar > label > input,
.list-toolbar > label > select,
.filters > label > input,
.filters > label > select,
.list-toolbar input,
.list-toolbar select,
.filters input,
.filters select {
  min-height: 26px;
  height: 26px;
  padding: 0 7px;
}

button,
.list-toolbar > button {
  min-height: 28px;
  height: 28px;
  padding: 0 9px;
}

.status-row {
  margin-top: 4px;
}

.status,
.summary {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
  line-height: 1.35;
}

.content {
  min-height: 0;
  margin-top: 6px;
}

.content > .table-panel,
.content > .detail-panel,
.provider-editor-content > .table-panel,
.provider-editor-content > .detail-panel,
.provider-detail-content > .table-panel,
.provider-detail-content > .detail-panel,
.role-management-layout > .table-panel,
.role-management-layout > .detail-panel {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

.table-panel {
  min-height: 0;
}

#users.active > .filter-stack {
  flex: 0 0 auto;
}

#users .unified-filter-toolbar {
  grid-template-columns:
    minmax(132px, 1.1fr)
    minmax(132px, 1.1fr)
    minmax(96px, 0.72fr)
    minmax(118px, 0.82fr)
    minmax(86px, 0.55fr)
    minmax(230px, auto);
  align-items: end;
}

#users .filter-actions {
  min-width: 230px;
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  align-items: end;
  align-self: end;
}

#users .filter-actions button {
  white-space: nowrap;
}

#users.active > .status-row {
  flex: 0 0 auto;
  margin-top: 4px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

#users.active > .table-panel {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
}

#users .table-panel table {
  min-width: 1040px;
}

#users .table-actions {
  flex-wrap: nowrap;
  gap: 5px;
}

#users .table-actions .small-button {
  min-height: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 7px;
  white-space: nowrap;
}

.quant-access-editor.hidden {
  display: none;
}

.quant-access-editor {
  position: fixed;
  top: 88px;
  right: 22px;
  z-index: 4200;
  width: min(520px, calc(100vw - 44px));
  max-height: calc(100vh - 110px);
  margin: 0;
  padding: 14px;
  display: grid;
  gap: 10px;
  overflow: auto;
  border-radius: 10px;
  box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.quant-access-editor .editor-heading {
  align-items: center;
}

.quant-access-editor .quant-access-form {
  gap: 10px;
}

th,
td {
  padding: 7px 8px;
}

.detail-panel {
  min-height: 0;
  padding: 10px;
  overflow: auto;
}

.detail-panel pre,
.admin-content .detail-panel pre,
.provider-editor-side pre {
  max-height: 140px;
  overflow: auto;
}

.dashboard-alert-panel {
  min-height: 0;
  overflow: auto;
}

.dashboard-alert-toolbar {
  gap: 8px;
}

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

.todo-grid {
  display: none;
}

.issue-feature-panel {
  margin-top: 0;
}

.issue-list-table {
  min-height: 0;
  overflow: auto;
}

.issue-list-table table {
  min-width: 920px;
}

.admin-role-preview-board {
  max-height: 180px;
  min-height: 0;
  overflow: auto;
}

.admin-role-preview-table {
  max-height: 104px;
  overflow: auto;
}

.pricing-editor {
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

#aiquantBacktest.active {
  display: flex;
  flex-direction: column;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

#aiquantBacktest.active > .placeholder-panel {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#aiquantBacktest.section.active > .placeholder-panel:last-child {
  flex: 0 0 auto !important;
  min-height: 214px;
  overflow: hidden;
}

#aiquantBacktest.active > .placeholder-panel > .panel-header {
  flex: 0 0 auto;
}

#aiquantBacktest.active > .placeholder-panel > .table-panel,
#aiquantBacktest.active > .placeholder-panel > .trace-summary-grid + .table-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
}

#admins.active > .filter-stack {
  flex: 0 0 auto;
  max-height: 232px;
  overflow: hidden;
}

#admins .compact-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

#admins .compact-toolbar .toolbar-note {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#admins .toolbar-note {
  min-height: 0;
  padding: 6px 8px;
  border-radius: 7px;
  line-height: 1.35;
  font-size: 12px;
}

#admins #rolePreviewPanel {
  display: none !important;
}

#admins #rolePreviewNote {
  display: none !important;
}

#admins .admin-role-preview-board {
  height: 42px;
  min-height: 42px;
  max-height: 42px;
  padding: 5px 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  overflow: hidden;
}

#admins .admin-role-preview-board .panel-header {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#admins .admin-role-preview-board .panel-header > div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#admins .admin-role-preview-board .panel-header h4 {
  margin: 0;
  font-size: 13px;
}

#admins .admin-role-preview-select {
  min-width: 180px;
  padding: 0;
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr);
  align-items: center;
  gap: 6px;
}

#admins .admin-role-preview-select span {
  font-size: 11px;
}

#admins .admin-role-preview-select select {
  min-height: 28px;
  height: 28px;
  padding: 0 8px;
}

#admins #adminRolePreviewHint {
  display: none;
}

#admins #adminRolePreviewSummary,
#admins #adminRolePreviewCapabilities,
#admins .admin-role-preview-table {
  display: none;
}

#admins > .filter-stack > .list-toolbar {
  min-height: 0;
}

/* Issues-style list/detail interaction for dense record pages. */
#requestLogs .content,
#versionLogs .content,
#auditLogs .content,
#admins .content {
  display: block;
  grid-template-columns: 1fr;
}

#requestLogs .table-panel table {
  min-width: 1040px;
}

#versionLogs .table-panel table {
  min-width: 980px;
}

#auditLogs .table-panel table {
  min-width: 1020px;
}

#admins .table-panel table {
  min-width: 1080px;
}

#pricing .table-panel table {
  min-width: 1160px;
}

#requestLogs .content > .table-panel,
#versionLogs .content > .table-panel,
#auditLogs .content > .table-panel,
#admins .admin-content > .table-panel,
#pricing .table-panel {
  height: 100%;
  min-height: 320px;
}

#versionLogsHighlights,
#admins .admin-role-preview-board,
#admins #rolePreviewPanel,
#admins #rolePreviewNote {
  display: none !important;
}

#admins.active > .filter-stack {
  max-height: none;
  overflow: visible;
}

#admins .admin-create-toolbar {
  grid-template-columns: minmax(180px, 1fr) minmax(154px, 0.72fr) minmax(118px, auto);
}

#admins .admin-filter-toolbar {
  grid-template-columns:
    minmax(150px, 1fr)
    minmax(136px, 0.72fr)
    minmax(122px, 0.62fr)
    minmax(122px, 0.62fr)
    minmax(106px, auto);
}

#admins .admin-filter-toolbar .filter-actions,
#admins .admin-create-toolbar .actions {
  min-width: 0;
}

.record-detail-panel {
  position: fixed !important;
  top: 0;
  right: 0;
  z-index: 90;
  width: min(760px, calc(100vw - 72px));
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 14px;
  overflow-y: auto;
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  border-radius: 0;
  background: #ffffff;
  transform: translateX(104%);
  transition: transform 180ms ease;
}

.record-detail-panel.is-open {
  transform: translateX(0);
}

.record-detail-panel .issue-detail-drawer-header {
  top: -14px;
}

body.record-detail-drawer-open {
  overflow: hidden;
}

.release-channel-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.release-status-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.release-status-badge.internal {
  border-color: #f2c66d;
  background: #fff8e8;
  color: #8a5a00;
}

.release-status-badge.approved {
  border-color: #86d0aa;
  background: #edf9f2;
  color: #17653f;
}

.release-status-badge.rejected {
  border-color: #ef9c9c;
  background: #fff1f1;
  color: #9b2424;
}

.release-status-badge.withdrawn {
  border-color: #b7c0cf;
  background: #f3f5f8;
  color: #4c586a;
}

.version-release-review {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.version-release-review__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.version-release-review__heading h4,
.version-release-review__heading p {
  margin: 0;
}

.version-release-review__heading p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.version-release-review > label {
  display: grid;
  gap: 6px;
}

.version-release-review textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
}

.version-release-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

#growth.active {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 64px);
}

.growth-section-heading {
  margin-bottom: 10px;
}

.growth-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.growth-kpi-strip > div {
  min-width: 0;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.growth-kpi-strip > div:last-child {
  border-right: 0;
}

.growth-kpi-strip span,
.growth-kpi-strip small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.growth-kpi-strip strong {
  display: block;
  margin: 3px 0 1px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.2;
}

.growth-workspace-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
}

.growth-view-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted, #f5f7fa);
  white-space: nowrap;
}

.growth-view-switch button {
  min-height: 32px;
  padding: 5px 11px;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
}

.growth-view-switch button.is-active {
  color: var(--accent-deep);
  background: var(--panel-strong);
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

#growthViewFilter {
  display: none;
}

.growth-filter-toolbar {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  align-items: end;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}

.growth-filter-toolbar label {
  gap: 3px;
}

.growth-filter-toolbar input,
.growth-filter-toolbar select,
.growth-filter-toolbar button {
  min-height: 34px;
}

#growth .status-row {
  min-height: 28px;
  margin: 5px 0;
  padding: 0 2px;
}

.growth-content {
  display: block;
  flex: 1;
  width: 100%;
  min-height: 360px;
}

.growth-content > .table-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100%;
}

.growth-content > .table-panel table {
  flex: 1;
}

#growthRows tr[data-growth-id] {
  cursor: pointer;
}

#growthRows tr[data-growth-id]:hover td {
  background: rgba(37, 99, 235, .055);
}

#growthRows td strong,
#growthRows td small {
  display: block;
  overflow-wrap: anywhere;
}

#growthRows td small {
  margin-top: 4px;
  color: var(--muted);
}

.growth-detail-panel {
  width: min(760px, calc(100vw - 24px));
}

.growth-drawer-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.growth-drawer-section:first-child {
  border-top: 0;
}

.growth-drawer-section h4,
.growth-drawer-section p {
  margin: 0 0 8px;
}

.growth-compliance-notice {
  margin: 4px 0;
  padding: 12px 14px;
  border: 1px solid #f3d29a;
  border-left: 4px solid #d97706;
  border-radius: 6px;
  background: #fffbeb;
  color: #78350f;
}

.growth-compliance-notice p:last-child {
  margin-bottom: 0;
  line-height: 1.6;
}

.growth-drawer-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.growth-share-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.growth-share-card img,
.growth-share-qr-empty {
  width: 104px;
  height: 104px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.growth-share-card img {
  padding: 5px;
  object-fit: contain;
}

.growth-share-qr-empty {
  display: grid;
  place-items: center;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.growth-share-card > div:last-child,
.growth-promo-share > span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.growth-share-card small,
.growth-promo-share small {
  overflow-wrap: anywhere;
  color: var(--muted);
}

.growth-data-warning {
  color: var(--danger, #c43b3b) !important;
  font-weight: 600;
}

.growth-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 30px;
  padding: 4px 10px;
  text-decoration: none;
}

.growth-compact-list {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.growth-compact-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted, #f7f8fa);
}

.growth-promo-list {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.growth-promo-item {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted, #f7f8fa);
}

.growth-promo-summary {
  display: grid;
  grid-template-columns: minmax(130px, .7fr) minmax(220px, 1.3fr);
  gap: 12px;
}

.growth-promo-summary > span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.growth-promo-summary small,
.growth-promo-item summary,
.growth-form-note,
.growth-technical-key {
  color: var(--muted);
  font-size: 12px;
}

.growth-promo-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.growth-promo-share {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}

.growth-promo-share img {
  width: 60px;
  height: 60px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
}

.growth-promo-share strong {
  overflow-wrap: anywhere;
  font-size: 11px;
  font-weight: 500;
}

.growth-promo-actions button {
  min-height: 30px;
  padding: 4px 9px;
}

.growth-promo-item details {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.growth-promo-item summary {
  cursor: pointer;
}

.growth-promo-edit-form,
.growth-promo-create-form,
.growth-campaign-window-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.growth-promo-edit-form label,
.growth-promo-create-form label,
.growth-campaign-window-form label {
  display: grid;
  gap: 4px;
}

.growth-promo-edit-form .wide-field,
.growth-promo-create-form .wide-field,
.growth-campaign-window-form .wide-field {
  grid-column: 1 / -1;
}

.growth-compact-list > div > span {
  min-width: 0;
  margin-right: auto;
  display: grid;
  gap: 3px;
}

.growth-compact-list > div > span small {
  color: var(--muted);
}

.growth-compact-list button {
  min-height: 30px;
  padding: 4px 9px;
}

.growth-inline-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(100px, .7fr) minmax(90px, .5fr) auto;
  gap: 8px;
}

.growth-rule-list,
.growth-campaign-form {
  display: grid;
  gap: 10px;
}

.growth-rule-list label,
.growth-campaign-form label {
  display: grid;
  gap: 6px;
}

.growth-rule-list label {
  grid-template-columns: minmax(0, 1fr) 120px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.growth-rule-list label > span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.growth-rule-list label small {
  overflow-wrap: anywhere;
}

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

.growth-campaign-form .wide-field {
  grid-column: 1 / -1;
}

.growth-rule-list textarea,
.growth-campaign-form textarea,
#growthCampaignActionReason,
#growthPromoActionReason,
#growthReferralActionReason,
#growthRewardReviewReason {
  min-height: 76px;
  resize: vertical;
}

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

.growth-fact-grid p {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.growth-fact-grid p span {
  color: var(--muted);
  font-size: 12px;
}

.growth-fact-grid p strong {
  overflow-wrap: anywhere;
}

.growth-signal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.growth-signal-list > span {
  display: grid;
  gap: 1px;
  padding: 6px 8px;
  border: 1px solid #f2b7b7;
  border-radius: 6px;
  color: #9f1d1d;
  background: #fff7f7;
  font-size: 12px;
}

.growth-signal-list > span small {
  color: #a97070;
}

.growth-signal-list > span.is-clear {
  border-color: #b9dec9;
  color: #17663a;
  background: #f3fbf6;
}

.growth-review-reason {
  margin-top: 9px !important;
  padding: 8px 10px;
  border-left: 3px solid var(--accent);
  background: var(--surface-muted, #f7f8fa);
}

.growth-timeline {
  display: grid;
  gap: 8px;
}

.growth-timeline > div {
  padding-left: 10px;
  border-left: 2px solid var(--line);
}

.growth-timeline span,
.growth-timeline p {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.growth-review-actions {
  flex-wrap: wrap;
}

@media (max-width: 1100px) {
  .growth-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .growth-kpi-strip > div { border-bottom: 1px solid var(--line); }
  .growth-workspace-bar { grid-template-columns: 1fr; align-items: stretch; }
}

@media (max-width: 720px) {
  .growth-kpi-strip,
  .growth-filter-toolbar,
  .growth-campaign-form,
  .growth-inline-form,
  .growth-promo-edit-form,
  .growth-promo-create-form,
  .growth-campaign-window-form,
  .growth-promo-summary,
  .growth-fact-grid { grid-template-columns: 1fr; }
  .growth-promo-edit-form .wide-field,
  .growth-promo-create-form .wide-field,
  .growth-campaign-window-form .wide-field { grid-column: auto; }
  .growth-view-switch { overflow-x: auto; }
  .growth-campaign-form .wide-field { grid-column: auto; }
  .growth-rule-list label { grid-template-columns: 1fr; }
}

.record-detail-backdrop {
  z-index: 80;
  height: auto;
  min-height: 0;
  padding: 0;
}

.pricing-editor.record-detail-panel .pricing-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pricing-editor.record-detail-panel .wide-field {
  grid-column: 1 / -1;
}

.pricing-model-summary {
  max-width: 420px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.role-card {
  height: auto;
  min-height: 118px;
  max-height: none;
  align-content: start;
  overflow: visible;
}

.role-card small {
  overflow: visible;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .record-detail-panel {
    width: min(100vw, 680px);
  }

  #admins .admin-create-toolbar,
  #admins .admin-filter-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .pricing-editor.record-detail-panel .pricing-form {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 861px) {
  .app-shell,
  body.sidebar-collapsed .app-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  body:not(.sidebar-collapsed) .app-shell {
    grid-template-columns: minmax(220px, 248px) minmax(0, 1fr);
  }

  .app-shell > .sidebar,
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: none;
    border-right: 1px solid rgba(148, 163, 184, 0.22);
    border-bottom: 0;
  }

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

  body.sidebar-collapsed .brand {
    min-height: 76px;
    flex-direction: column;
  }

  body.sidebar-collapsed .brand-copy {
    display: none;
  }

  body.sidebar-collapsed .nav-item {
    font-size: 0;
  }

  body.sidebar-collapsed .nav-item::before {
    content: attr(data-short);
    display: inline;
    font-size: 11px;
  }
}

@media (max-width: 860px) {
  html,
  body,
  .app-shell,
  .page {
    height: auto;
    overflow: auto;
  }

  .sidebar {
    height: auto;
    overflow: visible;
  }

  .hero {
    min-height: 0;
  }

  .hero-console-grid,
  .hero-console-meta {
    display: grid;
  }

  .section.active:not(#dashboard),
  #dashboard.active {
    height: auto;
    overflow: visible;
  }
}
