/* Admin layout and screens, in the website's skin (jayphotography.com.au).
 *
 * THEME LAYER. tokens.css and components.css are generated from shared/ and are not edited;
 * this file redefines the tokens the admin uses so the portal reads as the website:
 *   Palette (dark = the site's ink sections, light = its cream sections)
 *     ink #0B0D1A  navy #14162A  raise #1B1E38  line #2A2E52  orange #F5991F  cream #F2EEE3  mute #8B90AF
 *     cream sections: line-light #DDD7C6  mute-light #4A4F6A  accent-light #B86200 (orange for text on cream)
 *   Fonts: Anton (display, uppercase, one weight), Archivo (body 400/500/600), IBM Plex Mono (labels, chips, data).
 *   Type scale: unchanged tokens, nothing else: --fs-label 13 (uppercase letterspaced labels, chips, buttons and
 *     nav only) / --fs-body 18 (every sentence) / --fs-body-lg 20 / --fs-h3 24 / --fs-h2 32 / --fs-h1 44 /
 *     --fs-display clamp(40, 9vw, 60). Hierarchy comes from weight and colour, size last.
 *   Shape: square corners (2px), 1px line borders, no soft shadows; hover = orange border + lift.
 *   Signature: film grain, viewfinder corner brackets, mono eyebrow with a 34px orange dash. */

@font-face { font-family: 'Anton'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/anton-400.woff2") format("woff2"); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/archivo-400-700.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/plexmono-400.woff2") format("woff2"); }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/plexmono-500.woff2") format("woff2"); }

:root {
  --font: 'Archivo', -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: 'Anton', 'Archivo Black', Impact, 'Arial Narrow Bold', sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --ink: #0B0D1A;
  --cream: #F2EEE3;
  --orange: #F5991F;
  --accent: var(--orange);
  --on-accent: var(--ink);
  --r-sm: 2px; --r-md: 2px; --r-lg: 2px; --r-pill: 2px;
  --gutter: 16px;
  --side-w: 248px;
  --ls-label: 0.2em;                 /* mono labels */
  --ls-ui: 0.16em;                   /* uppercase buttons and nav */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="light"] {
  --bg: var(--cream);
  --surface: #FFFFFF;
  --surface-2: #F6F3EA;
  --hairline: #DDD7C6;
  --text: var(--ink);
  --text-2: #4A4F6A;
  --track: #E6E1D3;
  --accent-ink: #B86200;             /* orange as text or a thin line on cream/white (3.8:1) */
  --field-bg: #FFFFFF;
  --glass: rgba(242, 238, 227, 0.86);
  --shadow-1: none;
  --shadow-2: 0 22px 50px rgba(11, 13, 26, 0.18);
  --ink-soft: var(--text-2);
  --accent-soft: rgba(245, 153, 31, 0.22);
  --warn-bg: rgba(245, 153, 31, 0.14);
  --lift: 0 16px 36px rgba(11, 13, 26, 0.10);
}
:root:not([data-theme="light"]) {
  --bg: var(--ink);
  --surface: #14162A;
  --surface-2: #1B1E38;
  --hairline: #2A2E52;
  --text: var(--cream);
  --text-2: #8B90AF;
  --track: #2A2E52;
  --accent-ink: var(--orange);
  --field-bg: #1B1E38;
  --glass: rgba(11, 13, 26, 0.86);
  --shadow-1: none;
  --shadow-2: 0 22px 50px rgba(0, 0, 0, 0.55);
  --ink-soft: var(--text-2);
  --accent-soft: rgba(245, 153, 31, 0.22);
  --warn-bg: rgba(245, 153, 31, 0.16);
  --lift: 0 16px 36px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-weight: 400; line-height: 1.5; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.offscreen { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
::selection { background: var(--orange); color: var(--ink); }

/* film grain over everything, as on the site; static here (no animation cost) */
body::after {
  content: ""; position: fixed; inset: -100px; z-index: 150; pointer-events: none; opacity: 0.04;
  background-image: var(--grain);
}

/* ---------- type ---------- */
.display, .page-head h1, .lock-card h1, .block-title, .card-body h2, .drop-title, .state-title, main h2 {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.98;
}
.label, .chip, th, .lock-label, .exif {
  font-family: var(--font-mono); font-weight: 500; letter-spacing: var(--ls-label); text-transform: uppercase;
}
.label { color: var(--text-2); }
.label.cap { margin: 0 0 12px 0; }
.label.eyebrow { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--accent-ink); letter-spacing: 0.3em; }
.label.eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; flex: none; }
.chip { padding: 5px 9px; border: 1px solid var(--hairline); background: var(--surface-2); color: var(--text-2); letter-spacing: 0.14em; }
.chip--good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.chip--muted { background: var(--surface-2); color: var(--text-2); }
.chip--accent, .chip--warm { background: var(--orange); color: var(--ink); border-color: var(--orange); }
.lede { font-size: var(--fs-body); font-weight: 400; color: var(--text-2); line-height: 1.45; }

