:root {
  --navy: #07111f;
  --navy-2: #0c1730;
  --panel: rgba(255, 255, 255, 0.9);
  --panel-solid: #ffffff;
  --ink: #111827;
  --muted: #697586;
  --line: #dce6f4;
  --cyan: #18d6ff;
  --violet: #8067ff;
  --green: #35d49c;
  --danger: #dc3f68;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.11);
}

/* Official account management and user claim analytics */
.account-list-panel { min-width: 0; }
.account-list-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.account-list-table-wrap table { min-width: 820px; }
.account-create-modal[hidden] { display: none; }
.account-create-modal {
  position: fixed;
  inset: 0;
  z-index: 720;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(10px);
}
.account-create-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(220, 230, 244, .92);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}
.account-create-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.account-create-heading h2 {
  margin: 7px 0 0;
  font-size: 24px;
}
.account-create-close {
  display: inline-grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 8px;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  font-size: 23px;
  line-height: 1;
}
.account-create-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.account-create-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.account-create-field-wide { grid-column: 1 / -1; }
.account-create-field label {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}
.account-create-field .errorlist,
.account-create-form > .errorlist {
  margin: 0;
  padding: 9px 12px;
  border: 1px solid rgba(220, 38, 38, .18);
  border-radius: 8px;
  color: #b91c1c;
  background: #fff1f2;
  font-size: 13px;
  list-style: none;
}
.account-create-toggles {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-top: 20px;
  padding: 14px 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}
.account-create-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #334155;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
}
.account-create-toggle input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 0;
  padding: 0;
  accent-color: #0891b2;
}
.account-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
.claim-stats-filter {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(220, 230, 244, .86);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: var(--shadow);
}
.claim-stats-filter label {
  display: grid;
  gap: 6px;
  width: 180px;
}
.claim-stats-filter label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}
.claim-stats-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.claim-stats-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: min(420px, 100%);
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, .26);
  border-radius: 8px;
  background: #e9f0f8;
}
.claim-stats-switch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #526174;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 900;
}
.claim-stats-switch-button:hover { color: #0f4f88; }
.claim-stats-switch-button:focus-visible {
  outline: 3px solid rgba(2, 132, 199, .22);
  outline-offset: 1px;
}
.claim-stats-switch-button[aria-selected="true"] {
  border-color: rgba(148, 163, 184, .24);
  color: #0f4f88;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, .1);
}
.claim-stats-switch-button strong {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 6px;
  color: #64748b;
  background: rgba(148, 163, 184, .14);
  font-size: 12px;
}
.claim-stats-switch-button[aria-selected="true"] strong {
  color: #0369a1;
  background: #e0f2fe;
}
.claim-stats-range {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 13px;
}
.claim-stats-panels,
.claim-stats-panel { min-width: 0; }
.claim-stats-panel[hidden] { display: none; }
.claim-stats-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.claim-stats-summary > div {
  min-width: 0;
  padding: 14px 15px;
  border: 1px solid rgba(203, 213, 225, .8);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
}
.claim-stats-summary span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
}
.claim-stats-summary strong {
  display: block;
  overflow: hidden;
  color: #0f4f88;
  font-size: 24px;
  line-height: 1.1;
  text-overflow: ellipsis;
}
.claim-stats-chart-panel {
  min-width: 0;
  overflow: hidden;
}
.claim-stats-chart-panel .panel-title {
  flex-wrap: wrap;
  gap: 10px 16px;
}
.claim-stats-chart-wrap {
  position: relative;
  width: 100%;
  height: 460px;
}
.claim-stats-empty {
  display: grid;
  place-items: center;
  min-height: 300px;
  color: #64748b;
  border-top: 1px solid #e2e8f0;
}
@media (max-width: 720px) {
  .account-create-modal { padding: 12px; }
  .account-create-dialog {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }
  .account-create-fields { grid-template-columns: 1fr; }
  .account-create-field-wide { grid-column: auto; }
  .account-create-toggles { align-items: flex-start; flex-direction: column; }
  .account-create-actions { flex-direction: column-reverse; }
  .account-create-actions .primary,
  .account-create-actions .secondary { width: 100%; }
  .claim-stats-filter { align-items: stretch; }
  .claim-stats-filter label,
  .claim-stats-filter .primary { width: 100%; }
  .claim-stats-toolbar {
    align-items: stretch;
    flex-direction: column;
  }
  .claim-stats-switch { width: 100%; }
  .claim-stats-range { padding: 0 2px; }
  .claim-stats-switch-button { padding-inline: 8px; }
  .claim-stats-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .claim-stats-chart-panel .panel-title { align-items: flex-start; }
  .claim-stats-chart-wrap { height: 360px; }
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(24, 214, 255, 0.12), transparent 26%),
    radial-gradient(circle at 86% 0%, rgba(128, 103, 255, 0.11), transparent 24%),
    linear-gradient(135deg, #f5f9ff 0%, #eef4ff 42%, #f8fbff 100%);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.scene-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 92, 180, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 92, 180, 0.055) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 82%);
}

a { color: #1463d8; text-decoration: none; }
a:hover { color: #083c9b; }

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px;
  color: #eaf6ff;
  background:
    radial-gradient(circle at 18% 8%, rgba(24,214,255,.24), transparent 28%),
    radial-gradient(circle at 90% 18%, rgba(128,103,255,.2), transparent 25%),
    linear-gradient(180deg, #07111f 0%, #08182d 55%, #06101f 100%);
  border-right: 1px solid rgba(255,255,255,.12);
  box-shadow: 14px 0 42px rgba(15,23,42,.2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}
.brand:hover { color: #fff; }
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #06111f;
  font-weight: 900;
  background: linear-gradient(135deg, #ffffff, var(--cyan) 52%, var(--green));
  box-shadow: 0 0 0 1px rgba(255,255,255,.26), 0 18px 42px rgba(24,214,255,.28);
}
.brand strong { display: block; font-size: 17px; }
.brand em { display: block; margin-top: 2px; color: rgba(234,246,255,.54); font-size: 12px; font-style: normal; }

.side-nav {
  display: grid;
  gap: 9px;
  margin-top: 34px;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 12px;
  color: rgba(234,246,255,.78);
  border: 1px solid transparent;
  border-radius: 10px;
}
.side-nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
.side-nav span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--cyan);
  background: rgba(24,214,255,.1);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  background: rgba(255,255,255,.06);
}
.sidebar-footer small { display: block; color: rgba(234,246,255,.52); }
.sidebar-footer strong { display: block; margin: 5px 0 12px; }

.page {
  width: min(1240px, calc(100% - 44px));
  margin: 28px auto 56px;
}

.login-page {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 44px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  align-items: center;
}

.login-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 36px;
  align-items: center;
}

.login-left {
  color: #f6fbff;
  min-height: 520px;
  padding: 52px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 10%, rgba(24,214,255,.24), transparent 28%),
    radial-gradient(circle at 92% 14%, rgba(128,103,255,.24), transparent 28%),
    linear-gradient(135deg, #07111f, #0a1c36 64%, #07101f);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.login-left h1 {
  max-width: 680px;
  margin: 20px 0 18px;
  font-size: clamp(48px, 7vw, 86px);
  line-height: 1.02;
}
.login-left p {
  max-width: 660px;
  margin: 0;
  color: rgba(246,251,255,.7);
  font-size: 18px;
  line-height: 1.8;
}

.login-card, .panel, .article-card, .reader, .command-hero, .toolbar {
  border: 1px solid rgba(220,230,244,.86);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}
.card-glow {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--green));
}

.eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 5px 10px;
  border: 1px solid rgba(24,214,255,.22);
  border-radius: 999px;
  color: #0369a1;
  background: rgba(236,253,255,.74);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}
.login-left .eyebrow {
  color: #99f0ff;
  background: rgba(24,214,255,.09);
  border-color: rgba(24,214,255,.2);
}

h1, h2, h3 { letter-spacing: 0; }
h1 { margin: 0 0 10px; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.08; }
h2 { margin: 0; font-size: 21px; }
p { line-height: 1.75; }

.signal-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin-top: 34px;
}
.signal-row div {
  padding: 16px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
}
.signal-row strong { display: block; font-size: 25px; }
.signal-row span { color: rgba(246,251,255,.58); font-size: 13px; }

.command-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  padding: 28px;
  background:
    radial-gradient(circle at 90% 0%, rgba(24,214,255,.16), transparent 26%),
    linear-gradient(110deg, rgba(255,255,255,.94), rgba(255,255,255,.76));
}
.command-hero p { margin: 0; color: var(--muted); }
.hero-metric {
  min-width: 170px;
  padding: 18px;
  text-align: center;
  border: 1px solid rgba(24,214,255,.18);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #edfaff);
}
.hero-metric span, .hero-metric em { display: block; color: var(--muted); font-style: normal; }
.hero-metric strong { color: #0574b8; font-size: 46px; line-height: 1; }

.toolbar, .panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.toolbar { margin-bottom: 18px; padding: 16px 18px; }
.toolbar span, .panel-title span { color: var(--muted); font-size: 13px; }
.panel { padding: 22px; }
.panel-title { margin-bottom: 16px; }
.panel-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.bulk-form { margin: 0; }
.compact-button { min-height: 34px; padding: 0 12px; border-radius: 9px; }

.filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(4, max-content);
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(220,230,244,.86);
  border-radius: 14px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.dashboard-grid, .editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .85fr);
  gap: 18px;
}

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

.stat-card {
  padding: 20px;
  border: 1px solid rgba(220,230,244,.86);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.stat-card span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat-card strong {
  display: block;
  color: #0f4f88;
  font-size: 34px;
  line-height: 1;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.article-card {
  position: relative;
  min-height: 230px;
  padding: 22px;
  overflow: hidden;
}
.article-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--green));
}
.article-card:hover { transform: translateY(-3px); transition: transform .18s ease; }
.article-topline, .article-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.article-topline { color: var(--muted); font-size: 13px; }
.article-card h2 { margin: 18px 0 10px; }
.article-card p { min-height: 72px; margin: 0; color: var(--muted); }
.article-actions { margin-top: 20px; color: var(--muted); font-size: 13px; }

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #047857;
  background: rgba(209,250,229,.78);
  border: 1px solid rgba(52,211,153,.28);
  font-size: 12px;
  font-weight: 800;
}
.status-chip.muted { color: #64748b; background: rgba(226,232,240,.75); border-color: rgba(148,163,184,.28); }

.primary, .secondary, button.primary, .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 900;
  cursor: pointer;
  letter-spacing: 0;
}
.primary, button.primary {
  color: #06111f;
  background: linear-gradient(135deg, #8df3ff, var(--cyan) 48%, #74ffca);
  box-shadow: 0 16px 36px rgba(24,214,255,.24);
}
.primary:hover { color: #06111f; }
.secondary {
  color: #213047;
  background: #fff;
  border-color: rgba(148,163,184,.32);
}
.primary:disabled,
.secondary:disabled,
button.primary:disabled,
button.secondary:disabled {
  cursor: not-allowed;
  opacity: .48;
  box-shadow: none;
}
.ghost-button {
  width: 100%;
  color: #eaf6ff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.12);
}
.wide { width: 100%; }
.link-button {
  border: 0;
  background: transparent;
  color: #1463d8;
  cursor: pointer;
  padding: 0;
  font: inherit;
}
.danger { color: var(--danger); }
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid rgba(220, 63, 104, .18);
  color: #fff;
  background: linear-gradient(135deg, #ef476f, #c9184a);
  font-weight: 900;
  cursor: pointer;
}
.inline-form { display: inline; }
.actions-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.form p { margin: 0 0 16px; }
.form label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}
input, select, textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #c9d7ea;
  border-radius: 10px;
  outline: none;
  background: rgba(255,255,255,.92);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(24,214,255,.14);
}
textarea { min-height: 120px; resize: vertical; }
.rich-editor-source {
  min-height: 360px;
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.6;
}

.form-actions, .confirm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.article-side-panel {
  align-self: start;
  position: sticky;
  top: 24px;
}

.check-list {
  margin: 0 0 18px;
  padding-left: 20px;
  color: #334155;
  line-height: 1.8;
}

.mini-meta {
  padding: 14px;
  border-radius: 12px;
  background: rgba(248,250,252,.9);
  border: 1px solid #edf2f8;
}

.mini-meta p, .muted-text { color: var(--muted); }
.credential-cell {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 8px;
  color: #0f172a;
  background: #f8fafc;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  white-space: nowrap;
}

.confirm-panel p {
  color: var(--muted);
  font-size: 16px;
}

table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
  vertical-align: top;
}
th {
  color: #475569;
  font-size: 13px;
  background: rgba(248,250,252,.92);
}
tbody tr:hover { background: rgba(24,214,255,.045); }
.select-cell {
  width: 38px;
  text-align: center;
}
.select-cell input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #18d6ff;
  cursor: pointer;
}
.select-cell input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .36;
}

