@import url('../fonts/concise-regular-demo.css');

@font-face {
  font-family: 'UNCMMNNominee-LightNormal';
  src: url('../fonts/uncmmn-nominee-light-normal.woff2') format('woff2');
  font-display: swap;
}

:root {
  --navy: #0f2a4a;
  --navy-dark: #0a1e36;
  --blue: #3d6ba3;
  --blue-pale: #eaf1f8;
  --line: #c7d9ea;
  --green: #3ece7b;
  --white: #fff;
  --ink: #102943;
  --muted: #607286;
  --surface: #f5f8fb;
  --danger: #a63b3b;
  --warning: #9a6b16;
  --sidebar: 272px;
  --radius: 4px;
  --shadow: 0 16px 48px rgba(15, 42, 74, .12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--surface); }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--surface); font-family: Arial, Helvetica, sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid rgba(61, 107, 163, .45); outline-offset: 3px; }
.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; }

.auth-gate { min-height: 100vh; padding: 32px 20px; display: grid; place-items: center; background: var(--navy); }
.auth-card { width: min(100%, 480px); padding: clamp(28px, 5vw, 48px); background: var(--white); border-top: 4px solid var(--green); box-shadow: var(--shadow); }
.auth-card__logo { display: inline-block; margin-bottom: 56px; color: var(--navy); font-family: 'UNCMMNNominee-LightNormal', Arial, sans-serif; font-size: 20px; letter-spacing: .08em; text-decoration: none; }
.auth-card h1 { margin: 8px 0 14px; color: var(--navy); font-family: 'UNCMMNNominee-LightNormal', Arial, sans-serif; font-size: clamp(34px, 5vw, 48px); font-weight: 400; line-height: 1; }
.auth-card p:not(.eyebrow):not(.field-help) { color: var(--muted); line-height: 1.5; }
.auth-form { display: grid; gap: 18px; }
.auth-form .button { width: 100%; margin-top: 6px; }
.auth-error { min-height: 1.25em; margin: 0; color: var(--danger) !important; font-size: 13px; }
.auth-status { min-height: 1.25em; margin: 0; color: #17683d !important; font-size: 13px; line-height: 1.45; }
.auth-link { justify-self: center; width: auto !important; margin-top: 0 !important; }
.password-requirements { margin: -4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.auth-error-actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.auth-card code { padding: 2px 4px; background: var(--blue-pale); color: var(--navy); }

.admin-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); }
.admin-shell.is-collapsed { --sidebar: 84px; }
.admin-shell.is-collapsed .sidebar__label,
.admin-shell.is-collapsed .sidebar__nav span,
.admin-shell.is-collapsed .sidebar__group { display: none; }
.admin-shell.is-collapsed .sidebar__nav a { justify-content: center; }

.sidebar { position: sticky; top: 0; z-index: 30; height: 100vh; overflow: auto; background: var(--navy); color: var(--white); transition: width .2s ease, transform .25s ease; }
.sidebar__brand { min-height: 80px; padding: 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.12); }
.sidebar__logo { color: var(--white); font-family: 'UNCMMNNominee-LightNormal', Arial, sans-serif; font-size: 14px; letter-spacing: .06em; white-space: nowrap; text-decoration: none; }
.sidebar__nav { padding: 24px 12px; }
.sidebar__group { margin: 0 12px 10px; color: rgba(255,255,255,.52); font-family: 'Concise-RegularDemo', sans-serif; font-size: 11px; letter-spacing: .11em; text-transform: uppercase; }
.sidebar__nav a { min-height: 46px; margin-bottom: 4px; padding: 10px 12px; display: flex; align-items: center; gap: 12px; border-radius: var(--radius); color: rgba(255,255,255,.76); text-decoration: none; font-size: 14px; }
.sidebar__nav a:hover { background: rgba(255,255,255,.07); color: var(--white); }
.sidebar__nav a.is-active { background: rgba(62,206,123,.13); color: var(--white); box-shadow: inset 3px 0 var(--green); }
.nav-icon { width: 22px; flex: 0 0 22px; text-align: center; color: var(--green); font-size: 15px; }
.sidebar__footer { min-height: 68px; margin-top: auto; padding: 18px 24px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.64); font-size: 12px; }
.sidebar__signout { margin-left: auto; padding: 4px; border: 0; background: transparent; color: rgba(255,255,255,.72); cursor: pointer; font-size: 12px; }
.connection-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--green); }

