/* Hanin Visuals — client gallery & studio admin.
   Extends style.css: reuses its tokens, header, footer, buttons, cards and hero patterns.
   Nothing here changes the public pages. */

:root {
  --line: rgba(29, 30, 32, .12);
  --muted: #6b6560;
  --ok: #2f7a4f;
  --warn: #a8620f;
  --danger: #b3261e;
  --row-h: 260px;          /* justified gallery row height */
  --shadow: 0 18px 50px -34px rgba(0, 0, 0, .45);
}

/* ---------- Shared bits ---------- */
.portal .muted { color: var(--muted); }
.portal small { font-size: 13px; }
.portal code { font-size: 13px; background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 6px; }
.portal button { font: inherit; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #8c1d17; }
.btn-ghost.small { height: 44px; min-width: 0; padding: 0 22px; font-size: 15px; }
.btn-row.left { justify-content: flex-start; }
.tool-btn {
  background: none; border: 0; padding: 8px 4px; cursor: pointer; color: inherit;
  font-family: var(--font-body); font-weight: 700; font-size: var(--fs-small); letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid transparent; transition: var(--hover);
}
.tool-btn:hover { color: var(--primary); border-bottom-color: currentColor; }
.link-btn, .link-danger { background: none; border: 0; padding: 0; cursor: pointer; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; font-size: inherit; }
.link-danger { color: var(--danger); }
.link-danger:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.toolbar-spacer { flex: 1; }
.eyebrow-sm { margin: 0 0 4px; font-family: var(--font-display); font-weight: 700; font-size: 15px; color: var(--primary); }
.eyebrow-sm a { text-decoration: none; }
.eyebrow-sm a:hover { text-decoration: underline; }
.section-title.small { font-size: var(--fs-h4); }

/* Header additions */
.nav-account > a::after { display: none; }
.nav-account .nav-drop-menu { min-width: 220px; }
.nav-drop-note { display: block; padding: 6px 20px 10px; font-size: 13px; opacity: .65; }
.site-nav .nav-logout { margin: 0; }
.nav-logout button {
  background: none; border: 0; color: inherit; cursor: pointer; padding: 6px 0;
  font-family: var(--font-display); font-size: 16px; transition: var(--hover); border-bottom: 1px solid transparent;
}
.nav-logout button:hover { color: #F3B48F; border-bottom-color: currentColor; }
.nav-drop-menu .nav-logout button { display: block; width: 100%; text-align: left; padding: 10px 20px; font-size: 15px; border: 0; }
.brand-tag { font-family: var(--font-body); font-weight: 500; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-left: 4px; }

/* Flash messages */
.flash-stack { max-width: var(--container); margin: 0 auto; padding: 16px 24px 0; display: grid; gap: 8px; }
.admin .flash-stack { padding: 0 0 20px; }
.flash { padding: 14px 18px; border-radius: 12px; background: var(--white); border-left: 4px solid var(--ink); box-shadow: var(--shadow); font-weight: 500; }
.flash-success { border-left-color: var(--ok); }
.flash-error { border-left-color: var(--danger); }
.flash-info { border-left-color: var(--primary); }

/* ---------- Customer pages ---------- */
.portal-hero { min-height: 380px; }
.portal-hero .display { max-width: 900px; }
.hero-note { position: relative; margin: 12px 0 0; font-size: 18px; font-weight: 500; }
.portal-section { padding: 72px 0 120px; }
.lead { font-size: 18px; max-width: 560px; margin: 0 auto 32px; }
.crumbs { margin: 0 0 24px; font-weight: 500; }
.crumbs a { text-decoration: none; color: var(--primary); }
.crumbs a:hover { text-decoration: underline; }

.auth-card {
  max-width: 460px; margin: 0 auto; padding: 44px 40px;
  background: var(--white); border-radius: var(--radius-card); box-shadow: 0 24px 60px -36px rgba(0,0,0,.4);
}
.auth-title { font-size: 34px; margin-bottom: 8px; }
.auth-sub { margin: 0 0 24px; color: var(--muted); }
.auth-links { text-align: center; margin: 20px 0 0; }
.auth-links a, .auth-foot a { color: var(--primary); }
.auth-foot { text-align: center; margin-top: 28px; }
.form-error { background: #fbeae8; color: var(--danger); border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-weight: 500; }
.admin-login { min-height: calc(100vh - var(--header-h) - 260px); display: flex; align-items: center; padding: 40px 0; }
.admin-login .auth-card { width: 100%; }

/* Form fields — underlined, quiet, serif labels */
.field { display: block; margin: 0 0 20px; border: 0; padding: 0; min-width: 0; }
.field > span, .field > legend { display: block; margin-bottom: 6px; font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.field > span small { font-family: var(--font-body); font-weight: 400; color: var(--muted); }
.field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .field textarea, .filters input, .filters select, .copy-row input {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .filters input:focus, .filters select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192, 87, 34, .15);
}
.field.has-error input, .field.has-error select { border-color: var(--danger); }
.field-error { display: block; margin-top: 6px; color: var(--danger); font-size: var(--fs-small); font-weight: 500; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: end; }
.check { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.radio-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card > span { display: block; height: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 12px; transition: var(--hover); }
.radio-card small { display: block; color: var(--muted); line-height: 1.4; }
.radio-card input:checked + span { border-color: var(--primary); background: rgba(192, 87, 34, .06); box-shadow: inset 0 0 0 1px var(--primary); }
.radio-card input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Dashboard gallery cards (same overlay card as "Explore our packages") */
.gallery-cards { margin-top: 40px; }
.gallery-cards.single { grid-template-columns: minmax(0, 520px); justify-content: center; }
.card.no-cover { background: linear-gradient(135deg, #000 0%, var(--maroon) 70%, var(--primary) 100%); }
.card-eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 15px !important; margin: 0 !important; opacity: .9; }
.card-meta { letter-spacing: .06em; text-transform: uppercase; font-size: 13px !important; font-weight: 700 !important; }
.empty-state { max-width: 560px; margin: 0 auto; text-align: center; }
.empty-state p { margin: 12px 0; font-size: 17px; }
.empty-state .btn-row { margin-top: 28px; }

/* Gallery */
.gallery-section { padding: 48px 0 120px; }
.gallery-intro { max-width: 720px; margin: 0 auto 36px; text-align: center; }
.gallery-intro p { margin: 8px 0 0; }
.gallery-toolbar {
  position: sticky; top: var(--header-h); z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 0 0 16px; padding: 12px 0; background: var(--white); border-bottom: 1px solid var(--line);
}
.sel-count { font-weight: 700; color: var(--primary); }
.justified { display: flex; flex-wrap: wrap; gap: var(--gap); }
.justified::after { content: ""; flex-grow: 999999; }
.tile {
  position: relative; margin: 0;
  flex-grow: calc(var(--r) * 100); flex-basis: calc(var(--r) * var(--row-h));
  max-width: calc(var(--r) * var(--row-h) * 1.9);
}
.tile-link { display: block; aspect-ratio: var(--r); overflow: hidden; background: #1a1a1a; position: relative; }
.tile-link img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.tile-link:hover img { transform: scale(1.04); }
.tile-link:focus-visible { outline: 3px solid var(--primary); outline-offset: -3px; }
.tile-placeholder, .media-thumb .tile-placeholder {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7); font-family: var(--font-display); font-size: 15px;
  background: linear-gradient(135deg, #111, #3b2418);
}
.tile .play, .media-thumb .play, .pv-poster-play {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border: 1px solid var(--white); border-radius: 50%; background: rgba(0,0,0,.3); pointer-events: none; transition: var(--hover);
}
.tile .play::after, .media-thumb .play::after {
  content: ""; position: absolute; left: 22px; top: 17px; border: 11px solid transparent; border-left: 16px solid var(--white); border-right: 0;
}
.tile-link:hover .play, .media-thumb:hover .play { background: var(--primary); border-color: var(--primary); }
.tile-duration {
  position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 10px;
  background: rgba(0,0,0,.6); color: var(--white); font-size: 12px; font-weight: 700; letter-spacing: .04em;
}
.tile-check {
  position: absolute; left: 8px; top: 8px; width: 30px; height: 30px; padding: 0; cursor: pointer;
  border-radius: 50%; border: 2px solid var(--white); background: rgba(0,0,0,.25);
  opacity: 0; transition: opacity .2s, background-color .2s, border-color .2s;
}
.tile-check::after {
  content: ""; position: absolute; left: 8px; top: 4px; width: 7px; height: 13px;
  border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0;
}
.tile:hover .tile-check, .tile-check:focus-visible, .selecting .tile-check { opacity: 1; }
.tile.selected .tile-check { background: var(--primary); border-color: var(--primary); opacity: 1; }
.tile.selected .tile-check::after { opacity: 1; }
.tile.selected .tile-link { box-shadow: inset 0 0 0 4px var(--primary); }
.tile.selected .tile-link img { transform: scale(.94); }
@media (hover: none) { .tile-check { opacity: 1; width: 34px; height: 34px; } .tile-check::after { left: 10px; top: 5px; } }
.gallery-more { text-align: center; margin-top: 40px; }

/* Viewer / lightbox */
.pv { position: fixed; inset: 0; z-index: 120; display: none; flex-direction: column; background: rgba(0,0,0,.96); color: var(--white); }
.pv.open { display: flex; }
.pv-bar { display: flex; align-items: center; gap: 16px; padding: 12px 16px; min-height: 60px; }
.pv-title { flex: 1; min-width: 0; font-family: var(--font-display); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-count { font-size: 13px; opacity: .7; white-space: nowrap; }
.pv-bar a, .pv-bar button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px;
  border: 1px solid rgba(255,255,255,.6); border-radius: var(--radius-pill); background: none; color: var(--white);
  text-decoration: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: var(--hover); white-space: nowrap;
}
.pv-bar a:hover, .pv-bar button:hover { background: var(--white); color: var(--ink); }
.pv-bar .pv-close { border: 0; font-size: 34px; padding: 0 8px; }
.pv-bar .pv-select.on { background: var(--primary); border-color: var(--primary); color: var(--white); }
.pv-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 64px 24px; touch-action: pan-y; }
.pv-stage img, .pv-stage video { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.pv-stage img { transition: opacity .25s; }
.pv-stage img.loading { opacity: .35; }
.pv-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.3); color: var(--white); font-size: 30px; line-height: 1; cursor: pointer; transition: var(--hover);
}
.pv-nav:hover { background: var(--primary); border-color: var(--primary); }
.pv-prev { left: 8px; }
.pv-next { right: 8px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 130; transform: translateX(-50%);
  max-width: calc(100% - 32px); padding: 14px 22px; border-radius: var(--radius-pill);
  background: var(--ink); color: var(--white); box-shadow: 0 16px 40px -20px rgba(0,0,0,.6); font-weight: 500;
}
.toast .spinner { display: inline-block; width: 14px; height: 14px; margin-right: 10px; vertical-align: -2px; border: 2px solid rgba(255,255,255,.35); border-top-color: var(--white); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Admin ---------- */
.admin .site-header .site-nav { gap: 26px; }
.admin-main { background: var(--paper); padding: 40px 0 96px; min-height: calc(100vh - var(--header-h) - 140px); }
.admin-footer { padding: 28px 0; }
.admin-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.admin-head .muted { margin: 8px 0 0; }
.admin-title { font-size: 40px; line-height: 1.2; }
.panel { background: var(--white); border-radius: var(--radius-card); padding: 28px; box-shadow: var(--shadow); margin-bottom: 24px; }
.panel h2 { font-size: 22px; margin-bottom: 16px; }
.panel.flush { padding: 8px 0; overflow-x: auto; }
.panel.narrow { max-width: 720px; }
.panel.highlight { border: 2px solid var(--primary); }
.panel.danger h2 { color: var(--danger); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.panel-head a { color: var(--primary); font-weight: 500; text-decoration: none; }
.panel details { margin-top: 16px; }
.panel summary { cursor: pointer; color: var(--primary); font-weight: 500; margin-bottom: 12px; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.admin-cols.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.admin-cols > .panel, .admin-cols > div > .panel { margin-bottom: 24px; }
.admin-empty { text-align: center; padding: 40px 16px; }
.admin-empty.small { padding: 28px 16px; }
.admin-empty p { margin: 0 0 16px; }
.small-h { font-size: 16px; margin: 20px 0 6px; }
.notice { padding: 14px 18px; border-radius: 12px; background: #fff4e8; border: 1px solid #f3cfa9; margin: 0 0 24px; }
.inline-form { display: inline; margin: 0; }
.panel .inline-form { display: block; margin-bottom: 8px; }
.danger-zone { margin-top: 20px !important; padding-top: 16px; border-top: 1px solid var(--line); }
.form-grid .btn-row { margin-top: 8px; }
.cover-preview { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.copy-row { display: flex; gap: 10px; }
.copy-row input { flex: 1; font-family: ui-monospace, monospace; font-size: 13px; }

.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 28px; }
.stat {
  display: flex; flex-direction: column; gap: 2px; padding: 22px 22px 20px; background: var(--white);
  border-radius: var(--radius-card); box-shadow: var(--shadow); text-decoration: none; transition: transform .2s;
}
a.stat:hover { transform: translateY(-2px); }
.stat-num { font-family: var(--font-display); font-size: 32px; line-height: 1.2; }
.stat-label { font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.stat-sub { font-size: 13px; color: var(--muted); }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(247, 242, 234, .6); }
.table a { text-decoration: none; }
.table a:hover { color: var(--primary); }
.table.compact th, .table.compact td { padding: 8px 10px; }
.panel .table th:first-child, .panel .table td:first-child { padding-left: 0; }
.panel.flush .table th:first-child, .panel.flush .table td:first-child { padding-left: 28px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; letter-spacing: .04em; background: #eee; color: var(--ink); white-space: nowrap; }
.badge-active, .badge-published { background: #e3f1e8; color: var(--ok); }
.badge-inactive, .badge-archived { background: #ececec; color: #555; }
.badge-draft, .badge-warn { background: #fff0dc; color: var(--warn); }
.badge-photo { background: #f7ebe3; color: var(--primary-dark); }
.badge-video { background: #1d1e20; color: var(--white); }

.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.filters input { flex: 1 1 260px; width: auto; }
.filters select { flex: 0 0 auto; width: auto; }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.activity li:last-child { border-bottom: 0; }
.activity li.warn .what strong { color: var(--danger); }
.activity .when { color: var(--muted); font-size: 13px; }
.how-to .steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 24px; margin: 0 0 16px; }
.kv dt { font-weight: 700; }
.kv dd { margin: 0; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 24px 0; }
.pager a, .pager span { min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 20px; text-decoration: none; }
.pager a { border: 1px solid var(--line); background: var(--white); }
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .current { background: var(--ink); color: var(--white); }
.admin-foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

.pick-list { display: grid; gap: 10px; margin-top: 20px; }
.pick { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; padding: 18px 22px; background: var(--white); border-radius: 14px; box-shadow: var(--shadow); text-decoration: none; transition: var(--hover); border: 1px solid transparent; }
.pick:hover { border-color: var(--primary); }

/* Uploader */
.uploader { padding: 20px; }
.dropzone {
  text-align: center; padding: 36px 20px; border: 2px dashed rgba(192, 87, 34, .45); border-radius: 16px;
  background: rgba(247, 242, 234, .6); transition: background-color .2s, border-color .2s; outline: none;
}
.dropzone p { margin: 6px 0; }
.dropzone .small { font-size: 13px; margin-top: 14px; }
.dz-title { font-family: var(--font-display); font-size: 20px; }
.dropzone.dragover, .dropzone:focus-visible { background: rgba(192, 87, 34, .08); border-color: var(--primary); }
.queue { margin-top: 18px; }
.queue-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 10px; }
.queue-progress { height: 6px; border-radius: 3px; background: #eee; overflow: hidden; margin-bottom: 12px; }
.queue-progress span { display: block; height: 100%; width: 0; background: var(--primary); transition: width .3s; }
.queue-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.queue-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto 90px; gap: 10px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.queue-list li:last-child { border-bottom: 0; }
.q-icon { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #ccc; }
.q-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-size { color: var(--muted); font-size: 13px; }
.q-status { font-size: 13px; text-align: right; }
.q-bar { grid-column: 2 / -1; height: 3px; background: #eee; border-radius: 2px; overflow: hidden; }
.q-bar span { display: block; height: 100%; width: 0; background: var(--primary); }
li.q-uploading .q-icon { border-color: var(--primary); border-top-color: transparent; animation: spin .8s linear infinite; }
li.q-done .q-icon { border-color: var(--ok); background: var(--ok); }
li.q-done .q-status { color: var(--ok); }
li.q-error .q-icon { border-color: var(--danger); background: var(--danger); }
li.q-error .q-status { color: var(--danger); }
li.q-skipped .q-icon { border-color: var(--warn); }
li.q-skipped .q-status { color: var(--warn); }

/* Admin media grid */
.admin-toolbar { position: sticky; top: var(--header-h); background: var(--paper); border-bottom: 1px solid var(--line); }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.tabs a { text-decoration: none; font-weight: 500; padding: 6px 0; border-bottom: 2px solid transparent; }
.tabs a[aria-current] { border-bottom-color: var(--primary); color: var(--primary); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.media-card { position: relative; background: var(--white); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s; }
.media-card.selected { box-shadow: 0 0 0 3px var(--primary), var(--shadow); }
.media-thumb { position: relative; display: block; aspect-ratio: 1; background: #1a1a1a; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.media-thumb:hover img { transform: scale(1.04); }
.media-check { position: absolute; left: 8px; top: 8px; z-index: 3; width: 30px; height: 30px; cursor: pointer; }
.media-check input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.media-check span { position: absolute; inset: 0; border-radius: 8px; border: 2px solid var(--white); background: rgba(0,0,0,.3); transition: background-color .2s; }
.media-check input:checked + span { background: var(--primary); border-color: var(--primary); }
.media-check input:checked + span::after { content: ""; position: absolute; left: 8px; top: 3px; width: 7px; height: 13px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.media-check input:focus-visible + span { outline: 2px solid var(--white); outline-offset: 2px; }
.cover-flag { position: absolute; right: 8px; top: 8px; background: var(--primary); color: var(--white); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; }
.media-meta { display: grid; gap: 2px; padding: 10px 12px 12px; font-size: 13px; }
.media-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-info { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-info a { color: var(--primary); text-decoration: none; }
.media-actions { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.media-actions a { color: var(--primary); }

.modal { position: fixed; inset: 0; z-index: 140; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.55); }
.modal[hidden] { display: none; }
.modal-card { width: 100%; max-width: 440px; background: var(--white); border-radius: var(--radius-card); padding: 28px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.modal-card h2 { font-size: 24px; margin-bottom: 8px; }
.modal-card p { margin: 8px 0; }
.modal-card .btn-row { margin-top: 20px; justify-content: flex-end; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .admin .site-header .site-nav { gap: 18px; }
  .admin .site-nav > a { font-size: 15px; }
}
@media (max-width: 920px) {
  :root { --row-h: 190px; }
  .admin .site-header .site-nav { gap: 0; }
  .admin .site-nav > a, .site-nav .nav-logout button { font-size: 22px; padding: 12px 0; }
  .site-nav > .nav-logout { margin-top: 12px; }
  .nav-drop-menu .nav-logout button { font-size: 16px; padding: 8px 0; }
  .admin-cols, .admin-cols.wide-left { grid-template-columns: 1fr; }
  .admin-title { font-size: 32px; }
  .portal-hero { min-height: 300px; }
  .hide-sm { display: none; }
}
@media (max-width: 600px) {
  :root { --row-h: 120px; --gap: 3px; }
  .portal-section { padding: 40px 0 80px; }
  .auth-card { padding: 32px 22px; }
  .auth-title { font-size: 28px; }
  .field-row, .radio-cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 16px; }
  .stat-num { font-size: 24px; }
  .panel { padding: 20px 16px; border-radius: 16px; }
  .panel.flush .table th:first-child, .panel.flush .table td:first-child { padding-left: 16px; }
  .table th, .table td { padding: 10px 8px; font-size: 14px; }
  .admin-main { padding: 24px 0 64px; }
  .admin-title { font-size: 28px; }
  .media-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .media-meta { padding: 8px; }
  .gallery-toolbar { gap: 8px 12px; }
  .gallery-toolbar .btn { flex: 1 1 auto; padding: 10px 14px; }
  .gallery-toolbar .btn-ghost.small { flex: 1 1 auto; }
  .gallery-section { padding: 28px 0 80px; }
  .tile { max-width: none; }
  .pv-bar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .pv-title { flex-basis: 100%; order: -1; }
  .pv-bar .pv-close { position: absolute; right: 6px; top: 2px; }
  .pv-stage { padding: 0 0 12px; }
  .pv-nav { width: 42px; height: 42px; font-size: 24px; background: rgba(0,0,0,.45); }
  .queue-list li { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .q-size { display: none; }
  .pick { grid-template-columns: 1fr auto; }
  .pick .muted { grid-column: 1; grid-row: 2; }
  .activity li { grid-template-columns: 1fr; gap: 0; }
  .copy-row { flex-direction: column; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}