.reader-shell { max-width: 980px; margin: 0 auto; }
.reader-header { margin-bottom: 18px; }
.reader-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.copy-wechat-button.copy-failed {
  color: #be123c;
  border-color: rgba(220, 63, 104, .28);
  background: #fff5f7;
}
.reader { padding: 34px; background: rgba(255,255,255,.96); }
.reader:not(.wechat-html-content) p { color: #26364f; font-size: 17px; }
.reader:not(.wechat-html-content) img { max-width: 100%; height: auto; }
.reader.wechat-html-content {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
  color: initial;
}

.empty, .message {
  padding: 16px 18px;
  color: #334155;
  border: 1px solid rgba(220,230,244,.86);
  border-radius: 14px;
  background: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}
.message { margin-bottom: 16px; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: relative;
    height: auto;
  }
  .side-nav { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .login-hero { grid-template-columns: 1fr; padding: 24px 0; }
  .login-left { min-height: auto; padding: 34px; }
}

@media (max-width: 720px) {
  .page, .login-page { width: min(100% - 22px, 1180px); }
  .command-hero, .toolbar, .panel-title, .article-actions { align-items: flex-start; flex-direction: column; }
  .dashboard-grid, .editor-layout, .stat-grid { grid-template-columns: 1fr; }
  .signal-row { grid-template-columns: 1fr; }
  .login-left h1 { font-size: 44px; }
  table { display: block; overflow-x: auto; white-space: nowrap; }
  .filter-bar { grid-template-columns: 1fr; }
}

/* Operations filter toolbar */
.filter-bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  overflow: visible;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(220,230,244,.86);
  border-radius: 14px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.filter-bar.filter-expanded { overflow: visible; }
.filter-bar > input[type="search"] {
  flex: 1 1 260px;
  min-width: 240px;
}
.filter-bar select,
.filter-bar input[type="date"],
.account-picker-trigger {
  height: 43px;
}
.filter-bar select {
  flex: 0 0 180px;
  width: 180px;
}
.filter-bar input[type="date"] {
  flex: 0 0 160px;
  width: 160px;
}
.filter-bar .primary,
.filter-bar .secondary {
  flex: 0 0 auto;
  white-space: nowrap;
}
.account-picker {
  position: relative;
  flex: 0 0 auto;
  align-self: center;
}
.account-picker.is-open { flex-basis: auto; align-self: center; }
.account-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 172px;
  padding: 0 14px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #102a43;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,42,67,.04);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.account-picker-trigger:hover,
.account-picker.is-open .account-picker-trigger {
  border-color: #17b8d5;
  background: #fbfeff;
  box-shadow: 0 0 0 3px rgba(24,214,255,.14);
}
.account-picker-trigger span {
  font-weight: 800;
  font-size: 14px;
}
.account-picker-trigger strong {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.account-picker-trigger::after {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid #4b6078;
  border-bottom: 2px solid #4b6078;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .16s ease;
}
.account-picker.is-open .account-picker-trigger::after { transform: rotate(225deg) translateY(-1px); }
.account-picker-panel {
  display: none;
  position: absolute;
  z-index: 300;
  top: calc(100% + 8px);
  left: 0;
  width: min(320px, calc(100vw - 40px));
  max-height: min(380px, calc(100vh - 160px));
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.36);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(15,23,42,.18);
}
.account-picker.is-open .account-picker-panel {
  display: flex;
  flex-direction: column;
}
.account-picker-title {
  margin-bottom: 8px;
  color: #102a43;
  font-size: 14px;
  font-weight: 900;
}
.account-picker-search {
  width: 100%;
  min-height: 40px;
  margin-bottom: 8px;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
}
.account-picker-options {
  min-height: 0;
  max-height: 216px;
  overflow-y: auto;
  margin: 0 -2px;
  padding: 3px 2px;
  border-top: 1px solid rgba(226,232,240,.95);
  border-bottom: 1px solid rgba(226,232,240,.95);
}
.account-picker-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px;
  border-radius: 8px;
  color: #102a43;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}
.account-picker-option:hover { background: rgba(24,214,255,.09); }
.account-picker-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-picker-option input {
  width: 16px;
  height: 16px;
  min-height: auto;
  padding: 0;
  accent-color: #06b6d4;
}
.account-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  background: #fff;
}
.account-picker-actions .primary,
.account-picker-actions .secondary {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 9px;
}
.account-picker-actions .primary { box-shadow: none; }
.article-filter-bar > input[type="search"] {
  flex-basis: 100%;
  min-width: 100%;
}
.article-filter-bar select {
  flex: 0 0 132px;
  width: 132px;
  min-width: 132px;
}
.article-filter-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}
.article-table-wrap {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.article-list-panel { min-width: 0; }
.article-management-table { min-width: 920px; }
.article-management-table th { white-space: nowrap; }
.article-management-table .article-state-cell { white-space: nowrap; }
.page-jump-form { display: inline-flex; align-items: center; gap: 8px; }
.page-jump-form input[type="number"] {
  width: 86px;
  padding: 10px 12px;
  border: 1px solid rgba(16,42,67,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.94);
}
@media (max-width: 1180px) {
  .filter-bar { flex-wrap: wrap; }
  .filter-bar > input[type="search"] { flex-basis: 100%; min-width: min(100%, 280px); }
}
@media (max-width: 720px) {
  .filter-bar { align-items: stretch; }
  .filter-bar > *, .account-picker, .account-picker-trigger { width: 100%; }
  .filter-bar select, .filter-bar input[type="date"] { flex-basis: 100%; }
  .account-picker-trigger { justify-content: space-between; }
  .account-picker-panel {
    left: 0;
    right: auto;
    width: 100%;
    max-height: min(420px, 70vh);
  }
  .article-filter-bar select {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }
  .article-filter-actions { width: 100%; }
  .article-filter-actions .secondary { flex: 1 1 0; }
  .article-table-wrap .article-management-table {
    display: table;
    overflow: visible;
  }
}

.database-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.database-sidebar,
.database-main { min-width: 0; }
.table-list {
  display: grid;
  gap: 6px;
  max-height: 620px;
  overflow: auto;
}
.table-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #213047;
}
.table-list-item:hover,
.table-list-item.active {
  color: #083c9b;
  background: rgba(24,214,255,.08);
  border-color: rgba(24,214,255,.2);
}
.table-list-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}
.table-list-item em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}
.database-filter {
  margin-bottom: 14px;
  box-shadow: none;
}
.table-scroll {
  width: 100%;
  overflow: auto;
}
.database-table {
  min-width: 760px;
}
.database-table th,
.database-table td {
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.database-table td {
  font-size: 13px;
}
.null-cell {
  color: #94a3b8;
  font-family: Consolas, "SFMono-Regular", monospace;
}
.database-sql-panel {
  margin-top: 18px;
}
.sql-query {
  min-height: 118px;
  font-family: Consolas, "SFMono-Regular", monospace;
}
@media (max-width: 980px) {
  .database-layout { grid-template-columns: 1fr; }
  .table-list { max-height: 300px; }
}

.followup-grid .panel {
  min-width: 0;
}
.followup-table-wrap {
  max-height: 560px;
  overflow: auto;
}
.followup-table-wrap table {
  min-width: 620px;
}
.followup-table-wrap th,
.followup-table-wrap td {
  white-space: nowrap;
}
.followup-table-wrap td:nth-child(3) {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dashboard claim ranking */
.dashboard-ranking-panel {
  min-width: 0;
  margin-top: 18px;
}
.dashboard-ranking-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.dashboard-ranking-heading h2 {
  margin: 0 0 5px;
}
.dashboard-ranking-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.dashboard-ranking-filter {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}
.dashboard-ranking-filter label {
  display: grid;
  gap: 6px;
}
.dashboard-ranking-filter label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.dashboard-ranking-filter input[type="date"] {
  width: 168px;
}
.dashboard-ranking-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
}
.dashboard-ranking-meta strong {
  color: #0f4f88;
  font-size: 15px;
}
.dashboard-ranking-table-wrap {
  width: 100%;
  overflow: auto;
  overscroll-behavior-inline: contain;
}
.dashboard-ranking-table {
  min-width: 1420px;
}
.dashboard-ranking-table th,
.dashboard-ranking-table td {
  white-space: nowrap;
}
.dashboard-ranking-table .dashboard-ranking-article {
  min-width: 260px;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-ranking-position {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: #64748b;
  background: #f1f5f9;
  font-weight: 900;
}
.dashboard-ranking-position.is-top {
  color: #075985;
  background: #cffafe;
}
.dashboard-ranking-read {
  color: #0369a1;
  font-weight: 900;
}
@media (max-width: 720px) {
  .dashboard-ranking-header {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-ranking-filter {
    align-items: stretch;
  }
  .dashboard-ranking-filter label {
    flex: 1 1 auto;
  }
  .dashboard-ranking-filter input[type="date"] {
    width: 100%;
  }
  .dashboard-ranking-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

/* Claim metrics */
.claims-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.claims-data-table { min-width: 1780px; }
.claims-data-table th,
.claims-data-table td { white-space: nowrap; }
.claims-data-table td:first-child {
  min-width: 260px;
  max-width: 360px;
  white-space: normal;
}
.claims-data-table .metrics-column {
  color: #0369a1;
  background: #ecfeff;
}
.claims-data-table .metric-value {
  color: #0f4c5c;
  background: rgba(236, 254, 255, .42);
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  text-align: right;
}
.metrics-entry-panel {
  max-width: 1050px;
  margin: 0 auto;
}
.claim-metrics-context {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 24px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #e2e8f0;
}
.claim-metrics-context div { padding: 14px; background: #f8fafc; }
.claim-metrics-context dt {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.claim-metrics-context dd {
  margin: 0;
  overflow: hidden;
  color: #0f172a;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.metrics-input-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.metrics-input-item label {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}
.metrics-input-item input { font-variant-numeric: tabular-nums; font-weight: 800; }
.metrics-entry-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; }
.metrics-entry-form .errorlist {
  margin: 7px 0 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: 13px;
}
.metrics-import-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 18px;
  align-items: start;
}
.metrics-import-panel,
.metrics-import-rules { min-width: 0; }
.metrics-upload-field label {
  display: block;
  margin-bottom: 9px;
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}
.metrics-upload-field input[type="file"] {
  min-height: 96px;
  padding: 28px 18px;
  border-style: dashed;
  background: #f8fafc;
  cursor: pointer;
}
.metrics-import-form .errorlist {
  margin: 10px 0 0;
  padding: 12px 14px 12px 32px;
  border-left: 3px solid var(--danger);
  color: #be123c;
  background: #fff5f7;
  font-size: 13px;
  line-height: 1.65;
}
.metrics-header-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.metrics-header-list code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid #bae6fd;
  border-radius: 7px;
  color: #075985;
  background: #ecfeff;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 800;
}
.metrics-import-rules .check-list { margin-bottom: 0; }
@media (max-width: 980px) {
  .claim-metrics-context,
  .metrics-input-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metrics-import-layout { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .claim-metrics-context,
  .metrics-input-grid { grid-template-columns: 1fr; }
}

/* Image article workbench */
.image-workbench {
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 16px;
  color: #ecfeff;
  background:
    radial-gradient(circle at 18% 0%, rgba(20, 184, 166, .18), transparent 28%),
    linear-gradient(135deg, #08111f 0%, #111827 58%, #0b141d 100%);
  box-shadow: 0 28px 70px rgba(15, 23, 42, .25);
}
.image-workbench-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 8px 18px;
}
.image-workbench-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  color: #6ee7f9;
  font-size: 12px;
  font-weight: 900;
}
.image-workbench-title h1 {
  max-width: 820px;
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: 28px;
  line-height: 1.22;
}
.image-workbench-meta,
.image-workbench-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.image-workbench-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(103, 232, 249, .22);
  border-radius: 999px;
  color: #dffcff;
  background: rgba(8, 145, 178, .14);
  font-size: 12px;
  font-weight: 800;
}
.image-workbench-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(340px, .68fr);
  gap: 16px;
  align-items: start;
}
.image-preview-panel,
.image-copy-panel,
.image-action-panel,
.image-info-panel,
.image-claim-panel {
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 12px;
  background: rgba(15, 23, 42, .74);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.image-preview-panel { padding: 14px; min-width: 0; }
.image-preview-stage {
  display: grid;
  place-items: center;
  min-height: 560px;
  max-height: 68vh;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 10px;
  background: #f8fafc;
}
.image-preview-stage img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 68vh;
  object-fit: contain;
}
.image-preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 10px 2px 0;
}
.image-preview-toolbar span {
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.image-thumb-strip {
  display: flex;
  gap: 10px;
  max-width: 100%;
  overflow-x: auto;
  padding: 12px 2px 2px;
}
.image-thumb {
  flex: 0 0 108px;
  width: 108px;
  min-height: 118px;
  padding: 7px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 10px;
  color: #cbd5e1;
  background: rgba(2, 6, 23, .34);
  cursor: pointer;
}
.image-thumb.is-active,
.image-thumb:hover {
  border-color: #22d3ee;
  background: rgba(8, 145, 178, .16);
}
.image-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 7px;
  background: #fff;
}
.image-thumb span {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-copy-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.image-copy-panel { padding: 14px; }
.image-copy-panel.is-large .image-copy-textarea { min-height: 260px; }
.image-copy-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.image-copy-heading span {
  color: #e2f7ff;
  font-size: 14px;
  font-weight: 900;
}
.image-copy-heading a { color: #67e8f9; font-weight: 800; }
.image-copy-textarea {
  width: 100%;
  min-height: 150px;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, .22);
  border-radius: 10px;
  color: #e5e7eb;
  background: rgba(2, 6, 23, .46);
  line-height: 1.7;
  resize: vertical;
}
.image-copy-textarea.title-field { min-height: 76px; font-size: 16px; font-weight: 800; }
.image-copy-panel small {
  display: block;
  min-height: 18px;
  margin-top: 8px;
  color: #86efac;
  font-size: 12px;
  font-weight: 800;
}
.image-button,
.image-copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, .24);
  border-radius: 9px;
  font-weight: 900;
  cursor: pointer;
}
.image-button.ghost,
.image-copy-button {
  color: #e0f2fe;
  background: rgba(15, 23, 42, .68);
}
.image-button.primary {
  color: #04111d;
  background: linear-gradient(135deg, #a7f3d0, #22d3ee);
  border-color: transparent;
}
.image-button.warn {
  color: #ffe4e6;
  background: rgba(190, 18, 60, .2);
  border-color: rgba(251, 113, 133, .32);
}
.image-copy-button.is-copied {
  color: #052e16;
  background: #86efac;
  border-color: transparent;
}
.image-action-panel {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px;
}
.image-action-note {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}
.image-info-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}
.image-info-panel div {
  min-width: 0;
  padding: 12px;
  background: rgba(2, 6, 23, .18);
}
.image-info-panel span,
.image-info-panel strong { display: block; }
.image-info-panel span { color: #94a3b8; font-size: 12px; }
.image-info-panel strong {
  margin-top: 5px;
  overflow: hidden;
  color: #f8fafc;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-claim-panel { padding: 14px; }
.image-claim-panel table { color: #dbeafe; }
.image-claim-panel th,
.image-claim-panel td {
  border-color: rgba(148, 163, 184, .14);
  padding: 10px 8px;
  font-size: 13px;
}
.image-claim-panel tbody tr:hover { background: rgba(34, 211, 238, .08); }
.image-empty-state {
  display: grid;
  place-items: center;
  min-height: 360px;
  color: #cbd5e1;
  border: 1px dashed rgba(148, 163, 184, .28);
  border-radius: 10px;
  background: rgba(15, 23, 42, .5);
  font-weight: 900;
}
@media (max-width: 1180px) {
  .image-workbench-grid { grid-template-columns: 1fr; }
  .image-preview-stage { min-height: 460px; }
}
@media (max-width: 720px) {
  .image-workbench { padding: 12px; border-radius: 12px; }
  .image-workbench-header { flex-direction: column; padding: 4px 2px 14px; }
  .image-workbench-title h1 { font-size: 22px; }
  .image-workbench-actions,
  .image-workbench-actions .image-button,
  .image-action-panel .image-button,
  .image-preview-toolbar .image-button { width: 100%; }
  .image-preview-toolbar { align-items: stretch; flex-direction: column; }
  .image-preview-panel,
  .image-copy-panel,
  .image-action-panel,
  .image-info-panel,
  .image-claim-panel { border-radius: 10px; }
  .image-preview-stage { min-height: 320px; max-height: 58vh; }
  .image-preview-stage img { max-height: 58vh; }
  .image-info-panel { grid-template-columns: 1fr; }
  .image-thumb { flex-basis: 92px; width: 92px; min-height: 104px; }
}

/* Claim metrics batch modal */
.date-filter-field {
  display: inline-grid;
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: center;
  gap: 8px;
  flex: 0 0 226px;
  min-height: 43px;
}
.date-filter-field span {
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}
.date-filter-field input[type="date"] {
  width: 100%;
}
.claim-bulk-modal[hidden] { display: none; }
.claim-bulk-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .46);
  backdrop-filter: blur(10px);
}
body.modal-open { overflow: hidden; }
.claim-bulk-dialog {
  width: min(460px, 100%);
  padding: 22px;
  border: 1px solid rgba(220,230,244,.92);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}
.claim-bulk-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.claim-bulk-heading h2 { margin: 0; font-size: 20px; }
.claim-bulk-close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(148,163,184,.3);
  border-radius: 9px;
  color: #475569;
  background: #f8fafc;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.claim-bulk-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 12px;
  margin-bottom: 12px;
}
.claim-bulk-field {
  display: grid;
  gap: 8px;
}
.claim-bulk-field span {
  color: #334155;
  font-size: 14px;
  font-weight: 900;
}
.claim-bulk-field input { width: 100%; }
.claim-bulk-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
@media (max-width: 720px) {
  .date-filter-field { grid-template-columns: 1fr; flex-basis: 100%; width: 100%; }
  .claim-bulk-modal { padding: 14px; }
  .claim-bulk-fields { grid-template-columns: 1fr; }
  .claim-bulk-actions { flex-direction: column-reverse; }
  .claim-bulk-actions .primary,
  .claim-bulk-actions .secondary { width: 100%; }
}