.admin-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 80px; padding: 14px clamp(20px, 3vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.topbar__start, .topbar__actions { display: flex; align-items: center; gap: 12px; }
.topbar__eyebrow { margin: 0 0 2px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.topbar__crumb { margin: 0; color: var(--navy); font-size: 15px; }
.save-state { margin-right: 8px; color: var(--muted); font-size: 12px; }
.mobile-menu { display: none !important; }

.workspace { width: min(100%, 1540px); margin: 0 auto; padding: clamp(32px, 4vw, 64px); }
.page-header { margin-bottom: 36px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-header h1 { margin: 5px 0 10px; color: var(--navy); font-family: 'UNCMMNNominee-LightNormal', Arial, sans-serif; font-size: clamp(34px, 4vw, 56px); font-weight: 400; line-height: 1; letter-spacing: -.025em; }
.page-header p { max-width: 720px; margin: 0; color: var(--muted); line-height: 1.5; }
.eyebrow { margin: 0; color: var(--blue); font-family: 'Concise-RegularDemo', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.header-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.button { min-height: 42px; padding: 0 18px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; font-family: 'Concise-RegularDemo', Arial, sans-serif; font-size: 13px; letter-spacing: .055em; text-decoration: none; transition: background .16s ease, border-color .16s ease; }
.button--primary { background: var(--navy); color: var(--white); }
.button--primary:hover { background: var(--navy-dark); }
.button--accent { background: var(--green); color: var(--navy-dark); }
.button--quiet { background: var(--white); border-color: var(--line); color: var(--navy); }
.button--quiet:hover { border-color: var(--blue); }
.button--danger { background: var(--danger); color: var(--white); }
.button--text { min-height: auto; padding: 4px; background: none; color: var(--blue); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.icon-button { width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.topbar .icon-button, .preview-toolbar .icon-button { border-color: var(--line); }

.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.summary-card { min-height: 148px; padding: 24px; background: var(--white); border: 1px solid var(--line); }
.summary-card__value { display: block; margin-bottom: 24px; color: var(--navy); font-family: 'UNCMMNNominee-LightNormal', Arial, sans-serif; font-size: clamp(32px, 3vw, 46px); font-weight: 400; }
.summary-card p { margin: 0; color: var(--muted); font-size: 14px; }
.summary-card--warning { border-top: 3px solid #d5a94e; }
.summary-card--positive { border-top: 3px solid var(--green); }

.dashboard-grid { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr); gap: 24px; align-items: start; }
.panel { background: var(--white); border: 1px solid var(--line); }
.panel + .panel { margin-top: 22px; }
.panel__header { min-height: 68px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.panel__header h2, .panel__header h3 { margin: 0; color: var(--navy); font-size: 18px; font-weight: 500; }
.panel__body { padding: 22px; }
.panel__footer { padding: 16px 22px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.database-state { margin-bottom: 20px; padding: 14px 16px; border-left: 3px solid var(--blue); background: var(--white); color: var(--muted); font-size: 13px; line-height: 1.45; }
.database-state--error { border-left-color: var(--danger); color: var(--danger); }
.database-state--warning { border-left-color: #b87916; color: #7a5312; background: #fffaf0; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.upload-progress { width: 100%; height: 8px; accent-color: var(--green); }

.status-list { list-style: none; margin: 0; padding: 0; }
.status-row { padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e5ebf1; }
.status-row:last-child { border-bottom: 0; }
.status-row__main { min-width: 0; display: flex; align-items: center; gap: 12px; }
.status-row__main strong { display: block; margin-bottom: 3px; color: var(--navy); font-size: 14px; }
.status-row__main small { color: var(--muted); }
.status-badge { min-width: 74px; padding: 6px 9px; display: inline-flex; justify-content: center; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.status-badge--published { background: rgba(62,206,123,.15); color: #17683d; }
.status-badge--draft { background: #eef1f4; color: #5f6d7a; }
.status-badge--hidden { background: rgba(15,42,74,.1); color: var(--navy); }
.warning-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #d5a94e; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr); gap: 28px; align-items: start; }
.form-section { padding: 24px; background: var(--white); border: 1px solid var(--line); }
.form-section + .form-section { margin-top: 20px; }
.form-section h2, .form-section h3 { margin: 0 0 20px; color: var(--navy); font-size: 18px; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field__label { margin-bottom: 7px; display: flex; justify-content: space-between; gap: 10px; color: var(--navy); font-size: 13px; font-weight: 600; }
.field input:not([type="checkbox"]):not([type="range"]), .field textarea, .field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); }
.field textarea { min-height: 116px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); outline: 2px solid rgba(61,107,163,.15); }
.field input.is-invalid, .field textarea.is-invalid { border-color: var(--danger); }
.field-help { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.field-error { color: var(--danger); }
.field-warning { color: var(--warning); }
.checkbox-row { min-height: 44px; padding: 10px 0; display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: 18px; height: 18px; accent-color: var(--green); }
.range-row { display: grid; grid-template-columns: 1fr 52px; gap: 12px; align-items: center; }
.range-row input { width: 100%; accent-color: var(--green); }
.range-value { color: var(--navy); font-size: 13px; text-align: right; }
.form-actions { position: sticky; bottom: 16px; z-index: 8; margin-top: 20px; padding: 14px; display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; background: rgba(255,255,255,.96); border: 1px solid var(--line); box-shadow: var(--shadow); }
.editor-form[data-form="hero"] { padding-bottom: 112px; }
.editor-form[data-form="snapshot"] { padding-bottom: 112px; }

.hero-upload-stack { display: grid; gap: 14px; margin-bottom: 20px; }
.hero-upload-card { padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border: 1px solid var(--line); background: #f8fafc; }
.hero-upload-card--poster { grid-template-columns: 112px minmax(0, 1fr) auto; }
.hero-upload-card strong { display: block; overflow-wrap: anywhere; color: var(--navy); font-size: 13px; }
.hero-upload-card dl { margin: 10px 0 0; display: flex; gap: 24px; }
.hero-upload-card dl div { display: grid; gap: 2px; }
.hero-upload-card dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; }
.hero-upload-card dd { margin: 0; color: var(--ink); font-size: 12px; }
.hero-upload-card__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.hero-upload-card__thumbnail { width: 112px; height: 76px; object-fit: cover; background: var(--blue-pale); }
.hero-upload-card__thumbnail--empty { display: grid; place-items: center; color: var(--muted); font-size: 11px; }
.media-validation { margin: 8px 0 0; color: #17683d; font-size: 11px; }
.hero-presentation-fields { margin-top: 20px; }
.hero-upload-state { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid var(--line); }
.hero-upload-state__heading { display: flex; justify-content: space-between; gap: 16px; color: var(--navy); font-size: 12px; }
.hero-upload-state > p { min-height: 1.4em; margin: 5px 0 10px; color: var(--muted); font-size: 11px; }
.hero-upload-state dl { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px 18px; }
.hero-upload-state dd { overflow-wrap: anywhere; }
.hero-upload-state progress { width: 100%; height: 9px; margin-top: 12px; accent-color: var(--green); }
.hero-upload-state__actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }

.preview-card { position: sticky; top: 104px; overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.preview-card__header { padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.preview-card__header strong { color: var(--navy); font-size: 13px; }
.preview-card__body { padding: 18px; }
.media-preview { position: relative; min-height: 250px; display: grid; place-items: center; overflow: hidden; background: var(--blue-pale); color: var(--blue); }
.media-preview img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.hero-media-preview video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media-preview__empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; background: var(--blue-pale); color: var(--muted); text-align: center; }
.hero-media-preview__label { position: absolute; z-index: 2; top: 10px; left: 10px; padding: 5px 8px; background: rgba(15,42,74,.82); color: var(--white); font-size: 10px; }
.media-preview__overlay { position: absolute; inset: 0; background: linear-gradient(rgba(15,42,74,.12), rgba(15,42,74,.75)); }
.media-preview__copy { position: relative; z-index: 1; align-self: end; padding: 24px; color: var(--white); }
.media-preview__copy h3 { margin: 0 0 10px; font-size: clamp(28px, 3vw, 46px); font-weight: 400; line-height: 1; }
.media-preview__copy p { margin: 0; line-height: 1.45; }
.hero-media-preview .media-preview__copy { position: absolute; top: 50%; left: 50%; width: 58%; min-height: 140px; padding: 28px; display: flex; align-items: center; justify-content: center; background: rgba(15,18,20,.55); text-align: center; transform: translate(-50%,-50%); }
.hero-media-preview .media-preview__copy h3 { margin: 0; font-size: clamp(22px,1.8vw,28px); font-weight: 300; white-space: nowrap; text-shadow: none; }
.device-toggle { display: flex; gap: 4px; }
.device-toggle button, .segmented button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; font-size: 12px; }
.device-toggle button.is-active, .segmented button.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.collection-toolbar { margin-bottom: 18px; display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; }
.filter-chip { min-height: 34px; padding: 0 12px; border: 1px solid var(--line); background: var(--white); color: var(--muted); cursor: pointer; font-size: 12px; }
.filter-chip.is-active { background: var(--navy); border-color: var(--navy); color: var(--white); }
.data-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); }
.data-table th { padding: 12px 14px; background: #f0f5f9; color: var(--muted); font-size: 11px; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 14px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
.data-table__title { color: var(--navy); font-weight: 600; }
.table-thumb { width: 76px; height: 52px; object-fit: cover; background: var(--blue-pale); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.row-actions button { min-height: 32px; padding: 0 8px; border: 0; background: transparent; color: var(--blue); cursor: pointer; font-size: 12px; }
.drag-handle { color: var(--muted); cursor: grab; font-size: 18px; letter-spacing: -3px; }

.empty-state { padding: 56px 24px; text-align: center; background: var(--white); border: 1px dashed var(--line); }
.empty-state h3 { margin: 0 0 8px; color: var(--navy); }
.empty-state p { margin: 0 auto 20px; max-width: 480px; color: var(--muted); line-height: 1.5; }
.loading-skeleton { display: grid; gap: 14px; }
.loading-skeleton span { height: 78px; background: linear-gradient(90deg, #e8eef4, #f7f9fb, #e8eef4); background-size: 200% 100%; animation: skeleton 1.4s linear infinite; }
@keyframes skeleton { to { background-position: -200% 0; } }

.focal-preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); cursor: crosshair; }
.focal-preview img { width: 100%; height: 100%; object-fit: cover; }
.focal-preview__point { position: absolute; width: 22px; height: 22px; border: 3px solid var(--white); border-radius: 50%; background: var(--green); transform: translate(-50%, -50%); box-shadow: 0 0 0 2px rgba(15,42,74,.55); pointer-events: none; }
.expertise-preview { position: relative; min-height: 430px; overflow: hidden; background: var(--navy); color: var(--white); }
.expertise-preview > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.expertise-preview::after { position: absolute; inset: 0; background: rgba(7,31,61,var(--expertise-preview-overlay,.45)); content: ''; }
.expertise-preview__content { position: relative; z-index: 1; min-height: 430px; padding: 28px; display: flex; flex-direction: column; }
.expertise-preview__meta { margin: 0; display: flex; justify-content: space-between; font-family: 'Concise-RegularDemo', sans-serif; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.expertise-preview h3 { margin: auto 0 18px; max-width: 90%; font-size: clamp(34px, 4vw, 58px); font-weight: 300; line-height: .96; }
.expertise-preview__content > p:not(.expertise-preview__meta) { max-width: 460px; margin: 0 0 20px; line-height: 1.45; }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; font-family: 'Concise-RegularDemo', sans-serif; font-size: 13px; letter-spacing: .05em; }
.arrow-link img { width: 34px; height: 34px; }
.expertise-preview__progress { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.2); }
.expertise-preview__progress span { display: block; width: 25%; height: 100%; background: var(--green); }

.snapshot-preview { min-height: 390px; padding: clamp(32px, 5vw, 58px); display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px; background: var(--navy); color: var(--white); position: relative; overflow: hidden; }
.snapshot-preview::before { position: absolute; inset: 0; z-index: 0; opacity: .015; background-image: linear-gradient(rgba(255,255,255,.25) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.25) 1px, transparent 1px); background-size: 48px 48px; animation: drift 20s linear infinite; content: ''; }
@keyframes drift { to { background-position: 48px 24px, 48px 24px; } }
.snapshot-preview__background, .snapshot-preview__video, .snapshot-preview__overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
.snapshot-preview__background { z-index: 0; background-position: center; background-size: cover; }
.snapshot-preview__video { object-fit: cover; }
.snapshot-preview__overlay { z-index: 1; pointer-events: none; background: rgba(7,35,69,var(--snapshot-preview-overlay,.72)); }
.snapshot-preview__content { display: contents; }
.snapshot-preview__content > * { position: relative; z-index: 2; }
.snapshot-preview h3 { margin: 8px 0 16px; font-size: clamp(32px, 4vw, 54px); font-weight: 400; line-height: 1; }
.snapshot-preview p { color: rgba(255,255,255,.74); line-height: 1.45; }
.snapshot-preview__stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.snapshot-preview__stats strong { display: block; font-size: clamp(36px, 5vw, 66px); font-weight: 300; line-height: 1; }
.snapshot-preview__stats p { margin: 8px 0 0; font-size: 13px; }
.snapshot-media-stack { display: grid; gap: 14px; margin-bottom: 20px; }
.snapshot-media-card { padding: 16px; display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 16px; border: 1px solid var(--line); background: #f8fafc; }
.snapshot-media-card__preview { width: 160px; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; background: var(--navy); color: rgba(255,255,255,.68); font-size: 11px; }
.snapshot-media-card__preview img, .snapshot-media-card__preview video { width: 100%; height: 100%; object-fit: cover; }
.snapshot-media-card__details { min-width: 0; }
.snapshot-media-card__details > strong { display: block; overflow-wrap: anywhere; color: var(--navy); }
.snapshot-media-card__details dl { margin: 10px 0; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 18px; font-size: 12px; }
.snapshot-media-card__details dl div { display: flex; justify-content: space-between; gap: 10px; }
.snapshot-media-card__details dt { color: var(--muted); font-weight: 700; }
.snapshot-media-card__details dd { margin: 0; overflow-wrap: anywhere; text-align: right; }
.snapshot-media-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.snapshot-upload-state { grid-column: 1/-1; padding-top: 14px; border-top: 1px solid var(--line); }
.snapshot-upload-state__heading { display: flex; justify-content: space-between; color: var(--navy); font-size: 12px; }
.snapshot-upload-state > p { min-height: 1.4em; margin: 5px 0 10px; color: var(--muted); font-size: 11px; }
.snapshot-upload-state progress { width: 100%; height: 9px; accent-color: var(--green); }
.snapshot-upload-state__actions { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.media-picker-card__image--video { display: grid; place-items: center; color: rgba(255,255,255,.8); font-size: 12px; }
.media-picker-card__preferred { display: inline-block; margin-top: 8px; color: #17683d; font-size: 11px; font-weight: 700; }

.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.media-card { overflow: hidden; background: var(--white); border: 1px solid var(--line); }
.media-card__thumb { aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: var(--blue-pale); color: var(--blue); }
.media-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card__body { padding: 16px; }
.media-card__body h3 { margin: 0 0 6px; overflow: hidden; color: var(--navy); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.media-card__body p { margin: 4px 0; color: var(--muted); font-size: 12px; }
.media-card__actions { margin-top: 14px; display: flex; gap: 10px; }

.order-list { list-style: none; margin: 0; padding: 0; }
.order-item { min-height: 58px; padding: 10px 12px; display: grid; grid-template-columns: 28px 1fr auto auto; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); }
.order-item:last-child { border-bottom: 0; }
.order-item strong { color: var(--navy); font-size: 14px; }
.order-controls { display: flex; gap: 4px; }
.order-controls button { width: 30px; height: 30px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }

.notification-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; width: min(390px, calc(100% - 40px)); display: grid; gap: 10px; }
.notification { padding: 15px 16px; display: flex; align-items: flex-start; gap: 11px; background: var(--navy); color: var(--white); box-shadow: var(--shadow); animation: notificationIn .2s ease-out; }
.notification--error { background: var(--danger); }
.notification--success { border-left: 4px solid var(--green); }
.notification--warning { background: #6b4f00; border-left: 4px solid #f0c85a; }
@keyframes notificationIn { from { opacity: 0; transform: translateY(8px); } }

.modal, .preview-modal, .media-picker-modal { padding: 0; border: 0; background: transparent; }
.modal::backdrop, .preview-modal::backdrop, .media-picker-modal::backdrop { background: rgba(5,20,36,.72); }
.modal__panel { width: min(520px, calc(100vw - 32px)); padding: 30px; background: var(--white); box-shadow: var(--shadow); }
.modal__panel h2 { margin: 8px 0 12px; color: var(--navy); font-size: 28px; font-weight: 400; }
.modal__panel > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.modal__actions { margin-top: 24px; display: flex; justify-content: flex-end; gap: 10px; }
.preview-modal { width: 100vw; max-width: none; height: 100vh; max-height: none; }
.preview-modal__panel { min-height: 100%; background: #dce4eb; }

.project-image-panel { padding: 16px; display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr); gap: 18px; border: 1px solid var(--line); background: var(--surface); }
.project-image-panel__preview { aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: var(--navy); color: rgba(255,255,255,.72); text-align: center; }
.project-image-panel__preview img { width: 100%; height: 100%; object-fit: cover; }
.project-image-panel__details { min-width: 0; }
.project-image-panel__details strong { display: block; overflow-wrap: anywhere; color: var(--navy); }
.project-image-panel__details dl, .media-picker-card dl { margin: 12px 0; display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.project-image-panel__details dl div, .media-picker-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.project-image-panel__details dt, .media-picker-card dt { font-weight: 700; }
.project-image-panel__details dd, .media-picker-card dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.project-image-panel__status { min-height: 1.3em; margin: 8px 0; color: var(--muted); font-size: 12px; }
.project-image-panel .upload-progress { width: 100%; }
.preview-item > .media-preview { aspect-ratio: 16 / 10; min-height: 0; }

.media-picker-modal { width: min(1120px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); }
.media-picker-modal__panel { max-height: calc(100vh - 32px); display: grid; grid-template-rows: auto auto auto minmax(180px, 1fr) auto; overflow: hidden; background: var(--white); box-shadow: var(--shadow); }
.media-picker-modal__header, .media-picker-modal__actions { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.media-picker-modal__header h2 { margin: 5px 0 0; color: var(--navy); font-size: 26px; font-weight: 400; }
.media-picker-modal__header .icon-button { border-color: var(--line); }
.media-picker-modal__tools { padding: 18px 24px 8px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.media-picker-modal__tools .field { margin: 0; max-width: 480px; }
.media-picker-modal__status { min-height: 1.3em; margin: 0; padding: 8px 24px 14px; color: var(--muted); font-size: 13px; }
.media-picker-grid { padding: 0 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; overflow: auto; align-content: start; }
.media-picker-card { padding: 0; display: block; min-width: 0; border: 2px solid transparent; background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.media-picker-card:hover { border-color: var(--line); }
.media-picker-card[aria-selected="true"] { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(61,107,163,.18); }
.media-picker-card__image { aspect-ratio: 16 / 10; overflow: hidden; background: var(--navy); }
.media-picker-card__image img, .media-picker-card__image video { width: 100%; height: 100%; object-fit: cover; }
.media-picker-card__body { padding: 12px; }
.media-picker-card__body strong { display: block; overflow-wrap: anywhere; color: var(--navy); }
.media-picker-card__usage { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }

.selected-image-panel { padding: 16px; display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 18px; border: 1px solid var(--line); background: var(--surface); }
.selected-image-panel__preview { min-height: 120px; display: grid; place-items: center; overflow: hidden; background: var(--white); border: 1px solid var(--line); color: var(--muted); }
.selected-image-panel__preview img { width: 100%; height: 100%; max-height: 120px; object-fit: contain; }
.selected-image-panel__details { min-width: 0; }
.selected-image-panel__details strong { display: block; overflow-wrap: anywhere; color: var(--navy); }
.selected-image-panel__details dl { margin: 12px 0; display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.selected-image-panel__details dl div { display: flex; justify-content: space-between; gap: 12px; }
.selected-image-panel__details dt { font-weight: 700; }
.selected-image-panel__details dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.selected-image-panel__actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
#logoMediaGrid .media-picker-card__image { background: var(--white); border-bottom: 1px solid var(--line); }
#logoMediaGrid .media-picker-card__image img { padding: 18px; object-fit: contain; }
.table-thumb--logo { object-fit: contain; background: var(--white); }

.logo-admin-preview { padding: clamp(42px, 7vw, 82px) clamp(18px, 4vw, 48px) clamp(30px, 4vw, 48px); overflow: hidden; border-block: 1px solid rgba(8,35,69,.1); background: var(--white); color: var(--navy); }
.logo-admin-preview__intro { max-width: 600px; margin-inline: auto; text-align: center; }
.logo-admin-preview__intro h3 { margin: 10px 0 0; color: var(--navy); font-size: clamp(28px, 4vw, 52px); font-weight: 400; line-height: 1.05; }
.logo-admin-preview__intro > p:last-child { max-width: 500px; margin: 18px auto 0; color: var(--muted); line-height: 1.6; }
.logo-admin-preview__grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: center; gap: clamp(24px, 3vw, 42px) clamp(18px, 3vw, 40px); margin-top: clamp(28px, 4vw, 44px); }
.logo-admin-preview__item { --logo-width: 18rem; --logo-height: 9.5rem; --logo-scale: 1.22; --logo-y: 0px; min-width: 0; display: grid; place-items: center; color: var(--muted); font-size: 11px; text-align: center; }
.logo-admin-preview__item[data-logo-name*="smart"] { --logo-width: 20rem; --logo-height: 10rem; --logo-scale: 1.35; }
.logo-admin-preview__item[data-logo-name*="electric"] { --logo-width: 18rem; --logo-height: 10.5rem; --logo-scale: 1.35; --logo-y: -1px; }
.logo-admin-preview__item[data-logo-name*="hilltop"] { --logo-width: 19.5rem; --logo-height: 10rem; --logo-scale: 1.30; }
.logo-admin-preview__item img { display: block; width: 100%; max-width: var(--logo-width); height: var(--logo-height); object-fit: contain; object-position: center; transform: translateY(var(--logo-y)) scale(var(--logo-scale)); transform-origin: center; }
.logo-admin-preview__item[data-logo-name*="electric"] img { clip-path: inset(12% 9%); }
.homepage-preview[data-size="tablet"] .logo-admin-preview__grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.homepage-preview[data-size="mobile"] .logo-admin-preview__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.media-picker-modal__actions { justify-content: flex-end; border-top: 1px solid var(--line); border-bottom: 0; }
.preview-toolbar { min-height: 78px; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--white); border-bottom: 1px solid var(--line); }
.preview-toolbar h2 { margin: 3px 0 0; color: var(--navy); font-size: 20px; font-weight: 500; }
.preview-toolbar__actions, .segmented { display: flex; align-items: center; gap: 6px; }
.preview-stage { min-height: calc(100vh - 78px); padding: 28px; display: flex; justify-content: center; overflow: auto; }
.homepage-preview { width: min(100%, 1440px); min-height: 100%; background: var(--white); box-shadow: var(--shadow); transition: width .25s ease; }
.homepage-preview[data-size="tablet"] { width: 768px; }
.homepage-preview[data-size="mobile"] { width: 390px; }
.preview-section { padding: clamp(34px, 6vw, 72px); }
.preview-section h2 { margin: 0 0 28px; color: var(--navy); font-size: clamp(34px, 5vw, 68px); font-weight: 400; line-height: 1; }
.preview-hero { min-height: 520px; padding: 54px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; background: var(--navy); color: var(--white); text-align: center; }
.preview-hero > img, .preview-hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-hero__copy { width: 58%; max-width: 1050px; min-height: 180px; padding: 44px; display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; background: rgba(15,18,20,.55); }
.preview-hero h1 { margin: 0; max-width: none; color: var(--white); font-size: clamp(40px,4.2vw,68px); font-weight: 300; line-height: 1; white-space: nowrap; text-shadow: none; }
.hero-media-preview[data-device="mobile"] .media-preview__copy h3,
.homepage-preview[data-size="mobile"] .preview-hero h1 { font-size: 30px; white-space: normal; }
.homepage-preview[data-size="tablet"] .preview-hero__copy { width: 82%; min-height: 165px; padding: 38px 34px; }
.hero-media-preview[data-device="mobile"] .media-preview__copy,
.homepage-preview[data-size="mobile"] .preview-hero__copy { width: 90%; min-height: 140px; padding: 30px 20px; }
.preview-discovery { text-align: center; }
.preview-discovery p { max-width: 820px; margin: auto; color: var(--navy); font-size: clamp(20px, 2.4vw, 31px); line-height: 1.45; }
.preview-projects, .preview-news { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.preview-item__image { aspect-ratio: 4 / 3; overflow: hidden; background: var(--blue-pale); }
.preview-item__image img { width: 100%; height: 100%; object-fit: cover; }
.preview-item h3 { margin: 14px 0 8px; color: var(--navy); font-size: 22px; font-weight: 400; }
.preview-item p { margin: 0; color: var(--muted); line-height: 1.4; }
[data-news-editor-preview] h3,
[data-news-editor-preview] > p:last-child { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; }
[data-news-editor-preview] h3 { -webkit-line-clamp: 2; }
[data-news-editor-preview] > p:last-child { -webkit-line-clamp: 3; }
.preview-expertise { min-height: 480px; padding: 48px; position: relative; display: flex; align-items: center; overflow: hidden; background: var(--navy); color: var(--white); }
.preview-expertise img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .48; }
.preview-expertise__copy { position: relative; z-index: 1; }
.preview-expertise h2 { max-width: 850px; color: var(--white); }
.preview-snapshot { background: var(--navy); color: var(--white); }
.preview-snapshot h2 { color: var(--white); }
.preview-snapshot__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.preview-snapshot strong { font-size: clamp(34px, 5vw, 72px); font-weight: 300; }
.preview-snapshot p { color: rgba(255,255,255,.74); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(5,20,36,.55); }

@media (max-width: 1180px) {
  :root { --sidebar: 84px; }
  .sidebar__label, .sidebar__nav span, .sidebar__group { display: none; }
  .sidebar__nav a { justify-content: center; }
  .sidebar__collapse { display: none; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .form-layout { grid-template-columns: 1fr; }
  .preview-card { position: static; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  :root { --sidebar: 280px; }
  .admin-shell { display: block; }
  .admin-main { width: 100vw; max-width: 100vw; }
  .editor-form[data-form="hero"] { padding-bottom: 150px; }
  .hero-upload-card, .hero-upload-card--poster { grid-template-columns: 1fr; }
  .snapshot-media-card { grid-template-columns: 1fr; }
  .snapshot-media-card__preview { width: 100%; }
  .hero-upload-card__actions { justify-content: flex-start; }
  .hero-upload-state dl { grid-template-columns: 1fr 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); width: var(--sidebar); }
  .admin-shell.is-drawer-open .sidebar { transform: translateX(0); }
  .sidebar__label, .sidebar__nav span, .sidebar__group { display: initial; }
  .sidebar__nav a { justify-content: flex-start; }
  .sidebar__collapse { display: none; }
  .mobile-menu { display: inline-grid !important; }
  .topbar { width: 100vw; max-width: 100vw; min-height: 68px; padding: 10px 16px; }
  .topbar__start { min-width: 0; flex: 1 1 auto; }
  .topbar__actions { margin-left: auto; flex: 0 0 auto; }
  .topbar__eyebrow { display: none; }
  .topbar__crumb { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
  .topbar__actions .save-state, .topbar__actions .button--quiet { display: none; }
  .topbar__actions .button--primary { min-height: 38px; padding-inline: 12px; display: inline-flex !important; font-size: 12px; }
  .workspace { width: 100%; max-width: 100%; padding: 28px 16px 48px; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .page-header > div:first-child { width: 100%; max-width: calc(100vw - 32px); min-width: 0; }
  .page-header p { width: 100%; max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .summary-grid, .media-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field--full { grid-column: auto; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table tr { margin-bottom: 14px; padding: 14px; background: var(--white); border: 1px solid var(--line); }
  .data-table td { padding: 7px 0; border: 0; }
  .data-table td::before { margin-right: 8px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; content: attr(data-label); }
  .row-actions { justify-content: flex-start; }
  .table-thumb { width: 100%; height: 160px; margin-bottom: 8px; }
  .snapshot-preview { grid-template-columns: 1fr; }
  .preview-toolbar { align-items: flex-start; flex-direction: column; }
  .preview-toolbar__actions { width: 100%; flex-wrap: wrap; }
  .preview-stage { padding: 12px; }
  .preview-projects, .preview-news, .preview-snapshot__grid { grid-template-columns: 1fr; }
  .homepage-preview[data-size] { width: 100%; }
  .order-item { grid-template-columns: 24px 1fr auto; }
  .order-item .status-badge { display: none; }
  .project-image-panel { grid-template-columns: 1fr; }
  .selected-image-panel { grid-template-columns: 1fr; }
  .logo-admin-preview__grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .media-picker-modal__tools { align-items: stretch; flex-direction: column; }
  .media-picker-modal__tools .field { max-width: none; }
  .media-picker-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
