/* Alba Authentics — admin console
   Shares the certificate palette: #ECD10E yellow, #101010 black, #f2f2f3 paper */

:root {
  --yellow: #ECD10E;
  --yellow-dim: #d4bb0c;
  --black: #101010;
  --ink: #1d1f20;
  --ink-soft: #424244;
  --ink-mute: #5d5d60;
  --paper: #f2f2f3;
  --panel: #ffffff;
  --rule: rgba(29, 31, 32, .16);
  --rule-soft: rgba(29, 31, 32, .09);
  --on-yellow-mute: rgba(16, 16, 16, .65);
  --ok: #2f7a45;
  --warn: #9a6b0c;
  --bad: #cc0000;

  --font-body: "Barlow", system-ui, sans-serif;
  --font-head: "Barlow Condensed", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --gutter: clamp(12px, 1.6vw, 20px);
  --sidebar: 216px;
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
html, body { max-width: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--font-body);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--yellow); color: var(--ink); }
a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--yellow); }
a:hover { background: var(--yellow); }
:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; letter-spacing: -.01em; margin: 0; }

.mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.mono-sm { font-size: 10px; }

/* ---------- blueprint frame ---------- */

.plate { position: relative; border: 1px solid var(--rule); background: var(--panel); }

.plate > .mk {
  position: absolute;
  width: 11px;
  height: 11px;
  color: rgba(29, 31, 32, .55);
  z-index: 2;
}
.plate > .mk::before,
.plate > .mk::after { content: ""; position: absolute; background: currentColor; }
.plate > .mk::before { left: 5px; top: 0; width: 1px; height: 100%; }
.plate > .mk::after { top: 5px; left: 0; width: 100%; height: 1px; }
.mk.tl { top: -6px; left: -6px; }
.mk.tr { top: -6px; right: -6px; }
.mk.bl { bottom: -6px; left: -6px; }
.mk.br { bottom: -6px; right: -6px; }

/* ---------- top bar ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: clamp(10px, 2vw, 20px);
  padding: 11px clamp(14px, 3vw, 24px);
  background: var(--yellow);
  color: var(--black);
}

.nav__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav__mark { width: 14px; height: 14px; background: var(--black); flex: 0 0 auto; }
.nav__name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(16px, 3.6vw, 20px);
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav__env {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 1px solid var(--black);
  padding: 3px 6px;
}
.nav__user {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.nav__usertrigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  cursor: pointer;
  user-select: none;
  list-style: none;
}
.nav__usertrigger::-webkit-details-marker { display: none; }
.nav__usertrigger::after {
  content: "";
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.nav__user[open] .nav__usertrigger::after { transform: rotate(180deg); }
.nav__usertrigger:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

.nav__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 210px;
  z-index: 40;
  background: var(--panel);
  border: 1px solid var(--black);
  color: var(--ink);
}
.nav__menu-meta {
  margin: 0;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-mute);
  text-transform: none;
  letter-spacing: .04em;
  white-space: normal;
  overflow-wrap: anywhere;
}
.nav__menu-item {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}
.nav__menu-item:hover { background: var(--yellow); }
.nav__avatar {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: var(--yellow);
  font-size: 10px;
  letter-spacing: .06em;
}
.nav__toggle {
  display: none;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--black);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 7px 9px;
  min-height: 34px;
  cursor: pointer;
}
.nav__toggle:hover { background: var(--black); color: var(--yellow); }

/* ---------- shell ---------- */

.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); align-items: start; }

.side {
  position: sticky;
  top: 48px;
  align-self: start;
  height: calc(100vh - 48px);
  overflow: auto;
  border-right: 1px solid var(--rule);
  background: var(--paper);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.side__group { display: flex; flex-direction: column; }
.side__label { letter-spacing: .16em; padding: 0 20px 8px; margin: 0; }

.side__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 20px;
  min-height: 42px;
  font-size: 15px;
  color: var(--ink-soft);
  border: 0;
  border-left: 3px solid transparent;
}
.side__link:hover { background: rgba(236, 209, 14, .28); color: var(--ink); }
.side__link[aria-current="page"] {
  background: var(--yellow);
  color: var(--black);
  border-left-color: var(--black);
  font-weight: 500;
}
.side__count { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: var(--ink-mute); }
.side__link[aria-current="page"] .side__count { color: var(--on-yellow-mute); }