/* ---------- buttons ---------- */
.btn {
  font: 600 var(--fs-label)/1 var(--font); letter-spacing: var(--ls-ui); text-transform: uppercase;
  min-height: 48px; padding: 0 24px; border-width: 2px; border-style: solid; border-radius: 2px;
  text-decoration: none; white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--orange); color: var(--ink); border-color: var(--orange); box-shadow: 0 6px 18px rgba(245, 153, 31, 0.28); }
.btn-primary:hover, .btn-primary:focus-visible { background: transparent; color: var(--accent-ink); box-shadow: none; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--text); box-shadow: none; }
.btn-secondary:hover, .btn-secondary:focus-visible { color: var(--accent-ink); border-color: var(--accent-ink); }
.btn-quiet { background: transparent; color: var(--text); border-color: transparent; }
.btn-quiet:hover { background: transparent; color: var(--accent-ink); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: var(--surface); }
.btn-lg { min-height: 56px; padding: 0 32px; }
.icon-btn { padding: 0; min-width: var(--tap); min-height: var(--tap); border-color: transparent; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn-primary:focus-visible { outline-color: var(--text); }

/* ---------- shell ---------- */
#app { min-height: 100vh; background: var(--bg); }
.side {
  position: relative; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px var(--gutter) 0; background: var(--ink); color: var(--cream); border-bottom: 3px solid var(--orange);
}
.side .brand { display: flex; align-items: center; padding: 2px 0; text-decoration: none; }
.side .brand img { height: 40px; width: auto; display: block; }
.side-nav {
  display: flex; gap: 2px; width: 100%; overflow-x: auto; padding: 8px 0 0; scrollbar-width: none; counter-reset: nav;
}
.side-nav::-webkit-scrollbar { display: none; }
.side-nav a {
  flex: none; display: inline-flex; align-items: center; gap: 10px; min-height: var(--tap); padding: 0 12px;
  font: 600 var(--fs-label)/1 var(--font); letter-spacing: 0.14em; text-transform: uppercase; color: #8B90AF; text-decoration: none;
  border-bottom: 3px solid transparent; margin-bottom: -3px;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.side-nav a::before { counter-increment: nav; content: counter(nav, decimal-leading-zero); font-family: var(--font-mono); font-weight: 400; color: var(--orange); opacity: 0.8; letter-spacing: 0.1em; }
.side-nav a:hover { color: var(--cream); }
.side-nav a.active { color: var(--cream); border-bottom-color: var(--cream); }
.side-nav a:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px; }
.content { min-width: 0; position: relative; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; justify-content: flex-end; padding: 0 var(--gutter); height: 0; }
#pill-slot { position: absolute; top: 10px; right: var(--gutter); left: var(--gutter); display: flex; justify-content: flex-end; pointer-events: none; }
#pill-slot > * { pointer-events: auto; }
main { max-width: 1240px; margin: 0 auto; padding: 28px var(--gutter) 64px; }

@media (min-width: 1024px) {
  #app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; height: 100vh; align-items: flex-start; align-content: flex-start;
    flex-direction: column; flex-wrap: nowrap; gap: 0; padding: 30px 0 28px;
    border-bottom: 0; border-right: 3px solid var(--orange);
  }
  :root:not([data-theme="light"]) .side { border-right: 1px solid var(--hairline); }
  .side .brand { margin: 0 0 30px 24px; padding: 0; }
  .side .brand img { height: 56px; }
  .side-nav { flex-direction: column; overflow: visible; width: 100%; padding: 0; gap: 0; border-top: 1px solid #2A2E52; }
  .side-nav a {
    width: 100%; min-height: 54px; padding: 0 22px 0 24px; gap: 14px; margin: 0;
    border-bottom: 1px solid #2A2E52; border-left: 3px solid transparent;
  }
  .side-nav a.active { border-left-color: var(--orange); background: #14162A; }
  main { padding: 44px 48px 96px; }
  .topbar { padding: 0 48px; }
  #pill-slot { top: 20px; right: 48px; left: 48px; }
}

/* ---------- page head ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; margin-bottom: 32px; }
.page-head h1 { font-size: var(--fs-h2); margin-bottom: 8px; overflow-wrap: anywhere; }
.page-head .lede { max-width: 60ch; }
.page-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.block-title { font-size: var(--fs-h3); }
.block { margin-bottom: 32px; }
.back { margin-bottom: 14px; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); text-decoration: none;
  font: 500 var(--fs-label)/1 var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-2);
}
.back-link:hover { color: var(--accent-ink); }
.back-link .icon { transform: rotate(180deg); }
@media (min-width: 768px) { .page-head h1 { font-size: var(--fs-h1); } }

/* ---------- icons, rows, controls ---------- */
.icon { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.inset-list { margin: 0; border: 1px solid var(--hairline); box-shadow: none; }
.inset-row { flex-wrap: wrap; min-height: 64px; }
.inset-row > .row-text { flex: 1 1 120px; min-width: 0; }
.inset-row .row-label { overflow-wrap: anywhere; font-weight: 500; }
.inset-list .segmented { flex: none; }

.segmented { gap: 0; padding: 0; background: transparent; border: 1px solid var(--hairline); border-radius: 2px; overflow: hidden; }
.segmented-option {
  border-radius: 0; min-height: var(--tap); padding: 0 16px;
  font: 600 var(--fs-label)/1 var(--font); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2);
}
.segmented-option + .segmented-option { border-left: 1px solid var(--hairline); }
.segmented-option[aria-checked="true"] { background: var(--orange); color: var(--ink); box-shadow: none; }
.segmented-option:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.switch::after { background: var(--cream); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.switch[aria-checked="true"]::after { background: var(--ink); }

input.bare, select.bare {
  flex: 1; min-width: 0; min-height: var(--tap); border: 0; outline: 0; background: transparent;
  text-align: right; font: 400 var(--fs-body)/1.2 var(--font); color: var(--text); padding: 0;
}
select.bare { text-align-last: right; cursor: pointer; }
input.bare::placeholder { color: var(--text-2); }
input.bare:focus, select.bare:focus { outline: none; }
.inset-row:has(input.bare:focus, select.bare:focus) { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); box-shadow: inset 3px 0 0 var(--orange); }
.tier-row input.tier-name { text-align: left; font-weight: 500; }
.tier-row { flex-wrap: nowrap; gap: 8px; }
.price-wrap { display: inline-flex; align-items: center; gap: 4px; flex: none; width: 110px; }
.price-wrap input { text-align: left; font-weight: 600; width: 80px; }
.add-tier { padding: 0 8px; }
.pin-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pin-value { font: 400 var(--fs-h2)/1 var(--font-display); letter-spacing: 0.18em; font-variant-numeric: tabular-nums; }
.btn-secondary { min-height: var(--tap); padding: 0 18px; }

.field { border-radius: 2px; background: var(--field-bg); }
.field:focus { border: 1px solid var(--orange); box-shadow: 0 0 0 3px rgba(245, 153, 31, 0.28); }

.note {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 12px; padding: 18px 22px; background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline); border-left: 4px solid var(--orange); border-radius: 2px; box-shadow: none;
}
.note { margin-bottom: 28px; }
.col .note, .block .note { margin-bottom: 0; }
.note-title { font-weight: 600; }
.note-sub { color: var(--text-2); margin-top: 2px; line-height: 1.4; }
.note-text { flex: 1 1 240px; min-width: 0; }
.photos-block + .settings-head { margin-top: 8px; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }
.save-status { color: var(--text-2); font-weight: 500; min-height: 1em; }
.form-error { color: var(--danger); font-weight: 600; margin-right: auto; align-self: center; }
.settings-head { display: flex; align-items: baseline; gap: 16px; margin: 40px 0 20px; flex-wrap: wrap; }
.center { display: flex; justify-content: center; margin-top: 16px; }
.state-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 40px 24px; background: var(--surface); border: 1px solid var(--hairline); border-radius: 2px; grid-column: 1 / -1;
}
.state-title { font-size: var(--fs-h3); }
.state-card .btn { margin-top: 10px; }
.danger-zone { display: flex; }

