:root {
  color-scheme: light;
  --ink: #1e2933;
  --muted: #66737f;
  --line: #d9e0e5;
  --panel: #ffffff;
  --canvas: #eef2f4;
  --navy: #173f5f;
  --blue: #1769aa;
  --danger: #a52a2a;
  --warning: #8a5a00;
  --success: #24734b;
  --control-panel: #19384d;
  --control-surface: #24485f;
  --control-surface-hover: #2d5871;
  --control-line: #668397;
  --control-ink: #f3f8fb;
  --control-muted: #c4d4de;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { min-height: 34px; padding: 6px 12px; border: 1px solid #aab5bd; border-radius: 4px; background: #fff; cursor: pointer; }
button:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
button:disabled { opacity: .55; cursor: not-allowed; }
button.primary { color: #fff; border-color: var(--navy); background: var(--navy); }
button.danger { color: #fff; border-color: var(--danger); background: var(--danger); }
button.danger:hover:not(:disabled) { color: #fff; border-color: #761c1c; background: #8e2323; }
button.secondary { background: #f5f7f8; }
input, select, textarea { width: 100%; padding: 7px 8px; border: 1px solid #aeb9c1; border-radius: 3px; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid #5aa5db; outline-offset: 1px; }
input[readonly] { background: #eef1f3; }
textarea { resize: vertical; line-height: 1.4; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
label small { min-height: 15px; color: var(--danger); font-weight: 500; }
.app-header { height: 72px; padding: 11px 20px; display: flex; align-items: center; justify-content: space-between; color: #fff; background: var(--navy); border-bottom: 3px solid #c89b32; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 23px; }
h2 { margin-bottom: 2px; font-size: 19px; }
.eyebrow { margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; opacity: .8; }
.auth-controls { display: grid; grid-template-columns: auto 220px auto auto; gap: 8px; align-items: center; }
.auth-controls input { color: var(--ink); }
.workspace { --list-width: 52%; display: grid; grid-template-columns: minmax(520px, var(--list-width)) 10px minmax(460px, 1fr); gap: 0; height: calc(100vh - 72px); padding: 12px; }
.workspace.editor-collapsed { grid-template-columns: minmax(0, 1fr); }
.split-divider { margin: 0 2px; border-radius: 4px; cursor: col-resize; touch-action: none; background: linear-gradient(90deg, transparent 3px, #9aaab5 3px, #9aaab5 5px, transparent 5px); }
.split-divider:hover, .split-divider:focus { background-color: #dce8ef; outline: 2px solid #54758b; outline-offset: -2px; }
body.split-resizing { cursor: col-resize; user-select: none; }
.list-pane, .editor-pane { min-width: 0; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 1px 3px #20304018; }
.list-pane { display: flex; flex-direction: column; }
.editor-pane { padding: 16px; }
.toolbar, .editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toolbar { padding: 14px; border-bottom: 1px solid var(--line); }
.toolbar-actions { display: flex; gap: 7px; }
.filters { display: grid; grid-template-columns: 1.1fr .8fr .9fr .8fr 1.3fr; gap: 8px; padding: 10px 14px; background: #f7f9fa; border-bottom: 1px solid var(--line); }
.filters label { font-size: 12px; }
.publication-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 14px; background: #f7f9fa; border-bottom: 1px solid var(--line); }
.publication-controls .select-all-control { flex-direction: row; align-items: center; gap: 7px; }
.publication-controls input { width: auto; }
.publication-controls .muted { margin-right: auto; }
.bulk-edit-controls { display: grid; grid-template-columns: auto minmax(140px, .7fr) minmax(150px, .8fr) auto minmax(170px, 1fr); gap: 10px; align-items: end; padding: 10px 14px; color: var(--control-ink); background: var(--control-panel); border-bottom: 1px solid var(--control-line); }
.bulk-edit-controls > strong, .bulk-edit-controls > .muted { align-self: center; }
.bulk-edit-controls > .muted { color: var(--control-muted); }
.bulk-edit-controls label { font-size: 12px; }
.bulk-edit-dialog { width: min(850px, calc(100vw - 32px)); max-height: 85vh; padding: 20px; border: 2px solid var(--blue); border-radius: 8px; color: var(--ink); background: var(--panel); }
.bulk-edit-dialog::backdrop { background: #17232dbb; }
.bulk-edit-dialog .preview-table-wrap { max-height: 52vh; border: 1px solid var(--line); }
.bulk-edit-dialog td { white-space: normal; }
.bulk-edit-dialog .message { margin-top: 12px; }
.selection-column { width: 38px; text-align: center; }
.bonus-selection { width: 18px; height: 18px; vertical-align: middle; }
.row-action { min-height: 30px; padding: 4px 9px; }
.row-actions { display: flex; gap: 5px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.table-wrap { overflow: auto; flex: 1; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { position: sticky; top: 0; z-index: 1; padding: 8px 9px; text-align: left; color: #44515c; background: #edf1f3; border-bottom: 1px solid #c9d2d8; font-size: 12px; }
td { padding: 8px 9px; border-bottom: 1px solid #e6eaed; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
tbody tr { cursor: pointer; }
tbody tr:hover, tbody tr.selected { background: #e9f3fa; }
.access-header { height: auto; min-height: 88px; padding: 14px 20px; align-items: center; }
.access-header .eyebrow { line-height: 1.25; }
.access-header p:last-child { margin-bottom: 0; line-height: 1.35; }
.access-workspace { display: block; height: calc(100vh - 88px); }
.access-list-pane { width: 100%; height: 100%; }
.access-table { min-width: 920px; white-space: normal; }
.access-table td { max-width: none; vertical-align: top; overflow-wrap: anywhere; }
.access-table th:nth-child(1) { width: 20%; }
.access-table th:nth-child(2) { width: 16%; }
.access-table th:nth-child(3) { width: 8%; }
.access-table th:nth-child(4), .access-table th:nth-child(5) { width: 18%; }
.access-table .actions-column { width: 280px; min-width: 280px; }
.access-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#identity-dialog { width: min(520px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); }
#identity-dialog::backdrop { background: #17232d88; }
#identity-form { display: grid; gap: 14px; }
#identity-form h2, #identity-form p { margin-bottom: 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 28px; text-align: center; color: var(--muted); }
.muted, .helper { color: var(--muted); }
.helper { margin-bottom: 9px; font-size: 12px; }
.status, .state-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 3px 8px; border-radius: 12px; font-size: 12px; font-weight: 700; text-transform: capitalize; }
.status.neutral, .state-badge.neutral { color: #42515d; background: #dfe5e9; }
.status.success, .state-badge.draft { color: #155335; background: #d9efe3; }
.state-badge.published { color: #174d77; background: #d9eafa; }
.state-badge.withdrawn, .state-badge.superseded, .state-badge.archived { color: #664a18; background: #f2e7ce; }
.message, .notice { margin: 10px 0; padding: 9px 11px; border-radius: 4px; }
.list-pane > .message { margin: 10px 14px 0; }
.message.error { color: #7c1f1f; background: #fbe1e1; border: 1px solid #e9aaaa; }
.message.success { color: #155335; background: #def3e7; border: 1px solid #a9d6bd; }
.notice { color: #694700; background: #fff3d2; border: 1px solid #e5c66e; }
.hidden { display: none !important; }
fieldset { margin: 14px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 4px; }
legend { padding: 0 6px; font-weight: 700; color: var(--navy); }
.form-grid { display: grid; gap: 10px 12px; }
.form-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1.5fr; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.required { color: var(--danger); }
.check-grid { display: grid; grid-template-columns: repeat(6, minmax(70px, 1fr)); gap: 8px; }
.check-grid label { flex-direction: row; align-items: center; padding: 8px; color: var(--control-ink); border: 1px solid var(--control-line); border-radius: 3px; background: var(--control-surface); }
.check-grid label:has(input:checked), .weekday-grid label:has(input:checked) { border-color: #9ed7fa; background: var(--control-surface-hover); box-shadow: inset 3px 0 0 #9ed7fa; }
.check-grid label:has(input:focus-visible), .weekday-grid label:has(input:focus-visible) { outline: 2px solid #9ed7fa; outline-offset: 2px; }
.check-grid label:has(input:disabled), .weekday-grid label:has(input:disabled) { color: #9eb1bd; background: #203847; border-style: dashed; opacity: .72; cursor: not-allowed; }
.check-grid input, .weekday-grid input { width: 17px; height: 17px; margin: 0 5px 0 0; accent-color: #67b7e8; }
.maximum-photos { display: flex; align-items: end; gap: 14px; margin-top: 10px; padding: 10px; color: var(--control-ink); background: var(--control-panel); border: 1px solid var(--control-line); border-radius: 3px; }
.maximum-photos label { max-width: 180px; }
.maximum-photos .helper { margin: 0 0 8px; color: var(--control-muted); }
.maximum-photos input, .availability-boundary input, .availability-boundary select { color: var(--control-ink); background: var(--control-surface); border-color: var(--control-line); color-scheme: dark; }
.maximum-photos input:disabled, .availability-boundary input:disabled, .availability-boundary select:disabled { color: #9eb1bd; background: #203847; border-style: dashed; opacity: .72; cursor: not-allowed; }
.availability-builder { display: grid; gap: 12px; }
.availability-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.availability-presets button { min-height: 32px; padding: 5px 9px; }
.availability-days { padding: 10px; color: var(--control-ink); background: var(--control-panel); border: 1px solid var(--control-line); border-radius: 3px; }
.availability-heading { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.availability-heading .helper { margin: 0; color: var(--control-muted); }
.weekday-grid { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.weekday-grid label { flex-direction: row; align-items: center; min-width: 42px; padding: 6px 8px; color: var(--control-ink); background: var(--control-surface); border: 1px solid var(--control-line); border-radius: 3px; }
.availability-days .link-button { min-height: 29px; padding: 3px 7px; color: #a9ddfb; background: transparent; border: 0; text-decoration: underline; }
.availability-days .link-button:hover:not(:disabled) { color: #fff; }
.availability-boundaries { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.availability-boundary { display: grid; gap: 8px; padding: 11px; color: var(--control-ink); border: 1px solid var(--control-line); border-radius: 3px; background: var(--control-panel); }
.availability-boundary .required { color: #ff918b; font-weight: 750; }
.boundary-fixed { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.availability-advanced { margin-top: 10px; }
.availability-advanced summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 700; }
.availability-advanced textarea { margin-top: 7px; font-family: Consolas, monospace; font-size: 12px; }
.custom-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-bottom: 7px; }
.photo-list { display: grid; gap: 8px; }
.photo-card { display: grid; grid-template-columns: 96px 70px 1fr auto; gap: 9px; align-items: end; padding: 8px; color: var(--control-ink); border: 1px solid var(--control-line); border-radius: 3px; background: var(--control-panel); }
.photo-card img { width: 96px; height: 68px; object-fit: cover; border: 1px solid var(--control-line); background: var(--control-surface); }
.photo-card label { font-size: 12px; }
.photo-card input { color: var(--control-ink); background: var(--control-surface); border-color: var(--control-line); }
.photo-card input:disabled { color: #9eb1bd; background: #203847; border-style: dashed; opacity: .72; cursor: not-allowed; }
.photo-upload { display: grid; grid-template-columns: 1.4fr 2fr auto; gap: 8px; align-items: end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.editor-actions { position: sticky; bottom: -16px; display: flex; gap: 8px; margin: 16px -16px -16px; padding: 12px 16px; background: #19384df2; border-top: 1px solid var(--control-line); box-shadow: 0 -3px 10px #07182466; backdrop-filter: blur(4px); }
.validation-panel { margin-top: 14px; padding: 12px; color: var(--control-ink); border: 1px solid var(--control-line); border-radius: 3px; background: var(--control-panel); }
.validation-panel .helper, .validation-panel .muted { color: var(--control-muted); }
.validation-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.validation-columns h4 { margin-bottom: 5px; }
.validation-columns ul { margin: 0; padding-left: 20px; }
code { padding: 1px 4px; background: #edf1f3; border-radius: 2px; }
.import-workspace {
  --import-canvas: #071824;
  --import-surface: #0d2638;
  --import-surface-raised: #143247;
  --import-control: #081d2c;
  --import-line: #41677e;
  --import-line-strong: #5f8399;
  --import-ink: #f7fbfd;
  --import-muted: #c4d3dc;
  min-height: calc(100vh - 72px);
  padding: 14px 18px 28px;
  align-content: start;
  grid-auto-rows: max-content;
  color: var(--import-ink);
  background: linear-gradient(180deg, #081c2a 0, var(--import-canvas) 36rem);
}
.import-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  color: var(--import-ink);
  background: linear-gradient(120deg, #17384d, #102b3e 68%, #0c2333);
  border: 1px solid var(--import-line);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #ffffff14, 0 10px 24px #0004;
}
.import-header h2 { color: #fff; }
.import-header .eyebrow { color: #f5bd3e; opacity: 1; }
.import-header .muted { max-width: 980px; color: #d7e3e9; line-height: 1.5; }
.import-header p:last-child { margin-bottom: 0; }
.import-controls {
  display: grid;
  grid-template-columns: minmax(225px, .72fr) minmax(0, 2fr);
  gap: 14px;
  align-items: stretch;
  padding: 16px;
  color: var(--import-ink);
  background: linear-gradient(145deg, #102d42, #0a2233 70%);
  border: 1px solid var(--import-line);
  border-radius: 11px;
  box-shadow: inset 0 1px 0 #ffffff0f, 0 10px 24px #0004;
}
.import-template-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  color: var(--import-ink);
  background: linear-gradient(150deg, #17384d, #102a3d);
  border: 1px solid var(--import-line);
  border-radius: 9px;
}
.import-template-panel h3, .import-step h3 { margin: 0; color: #fff; font-size: 16px; }
.import-template-panel > div > p:last-child { margin: 8px 0 0; color: var(--import-muted); line-height: 1.45; }
.import-panel-kicker, .import-step-heading p {
  margin: 0 0 3px;
  color: #82d8ff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.template-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.template-controls button { min-width: 0; }
.template-download { display: grid; gap: 2px; justify-items: start; text-align: left; }
.template-download span { color: #fff; }
.template-download small { color: #b9cfdb; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.import-workflow-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-width: 0; }
.import-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 15px;
  color: var(--import-ink);
  background: linear-gradient(155deg, var(--import-surface-raised), #0e293b);
  border: 1px solid var(--import-line);
  border-radius: 9px;
  box-shadow: inset 0 1px 0 #ffffff12;
}
.import-step-heading { display: flex; align-items: center; gap: 10px; }
.import-step-number {
  display: inline-grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #071824;
  background: #69cdf7;
  border: 1px solid #a6e6ff;
  border-radius: 50%;
  font-weight: 900;
  box-shadow: 0 0 16px #38bdf82b;
}
.import-step label { color: #eef6fa; font-size: 12px; }
.import-step :is(input, select) {
  min-height: 42px;
  color: var(--import-ink);
  background: linear-gradient(180deg, #0a2131, var(--import-control));
  border-color: var(--import-line-strong);
  color-scheme: dark;
}
.import-step input::placeholder { color: #a9beca; opacity: 1; }
.import-file-field input { padding: 4px; }
.import-file-field input::file-selector-button {
  min-height: 32px;
  margin-right: 9px;
  padding: 5px 10px;
  color: #081822;
  background: #8fdcff;
  border: 1px solid #c6efff;
  border-radius: 5px;
  font-weight: 850;
  cursor: pointer;
}
.file-info {
  min-height: 38px;
  padding: 9px 10px;
  overflow: hidden;
  color: #dce8ee;
  background: #091d2b;
  border: 1px solid #365c72;
  border-radius: 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.import-destination-fields { display: grid; gap: 10px; }
.import-step-note { margin: 0; color: var(--import-muted); line-height: 1.45; }
.import-step-preview .import-step-note { flex: 1; }
.import-preview-button { width: 100%; min-height: 48px; }
.import-guidance {
  margin: 0;
  padding: 11px 14px;
  color: #d8e6ed;
  background: #0d2a3d;
  border: 1px solid #41677e;
  border-left: 4px solid #68cef8;
  border-radius: 8px;
  line-height: 1.45;
}
.context-note { margin: 0; padding: 9px 16px; color: #4e5d68; background: #eef5fa; border: 1px solid #ccdde9; }
.portal-shell-ready.portal-area-bonuses .publication-controls {
  color: #f7fbfd;
  background: linear-gradient(180deg, #122f43, #0c2435);
  border-color: #41677e;
}
.portal-shell-ready.portal-area-bonuses .publication-controls :is(.muted, .select-all-control) { color: #eef6fa; }
.portal-shell-ready.portal-area-bonuses .import-workspace { color: var(--import-ink); background: linear-gradient(180deg, #081c2a 0, var(--import-canvas) 36rem); }
.portal-shell-ready.portal-area-bonuses .import-header { color: var(--import-ink); background: linear-gradient(120deg, #17384d, #102b3e 68%, #0c2333); border-color: var(--import-line); }
.portal-shell-ready.portal-area-bonuses .import-header .muted { color: #d7e3e9; }
.portal-shell-ready.portal-area-bonuses .import-controls { color: var(--import-ink); background: linear-gradient(145deg, #102d42, #0a2233 70%); border-color: var(--import-line); }
.portal-shell-ready.portal-area-bonuses .import-controls label { color: #eef6fa; }
.portal-shell-ready.portal-area-bonuses .import-controls :is(input, select) { color: var(--import-ink); background: linear-gradient(180deg, #0a2131, var(--import-control)); border-color: var(--import-line-strong); }
.portal-shell-ready.portal-area-bonuses .import-controls input::placeholder { color: #a9beca; opacity: 1; }
.portal-shell-ready.portal-area-bonuses .import-controls .file-info { color: #dce8ee; background: #091d2b; border-color: #365c72; }
.portal-shell-ready.portal-area-bonuses .import-controls .template-download { color: #f7fbfd; background: linear-gradient(180deg, #234c65, #17384d); border-color: #5f8399; }
.portal-shell-ready.portal-area-bonuses .import-controls .template-download:hover:not(:disabled) { color: #fff; background: linear-gradient(180deg, #2b5b76, #1b4259); border-color: #69cdf7; }
.portal-shell-ready.portal-area-bonuses .import-controls .import-preview-button:disabled {
  color: #dce6ec;
  background: #304858;
  border-color: #60798a;
  opacity: 1;
  box-shadow: inset 0 1px 0 #ffffff12;
  filter: none;
}
.portal-shell-ready.portal-area-bonuses .import-workspace > .import-guidance { color: #d8e6ed; background: #0d2a3d; border-color: #41677e; border-left-color: #68cef8; }
.import-workspace > .message { margin: 12px 0; }
.summary-grid { display: grid; grid-template-columns: repeat(7, minmax(105px, 1fr)); gap: 8px; margin-top: 14px; }
.summary-card { padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.summary-card strong { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.summary-card span { color: var(--muted); font-size: 12px; }
.summary-card.error { border-left: 4px solid var(--danger); }
.summary-card.warning { border-left: 4px solid #c18412; }
.summary-card.success { border-left: 4px solid var(--success); }
.import-decision { margin-top: 9px; padding: 10px 12px; font-weight: 700; border-radius: 4px; }
.import-decision.blocked { color: #7c1f1f; background: #fbe1e1; border: 1px solid #e9aaaa; }
.import-decision.ready { color: #155335; background: #def3e7; border: 1px solid #a9d6bd; }
.column-summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-top: 10px; }
.column-summary > div { padding: 11px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.column-summary h3 { margin-bottom: 8px; font-size: 14px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 5px; min-height: 23px; }
.chip { padding: 3px 7px; border: 1px solid #cbd4da; border-radius: 11px; background: #f2f5f7; font-size: 12px; }
.chip.warning { color: #694700; background: #fff3d2; border-color: #e5c66e; }
.chip.error { color: #7c1f1f; background: #fbe1e1; border-color: #e9aaaa; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.preview-toolbar h3 { margin: 0; }
.preview-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.preview-filters button { min-height: 30px; padding: 4px 9px; }
.preview-filters button.active { color: #fff; border-color: var(--navy); background: var(--navy); }
.preview-table-wrap { max-height: 470px; margin-top: 8px; overflow: auto; background: var(--panel); border: 1px solid var(--line); }
#preview-table { table-layout: fixed; min-width: 1300px; }
#preview-table th:nth-child(1) { width: 55px; }
#preview-table th:nth-child(2) { width: 105px; }
#preview-table th:nth-child(3) { width: 175px; }
#preview-table th:nth-child(4) { width: 145px; }
#preview-table th:nth-child(5) { width: 70px; }
#preview-table th:nth-child(6) { width: 170px; }
#preview-table th:nth-child(7) { width: 190px; }
#preview-table th:nth-child(8) { width: 160px; }
#preview-table th:nth-child(9) { width: 125px; }
#preview-table th:nth-child(10) { width: 105px; }
.preview-row.error-row { background: #fff5f5; }
.preview-row.warning-row { background: #fffaf0; }
.preview-row:hover, .preview-row.selected { background: #e9f3fa; }
.row-status, .action-badge { display: inline-block; padding: 3px 7px; border-radius: 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.row-status.valid, .action-badge.create { color: #155335; background: #d9efe3; }
.row-status.warning, .action-badge.update_candidate, .action-badge.no_change { color: #694700; background: #fff0c9; }
.row-status.error, .action-badge.invalid, .action-badge.duplicate { color: #7c1f1f; background: #f9dcdc; }
.preview-detail { margin-top: 10px; padding: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.preview-detail-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.preview-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.issue-panel { padding: 10px; border-radius: 4px; }
.issue-panel.errors { background: #fff3f3; border: 1px solid #ebbbbb; }
.issue-panel.warnings { background: #fff9e9; border: 1px solid #ead29a; }
.issue-panel h4 { margin-bottom: 7px; }
.issue-list { margin: 0; padding-left: 20px; }
.issue-list li { margin-bottom: 6px; }
.issue-value { display: inline-block; margin-left: 4px; padding: 1px 4px; background: #ffffffaa; font-family: Consolas, monospace; font-size: 12px; }
.data-table { width: 100%; white-space: normal; }
.data-table th { position: static; width: 180px; vertical-align: top; }
.data-table td { max-width: none; overflow-wrap: anywhere; }
.preview-detail details { margin-top: 10px; }
.preview-detail summary { cursor: pointer; font-weight: 700; }
.technical-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.technical-grid pre { max-height: 300px; margin: 0; padding: 10px; overflow: auto; background: #17232d; color: #e8f0f5; border-radius: 3px; font-size: 11px; }
.photo-import-panel { margin-top: 18px; padding: 16px; color: var(--control-ink); background: var(--control-panel); border: 1px solid var(--control-line); border-radius: 5px; }
.photo-import-panel .muted { color: var(--control-muted); }
.photo-import-panel code { color: #eef8ff; background: var(--control-surface); }
.photo-import-panel input, .photo-import-panel select { color: var(--control-ink); background: var(--control-surface); border-color: var(--control-line); color-scheme: dark; }
.photo-import-panel .context-note { color: var(--control-muted); background: #17384d; border-color: var(--control-line); }
.photo-import-panel .preview-table-wrap { background: var(--control-surface); border-color: var(--control-line); }
.photo-import-panel .photo-preview-table th { color: var(--control-ink); background: #1d4259; border-color: var(--control-line); }
.photo-import-panel .photo-preview-table td { border-color: var(--control-line); }
.photo-import-controls { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(260px, 1.2fr) minmax(220px, 1fr) auto; gap: 12px; align-items: end; }
.photo-import-panel .context-note { margin-top: 10px; border-top: 1px solid var(--control-line); }
.photo-preview-table { min-width: 850px; white-space: normal; }
.photo-preview-table th:nth-child(1) { width: 220px; }
.photo-preview-table th:nth-child(2) { width: 130px; }
.photo-preview-table th:nth-child(3) { width: 80px; }
.photo-preview-table th:nth-child(4) { width: 110px; }
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 1fr; height: auto; }
  .workspace.editor-collapsed { height: calc(100dvh - 88px); min-height: 0; }
  .workspace.editor-collapsed .list-pane { height: 100%; min-height: 0; }
  .split-divider { display: none; }
  .list-pane { min-height: 480px; }
  .form-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .import-controls { grid-template-columns: 1fr; }
  .import-template-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .8fr); align-items: center; }
  .summary-grid { grid-template-columns: repeat(4, 1fr); }
  .photo-import-controls { grid-template-columns: repeat(2, 1fr); }
  .availability-boundaries { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .import-workflow-grid { grid-template-columns: 1fr; }
  .import-destination-fields { grid-template-columns: 1fr 1fr; }
  .import-step-preview .import-step-note { flex: initial; }
}

@media (max-width: 700px) {
  .import-workspace { padding: 12px 14px 24px; }
  .import-header { flex-direction: column; align-items: stretch; gap: 14px; }
  .import-header #close-import-button { width: 100%; }
  .import-controls { padding: 11px; }
  .import-template-panel { display: flex; align-items: stretch; }
  .template-controls, .import-destination-fields { grid-template-columns: 1fr; }
  .template-download { justify-items: center; text-align: center; }
}

/* Preserve a useful bonus table on short laptop displays and at increased browser zoom. */
@media (max-height: 820px) and (min-width: 701px) {
  body.portal-shell-ready > header.app-header {
    height: 60px;
    min-height: 60px;
    padding: 7px 16px;
  }
  body.portal-shell-ready > header.app-header h1 { font-size: 20px; }
  body.portal-shell-ready > main.workspace.editor-collapsed {
    height: calc(100dvh - 60px);
    min-height: 0;
    padding: 7px 9px;
  }
  body.portal-shell-ready .workspace.editor-collapsed .list-pane {
    height: 100%;
    min-height: 0;
  }
  body.portal-shell-ready .workspace.editor-collapsed .toolbar { padding: 7px 11px; }
  body.portal-shell-ready .workspace.editor-collapsed .toolbar h2 { font-size: 17px; }
  body.portal-shell-ready .workspace.editor-collapsed :is(.filters,.publication-controls) {
    padding: 6px 11px;
    gap: 6px;
  }
  body.portal-shell-ready .workspace.editor-collapsed .bulk-edit-controls {
    padding: 6px 11px;
    gap: 7px;
  }
  body.portal-shell-ready .workspace.editor-collapsed :is(input,select) {
    min-height: 32px;
    padding: 4px 7px;
  }
  body.portal-shell-ready .workspace.editor-collapsed button {
    min-height: 32px;
    padding: 5px 9px;
  }
  body.portal-shell-ready .workspace.editor-collapsed .publication-controls .muted,
  body.portal-shell-ready .workspace.editor-collapsed .bulk-edit-controls > .muted {
    display: none;
  }
  body.portal-shell-ready .workspace.editor-collapsed th,
  body.portal-shell-ready .workspace.editor-collapsed td { padding-block: 6px; }
}