.main { padding: clamp(14px, 2vw, 20px) var(--gutter) 40px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* ---------- page head ---------- */

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.head__kicker { letter-spacing: .16em; margin: 0 0 8px; }
.head__kicker:last-child { margin-bottom: 0; }
.head h1 { font-size: clamp(28px, 4vw, 38px); line-height: 1.05; }
.head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- stat strip ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: clamp(16px, 2.5vw, 24px); }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.stat__label { letter-spacing: .14em; margin: 0; }
.stat__value { font-family: var(--font-head); font-weight: 600; font-size: 38px; line-height: 1; margin: 0; }
.stat__delta { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; color: var(--ink-mute); margin: 0; }
.stat__delta.is-up { color: var(--ok); }
.stat__delta.is-down { color: var(--bad); }

/* ---------- panels ---------- */

.panel { padding: 0; }
.panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule);
}
.panel__head h2 { font-size: 22px; }
.panel__body { padding: 16px; }
.panel__body--flush { padding: 0 0 8px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 14px;
  border: 1px solid var(--black);
  background: transparent;
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
}
.btn:hover { background: var(--black); color: var(--yellow); }
.btn--primary { background: var(--yellow); }
.btn--primary:hover { background: var(--black); color: var(--yellow); }
.btn--quiet { border-color: var(--rule); color: var(--ink-soft); }
.btn--quiet:hover { background: var(--paper); color: var(--ink); border-color: var(--black); }
.btn--danger { border-color: var(--bad); color: var(--bad); }
.btn--danger:hover { background: var(--bad); color: #fff; }
.btn--sm { min-height: 28px; padding: 4px 9px; font-size: 10px; }
/* Bare icon button: no border or fill, so only the glyph shows. Keeps a
   32px hit area, and the global :focus-visible outline for keyboard users. */
.btn--icon {
  padding: 0;
  width: 32px;
  min-width: 32px;
  border-color: transparent;
  background: transparent;
}
.btn--icon:hover { background: transparent; opacity: .6; }
.btn--icon.btn--danger:hover { background: transparent; color: var(--bad); }
.btn--icon svg { display: block; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- status pills ---------- */

.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 8px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.pill--live { background: var(--yellow); color: var(--black); border-color: var(--black); }
.pill--draft { color: var(--ink-mute); }
.pill--hold { color: var(--warn); }
.pill--void { color: var(--bad); }

/* ---------- forms ---------- */

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 11px 16px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field--wide { grid-column: 1 / -1; }
.field > label:not(.check):not(.switch) { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-mute); }
.field__hint { font-size: 13px; color: var(--ink-mute); margin: 0; }
.field__hint--error { color: var(--bad); }
.field__hint--ok { color: var(--ok); }

.input, .select, .textarea {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 6px 10px;
  min-height: 32px;
  width: 100%;
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-mute); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--black); outline-offset: 1px; border-color: var(--black); }
.input::placeholder, .textarea::placeholder { color: var(--ink-mute); }
.input--mono { font-family: var(--font-mono); letter-spacing: .04em; }
.input.is-error, .select.is-error, .textarea.is-error { border-color: var(--bad); }
.textarea { min-height: 104px; resize: vertical; }
.select { appearance: none; padding-right: 34px; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 17px) 14px, calc(100% - 12px) 14px; background-size: 5px 5px; background-repeat: no-repeat; }