/* ---------- two-column forms ---------- */
.two-col { display: grid; gap: 28px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.col > .block { margin: 0; }
@media (min-width: 1100px) { .two-col { grid-template-columns: 1fr 1fr; gap: 32px; } }

.action-bar {
  position: sticky; bottom: 0; z-index: 20; display: flex; justify-content: flex-end; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 28px calc(var(--gutter) * -1) 0; padding: 16px var(--gutter) 20px;
  background: var(--glass); border-top: 1px solid var(--hairline);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
}
@media (min-width: 1024px) { .action-bar { margin: 28px -48px 0; padding: 20px 48px 24px; } }
@media (max-width: 480px) { .action-bar .btn { flex: 1 1 auto; } .action-bar .btn-secondary { display: none; } }

/* ---------- galleries list ---------- */
.search {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 16px; border-radius: 2px;
  background: var(--field-bg); border: 1px solid var(--hairline); color: var(--text-2);
}
.search:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(245, 153, 31, 0.28); }
.search-input { border: 0; outline: 0; background: transparent; font: 400 var(--fs-body)/1 var(--font); color: var(--text); width: 180px; min-height: var(--tap); }
.search-input::placeholder { color: var(--text-2); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.gallery-card {
  display: block; overflow: hidden; border-radius: 2px; background: var(--surface); color: var(--text); text-decoration: none;
  border: 1px solid var(--hairline); box-shadow: none;
  transition: transform var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.gallery-card:hover { transform: translateY(-4px); border-color: var(--accent-ink); box-shadow: var(--lift); }
.gallery-card:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.card-cover { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(0.92); transition: transform 600ms var(--ease); }
.gallery-card:hover .card-cover img { transform: scale(1.03); }
.card-cover::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(11, 13, 26, 0) 55%, rgba(11, 13, 26, 0.55) 100%); }
.card-body { padding: 18px 20px 20px; }
.card-body h2 { font-size: var(--fs-h3); margin-bottom: 6px; overflow-wrap: anywhere; }
.card-body .meta { color: var(--text-2); margin-bottom: 2px; line-height: 1.4; }
.card-body .meta + .meta { margin-bottom: 16px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- upload ---------- */
.upload-slot { display: flex; flex-direction: column; gap: 24px; margin-bottom: 36px; }
.panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: 2px; box-shadow: none; padding: 24px; }
.upload-progress { display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center; }
.progress-text { width: 100%; min-width: 0; }
.progress-text .lede { margin: 6px 0 18px; }
.upload-ring .ring-value { inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ring-big { font: 400 var(--fs-h2)/1 var(--font-display); letter-spacing: 0.01em; }
.ring-small { font-size: var(--fs-body); font-weight: 400; color: var(--text-2); }
.ring-progress .ring-track { stroke: var(--track); stroke-width: 6; }
.ring-progress .ring-fill { stroke: var(--orange); stroke-width: 6; stroke-linecap: butt; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; text-align: left; }
.stat { min-width: 0; padding: 14px 18px 16px; border-radius: 2px; background: var(--surface-2); border: 1px solid var(--hairline); }
.stat--warn { background: var(--warn-bg); border-color: rgba(245, 153, 31, 0.4); }
.stat-num { font: 400 var(--fs-h2)/1 var(--font-display); letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--text-2); margin-top: 6px; }
@media (min-width: 768px) {
  .upload-progress { flex-direction: row; text-align: left; gap: 32px; padding: 28px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .progress-text { flex: 1; }
}
@media (min-width: 1280px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.attention summary { display: flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; min-height: var(--tap); }
.attention summary::-webkit-details-marker { display: none; }
.attention summary .icon { transform: rotate(90deg); transition: transform var(--dur) var(--ease); }
.attention:not([open]) summary .icon { transform: rotate(0deg); }
.fail-row { align-items: flex-start; }
.fail-row .row-label { font-weight: 600; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 40px 24px; min-height: 280px; border: 2px dashed color-mix(in srgb, var(--text) 28%, transparent); border-radius: 2px; background: var(--surface);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.dropzone .icon { color: var(--accent-ink); }
.dropzone.is-over { border-color: var(--orange); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); transform: scale(1.005); }
.drop-title { font-size: var(--fs-h3); margin-top: 6px; }
.drop-sub { color: var(--text-2); max-width: 38ch; line-height: 1.45; }
.drop-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.dropzone--compact { min-height: 0; padding: 24px; }
.dropzone--compact .drop-title { font-size: var(--fs-h3); }
.dropzone--compact .drop-actions { margin-top: 6px; }
.drop-result { color: var(--text-2); margin-top: -12px; }
.drop-result:empty { display: none; }

/* ---------- photos ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 8px; }
.photo-cell { position: relative; aspect-ratio: 1; border-radius: 2px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--hairline); }
.photo-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-delete {
  position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: var(--tap); height: var(--tap);
  border: 0; border-radius: 2px; color: var(--cream); background: rgba(11, 13, 26, 0.72); cursor: pointer; opacity: 0;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: opacity var(--dur) var(--ease);
}
.photo-delete:hover { color: var(--orange); }
.photo-cell:hover .photo-delete, .photo-delete:focus-visible { opacity: 1; }
@media (hover: none) { .photo-delete { opacity: 1; } }
.photo-scene { position: absolute; left: 8px; bottom: 8px; background: var(--ink); color: var(--orange); border-color: transparent; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.block-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 16px; }

/* ---------- reprocess progress ---------- */
.bar { height: 6px; margin-top: 12px; border-radius: 1px; background: var(--track); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--orange); transition: width var(--dur) var(--ease); }

/* ---------- upload pill (top glass bar) ---------- */
.glass-bar { border-radius: 2px; box-shadow: var(--shadow-2); }
.upload-pill {
  position: relative; min-height: 56px; padding: 0 20px 0 16px; gap: 12px; justify-content: flex-start; overflow: hidden;
  text-decoration: none; color: var(--text); max-width: 100%;
}
.pill-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); animation: pill-pulse 1.8s infinite; }
@keyframes pill-pulse { 50% { opacity: 0.25; } }
.pill-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.pill-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill-sub { color: var(--text-2); }
.pill-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--track); }
.pill-bar span { display: block; height: 100%; background: var(--orange); }

