:root {
  --ac-ink: #2a172f;
  --ac-plum: #35143b;
  --ac-plum-light: #4a2452;
  --ac-gold: #bf9650;
  --ac-gold-light: #e8c982;
  --ac-paper: #fffaf2;
  --ac-cream: #f4ecdf;
  --ac-muted: #746a76;
  --ac-line: rgba(54, 31, 60, .15);
  --ac-danger: #8b3340;
  --ac-success: #286144;
  --ac-focus: #98671f;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.admin-claims-body { min-height: 100vh; margin: 0; color: var(--ac-ink); background: var(--ac-cream); font-family: "DM Sans", Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
button, select, input, textarea { accent-color: var(--ac-plum); }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .62; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(191, 150, 80, .55); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.admin-skip-link { position: fixed; z-index: 30; top: 10px; left: 10px; padding: 10px 14px; transform: translateY(-160%); border-radius: 8px; color: var(--ac-paper); background: var(--ac-plum); font-weight: 700; text-decoration: none; }
.admin-skip-link:focus { transform: translateY(0); }
.admin-header { display: flex; align-items: center; gap: 28px; min-height: 78px; padding: 12px max(24px, calc((100vw - 1380px) / 2)); color: #fff7e8; background: var(--ac-plum); }
.admin-brand { display: inline-flex; align-items: center; min-width: 190px; }
.admin-brand img { display: block; width: 178px; height: auto; }
.admin-header__nav { display: flex; gap: 24px; margin-left: auto; }
.admin-header__nav a { color: inherit; font-size: .88rem; font-weight: 600; text-decoration: none; }
.admin-header__nav a:hover { color: var(--ac-gold-light); }
.admin-shell { width: min(1340px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 90px; }
.demo-banner { position: sticky; z-index: 5; top: 10px; width: fit-content; max-width: 100%; margin: 0 auto 20px; padding: 10px 16px; border: 1px solid #70501f; border-radius: 999px; color: #4c3510; background: #f8e7bb; box-shadow: 0 8px 24px rgba(44, 22, 47, .12); font-size: .78rem; font-weight: 800; letter-spacing: .07em; text-align: center; }
.admin-hero { max-width: 920px; margin: 0 0 32px; }
.admin-eyebrow { margin: 0 0 9px; color: #956e38; font-size: .72rem; font-weight: 800; letter-spacing: .17em; }
.admin-hero h1, .access-card h2, .admin-context h2, .section-heading h2, .detail-heading h2, .decision-modal h2 { margin: 0; color: var(--ac-ink); font-family: "Playfair Display", Georgia, serif; font-weight: 600; }
.admin-hero h1 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.08; }
.admin-hero > p { max-width: 780px; margin: 18px 0 0; color: var(--ac-muted); font-size: 1.06rem; line-height: 1.7; }
.admin-disclosure { margin-top: 21px; padding: 15px 18px; border-left: 4px solid var(--ac-gold); border-radius: 0 12px 12px 0; color: #5e5261; background: #f9f0df; font-size: .92rem; line-height: 1.6; }
.access-card { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 24px; max-width: 800px; padding: 32px; border: 1px solid var(--ac-line); border-radius: 22px; background: var(--ac-paper); box-shadow: 0 18px 48px rgba(44, 22, 47, .08); }
.access-card__mark { display: grid; width: 68px; height: 68px; place-items: center; border-radius: 50%; color: var(--ac-gold-light); background: var(--ac-plum); font-size: 2rem; font-weight: 700; }
.access-card h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1.2; }
.access-card p:not(.admin-eyebrow) { max-width: 640px; color: var(--ac-muted); line-height: 1.65; }
.access-card .restricted-statement { color: var(--ac-danger); font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 999px; font-size: .9rem; font-weight: 700; text-decoration: none; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button--primary { border: 1px solid var(--ac-plum); color: #fff9ef; background: var(--ac-plum); box-shadow: 0 8px 22px rgba(53, 20, 59, .15); }
.button--primary:not(:disabled):hover { background: var(--ac-plum-light); }
.button--secondary { border: 1px solid var(--ac-line); color: var(--ac-ink); background: #fffdf9; }
.button--secondary:not(:disabled):hover, .button--quiet:not(:disabled):hover { background: #f7efdf; }
.button--danger { border: 1px solid #8b3340; color: #fff9ef; background: var(--ac-danger); }
.button--quiet { border: 1px solid transparent; color: #66476a; background: transparent; }
.admin-context { display: flex; align-items: end; justify-content: space-between; gap: 26px; margin-bottom: 22px; }
.admin-context h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.2; }
.admin-context > p { max-width: 540px; margin: 0; color: var(--ac-muted); font-size: .9rem; line-height: 1.55; text-align: right; }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.metric-card { display: grid; gap: 6px; min-height: 103px; padding: 17px; border: 1px solid var(--ac-line); border-radius: 15px; color: var(--ac-ink); background: var(--ac-paper); text-align: left; transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.metric-card:not(:disabled):hover, .metric-card.is-active { border-color: var(--ac-gold); box-shadow: 0 10px 20px rgba(68, 35, 57, .09); transform: translateY(-1px); }
.metric-card.is-active { background: #fff7e9; }
.metric-card__label { color: var(--ac-muted); font-size: .78rem; font-weight: 700; }
.metric-card strong { font-family: "Playfair Display", Georgia, serif; font-size: 1.7rem; line-height: 1; }
.queue-card { padding: clamp(20px, 3vw, 32px); border: 1px solid var(--ac-line); border-radius: 20px; background: var(--ac-paper); box-shadow: 0 14px 38px rgba(44, 22, 47, .06); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.2; }
.queue-summary { color: var(--ac-muted); font-size: .87rem; white-space: nowrap; }
.filters { display: grid; grid-template-columns: minmax(220px, 1fr) 200px auto; gap: 12px; align-items: end; margin: 24px 0 8px; padding: 16px; border-radius: 15px; background: #f8f2e9; }
.field { display: grid; gap: 7px; color: var(--ac-ink); font-size: .83rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid rgba(53, 20, 59, .22); border-radius: 10px; outline: 0; color: var(--ac-ink); background: #fffdf9; font-weight: 400; }
.field textarea { min-height: 112px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--ac-gold); box-shadow: 0 0 0 3px rgba(191, 150, 80, .15); }
.field__optional, .field__hint { color: var(--ac-muted); font-size: .78rem; font-weight: 400; line-height: 1.45; }
.inline-message { min-height: 1.3em; margin: 8px 0; color: var(--ac-danger); font-size: .87rem; line-height: 1.45; }
.inline-message.is-success { color: var(--ac-success); }
.workbench { display: grid; grid-template-columns: minmax(320px, .95fr) minmax(400px, 1.35fr); gap: 18px; align-items: start; margin-top: 14px; }
.queue-column { min-width: 0; }
.claims-list { display: grid; gap: 10px; }
.claim-row { width: 100%; padding: 16px; border: 1px solid var(--ac-line); border-radius: 14px; color: var(--ac-ink); background: #fffdf9; text-align: left; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.claim-row:not(:disabled):hover, .claim-row.is-selected { border-color: var(--ac-gold); box-shadow: 0 8px 18px rgba(68, 35, 57, .08); }
.claim-row.is-selected { background: #fff7e9; }
.claim-row__top, .claim-row__meta, .tag-list, .detail-tags, .detail-actions, .conflict-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.claim-row__top { justify-content: space-between; gap: 12px; }
.claim-row h3 { margin: 0; font-size: 1rem; line-height: 1.35; }
.claim-row__city { margin: 5px 0 0; color: var(--ac-muted); font-size: .85rem; }
.claim-row__applicant { margin: 11px 0 0; color: #514354; font-size: .86rem; line-height: 1.45; }
.claim-row__meta { margin-top: 10px; color: var(--ac-muted); font-size: .75rem; }
.status-tag, .soft-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; font-size: .68rem; font-weight: 800; letter-spacing: .035em; line-height: 1.15; text-transform: uppercase; }
.status-tag { color: #59445d; background: #eee7ef; }
.status-tag--pending { color: #70501b; background: #fbefd1; }
.status-tag--in-review { color: #3c506e; background: #e6edf8; }
.status-tag--in_review { color: #3c506e; background: #e6edf8; }
.status-tag--needs-info { color: #825c12; background: #f8ebc6; }
.status-tag--needs_info { color: #825c12; background: #f8ebc6; }
.status-tag--conflict { color: #7c3140; background: #f8e0e2; }
.status-tag--approved { color: #286144; background: #e0f0e5; }
.status-tag--rejected { color: #7b3c44; background: #f4e3e4; }
.status-tag--withdrawn { color: #66556a; background: #eee8ef; }
.soft-tag { color: #66556a; background: #f4ecdf; text-transform: none; }
.empty-state { padding: 42px 22px; border: 1px dashed rgba(53, 20, 59, .27); border-radius: 14px; text-align: center; }
.empty-state > span, .detail-placeholder > span { color: var(--ac-gold); font-size: 2rem; }
.empty-state h3, .detail-placeholder h3 { margin: 10px 0 7px; font-family: "Playfair Display", Georgia, serif; font-size: 1.35rem; }
.empty-state p, .detail-placeholder p { max-width: 440px; margin: 0 auto; color: var(--ac-muted); line-height: 1.6; }
.claim-detail { position: sticky; top: 20px; min-width: 0; min-height: 420px; padding: clamp(18px, 2.3vw, 26px); border: 1px solid var(--ac-line); border-radius: 16px; background: #fffdf9; }
.detail-placeholder { display: grid; min-height: 366px; place-content: center; text-align: center; }
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding-bottom: 17px; border-bottom: 1px solid var(--ac-line); }
.detail-heading h2 { font-size: clamp(1.4rem, 2.3vw, 1.9rem); line-height: 1.18; }
.detail-location { margin: 6px 0 0; color: var(--ac-muted); font-size: .9rem; }
.detail-tags { justify-content: flex-end; }
.detail-section { padding: 18px 0; border-bottom: 1px solid var(--ac-line); }
.detail-section:last-child { border-bottom: 0; }
.detail-section h3 { margin: 0 0 10px; font-size: .91rem; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-fact { padding: 11px; border-radius: 10px; background: #f8f2e9; }
.detail-fact dt { margin-bottom: 4px; color: var(--ac-muted); font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.detail-fact dd { margin: 0; font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }
.limit-note { margin: 0; padding: 12px 14px; border-left: 3px solid var(--ac-gold); border-radius: 0 9px 9px 0; color: #5e5261; background: #f9f0df; font-size: .84rem; line-height: 1.55; }
.history-list { display: grid; gap: 11px; margin: 0; padding: 0; list-style: none; }
.history-item { position: relative; padding-left: 18px; color: #504452; font-size: .84rem; line-height: 1.45; }
.history-item::before { position: absolute; top: .43em; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--ac-gold); content: ""; }
.history-item time { display: block; margin-bottom: 2px; color: var(--ac-muted); font-size: .74rem; }
.competitor-list { display: grid; gap: 8px; }
.competitor-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid var(--ac-line); border-radius: 10px; }
.competitor-card strong { display: block; font-size: .87rem; }
.competitor-card p { margin: 3px 0 0; color: var(--ac-muted); font-size: .78rem; line-height: 1.4; }
.text-button { padding: 7px 9px; border: 0; border-radius: 7px; color: #634267; background: #f3ebdf; font-size: .77rem; font-weight: 700; }
.text-button:not(:disabled):hover { background: #eadcc7; }
.compare-wrap { margin-top: 12px; }
.compare-wrap > summary { color: #634267; font-size: .84rem; font-weight: 700; cursor: pointer; }
.comparison { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: .78rem; }
.comparison th, .comparison td { padding: 9px 7px; border-bottom: 1px solid var(--ac-line); text-align: left; vertical-align: top; line-height: 1.4; }
.comparison th { color: var(--ac-muted); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.detail-actions { gap: 9px; padding-top: 18px; }
.detail-actions .button { flex: 1 1 145px; }
.conflict-actions { margin-top: 12px; }
.conflict-actions .button { flex: 1 1 180px; }
.decision-modal { width: min(620px, calc(100% - 28px)); max-height: min(720px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 18px; color: var(--ac-ink); background: var(--ac-paper); box-shadow: 0 24px 70px rgba(27, 12, 30, .35); }
.decision-modal::backdrop { background: rgba(29, 15, 32, .57); }
.decision-modal form { padding: clamp(20px, 4vw, 30px); }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.decision-modal h2 { font-size: 1.8rem; line-height: 1.2; }
.icon-button { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--ac-line); border-radius: 50%; color: var(--ac-ink); background: transparent; font-size: 1.45rem; line-height: 1; }
.icon-button:not(:disabled):hover { background: #f5ebdc; }
.modal-description { margin: 17px 0; color: var(--ac-muted); line-height: 1.55; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.toast { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: min(440px, calc(100vw - 48px)); padding: 13px 17px; border-radius: 12px; color: #fff8ed; background: var(--ac-plum); box-shadow: 0 15px 40px rgba(35, 17, 37, .25); opacity: 0; pointer-events: none; transform: translateY(12px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1060px) {
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .workbench { grid-template-columns: minmax(270px, .8fr) minmax(360px, 1.2fr); }
}
@media (max-width: 820px) {
  .admin-header { min-height: 68px; padding: 10px 20px; }
  .admin-brand { min-width: 130px; }
  .admin-brand img { width: 142px; }
  .admin-header__nav { gap: 12px; }
  .admin-header__nav a { font-size: .79rem; }
  .admin-shell { width: min(100% - 32px, 760px); padding-top: 30px; }
  .admin-context { align-items: flex-start; flex-direction: column; }
  .admin-context > p { text-align: left; }
  .workbench { grid-template-columns: 1fr; }
  .claim-detail { position: static; min-height: 0; }
  .detail-placeholder { min-height: 260px; }
}
@media (max-width: 600px) {
  .admin-header { gap: 10px; flex-wrap: wrap; }
  .admin-header__nav { order: 3; width: 100%; justify-content: space-between; padding: 4px 0 2px; }
  .admin-brand img { width: 130px; }
  .admin-shell { width: calc(100% - 24px); padding: 26px 0 56px; }
  .demo-banner { border-radius: 12px; font-size: .69rem; }
  .access-card { grid-template-columns: 1fr; gap: 12px; padding: 22px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card:last-child { grid-column: 1 / -1; }
  .filters { grid-template-columns: 1fr; }
  .filters .button { justify-self: start; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .detail-heading { flex-direction: column; }
  .detail-tags { justify-content: flex-start; }
  .detail-grid { grid-template-columns: 1fr; }
  .competitor-card { grid-template-columns: 1fr; }
  .competitor-card .text-button { justify-self: start; }
  .modal-actions .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

.metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.filters { grid-template-columns: minmax(180px, 2fr) minmax(140px, 1fr) minmax(150px, 1fr); }
.queue-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; }
.queue-pagination .button { padding: 0 12px; min-height: 38px; font-size: .8rem; }
.queue-pagination span { color: var(--ac-muted); font-size: .75rem; text-align: center; }
.claim-row__meta { overflow-wrap: anywhere; }
.competitor-reasons { display: grid; gap: 14px; margin: 16px 0; }
@media (max-width: 1060px) { .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .field--search { grid-column: 1 / -1; } }
@media (max-width: 600px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .metric-card:last-child { grid-column: auto; } }
@media (max-width: 420px) { .filters { grid-template-columns: 1fr; } .field--search { grid-column: auto; } }

.status-tag--submitted { color: #70501b; background: #fbefd1; }
.status-tag--under_review { color: #3c506e; background: #e6edf8; }
.status-tag--waiting_info { color: #825c12; background: #f8ebc6; }
.status-tag--applied { color: #286144; background: #e0f0e5; }
.private-contact { margin: 12px 0 0; padding: 11px 13px; border: 1px solid rgba(53,20,59,.14); border-radius: 9px; color: #57435b; background: #f6f0f5; font-size: .82rem; line-height: 1.5; overflow-wrap: anywhere; }
.limit-note--warning { border-left-color: var(--ac-danger); color: #6b3440; background: #f9e8e8; }
.proposal-comparison { display: grid; gap: 10px; }
.proposal-comparison__row { padding: 12px; border: 1px solid var(--ac-line); border-radius: 11px; background: #fcf8f1; }
.proposal-comparison__row h4 { margin: 0 0 9px; color: #453049; font-size: .82rem; }
.proposal-comparison__values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.proposal-comparison__value { min-width: 0; margin: 0; padding: 9px; border-radius: 8px; font-size: .77rem; line-height: 1.45; overflow-wrap: anywhere; }
.proposal-comparison__value strong { display: block; margin-bottom: 4px; font-size: .63rem; letter-spacing: .045em; text-transform: uppercase; }
.proposal-comparison__value.is-baseline { color: #645b65; background: #eee9e5; }
.proposal-comparison__value.is-current { color: #3e3342; background: #eee8f0; }
.proposal-comparison__value.is-proposed { color: #60451e; background: #f9e9c8; }
.revision-note { margin: 0 0 12px; color: var(--ac-muted); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .68rem; line-height: 1.45; overflow-wrap: anywhere; }
.selected-changes { display: grid; gap: 9px; margin: 16px 0; padding: 15px; border: 1px solid rgba(174,137,75,.3); border-radius: 12px; background: #f9f0df; }
.selected-changes h3 { margin: 0 0 2px; font-size: .92rem; }
.selected-changes > p { margin: 0; color: var(--ac-muted); font-size: .84rem; }
.selected-change { display: flex; gap: 9px; align-items: flex-start; color: #514354; font-size: .84rem; line-height: 1.45; }
.selected-change input { margin-top: 3px; flex: 0 0 auto; }
.selected-change strong { color: var(--ac-ink); }
.stale-confirm { margin: 16px 0; padding: 13px; border-left: 3px solid var(--ac-danger); border-radius: 0 9px 9px 0; background: #f9e8e8; color: #693541; font-weight: 600; }
.stale-confirm span { display: flex; align-items: flex-start; gap: 9px; }
.stale-confirm input { margin-top: 3px; flex: 0 0 auto; }
@media (max-width: 600px) { .proposal-comparison__values { grid-template-columns: 1fr; } }

.metrics { grid-template-columns: repeat(7, minmax(0, 1fr)); }
@media (max-width: 1060px) { .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
