:root {
  --bg-top: #f6efe5;
  --bg-bottom: #dfe7f4;
  --card: rgba(255, 255, 255, 0.78);
  --card-strong: #fffdf8;
  --text: #1f2937;
  --muted: #5b6472;
  --line: rgba(31, 41, 55, 0.08);
  --primary: #b64d1b;
  --primary-deep: #8f3710;
  --secondary: #123a70;
  --shadow: 0 18px 50px rgba(31, 41, 55, 0.12);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 38%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(182, 77, 27, 0.1), transparent 30%),
    radial-gradient(circle at bottom right, rgba(18, 58, 112, 0.18), transparent 30%);
  pointer-events: none;
}

.app-shell {
  width: min(100%, 540px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.admin-shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 24px 16px 40px;
}

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

.hero-card {
  padding: 24px;
  margin-bottom: 16px;
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -56px;
  top: -72px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(182, 77, 27, 0.22), rgba(255, 255, 255, 0));
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-actions,
.toolbar,
.record-actions,
.two-col {
  display: flex;
  align-items: center;
  gap: 12px;
}

h1,
h2 {
  margin: 0;
  line-height: 1.15;
}

h1 {
  font-size: 30px;
  margin-bottom: 12px;
}

h2 {
  font-size: 24px;
}

.hero-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel {
  padding: 20px;
  margin-bottom: 16px;
}

.flow-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

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

.ratio-option {
  position: relative;
  display: block;
  cursor: pointer;
}

.ratio-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.ratio-option span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--text);
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.ratio-option input:checked + span {
  border-color: rgba(182, 77, 27, 0.45);
  background: rgba(182, 77, 27, 0.12);
  color: var(--primary-deep);
}

.ratio-option input:focus + span {
  outline: 2px solid rgba(18, 58, 112, 0.22);
  outline-offset: 2px;
}

textarea,
input[type="text"],
input[type="password"],
input[type="file"],
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 253, 248, 0.9);
}

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

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="file"]:focus,
select:focus,
button:focus,
.download-link:focus,
.ghost-link:focus,
.inline-link:focus {
  outline: 2px solid rgba(18, 58, 112, 0.22);
  outline-offset: 2px;
}

button,
.download-link,
.ghost-link {
  border: 0;
  border-radius: 999px;
  min-height: 52px;
  padding: 0 18px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

button:active,
.download-link:active,
.ghost-link:active {
  transform: translateY(1px) scale(0.995);
}

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

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

.model-submit-btn {
  min-height: 58px;
  border-radius: 18px;
  white-space: normal;
}

.secondary-btn {
  background: rgba(18, 58, 112, 0.1);
  color: var(--secondary);
}

.compact-btn {
  min-height: 42px;
}

.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  background: rgba(18, 58, 112, 0.08);
  color: var(--secondary);
}

.secondary-link,
.danger-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  background: rgba(18, 58, 112, 0.1);
  color: var(--secondary);
}

.danger-link {
  background: rgba(180, 35, 24, 0.12);
  color: #b42318;
}

.image-preview,
.video-placeholder {
  display: grid;
  place-items: center;
  min-height: 168px;
  border-radius: 20px;
  border: 1px dashed rgba(18, 58, 112, 0.2);
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  overflow: hidden;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview.is-empty {
  padding: 18px;
}

.status-box {
  margin-top: 14px;
  min-height: 24px;
  color: var(--secondary);
  font-size: 14px;
  line-height: 1.5;
}

.hint-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.auth-form {
  max-width: 420px;
}

.result-panel {
  background: var(--card-strong);
}

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

.download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(182, 77, 27, 0.12);
  color: var(--primary-deep);
}

.download-link.disabled {
  opacity: 0.45;
  pointer-events: none;
}

.result-video {
  width: 100%;
  border-radius: 20px;
  background: #000;
}

.hidden {
  display: none;
}

.records-list {
  display: grid;
  gap: 14px;
}

.record-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
}

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

.record-layout {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 14px;
}

.record-thumb {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(18, 58, 112, 0.08);
}

.record-thumb.placeholder,
.record-empty {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 16px;
  color: var(--muted);
  background: rgba(18, 58, 112, 0.06);
}

.record-body p {
  margin: 0 0 8px;
  line-height: 1.6;
  word-break: break-word;
}

.record-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.record-tag.success {
  background: rgba(12, 166, 120, 0.12);
  color: #0c6b4f;
}

.record-tag.failed {
  background: rgba(180, 35, 24, 0.12);
  color: #b42318;
}

.record-time {
  font-size: 12px;
  color: var(--muted);
}

.inline-link {
  color: var(--secondary);
  font-weight: 700;
}

.error-text {
  color: #b42318;
}

.details-box {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(18, 58, 112, 0.05);
}

.details-box summary {
  cursor: pointer;
  font-weight: 700;
}

.details-box pre {
  margin: 10px 0 0;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.5 Consolas, monospace;
}

.two-col {
  align-items: stretch;
}

.two-col .field {
  flex: 1;
}