/* ---------- legacy views (reports, orders, print catalog): token restyle only ---------- */
main h2 { font-size: var(--fs-h3); margin-bottom: 18px; }
main h3 { font-size: var(--fs-body-lg); font-weight: 600; }
table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); background: var(--surface); border: 1px solid var(--hairline); border-radius: 2px; overflow: hidden; box-shadow: none; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
th { font-size: var(--fs-label); color: var(--text-2); background: var(--surface-2); }
main > form:not(.new-form) label, main > label { display: block; margin: 14px 0 6px; font: 500 var(--fs-label)/1.2 var(--font-mono); letter-spacing: var(--ls-label); text-transform: uppercase; color: var(--text-2); }
main > form:not(.new-form) input, main > form:not(.new-form) select, main > form:not(.new-form) textarea { font-size: var(--fs-body); }
main button:not(.btn):not(.segmented-option):not(.switch):not(.photo-delete) {
  background: var(--orange); color: var(--ink); border: 2px solid var(--orange); min-height: var(--tap); padding: 0 18px;
  border-radius: 2px; font: 600 var(--fs-label)/1 var(--font); letter-spacing: var(--ls-ui); text-transform: uppercase; cursor: pointer;
}
main button:not(.btn):not(.segmented-option):not(.switch):not(.photo-delete):hover { background: transparent; color: var(--accent-ink); }
main > form:not(.new-form) input, main > form:not(.new-form) select, main > form:not(.new-form) textarea, main > p input {
  min-height: 48px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 2px; background: var(--field-bg); color: var(--text); font-family: var(--font);
}
main > p, main > .table-wrap { overflow-x: auto; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .pill-dot { animation: none; } .gallery-card:hover, .gallery-card:hover .card-cover img { transform: none; } }
@media (max-width: 767px) { main > table { display: block; overflow-x: auto; white-space: nowrap; } }
.two-col + .block { margin-top: 36px; }