.check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { appearance: none; width: 18px; height: 18px; margin: 3px 0 0; border: 1px solid var(--ink); background: var(--panel); flex: 0 0 auto; cursor: pointer; }
.check input:checked { background: var(--yellow); box-shadow: inset 0 0 0 3px var(--panel); }
.check input[type="radio"] { border-radius: 50%; }
.check input:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

.seg { display: inline-flex; border: 1px solid var(--black); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  padding: 7px 12px;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border-right: 1px solid var(--black);
  cursor: pointer;
}
.seg label:last-of-type { border-right: 0; }
.seg input:checked + label { background: var(--yellow); }
.seg input:focus-visible + label { outline: 2px solid var(--black); outline-offset: -2px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.switch input { appearance: none; width: 44px; height: 24px; border: 1px solid var(--ink); background: var(--panel); position: relative; cursor: pointer; }
.switch input::after { content: ""; position: absolute; inset: 3px auto 3px 3px; width: 16px; background: var(--ink); transition: transform .15s ease; }
.switch input:checked { background: var(--yellow); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { outline: 2px solid var(--black); outline-offset: 2px; }

.form-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--rule); padding-top: 11px; margin-top: 2px; }
/* Keeps the buttons right when the message beside them is hidden. */
.form-foot .btn-row { margin-left: auto; }

/* ---------- tables (base + DataTables skin) ---------- */

table.dataTable, .table {
  width: 100% !important;
  border-collapse: collapse;
  font-size: 14px;
}

table.dataTable thead th, .table thead th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  text-align: left;
  font-weight: 400;
  padding: 8px 12px;
  border-bottom: 1px solid var(--black);
  white-space: nowrap;
}

table.dataTable tbody td, .table tbody td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--rule-soft);
  vertical-align: middle;
}
table.dataTable tbody tr:hover td, .table tbody tr:hover td { background: rgba(236, 209, 14, .16); }
/* Rows that open a record on double-click. */
table.dataTable tbody tr[tabindex], .table tbody tr[tabindex] { cursor: pointer; }
table.dataTable tbody tr[tabindex]:focus-visible, .table tbody tr[tabindex]:focus-visible { outline: 2px solid var(--black); outline-offset: -2px; }
/* Edge cells hold the inset so row rules span the full panel width. */
table.dataTable thead th:first-child, .table thead th:first-child,
table.dataTable tbody td:first-child, .table tbody td:first-child { padding-left: 16px; }
table.dataTable thead th:last-child, .table thead th:last-child,
table.dataTable tbody td:last-child, .table tbody td:last-child { padding-right: 16px; }

.cell-mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; white-space: nowrap; }
.cell-num { text-align: right; font-family: var(--font-mono); font-size: 13px; }
.cell-actions { text-align: right; white-space: nowrap; }

/* DataTables chrome */
.dt-container { font-family: var(--font-body); }
.dt-container .dt-length,
.dt-container .dt-search,
.dt-container .dt-info,
.dt-container .dt-paging { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; color: var(--ink-mute); text-transform: uppercase; }
.dt-container .dt-layout-row { padding: 5px 16px; gap: 12px; }
.dt-container .dt-layout-row.dt-layout-table { padding-left: 0; padding-right: 0; }
.dt-container .dt-search input,
.dt-container .dt-length select {
  font-family: var(--font-body);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--rule);
  padding: 6px 10px;
  min-height: 32px;
  margin-left: 8px;
}
.dt-container .dt-search input:focus-visible,
.dt-container .dt-length select:focus-visible { outline: 2px solid var(--black); outline-offset: 1px; }

.dt-container .dt-paging .dt-paging-button {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--ink) !important;
  background: transparent !important;
  border: 1px solid var(--rule) !important;
  border-radius: 0 !important;
  padding: 6px 11px;
  margin-left: 4px;
  min-height: 34px;
  cursor: pointer;
}
.dt-container .dt-paging .dt-paging-button:hover { background: var(--black) !important; color: var(--yellow) !important; border-color: var(--black) !important; }
.dt-container .dt-paging .dt-paging-button.current {
  background: var(--yellow) !important;
  color: var(--black) !important;
  border-color: var(--black) !important;
}
.dt-container .dt-paging .dt-paging-button.disabled { opacity: .4; pointer-events: none; }