@media (max-width: 420px) {
  .app-shell,
  .admin-shell {
    padding: 14px 12px 28px;
  }

  .hero-card,
  .panel {
    border-radius: 20px;
    padding: 18px;
  }

  h1 {
    font-size: 26px;
  }

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

  .download-link {
    width: 100%;
  }

  .topbar,
  .section-head,
  .record-card-head,
  .record-layout {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .record-thumb {
    width: 100%;
    height: 180px;
  }

  .ghost-link,
  .compact-btn,
  .secondary-link,
  .danger-link {
    width: 100%;
  }

  .topbar-actions,
  .toolbar,
  .record-actions,
  .two-col {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .ratio-group {
    grid-template-columns: 1fr;
  }
}

body.admin-page {
  --admin-bg: #f6f8fc;
  --admin-card: rgba(255, 255, 255, 0.92);
  --admin-line: #e6ebf4;
  --admin-text: #121827;
  --admin-muted: #697386;
  --admin-blue: #3d63ff;
  --admin-blue-deep: #2547da;
  --admin-purple: #8a5cf6;
  --admin-green: #19a463;
  --admin-orange: #ff6a2a;
  min-height: 100vh;
  color: var(--admin-text);
  background:
    radial-gradient(circle at 18% 0%, rgba(92, 125, 255, 0.16), transparent 28%),
    radial-gradient(circle at 100% 8%, rgba(138, 92, 246, 0.12), transparent 26%),
    linear-gradient(180deg, #fbfcff 0%, var(--admin-bg) 100%);
}

body.admin-page::before {
  display: none;
}

.admin-page .hidden {
  display: none !important;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.admin-layout.is-locked {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.admin-layout.is-locked .admin-sidebar,
.admin-layout.is-locked .admin-top {
  display: none;
}

.admin-layout.is-locked .admin-main {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
}

.admin-layout.is-locked .login-card {
  width: min(100%, 520px);
  margin: 0;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 18px 0 46px rgba(36, 52, 88, 0.06);
  backdrop-filter: blur(22px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--admin-text);
  font-size: 20px;
  font-weight: 900;
  text-decoration: none;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #1f7cff, #884dff 58%, #ff7b45);
  box-shadow: 0 12px 26px rgba(61, 99, 255, 0.28);
}

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

.side-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  color: #526070;
  font-weight: 800;
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.side-nav-item span {
  color: #8792a5;
  font-size: 12px;
  font-weight: 900;
}

.side-nav-item:hover,
.side-nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, #3d63ff, #4b74ff);
  box-shadow: 0 14px 30px rgba(61, 99, 255, 0.24);
  transform: translateY(-1px);
}

.side-nav-item:hover span,
.side-nav-item.active span {
  color: rgba(255, 255, 255, 0.8);
}

.side-quota-card {
  margin-top: auto;
  padding: 18px;
  border: 1px solid var(--admin-line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 248, 252, 0.86));
  box-shadow: 0 16px 34px rgba(36, 52, 88, 0.08);
}

.side-quota-card p,
.side-quota-card span {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
}

.side-quota-card strong {
  display: block;
  margin: 10px 0 8px;
  color: var(--admin-text);
  font-size: 15px;
}

.quota-track {
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf7;
}

.quota-track i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3d63ff, #8a5cf6);
}

.admin-main {
  min-width: 0;
  padding: 28px 32px 42px;
}

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

.admin-top h1 {
  margin: 0 0 8px;
  color: #070b18;
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: -0.04em;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(420px, 32vw);
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  color: #8a94a6;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(36, 52, 88, 0.08);
}

.admin-search input {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.admin-search kbd {
  padding: 4px 8px;
  border: 1px solid #d8dfeb;
  border-radius: 8px;
  color: #6c7687;
  background: #f6f8fc;
  font: 700 12px/1 "Segoe UI", sans-serif;
}

.icon-btn {
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  color: #344054;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(36, 52, 88, 0.08);
}

.admin-dashboard {
  display: grid;
  gap: 22px;
}

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

.metric-card,
.dashboard-card {
  border: 1px solid var(--admin-line);
  border-radius: 22px;
  background: var(--admin-card);
  box-shadow: 0 18px 40px rgba(36, 52, 88, 0.08);
}

.metric-card {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 16px;
  padding: 22px;
}

.metric-icon {
  grid-row: span 3;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 22px;
  font-weight: 900;
}

.metric-icon.blue {
  color: var(--admin-blue-deep);
  background: #dfe7ff;
}

.metric-icon.green {
  color: var(--admin-green);
  background: #ddf7e8;
}

.metric-icon.purple {
  color: var(--admin-purple);
  background: #ede4ff;
}

.metric-icon.orange {
  color: var(--admin-orange);
  background: #ffe9dd;
}

.metric-card p,
.metric-card small {
  margin: 0;
  color: var(--admin-muted);
}

.metric-card strong {
  display: block;
  margin: 6px 0;
  font-size: clamp(24px, 2.2vw, 34px);
  letter-spacing: -0.04em;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.dashboard-card {
  padding: 22px;
}

.config-card,
.records-card {
  min-width: 0;
}

.records-card {
  grid-column: 1 / -1;
}

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

.card-title-row h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.03em;
}

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

.config-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #edf1f7;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fbfcff);
}

.route-panels-section {
  background:
    radial-gradient(circle at top right, rgba(61, 99, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #fff, #fbfcff);
}

.route-config-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e6ecf8;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.route-config-panel h3 {
  margin: 0;
  font-size: 18px;
}

.route-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f7;
}

.route-panel-head strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.route-panel-head span {
  color: var(--admin-muted);
  font-size: 12px;
  font-weight: 700;
}

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

.route-switch-card {
  display: grid;
  gap: 10px;
  min-height: 170px;
  padding: 20px;
  border: 1px solid #dce3ef;
  border-radius: 22px;
  text-align: left;
  color: var(--admin-text);
  background: linear-gradient(180deg, #fff, #f8faff);
  box-shadow: none;
  cursor: pointer;
}

.route-switch-card span {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: var(--admin-blue-deep);
  background: #e8edff;
  font-size: 12px;
  font-weight: 900;
}

.route-switch-card strong {
  font-size: 24px;
  letter-spacing: -0.04em;
}

.route-switch-card small {
  color: var(--admin-muted);
  font-size: 13px;
  line-height: 1.55;
}

.route-switch-card.active {
  border-color: rgba(61, 99, 255, 0.55);
  background:
    radial-gradient(circle at top right, rgba(138, 92, 246, 0.18), transparent 34%),
    linear-gradient(135deg, #eef3ff, #ffffff);
  box-shadow: 0 18px 42px rgba(61, 99, 255, 0.16);
}

.route-current-box {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid #e6ecf8;
  border-radius: 18px;
  background: #fff;
}

.route-current-box p,
.route-current-box span {
  margin: 0;
  color: var(--admin-muted);
  font-size: 12px;
}

.route-current-box strong {
  font-size: 20px;
}

.form-section.full,
.form-actions.full {
  grid-column: 1 / -1;
}

.form-section-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.form-section-head > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--admin-blue-deep);
  background: #e8edff;
  font-size: 12px;
  font-weight: 900;
}

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

.form-section-head h3 {
  font-size: 16px;
}

.form-section-head p {
  margin-top: 4px;
  color: var(--admin-muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.admin-page .field {
  color: #344054;
  font-size: 13px;
}

.admin-page textarea,
.admin-page input[type="text"],
.admin-page input[type="password"],
.admin-page input[type="file"],
.admin-page select {
  min-height: 46px;
  border-color: #dce3ef;
  border-radius: 12px;
  padding: 11px 13px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.02);
}

.admin-page .primary-btn {
  background: linear-gradient(135deg, #3d63ff, #784dff);
  box-shadow: 0 14px 28px rgba(61, 99, 255, 0.26);
}

.admin-page .secondary-btn,
.admin-page .secondary-link {
  color: var(--admin-blue-deep);
  background: #edf2ff;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
}

.form-actions .status-box {
  margin: 0;
}

.preview-card {
  position: sticky;
  top: 24px;
}

.route-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  color: #0f7a4e;
  background: #ddf7e8;
  font-size: 12px;
  font-weight: 900;
}

.route-pill.warning {
  color: #b54708;
  background: #fff2d7;
}

.preview-screen {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 210px;
  overflow: hidden;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 42, 90, 0.35), rgba(18, 24, 39, 0.18)),
    radial-gradient(circle at 18% 24%, rgba(142, 195, 255, 0.95), transparent 25%),
    radial-gradient(circle at 80% 20%, rgba(150, 112, 255, 0.9), transparent 28%),
    linear-gradient(135deg, #172a5a, #263a7b 48%, #0f172a);
  box-shadow: inset 0 -50px 80px rgba(0, 0, 0, 0.25);
}

.preview-screen p {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  margin: 0;
  font-weight: 800;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.preview-play {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.preview-play::after {
  content: "";
  display: block;
  width: 0;
  height: 0;
  margin: 20px 0 0 24px;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 16px solid #263a7b;
}

.route-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.route-list div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #edf1f7;
}

.route-list dt {
  color: var(--admin-muted);
  font-weight: 800;
}

.route-list dd {
  min-width: 0;
  margin: 0;
  font-weight: 800;
  word-break: break-word;
}

.admin-page .record-card {
  border-color: #edf1f7;
  border-radius: 18px;
  background: #fff;
  box-shadow: none;
}

.admin-page .record-empty {
  min-height: 170px;
}

.login-card {
  max-width: 520px;
  margin: 84px auto 0;
}

@media (max-width: 1180px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--admin-line);
  }

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

  .side-quota-card {
    display: none;
  }

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

  .preview-card,
  .records-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .admin-main {
    padding: 20px 14px 32px;
  }

  .admin-top,
  .admin-top-actions,
  .form-actions,
  .card-title-row {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-search {
    width: 100%;
  }

  .side-nav,
  .metric-grid,
  .dashboard-grid,
  .config-grid,
  .config-grid.compact,
  .route-switch-grid,
  .model-submit-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-section.full,
  .form-actions.full {
    grid-column: auto;
  }
}