/* Admin dashboard mobile layout */
.dashboard-mobile-topbar,
.dashboard-sidebar-overlay {
  display: none;
}

@media (max-width: 980px) {
  body.dashboard-mobile-page {
    overflow-x: hidden;
  }
  body.dashboard-mobile-page.dashboard-sidebar-open {
    overflow: hidden;
  }
  .dashboard-mobile-page .app-shell {
    display: block;
    min-height: 100vh;
  }
  .dashboard-mobile-page .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1100;
    width: min(84vw, 306px);
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translate3d(-105%, 0, 0);
    transition: transform 180ms ease;
    box-shadow: 18px 0 46px rgba(2, 10, 24, .32);
  }
  .dashboard-mobile-page.dashboard-sidebar-open .sidebar {
    transform: translate3d(0, 0, 0);
  }
  .dashboard-mobile-page .side-nav {
    grid-template-columns: 1fr;
  }
  .dashboard-mobile-page .page {
    width: 100%;
    margin: 0;
    padding: 78px 18px 42px;
  }
  .dashboard-mobile-topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 60px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(203, 213, 225, .82);
    background: rgba(250, 252, 255, .94);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .07);
    backdrop-filter: blur(16px);
  }
  .dashboard-menu-button {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid #d8e4f2;
    border-radius: 8px;
    color: #0f4f88;
    background: #fff;
    cursor: pointer;
  }
  .dashboard-menu-icon {
    width: 18px;
    display: grid;
    gap: 4px;
  }
  .dashboard-menu-icon > span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
  }
  .dashboard-mobile-title {
    min-width: 0;
    flex: 1 1 auto;
  }
  .dashboard-mobile-title strong,
  .dashboard-mobile-title span {
    display: block;
  }
  .dashboard-mobile-title strong {
    color: #10233f;
    font-size: 15px;
  }
  .dashboard-mobile-title span {
    margin-top: 1px;
    color: #64748b;
    font-size: 11px;
  }
  .dashboard-mobile-user {
    max-width: 92px;
    overflow: hidden;
    color: #526175;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    opacity: 0;
    pointer-events: none;
    background: rgba(2, 8, 23, .52);
    transition: opacity 180ms ease;
  }
  .dashboard-mobile-page.dashboard-sidebar-open .dashboard-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 720px) {
  .dashboard-mobile-page .page {
    padding: 72px 12px 30px;
  }
  .dashboard-mobile-page .command-hero {
    align-items: center;
    flex-direction: row;
    gap: 14px;
    margin-bottom: 12px;
    padding: 18px;
    border-radius: 10px;
  }
  .dashboard-mobile-page .command-hero > div {
    min-width: 0;
  }
  .dashboard-mobile-page .command-hero .eyebrow {
    margin-bottom: 8px;
    padding: 4px 8px;
    font-size: 10px;
  }
  .dashboard-mobile-page .command-hero h1 {
    margin-bottom: 6px;
    font-size: 27px;
  }
  .dashboard-mobile-page .command-hero p {
    font-size: 12px;
    line-height: 1.55;
  }
  .dashboard-mobile-page .command-hero .primary {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 13px;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(24, 214, 255, .18);
  }
  .dashboard-mobile-page .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  .dashboard-mobile-page .stat-card {
    min-width: 0;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .07);
  }
  .dashboard-mobile-page .stat-card span {
    margin-bottom: 7px;
    font-size: 12px;
  }
  .dashboard-mobile-page .stat-card strong {
    font-size: 28px;
  }
  .dashboard-mobile-page .followup-grid {
    gap: 22px;
  }
  .dashboard-mobile-page .followup-grid .panel,
  .dashboard-mobile-page .dashboard-ranking-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  .dashboard-mobile-page .followup-grid .panel-title {
    align-items: center;
    flex-direction: row;
    margin: 0 2px 10px;
  }
  .dashboard-mobile-page .followup-grid .panel-title h2,
  .dashboard-mobile-page .dashboard-ranking-heading h2 {
    font-size: 18px;
  }
  .dashboard-mobile-page .followup-grid .panel-title span {
    padding: 3px 8px;
    border: 1px solid #d8e7f5;
    border-radius: 999px;
    color: #37536f;
    background: rgba(255, 255, 255, .76);
    white-space: nowrap;
  }
  .dashboard-mobile-page .followup-table-wrap {
    max-height: none;
    overflow: visible;
  }
  .dashboard-mobile-page .followup-table-wrap table,
  .dashboard-mobile-page .followup-table-wrap tbody {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
    white-space: normal;
  }
  .dashboard-mobile-page .followup-table-wrap thead {
    display: none;
  }
  .dashboard-mobile-page .followup-table-wrap tbody {
    display: grid;
    gap: 9px;
  }
  .dashboard-mobile-page .followup-table-wrap tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 16px;
    padding: 14px;
    border: 1px solid rgba(211, 223, 238, .92);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 7px 18px rgba(15, 23, 42, .055);
  }
  .dashboard-mobile-page .followup-table-wrap td {
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
    overflow: visible;
    border: 0;
    color: #1e293b;
    font-size: 13px;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
  .dashboard-mobile-page .followup-table-wrap td::before,
  .dashboard-mobile-page .dashboard-ranking-table td::before {
    content: attr(data-label);
    display: block;
    color: #7a899c;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.25;
  }
  .dashboard-mobile-page .followup-table-wrap td.dashboard-mobile-wide {
    grid-column: 1 / -1;
    padding: 10px 0;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
  }
  .dashboard-mobile-page .dashboard-ranking-panel {
    margin-top: 24px;
  }
  .dashboard-mobile-page .dashboard-ranking-header {
    gap: 12px;
    margin: 0 2px 12px;
  }
  .dashboard-mobile-page .dashboard-ranking-heading p {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.55;
  }
  .dashboard-mobile-page .dashboard-ranking-filter {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }
  .dashboard-mobile-page .dashboard-ranking-filter input[type="date"] {
    min-height: 40px;
  }
  .dashboard-mobile-page .dashboard-ranking-filter .secondary {
    min-height: 40px;
    padding: 0 15px;
    border-radius: 8px;
  }
  .dashboard-mobile-page .dashboard-ranking-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0 2px 10px;
  }
  .dashboard-mobile-page .dashboard-ranking-meta span {
    min-width: 0;
  }
  .dashboard-mobile-page .dashboard-ranking-table-wrap {
    overflow: visible;
  }
  .dashboard-mobile-page .dashboard-ranking-table,
  .dashboard-mobile-page .dashboard-ranking-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
    white-space: normal;
  }
  .dashboard-mobile-page .dashboard-ranking-table thead {
    display: none;
  }
  .dashboard-mobile-page .dashboard-ranking-table tbody {
    display: grid;
    gap: 10px;
  }
  .dashboard-mobile-page .dashboard-ranking-table tr {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 10px;
    padding: 14px;
    border: 1px solid rgba(211, 223, 238, .94);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 20px rgba(15, 23, 42, .06);
  }
  .dashboard-mobile-page .dashboard-ranking-table td {
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 3px 4px;
    overflow: visible;
    border: 0;
    color: #243247;
    font-size: 13px;
    overflow-wrap: anywhere;
    text-overflow: clip;
    white-space: normal;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
    justify-content: center;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(1)::before {
    display: none;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(2) {
    grid-column: 2 / 4;
    grid-row: 1;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(3) {
    grid-column: 1;
    grid-row: 2;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(4) {
    grid-column: 2 / 4;
    grid-row: 2;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(5) {
    grid-column: 1 / 4;
    grid-row: 3;
    padding: 9px 4px;
    border-top: 1px solid #edf2f7;
    border-bottom: 1px solid #edf2f7;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(6) { grid-column: 1; grid-row: 4; }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(7) { grid-column: 2; grid-row: 4; }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(8) { grid-column: 3; grid-row: 4; }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(9) { grid-column: 1; grid-row: 5; }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(10) { grid-column: 2; grid-row: 5; }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(11) { grid-column: 3; grid-row: 5; }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(12) {
    grid-column: 1 / 3;
    grid-row: 6;
    padding-top: 8px;
    border-top: 1px solid #edf2f7;
    color: #526175;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(13) {
    grid-column: 3;
    grid-row: 6;
    padding-top: 8px;
    border-top: 1px solid #edf2f7;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(n + 6):nth-child(-n + 11) {
    padding-left: 8px;
    border-left: 2px solid #dceaf7;
    font-size: 16px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
  }
  .dashboard-mobile-page .dashboard-ranking-table td:nth-child(n + 6):nth-child(-n + 11)::before {
    font-size: 10px;
    font-weight: 700;
  }
  .dashboard-mobile-page .dashboard-ranking-table .dashboard-ranking-article {
    min-width: 0;
    max-width: none;
  }
  .dashboard-mobile-page .dashboard-ranking-article a {
    display: -webkit-box;
    overflow: hidden;
    color: #1257a6;
    font-weight: 900;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .dashboard-mobile-page .dashboard-ranking-position {
    width: 30px;
    height: 30px;
  }
  .dashboard-mobile-page .dashboard-ranking-read {
    color: #0369a1;
    font-size: 18px !important;
  }
  .dashboard-mobile-page .followup-table-wrap tr.dashboard-mobile-empty,
  .dashboard-mobile-page .dashboard-ranking-table tr.dashboard-mobile-empty {
    display: block;
    padding: 18px 14px;
    color: #64748b;
    text-align: center;
  }
  .dashboard-mobile-page .followup-table-wrap tr.dashboard-mobile-empty td,
  .dashboard-mobile-page .dashboard-ranking-table tr.dashboard-mobile-empty td {
    display: block;
    padding: 0;
    border: 0;
    color: inherit;
    font-size: 13px;
    text-align: center;
  }
  .dashboard-mobile-page .followup-table-wrap tr.dashboard-mobile-empty td::before,
  .dashboard-mobile-page .dashboard-ranking-table tr.dashboard-mobile-empty td::before {
    display: none;
  }
}

@media (max-width: 420px) {
  .dashboard-mobile-page .command-hero {
    align-items: stretch;
    flex-direction: column;
  }
  .dashboard-mobile-page .command-hero .primary {
    width: 100%;
  }
  .dashboard-mobile-user {
    max-width: 64px;
  }
}

/* AI operations review */
.ai-review-hero {
  overflow: hidden;
}
.ai-review-connection {
  min-width: 190px;
  padding: 13px 15px;
  border: 1px solid #d8e3ef;
  border-radius: 8px;
  background: rgba(248, 250, 252, .86);
}
.ai-review-connection span,
.ai-review-connection strong {
  display: block;
}
.ai-review-connection span {
  margin-bottom: 4px;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}
.ai-review-connection strong {
  color: #475569;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.ai-review-connection.is-connected {
  border-color: rgba(16, 185, 129, .3);
  background: rgba(236, 253, 245, .86);
}
.ai-review-connection.is-connected span { color: #047857; }
.ai-review-connection.is-connected strong { color: #065f46; }

.ai-review-filter-panel {
  margin-bottom: 18px;
  padding: 18px 20px;
}
.ai-review-filter-form {
  display: grid;
  grid-template-columns: 170px 170px minmax(240px, 1fr) auto;
  align-items: end;
  gap: 12px;
}
.ai-review-filter-form label {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.ai-review-filter-form label > span {
  color: #526175;
  font-size: 12px;
  font-weight: 900;
}
.ai-review-filter-form input,
.ai-review-filter-form select {
  width: 100%;
  min-height: 42px;
}
.ai-review-filter-form .primary {
  min-height: 42px;
  white-space: nowrap;
}
.ai-review-basis {
  margin: 11px 0 0;
  color: #7a899c;
  font-size: 12px;
  line-height: 1.55;
}
.ai-review-form-error {
  margin-top: 10px;
  color: #be123c;
  font-size: 13px;
  font-weight: 800;
}
.ai-review-filter-form .field-error {
  color: #be123c;
  font-size: 11px;
}

.ai-review-stat-grid .stat-card {
  min-width: 0;
}
.ai-review-stat-grid .stat-card strong {
  overflow-wrap: anywhere;
}
.ai-review-stat-grid .stat-card em {
  display: block;
  margin-top: 8px;
  color: #7a899c;
  font-size: 12px;
  font-style: normal;
}
.ai-review-change.is-up { color: #047857 !important; }
.ai-review-change.is-down { color: #be123c !important; }
.ai-review-change.is-new { color: #0369a1 !important; }

.ai-review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 28px;
}
.ai-review-main {
  min-width: 0;
}
.ai-review-aside {
  min-width: 0;
  position: sticky;
  top: 28px;
  display: grid;
  gap: 14px;
}
.ai-review-report-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 2px 20px;
  border-bottom: 1px solid #dce6f1;
}
.ai-review-report-head h2 {
  margin: 0 0 7px;
  font-size: 27px;
}
.ai-review-report-head p,
.ai-review-report-head time {
  margin: 0;
  color: #718096;
  font-size: 12px;
}
.ai-review-report-head time {
  flex: 0 0 auto;
  padding-bottom: 2px;
  font-variant-numeric: tabular-nums;
}
.ai-review-warning {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-left: 3px solid #f59e0b;
  color: #7c4a03;
  background: rgba(255, 251, 235, .82);
  font-size: 13px;
  line-height: 1.65;
}
.ai-review-overview {
  margin-top: 18px;
  padding: 20px 22px;
  border-left: 4px solid #18b8d8;
  background: rgba(255, 255, 255, .7);
}
.ai-review-overview span {
  display: block;
  margin-bottom: 8px;
  color: #037491;
  font-size: 11px;
  font-weight: 900;
}
.ai-review-overview p {
  margin: 0;
  color: #243247;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.85;
}
.ai-review-section,
.ai-review-evidence-section {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid #dce6f1;
}
.ai-review-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.ai-review-section-title h2 {
  margin: 0;
  font-size: 19px;
}
.ai-review-section-title p {
  margin: 4px 0 0;
  color: #7a899c;
  font-size: 12px;
  line-height: 1.5;
}
.ai-review-section-title > span {
  flex: 0 0 auto;
  color: #718096;
  font-size: 12px;
}
.ai-review-insight-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ai-review-insight-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 13px;
  padding: 15px 2px;
  border-bottom: 1px solid #e8eef5;
}
.ai-review-insight-list li:last-child { border-bottom: 0; }
.ai-review-index {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #075985;
  background: #cffafe;
  font-size: 12px;
  font-weight: 900;
}
.ai-review-insight-list.is-risk .ai-review-index {
  color: #9f1239;
  background: #ffe4e6;
}
.ai-review-insight-list.is-action .ai-review-index {
  color: #047857;
  background: #d1fae5;
}
.ai-review-insight-list h3 {
  margin: 1px 0 5px;
  font-size: 15px;
}
.ai-review-insight-list p {
  margin: 0;
  color: #435269;
  font-size: 14px;
  line-height: 1.72;
}
.ai-review-insight-list small {
  display: block;
  margin-top: 6px;
  color: #7a899c;
  font-size: 11px;
  line-height: 1.55;
}
.ai-review-insight-list li.ai-review-list-empty {
  display: block;
  color: #718096;
  font-size: 13px;
}
.ai-review-awaiting {
  padding: 34px 2px;
  border-bottom: 1px solid #dce6f1;
}
.ai-review-awaiting h2 {
  margin: 0 0 8px;
  font-size: 26px;
}
.ai-review-awaiting p {
  margin: 0;
  color: #64748b;
}

.ai-review-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}
.ai-review-table {
  min-width: 760px;
}
.ai-review-table td,
.ai-review-table th {
  padding: 12px 10px;
}
.ai-review-table td:first-child {
  max-width: 360px;
}
.ai-review-table td:first-child a {
  display: block;
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-review-table td strong {
  color: #075985;
  font-size: 15px;
}
.ai-review-table-empty td {
  color: #7a899c;
  text-align: center;
}

.ai-review-type-panel,
.ai-review-quality-panel,
.ai-review-history-panel {
  padding: 18px;
  border: 1px solid rgba(211, 223, 238, .94);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 9px 24px rgba(15, 23, 42, .06);
}
.ai-review-type-panel .ai-review-section-title,
.ai-review-quality-panel .ai-review-section-title,
.ai-review-history-panel .ai-review-section-title {
  margin-bottom: 10px;
}
.ai-review-type-panel h2,
.ai-review-quality-panel h2,
.ai-review-history-panel h2 {
  font-size: 16px;
}
.ai-review-type-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #e8eef5;
}
.ai-review-type-row div:last-child { text-align: right; }
.ai-review-type-row strong,
.ai-review-type-row span {
  display: block;
}
.ai-review-type-row strong {
  color: #26364f;
  font-size: 14px;
}
.ai-review-type-row span {
  margin-top: 3px;
  color: #7a899c;
  font-size: 10px;
}
.ai-review-quality-panel dl {
  margin: 0;
}
.ai-review-quality-panel dl > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid #e8eef5;
}
.ai-review-quality-panel dt {
  color: #64748b;
  font-size: 12px;
}
.ai-review-quality-panel dd {
  margin: 0;
  color: #26364f;
  font-size: 13px;
  font-weight: 900;
}
.ai-review-history-list {
  display: grid;
}
.ai-review-history-list > a {
  display: block;
  padding: 12px 8px;
  border-top: 1px solid #e8eef5;
  border-left: 2px solid transparent;
  color: #26364f;
}
.ai-review-history-list > a:hover,
.ai-review-history-list > a.is-active {
  border-left-color: #18b8d8;
  color: #075985;
  background: rgba(236, 254, 255, .62);
}
.ai-review-history-list strong,
.ai-review-history-list span,
.ai-review-history-list time {
  display: block;
}
.ai-review-history-list strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ai-review-history-list span,
.ai-review-history-list time {
  margin-top: 4px;
  color: #7a899c;
  font-size: 10px;
}
.ai-review-history-list > p {
  margin: 8px 0 0;
  color: #7a899c;
  font-size: 12px;
}

@media (max-width: 1120px) {
  .ai-review-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ai-review-scope-field { grid-column: 1 / 2; }
  .ai-review-layout {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
  }
}

@media (max-width: 900px) {
  .ai-review-layout { grid-template-columns: 1fr; }
  .ai-review-aside {
    position: relative;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .ai-review-page .ai-review-hero {
    align-items: stretch;
  }
  .ai-review-page .ai-review-connection {
    min-width: 146px;
    padding: 10px 12px;
  }
  .ai-review-filter-panel {
    margin-bottom: 12px;
    padding: 15px;
    border-radius: 8px;
  }
  .ai-review-filter-form {
    grid-template-columns: 1fr;
    gap: 11px;
  }
  .ai-review-scope-field { grid-column: auto; }
  .ai-review-filter-form .primary { width: 100%; }
  .ai-review-basis { font-size: 11px; }
  .ai-review-layout { gap: 20px; }
  .ai-review-report-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
  }
  .ai-review-report-head h2 { font-size: 23px; }
  .ai-review-overview {
    padding: 16px;
  }
  .ai-review-overview p {
    font-size: 14px;
    line-height: 1.75;
  }
  .ai-review-section,
  .ai-review-evidence-section {
    margin-top: 22px;
    padding-top: 18px;
  }
  .ai-review-insight-list li {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    padding: 13px 0;
  }
  .ai-review-index {
    width: 27px;
    height: 27px;
  }
  .ai-review-aside {
    grid-template-columns: 1fr;
  }
  .ai-review-table-wrap { overflow: visible; }
  .ai-review-table,
  .ai-review-table tbody {
    display: block;
    width: 100%;
    min-width: 0;
    overflow: visible;
    white-space: normal;
  }
  .ai-review-table thead { display: none; }
  .ai-review-table tbody {
    display: grid;
    gap: 9px;
  }
  .ai-review-table tr {
    display: grid;
    gap: 10px 14px;
    padding: 14px;
    border: 1px solid rgba(211, 223, 238, .94);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 7px 18px rgba(15, 23, 42, .055);
  }
  .ai-review-article-table tr { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ai-review-account-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-review-table td,
  .ai-review-table td:first-child {
    min-width: 0;
    max-width: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0;
    overflow: visible;
    border: 0;
    font-size: 13px;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .ai-review-table td::before {
    content: attr(data-label);
    color: #7a899c;
    font-size: 10px;
    font-weight: 800;
  }
  .ai-review-table td:first-child,
  .ai-review-article-table td:nth-child(2) {
    grid-column: 1 / -1;
    padding-bottom: 9px;
    border-bottom: 1px solid #e8eef5;
  }
  .ai-review-table td:first-child a {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }
  .ai-review-table tr.ai-review-table-empty {
    display: block;
    color: #7a899c;
    text-align: center;
  }
  .ai-review-table tr.ai-review-table-empty td {
    display: block;
    padding: 3px;
    border: 0;
    text-align: center;
  }
  .ai-review-table tr.ai-review-table-empty td::before { display: none; }
}

@media (max-width: 420px) {
  .ai-review-page .ai-review-connection {
    width: 100%;
  }
}