table.dataTable thead th.dt-orderable-asc:hover,
table.dataTable thead th.dt-orderable-desc:hover { color: var(--ink); cursor: pointer; }
table.dataTable thead th.dt-ordering-asc,
table.dataTable thead th.dt-ordering-desc { color: var(--ink); }
table.dataTable thead th span.dt-column-order::before,
table.dataTable thead th span.dt-column-order::after { color: var(--ink); }
table.dataTable tbody tr.selected td { background: rgba(236, 209, 14, .3) !important; box-shadow: none !important; }

.table-scroll { overflow-x: auto; }

/* ---------- login ---------- */

.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr minmax(0, 460px);
}

.login__brandside {
  background: var(--black);
  color: var(--paper);
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
}
.login__brand { display: flex; align-items: center; gap: 12px; }
.login__brand .nav__mark { background: var(--yellow); }
.login__brand .nav__name { color: var(--paper); }
.login__pitch { font-family: var(--font-head); font-weight: 600; font-size: clamp(28px, 4vw, 46px); line-height: 1.06; margin: 0; max-width: 18ch; }
.login__pitch em { font-style: normal; color: var(--yellow); }
.login__meta { display: flex; gap: 28px; flex-wrap: wrap; color: #8d8d8f; }

.login__formside { background: var(--paper); padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 44px); display: flex; align-items: center; }
.login__card { width: 100%; padding: clamp(22px, 4vw, 30px); display: flex; flex-direction: column; gap: 18px; }
.login__card h1 { font-size: 30px; }
.login__kicker { letter-spacing: .16em; margin: 0 0 6px; }
.login__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.login__foot { font-size: 13px; color: var(--ink-mute); margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav__toggle { display: inline-flex; }
  .nav__username { display: none; }
  .side {
    position: fixed;
    top: 48px;
    left: 0;
    width: min(84vw, 300px);
    height: calc(100vh - 48px);
    z-index: 40;
    transform: translateX(-102%);
    transition: transform .2s ease;
    border-right: 1px solid var(--black);
    background: var(--paper);
    box-shadow: 0 0 0 100vmax rgba(16, 16, 16, 0);
  }
  #navtoggle:checked ~ .shell .side { transform: translateX(0); box-shadow: 0 0 0 100vmax rgba(16, 16, 16, .4); }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__brandside { gap: 28px; }
  .login__meta { gap: 18px; }
}

@media (max-width: 560px) {
  .head__actions .btn { flex: 1 1 auto; }
  .dt-container .dt-layout-row { flex-direction: column; align-items: stretch; }
}

/* ---------- modal ---------- */

.modal {
  padding: 0;
  border: 1px solid var(--black);
  background: var(--panel);
  color: var(--ink);
  width: min(92vw, 420px);
  margin: auto;
}
.modal--wide { width: min(92vw, 560px); }
.modal::backdrop { background: rgba(16, 16, 16, .5); }
.modal__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--rule);
}
.modal__text { margin: 0 0 8px; font-size: 15px; }
.modal__status {
  margin-right: auto;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.modal__status.is-saved { color: var(--ok); }
.modal__status.is-error { color: var(--bad); }

/* ---------- media plates ----------
   Matches the .media treatment on the public certificate page, so a plate
   looks the same in the admin as it does on the certificate it ends up on. */

/* Flex rather than grid: plates keep a fixed width and wrap, instead of
   stretching to fill the row when there are only a few of them. */
.gallery {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px;
}

.media {
  margin: 0;
  flex: 0 1 250px;
  max-width: 250px;
  display: flex;
  flex-direction: column;
}

.media__slot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: repeating-linear-gradient(45deg, #e4e4e6 0 9px, #eeeef0 9px 18px);
}
.media__slot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
a.media__slot { border-bottom: 0; }
a.media__slot:hover { background: repeating-linear-gradient(45deg, #e4e4e6 0 9px, #eeeef0 9px 18px); }
a.media__slot:hover img { opacity: .85; }

/* Shown when there is no thumbnail — an unreadable file, or one still landing. */
.media__note {
  position: relative;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mute);
  background: var(--paper);
  padding: 7px 10px;
  text-align: center;
}

.media__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--yellow);
  color: var(--black);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 4px 7px;
}
.media__badge--right { left: auto; right: 12px; background: var(--black); color: var(--yellow); }

