/* Dynasty Studios backend (/admin). Same palette as the site: ink, cream, gold. No external fonts (strict CSP). */
:root { --bg: #0e0d0c; --panel: #161412; --panel2: #1c1916; --line: #2c2823; --text: #ece5d8; --muted: #a59d8f;
  --gold: #bca782; --gold-hi: #d8c49c; --red: #d98b7a; --green: #9cc39a;
  --serif: Baskerville, 'Libre Baskerville', Georgia, serif; --sans: 'Avenir Next', system-ui, -apple-system, 'Segoe UI', sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--gold-hi); }
button { font: inherit; }
.a-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 12px clamp(16px, 4vw, 36px);
  background: rgba(14, 13, 12, .92); border-bottom: 1px solid rgba(188, 167, 130, .18); }
.a-mark { color: var(--gold); text-decoration: none; font: 500 13px/1 var(--sans); letter-spacing: .32em; white-space: nowrap; }
.a-mark span { color: var(--muted); letter-spacing: .2em; margin-left: 6px; }
.a-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-right: auto; }
.a-nav a { padding: 7px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 13px; }
.a-nav a[aria-current="page"] { color: var(--bg); background: var(--gold); }
.a-books { margin-left: auto; padding: 7px 12px; color: var(--gold); font-size: 13px; text-decoration: none; }
.a-out { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
body:not([data-mode="app"]) .a-nav, body:not([data-mode="app"]) .a-out { display: none; }
.a-main { max-width: 1180px; margin: 0 auto; padding: 26px clamp(16px, 4vw, 36px) 80px; outline: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: .03em; margin: 0; }
h1 { font-size: 28px; margin-bottom: 6px; }
h2 { font-size: 20px; margin: 30px 0 12px; color: var(--gold); }
h3 { font-size: 16px; }
.a-muted { color: var(--muted); }
.a-small { font-size: 13.5px; color: var(--muted); }
.a-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.a-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.a-card .k { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.a-card .v { font: 600 26px/1.2 var(--sans); color: var(--text); margin-top: 4px; }
.a-card .s { font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.a-card.is-off { border-style: dashed; }
.a-card.is-off .v { color: var(--muted); font-size: 18px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
td.n, th.n { text-align: right; font-variant-numeric: tabular-nums; }
.a-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.a-chart { display: block; width: 100%; height: 120px; }
.a-chart rect.r { fill: var(--gold); }
.a-chart rect.l { fill: #7f6f53; }
.a-chart text { fill: var(--muted); font: 12px var(--sans); }
.a-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 16px; }
.a-tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--muted); cursor: pointer; font-size: 13px; }
.a-tab[aria-pressed="true"] { color: var(--bg); background: var(--gold); border-color: var(--gold); }
.a-note { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.a-note.st-held { border-color: rgba(216, 196, 156, .55); border-style: dashed; }
.a-note.st-hidden { border-color: rgba(217, 139, 122, .5); }
.a-note.st-deleted, .a-note.st-removed { opacity: .6; }
.a-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13.5px; color: var(--muted); }
.a-meta b { color: var(--text); font-weight: 600; }
.a-pill { padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.a-pill.st-visible { color: var(--green); border-color: rgba(156, 195, 154, .5); }
.a-pill.st-held { color: var(--gold-hi); border-color: rgba(216, 196, 156, .5); }
.a-pill.st-hidden, .a-pill.st-deleted, .a-pill.st-removed { color: var(--red); border-color: rgba(217, 139, 122, .5); }
.a-warn { color: var(--red); font-size: 13.5px; }
.a-body { margin: 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.a-quote { margin: 6px 0; padding-left: 12px; border-left: 2px solid var(--gold); color: var(--muted); font: italic 14px/1.5 var(--serif); }
.a-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.a-btn { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--gold); background: none; color: var(--gold); cursor: pointer; font-size: 13px; text-decoration: none; display: inline-block; }
.a-btn:hover { background: var(--gold); color: var(--bg); }
.a-btn.solid { background: var(--gold); color: var(--bg); }
.a-btn.warn { border-color: var(--red); color: var(--red); }
.a-btn.warn:hover { background: var(--red); color: var(--bg); }
.a-btn:disabled { opacity: .5; cursor: default; }
.a-login { max-width: 460px; margin: 10vh auto 0; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.a-login input { width: 100%; padding: 10px 12px; margin: 12px 0; border-radius: 8px; border: 1px solid var(--line); background: #0b0a09; color: var(--text); }
.a-kit { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); margin-bottom: 18px; }
.a-items { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: 12px; }
.a-item { border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); overflow: hidden; display: flex; flex-direction: column; }
.a-item .pv { background: #000; display: flex; align-items: center; justify-content: center; min-height: 120px; }
.a-item .pv img, .a-item .pv video { width: 100%; max-height: 340px; object-fit: contain; display: block; }
.a-item .pv audio { width: 92%; margin: 20px 0; }
.a-item .tx { padding: 10px 12px 12px; display: grid; gap: 8px; font-size: 13.5px; }
.a-cap { position: relative; padding: 8px 10px; border-radius: 8px; background: #0b0a09; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.a-cap .lbl { display: block; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.a-copy { margin-top: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--gold-hi); cursor: pointer; font-size: 13px; }
.a-files { margin-top: 12px; font-size: 13px; }
.a-files li { margin: 3px 0; }
details > summary { cursor: pointer; color: var(--muted); margin-top: 10px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; background: #0b0a09; padding: 10px; border-radius: 8px; border: 1px solid var(--line); }
.a-flag-on { color: var(--green); font-weight: 600; }
.a-flag-off { color: var(--muted); }
.a-toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; background: var(--gold); color: var(--bg);
  font-size: 13px; z-index: 9; }
@media (max-width: 640px) { .a-top { gap: 10px; } .a-card .v { font-size: 22px; } }
.a-hidden { position: fixed; left: -9999px; top: 0; }
.a-kit > h2 { margin-top: 0; }

/* Sales keeps the reading room palette while giving figures and tables room to breathe. */
.a-sales-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.a-sales-tools label { font-size: 13px; color: var(--gold-hi); }
.a-sales-tools select { font: inherit; color: var(--text); background: var(--panel); border: 1px solid var(--gold); border-radius: 8px; padding: 9px 34px 9px 12px; min-height: 44px; }
.a-sales-tools .a-btn { min-height: 44px; }
.a-sales-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 20px; }
.a-sales-totals .v { font-size: clamp(20px, 2.1vw, 26px); overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.a-sales table td { overflow-wrap: anywhere; max-width: 330px; }
.a-sales table td:nth-child(n + 2) { font-variant-numeric: tabular-nums; }
.a-sales table th { white-space: nowrap; }
.a-sales table { min-width: 680px; }
.a-ref { font: 12px/1.6 ui-monospace, monospace; overflow-wrap: anywhere; color: var(--gold-hi); }
.a-attention { border-left: 3px solid var(--gold); }
.a-sales .a-body { font-size: 14px; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
@media (max-width: 800px) { .a-sales-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 400px) { .a-mark { font-size: 10px; letter-spacing: .28em; } .a-sales-totals { grid-template-columns: 1fr; } }