/* ---------- passphrase screen: the website's hero shot under its veil, the quote-form card on top ---------- */
#lock-gate {
  position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; justify-content: center;
  padding: 64px var(--gutter); background: var(--ink); color: var(--cream);
}
#lock-gate[hidden] { display: none; }
#lock-gate::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("../images/lock.jpg") center 30% / cover no-repeat; filter: saturate(0.85) brightness(0.8);
}
#lock-gate::after {
  /* the site's hero veil */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 13, 26, 0.6) 0, rgba(11, 13, 26, 0.25) 45%, rgba(11, 13, 26, 0.05) 70%),
    linear-gradient(180deg, rgba(11, 13, 26, 0.5), rgba(11, 13, 26, 0.04) 24%, rgba(11, 13, 26, 0.1) 55%, rgba(11, 13, 26, 0.9));
}
.lock-card {
  position: relative; width: 100%; max-width: 440px; padding: 40px 36px 36px; text-align: center;
  background: var(--cream); color: var(--ink); border-top: 6px solid var(--orange); border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(245, 153, 31, 0.35), 0 28px 70px rgba(0, 0, 0, 0.6), 0 0 90px rgba(245, 153, 31, 0.14);
  /* a cream card in both themes: its own light values */
  --text: var(--ink); --text-2: #4A4F6A; --hairline: #DDD7C6; --surface: #FFFFFF; --field-bg: #FFFFFF; --danger: #B3261E; --accent-ink: #B86200;
  color-scheme: light;
}
.lock-card::before {
  content: "AF \25CF  LOCKED"; position: absolute; left: 0; right: 0; top: -44px; text-align: center;
  font: 400 var(--fs-label)/1 var(--font-mono); letter-spacing: 0.3em; color: var(--orange);
}
.lock-card .brand-logo { height: 64px; width: auto; margin: 0 auto 18px; display: block; mix-blend-mode: multiply; }
.lock-card h1 { font-size: var(--fs-h1); margin: 0 0 8px; color: var(--ink); }
.lock-card .lede { margin-bottom: 26px; color: var(--text-2); }
@media (max-width: 480px) { .lock-card { padding: 32px 20px 28px; } }
/* wide: the card sits left, as the site's hero copy does, so Jay's frame stays in view on the right */
@media (min-width: 1024px) { #lock-gate { justify-content: flex-start; padding-left: 9vw; } #lock-gate::before { background-position: center 24%; } }
@media (min-width: 640px) and (max-width: 1023px) { #lock-gate::before { background-position: 82% 24%; } }
.lock-form { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lock-form .field { border: 1px solid var(--hairline); background: #FFFFFF; color: var(--ink); }
.lock-form .field::placeholder { color: #7A7F99; }
.lock-label { color: var(--text-2); margin-top: 6px; letter-spacing: 0.14em; }
.lock-error { font-size: var(--fs-body); font-weight: 600; color: var(--danger); line-height: 1.3; }
.lock-form .btn { width: 100%; margin-top: 12px; box-shadow: 0 6px 18px rgba(245, 153, 31, 0.4); }
.lock-form .btn-primary:hover { background: var(--ink); color: var(--orange); border-color: var(--ink); }