.media__caption {
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid var(--rule);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

/* Titles wrap rather than truncate — a plate caption is the only place the
   title is shown, so it has to be readable in full. */
/* Title shares its line with the buttons; the narrative runs the full width
   of the plate underneath, where it has room to be read. */
.media__line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.media__name {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 4px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.media__desc {
  font-family: var(--font-body);
  font-size: 11px;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.45;
  color: var(--ink-mute);
  overflow-wrap: anywhere;
}
.media__desc:empty { display: none; }

.gallery__empty { color: var(--ink-mute); font-size: 13px; margin: 0; }

/* ---------- upload ---------- */

.drop {
  border: 1px dashed var(--ink-mute);
  padding: 18px;
  text-align: center;
  color: var(--ink-mute);
  font-size: 13px;
}
.drop.is-over { border-color: var(--black); background: rgba(236, 209, 14, .18); color: var(--ink); }
.drop__input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.progress {
  height: 4px;
  background: var(--rule-soft);
  overflow: hidden;
}
.progress__bar { height: 100%; width: 0; background: var(--yellow); transition: width .15s linear; }
.upload-row { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; }
.upload-row__name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- instance import ---------- */

.panel__head-actions { display: flex; align-items: center; gap: 12px; }

.import-actions { display: flex; align-items: center; gap: 12px; }

/* A shoot is hundreds of photos, so a row has to be scannable at a glance and
   short enough that many fit on screen at once. Everything here is sized to
   that: the note crop is the one thing worth real estate, because it is what
   the operator is actually checking. */
.table--dense th,
.table--dense td { padding: 4px 8px; vertical-align: middle; }

.cell-tick { width: 30px; text-align: center; }
.cell-tick input { margin: 0; cursor: pointer; }

.cell-note { width: 88px; }
.note-crop {
  display: block;
  width: 80px;
  height: 40px;
  object-fit: cover;
  border: 1px solid var(--rule);
  background: var(--panel);
}

.cell-photo { width: 60px; }
.review-thumb {
  display: block;
  width: 52px;
  height: 36px;
  object-fit: cover;
  border: 1px solid var(--rule);
}

.cell-file { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.input--num {
  width: 68px;
  padding: 3px 6px;
  font-size: 13px;
  text-align: right;
  font-family: var(--font-mono);
}

.note-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 5px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.note-badge--ok { color: var(--ink-mute); }
.note-badge--warn { color: var(--warn); }
.note-badge--bad { color: var(--bad); }
.note-badge--off { color: var(--ink-mute); opacity: .55; border-style: dashed; }

/* A tint rather than a border, so a long list still scans as a table. */
#review-rows tr.is-unsure { background: rgba(236, 209, 14, .16); }
#review-rows tr.is-problem { background: rgba(204, 0, 0, .07); }
#review-rows tr.is-problem .input--num { border-color: var(--bad); }
#review-rows tr.is-skipped { opacity: .45; }
#review-rows tr.is-skipped .note-crop,
#review-rows tr.is-skipped .review-thumb { filter: grayscale(1); }

/* Hovering a row shows the note big enough to settle any doubt without
   leaving the list. */
.note-crop:hover {
  transform: scale(3.2);
  transform-origin: left center;
  position: relative;
  z-index: 5;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .3);
}

.field__hint--plain { color: var(--ink-mute); }
