:root {
  color-scheme: dark;
  --bg: #071012;
  --bg-deep: #04090a;
  --panel: #0d181a;
  --panel-raised: #122023;
  --panel-soft: #15272a;
  --line: #294044;
  --line-strong: #3b565b;
  --text: #f4f7f5;
  --muted: #a6b4b3;
  --muted-strong: #cbd4d2;
  --accent: #ff8a3d;
  --accent-hover: #ffa064;
  --accent-ink: #211009;
  --mint: #70d8bd;
  --cyan: #74cde0;
  --warning: #f4c36a;
  --danger: #ff837a;
  --success: #70d8bd;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .26);
  --content: 1180px;
  --sidebar: 232px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: radial-gradient(circle at 82% -10%, rgba(112, 216, 189, .08), transparent 38%), var(--bg); color: var(--text); font-size: 16px; line-height: 1.55; }
body, button, input, select, textarea { font: inherit; }
button, input, select, textarea { color: inherit; }
button, select, label[for], input[type="checkbox"] { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
img { display: block; max-width: 100%; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: #a7e9f5; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }

.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; transform: translateY(-150%); padding: 10px 14px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg-deep); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }
.app-shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 50; display: flex; flex-direction: column; height: 100vh; min-width: 0; padding: 22px 16px 16px; overflow-y: auto; background: rgba(4, 9, 10, .95); border-right: 1px solid var(--line); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; width: 142px; min-height: 48px; margin: 0 8px 22px; }
.brand-logo { width: 142px; height: auto; }
.rail-label, .nav-group-label { display: block; margin: 13px 10px 6px; color: #76898a; font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.rail-label { display: none; }
.nav-list { display: flex; flex-direction: column; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 10px; border: 1px solid transparent; border-radius: 10px; color: var(--muted-strong); font-size: .91rem; font-weight: 650; text-decoration: none; }
.nav-link:hover { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .04); color: var(--text); }
.nav-link.active { background: rgba(255, 138, 61, .11); border-color: rgba(255, 138, 61, .24); color: #ffd8bf; }
.nav-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; line-height: 1; }
.nav-link.active .nav-icon { border-color: var(--accent); color: var(--accent); }
.history-icon::before { content: "↺"; }
.nav-divider { height: 1px; margin: 12px 10px 5px; background: var(--line); }
.sidebar-lower { margin-top: auto; padding-top: 24px; }
.privacy-note { display: grid; grid-template-columns: 24px 1fr; gap: 9px; margin: 0 7px 12px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.privacy-note p { margin: 0; }
.privacy-note strong { color: var(--muted-strong); }
.privacy-mark { color: var(--mint); }
.pilot-chip { display: grid; grid-template-columns: 34px minmax(0, 1fr) 8px; align-items: center; gap: 9px; width: 100%; min-height: 56px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; }
.pilot-chip:hover { background: var(--panel-raised); border-color: var(--line-strong); }
.pilot-avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--panel-soft); color: var(--mint); font-weight: 850; font-size: .75rem; }
.pilot-details { min-width: 0; }
.pilot-details strong, .pilot-details small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pilot-details strong { font-size: .76rem; }
.pilot-details small { color: var(--muted); font-size: .66rem; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #647274; }
.online-dot.is-signed-in { background: var(--success); box-shadow: 0 0 0 4px rgba(112, 216, 189, .12); }

.main-content { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 12px clamp(22px, 4vw, 54px); border-bottom: 1px solid var(--line); background: rgba(7, 16, 18, .88); backdrop-filter: blur(18px); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .82rem; }
.breadcrumb strong { color: var(--text); }
.breadcrumb-slash { color: #536466; }
.system-status, .context-status, .auth-status-pill { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted-strong); font-size: .72rem; font-weight: 700; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.workspace, .workspace-content, .page-content { width: min(100%, calc(var(--content) + clamp(44px, 8vw, 108px))); margin: 0 auto; padding: clamp(40px, 6vw, 76px) clamp(22px, 4vw, 54px) 34px; }
.section-kicker, .eyebrow { margin: 0 0 8px; color: var(--mint); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.hero { display: block; margin-bottom: 30px; }
.hero-copy { max-width: 930px; }
.hero h1, .page-intro h1 { max-width: 860px; margin: 0; font-size: clamp(2.45rem, 5.7vw, 5.3rem); line-height: .98; letter-spacing: -.055em; }
.hero h1 { font-size: clamp(2.45rem, 5.2vw, 4.8rem); }
.hero h1 em, .page-intro h1 em { color: var(--accent); font-family: inherit; font-style: normal; }
.hero-description { max-width: 720px; margin: 20px 0 0; color: var(--muted-strong); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.trust-list { display: grid; gap: 12px; margin: 0; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13, 24, 26, .62); list-style: none; }
.trust-list li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; color: var(--muted); font-size: .86rem; }
.hero-copy .trust-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 700px; margin-top: 24px; padding: 14px 16px; }
.trust-list strong { display: block; color: var(--text); font-size: .9rem; }
.trust-mark { color: var(--mint); font-weight: 900; }

.transfer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.transfer-card, .review-card, .validation-card, .export-panel, .local-history, .workflow-note { border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(18, 32, 35, .96), rgba(10, 20, 22, .96)); box-shadow: var(--shadow); }
.transfer-card { min-width: 0; overflow: hidden; }
.stepper { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; border-bottom: 1px solid var(--line); list-style: none; }
.step { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 16px 18px; color: var(--muted); }
.step + .step { border-left: 1px solid var(--line); }
.step.active { color: var(--text); background: rgba(255, 138, 61, .05); }
.step.complete { color: var(--muted-strong); }
.step-number { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid var(--line-strong); border-radius: 50%; font-size: .76rem; font-weight: 800; }
.step.active .step-number { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.step.complete .step-number { border-color: var(--success); color: var(--success); }
.step-copy { min-width: 0; }
.step-copy strong, .step-copy small { display: block; }
.step-copy strong { font-size: .86rem; }
.step-copy small { overflow: hidden; color: var(--muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.transfer-body { padding: clamp(20px, 4vw, 34px); }
.source-heading, .review-card-heading, .review-header, .review-actions-heading, .validation-heading, .local-history-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.source-heading { margin-bottom: 18px; }
.source-heading h2, .review-header h2, .export-copy h2, .local-history-heading h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 2.05rem); line-height: 1.15; letter-spacing: -.025em; }
.source-heading p, .review-header p, .local-history-heading p { max-width: 680px; margin: 7px 0 0; color: var(--muted); }
.accepted-types { flex: 0 0 auto; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .7rem; text-align: right; }
.accepted-types strong { display: block; margin-bottom: 2px; color: var(--muted-strong); }
.formats-ready { display: flex; flex: 0 0 auto; gap: 8px; align-items: center; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .68rem; text-align: right; }
.formats-ready small, .formats-ready strong { display: block; }
.formats-ready strong { color: var(--muted-strong); }
.check-mark { color: var(--mint); font-size: 1rem; }
.file-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.dropzone { display: grid; min-height: 210px; place-items: center; padding: 28px; border: 1.5px dashed #49666b; border-radius: var(--radius); background: rgba(4, 9, 10, .38); text-align: center; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.dropzone:hover, .dropzone.dragover, .dropzone.is-dragging { border-color: var(--accent); background: rgba(255, 138, 61, .055); }
.dropzone.dragover, .dropzone.is-dragging { transform: translateY(-2px); }
.dropzone-main { display: grid; justify-items: center; gap: 12px; }
.upload-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 138, 61, .12); color: var(--accent); font-size: 1.35rem; }
.file-badge { display: grid; place-items: center; min-width: 48px; height: 32px; padding: 0 8px; border: 1px solid rgba(255, 138, 61, .38); border-radius: 8px; background: rgba(255, 138, 61, .09); color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .68rem; font-weight: 850; }
.upload-arrow { color: var(--accent); font-size: 1.35rem; }
.dropzone-copy strong, .dropzone-copy span { display: block; }
.dropzone-copy strong { font-size: 1.04rem; }
.dropzone-copy span { color: var(--muted); font-size: .88rem; }
.dropzone-meta { display: flex; justify-content: center; gap: 8px; color: var(--muted); font-size: .72rem; }
.meta-dot { color: var(--line-strong); }
.import-status { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(116, 205, 224, .06); }
.analysis-status { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; margin-top: 14px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(116, 205, 224, .06); }
.analysis-status strong, .analysis-status small { display: block; }
.analysis-status small { color: var(--muted); }
.activity-indicator { width: 16px; height: 16px; margin-top: 3px; border: 2px solid var(--line-strong); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
.analysis-status[data-kind="success"] .activity-indicator { border: 0; color: var(--success); animation: none; }
.analysis-status[data-kind="success"] .activity-indicator::before { content: "✓"; }
.analysis-status[data-kind="error"] { border-color: rgba(255, 131, 122, .4); background: rgba(255, 131, 122, .06); }
.analysis-status[data-kind="error"] .activity-indicator { border: 0; color: var(--danger); animation: none; }
.analysis-status[data-kind="error"] .activity-indicator::before { content: "!"; font-weight: 900; }
.import-status-indicator { width: 16px; height: 16px; margin-top: 3px; border: 2px solid var(--line-strong); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
.import-status[data-kind="success"] .import-status-indicator { border: 0; color: var(--success); animation: none; }
.import-status[data-kind="success"] .import-status-indicator::before { content: "✓"; }
.import-status[data-kind="error"] { border-color: rgba(255, 131, 122, .4); background: rgba(255, 131, 122, .06); }
.import-status[data-kind="error"] .import-status-indicator { border: 0; color: var(--danger); animation: none; }
.import-status[data-kind="error"] .import-status-indicator::before { content: "!"; font-weight: 900; }
.import-status strong, .import-status span { display: block; }
.import-status span { color: var(--muted); font-size: .82rem; }
@keyframes spin { to { transform: rotate(360deg); } }
.fixture-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 14px; }
.fixture-copy { margin: 0; color: var(--muted); font-size: .78rem; }
.fixture-row > span { color: var(--muted); font-size: .78rem; }
.fixture-row > button { min-height: 44px; padding: 7px 3px; border: 0; background: transparent; color: var(--cyan); font-weight: 750; }
.text-button { min-height: 44px; padding: 7px 3px; border: 0; background: transparent; color: var(--cyan); font-weight: 750; text-decoration: underline; text-underline-offset: 4px; }
.helper-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin-top: 18px; color: var(--muted); font-size: .78rem; }
.helper-row p { margin: 0; }
.helper-icon { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--cyan); font-size: .68rem; }
.workflow-note { padding: 22px; box-shadow: none; }
.handoff-note { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(145deg, rgba(18, 32, 35, .96), rgba(10, 20, 22, .96)); }
.handoff-note h2 { margin: 4px 0 10px; font-size: 1.08rem; }
.principles { display: grid; gap: 15px; margin: 18px 0; padding: 0; list-style: none; }
.principles li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--muted); font-size: .81rem; }
.principles li > span:first-child { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--panel-soft); color: var(--mint); font-size: .7rem; font-weight: 800; }
.principles strong, .principles small { display: block; }
.principles strong { color: var(--text); }
.aside-link { font-size: .8rem; font-weight: 750; }
.workflow-note h2 { margin: 4px 0 10px; font-size: 1.08rem; }
.workflow-note ol { display: grid; gap: 15px; margin: 18px 0 0; padding: 0; list-style: none; }
.workflow-note li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; color: var(--muted); font-size: .81rem; }
.workflow-note li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--panel-soft); color: var(--mint); font-size: .7rem; font-weight: 800; }
.workflow-note strong { display: block; color: var(--text); }

.review-panel { scroll-margin-top: 86px; }
.review-header { margin-bottom: 20px; }
.review-header .text-button { flex: 0 0 auto; }
.review-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.summary-stat { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.summary-stat strong { display: block; font-size: 1.35rem; }
.summary-stat span { color: var(--muted); font-size: .74rem; }
.summary-item { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.summary-value, .summary-label { display: block; }
.summary-value { overflow-wrap: anywhere; font-size: 1.2rem; font-weight: 850; }
.summary-label { color: var(--muted); font-size: .72rem; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.review-main-column { display: grid; gap: 16px; min-width: 0; }
.review-card { overflow: hidden; box-shadow: none; }
.review-card-heading { padding: 20px 22px 14px; }
.review-card-heading h3, .review-actions h3, .validation-card h3 { margin: 0; font-size: 1.1rem; }
.preview-caption { color: var(--muted); font-size: .7rem; text-align: right; }
.source-files-list { display: grid; gap: 1px; padding: 0 22px 20px; }
.source-file-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .82rem; }
.source-file-row span { color: var(--muted); }
.source-file-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.source-file-mark { color: var(--success); font-weight: 900; }
.source-file-item.warning .source-file-mark { color: var(--warning); }
.source-file-item.error .source-file-mark { color: var(--danger); }
.source-file-copy strong, .source-file-copy small { display: block; }
.source-file-copy small { color: var(--muted); }
.source-file-status { color: var(--muted); font-size: .72rem; }
.review-disclosure > summary, .validation-details > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 14px 20px; cursor: pointer; font-weight: 800; list-style: none; }
.review-disclosure > summary > span:first-child > span, .review-disclosure > summary > span:first-child > strong, .review-disclosure > summary > span:first-child > small { display: block; }
.review-disclosure > summary > span:first-child > small { color: var(--muted); font-size: .7rem; font-weight: 500; }
.review-disclosure > summary::-webkit-details-marker, .validation-details > summary::-webkit-details-marker { display: none; }
.review-disclosure > summary::after, .validation-details > summary::after { content: "+"; color: var(--cyan); font-size: 1.25rem; }
.review-disclosure[open] > summary::after, .validation-details[open] > summary::after { content: "−"; }
.mapping-confidence { margin-left: auto; margin-right: 14px; color: var(--muted); font-size: .72rem; font-weight: 600; }
.disclosure-body { border-top: 1px solid var(--line); }
.mapping-table-wrap, .preview-table-wrap, .runway-table-wrap { max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .67rem; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
td { font-size: .8rem; }
.mapping-table { min-width: 600px; }
.preview-table { min-width: 820px; }
.mapping-table select { min-width: 160px; }
.mapping-source-list { display: grid; gap: 8px; }
.mapping-source { display: grid; grid-template-columns: minmax(100px, .6fr) minmax(160px, 1fr); gap: 10px; align-items: center; }
.mapping-source > span, .mapping-empty, .output-label { color: var(--muted); font-size: .72rem; }
.field-name { font-weight: 750; }
.required-mark { margin-left: 3px; color: var(--danger); }
input, select, textarea { width: 100%; min-height: 44px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: #081315; }
input:hover, select:hover, textarea:hover { border-color: #587178; }
input[aria-invalid="true"], select[aria-invalid="true"], .repair-editor[aria-invalid="true"] { border-color: var(--danger); background: rgba(255, 131, 122, .06); }
.preview-cell-input[aria-invalid="true"] { border-color: #087fce; background: rgba(0, 132, 218, .10); box-shadow: 0 0 0 2px rgba(0, 132, 218, .18); }
.preview-cell-editor small { display: block; }
.repair-editor { min-width: 110px; }
.preview-cell-input { min-width: 120px; }
.preview-cell-input[type="date"] { color-scheme: dark; }
.preview-cell-editor { display: grid; gap: 4px; }
.preview-cell-editor small { color: var(--danger); font-size: .65rem; }
.preview-cell-needs-repair, .preview-row-needs-repair { background: rgba(255, 131, 122, .035); }
.preview-cell-needs-repair { background: rgba(0, 132, 218, .055); }
.required-missing { color: var(--danger); }
.preview-guidance { margin: 0; padding: 0 22px 14px; color: var(--warning); font-size: .78rem; }
.review-actions { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.review-action-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.role-select-label, .format-select-label { color: var(--muted-strong); font-size: .76rem; font-weight: 750; }
.role-select-label select, .format-select-label select { margin-top: 6px; }
.review-confirmation { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; margin-top: 16px; color: var(--muted-strong); font-size: .82rem; }
.review-confirmation input { width: 20px; min-height: 20px; margin: 2px 0 0; accent-color: var(--accent); }
.preference-note { margin: 9px 0 0; color: var(--muted); font-size: .72rem; }
.review-actions .primary-action { margin-top: 17px; }
.primary-action, .secondary-action, .primary-page-button, .secondary-page-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 16px; border-radius: 9px; font-weight: 800; text-decoration: none; }
.primary-action, .primary-page-button { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); }
.primary-action:hover, .primary-page-button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.secondary-action, .secondary-page-button { border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); }
.secondary-action:hover, .secondary-page-button:hover { border-color: var(--cyan); color: var(--text); }
.validation-column { position: sticky; top: 82px; }
.validation-card { padding: 20px; box-shadow: none; }
.validation-heading { justify-content: flex-start; align-items: center; gap: 11px; }
.validation-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: rgba(112, 216, 189, .1); color: var(--success); font-weight: 900; }
.validation-card.invalid .validation-icon { background: rgba(255, 131, 122, .1); color: var(--danger); }
.validation-card.has-errors .validation-icon { background: rgba(255, 131, 122, .1); color: var(--danger); }
.validation-card.warning .validation-icon { background: rgba(244, 195, 106, .1); color: var(--warning); }
.validation-copy { color: var(--muted); font-size: .82rem; }
.validation-action { width: 100%; margin-bottom: 12px; }
.validation-details { border-top: 1px solid var(--line); }
.validation-details > summary { padding: 12px 0; font-size: .78rem; }
.validation-list { display: grid; gap: 8px; padding-top: 5px; }
.validation-item { padding: 9px 10px; border-radius: 8px; background: rgba(255, 255, 255, .035); color: var(--muted); font-size: .76rem; }
.validation-item.error { color: #ffc1bc; }
.validation-item.warning { color: #f8dca8; }
.export-panel { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-top: 20px; padding: 22px; border-color: rgba(112, 216, 189, .4); }
.export-ready-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: rgba(112, 216, 189, .12); color: var(--success); font-size: 1.3rem; font-weight: 900; }
.export-copy p { margin: 6px 0 0; color: var(--muted); }
.local-history { margin-top: 36px; padding: clamp(20px, 3vw, 28px); box-shadow: none; scroll-margin-top: 86px; }
.local-history-heading { align-items: center; }
.local-history-list { display: grid; gap: 10px; margin-top: 20px; }
.local-history-empty { margin: 0; padding: 24px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; }
.local-history-empty h3 { margin: 0 0 5px; color: var(--text); }
.local-history-empty p { margin: 0 0 12px; }
.history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line); }
.history-row:first-child { border-top: 0; }
.history-row p { margin: 0; color: var(--muted); font-size: .77rem; }
.local-history-entry { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.local-history-entry:first-child { border-top: 0; }
.local-history-entry strong, .local-history-entry small { display: block; }
.local-history-entry small { color: var(--muted); font-size: .72rem; }
.local-history-entry code { color: var(--muted-strong); font-size: .72rem; }
.privacy-card { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); font-size: .73rem; }
.privacy-card p { margin: 0; }
.privacy-card strong { color: var(--muted-strong); }
.review-card,
.validation-card,
.export-panel { max-width: 100%; }
.site-footer, .page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .72rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.main-content > .page-footer { width: min(100%, calc(var(--content) + clamp(44px, 8vw, 108px))); margin: 18px auto 0; padding: 22px clamp(22px, 4vw, 54px) 30px; }
.page-footer nav { display: flex; flex-wrap: wrap; gap: 14px; }
.airport-suggestions { position: fixed; z-index: 200; max-height: 344px; padding: 6px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--panel-raised); box-shadow: var(--shadow); }
.airport-suggestion { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 9px; padding: 10px; border-radius: 8px; cursor: pointer; }
.airport-suggestion:hover, .airport-suggestion.is-active { background: var(--panel-soft); }
.airport-suggestion-code { color: var(--mint); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-weight: 850; }
.airport-suggestion-copy strong, .airport-suggestion-copy small { display: block; }
.airport-suggestion-copy small { color: var(--muted); }
.mobile-nav-toggle, .mobile-nav-backdrop { display: none; }

@media (max-width: 1120px) {
  :root { --sidebar: 218px; }
  .transfer-layout { grid-template-columns: 1fr; }
  .workflow-note { display: grid; grid-template-columns: .7fr 1.3fr; gap: 18px; }
  .workflow-note ol { grid-template-columns: repeat(3, 1fr); margin: 0; }
  .review-grid { grid-template-columns: minmax(0, 1fr) 270px; }
}

@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: sticky; z-index: 80; display: flex; flex-direction: row; align-items: center; width: 100%; height: 68px; padding: 9px 16px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { width: 118px; min-height: 44px; margin: 0 auto 0 0; }
  .brand-logo { width: 118px; }
  .mobile-nav-drawer { position: fixed; z-index: 85; top: 68px; left: 0; bottom: 0; display: block; width: min(320px, calc(100vw - 48px)); padding: 18px 14px; overflow-y: auto; visibility: hidden; background: var(--bg-deep); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .18s ease, visibility .18s ease; }
  .mobile-nav-open .mobile-nav-drawer { visibility: visible; transform: translateX(0); }
  .mobile-nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; margin-right: 8px; padding: 0; border: 1px solid #a4efc2; border-radius: 9px; background: var(--panel); }
  .mobile-nav-toggle-icon { display: grid; gap: 4px; }
  .mobile-nav-toggle-icon span { display: block; width: 18px; height: 2px; background: #a4efc2; }
  .mobile-nav-backdrop { position: fixed; z-index: 75; inset: 68px 0 0; display: block; border: 0; background: rgba(0, 0, 0, .62); opacity: 0; transition: opacity .18s ease; }
  .mobile-nav-open .mobile-nav-backdrop { opacity: 1; }
  .sidebar-lower { margin: 0; padding: 0; }
  .privacy-note { display: none; }
  .pilot-chip { width: 44px; min-height: 44px; padding: 4px; border: 0; background: transparent; }
  .pilot-avatar { width: 36px; height: 36px; }
  .pilot-details, .pilot-chip .online-dot { display: none; }
  .topbar { top: 68px; padding: 10px 20px; }
  .review-grid { grid-template-columns: 1fr; }
  .validation-column { position: static; }
}

@media (max-width: 720px) {
  .workspace, .workspace-content, .page-content { padding: 30px 16px 26px; }
  .topbar { min-height: 54px; padding-inline: 16px; }
  .system-status, .context-status, .auth-status-pill { display: none; }
  .hero { grid-template-columns: 1fr; gap: 22px; margin-bottom: 26px; }
  .hero h1, .page-intro h1 { font-size: clamp(2.25rem, 12vw, 3.75rem); }
  .trust-list { grid-template-columns: 1fr; }
  .hero-copy .trust-list { grid-template-columns: 1fr; }
  .workflow-note { display: block; }
  .workflow-note ol { display: grid; grid-template-columns: 1fr; margin-top: 16px; }
  .review-summary { grid-template-columns: repeat(2, 1fr); }
  .review-header, .source-heading, .local-history-heading { display: block; }
  .accepted-types { margin-top: 12px; text-align: left; }
  .dropzone { min-height: 188px; padding: 22px 16px; }
  .helper-row { grid-template-columns: 22px 1fr; }
  .helper-row a { grid-column: 2; }
  .fixture-row { align-items: flex-start; flex-direction: column; }
  .review-action-fields { grid-template-columns: 1fr; }
  .preview-table-wrap { overflow: visible; padding: 0 12px 12px; }
  .preview-table { display: block; min-width: 0; }
  .preview-table thead { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .preview-table tbody { display: grid; gap: 9px; }
  .preview-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-soft); }
  .preview-table tbody td { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 7px; align-items: start; min-width: 0; padding: 10px 9px; border-bottom: 1px solid var(--line); font-size: .76rem; overflow-wrap: anywhere; }
  .preview-table tbody td::before { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .62rem; letter-spacing: .04em; text-transform: uppercase; }
  .preview-table tbody td:nth-child(1)::before { content: "Date"; }
  .preview-table tbody td:nth-child(2)::before { content: "Flight"; }
  .preview-table tbody td:nth-child(3)::before { content: "Aircraft"; }
  .preview-table tbody td:nth-child(4)::before { content: "From"; }
  .preview-table tbody td:nth-child(5)::before { content: "To"; }
  .preview-table tbody td:nth-child(6)::before { content: "Out → In"; }
  .preview-table tbody td:nth-child(7)::before { content: "Total"; }
  .preview-table tbody td:nth-child(1), .preview-table tbody td:nth-child(4), .preview-table tbody td:nth-child(5) { grid-column: 1 / -1; }
  .preview-table tbody td:nth-child(6), .preview-table tbody td:nth-child(7) { border-bottom: 0; }
  .preview-cell-editor, .preview-cell-input { width: 100%; min-width: 0; max-width: 100%; }
  .preview-cell-editor small { overflow-wrap: anywhere; }
  .export-panel { grid-template-columns: 44px 1fr; }
  .export-panel .primary-action { grid-column: 1 / -1; width: 100%; }
  .site-footer, .page-footer { flex-direction: column; }
  .local-history-entry { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .step { gap: 6px; padding: 13px 10px; }
  .step-number { width: 26px; height: 26px; }
  .step-copy small { display: none; }
  .transfer-body { padding: 18px 14px; }
  .review-summary { grid-template-columns: 1fr 1fr; }
  .review-card-heading { padding-inline: 16px; }
  .source-files-list { padding-inline: 16px; }
  .review-actions { padding: 18px 16px; }
  .dropzone-meta { display: block; }
  .meta-dot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.logspec-progress-overlay { position: fixed; inset: 0; z-index: 20000; display: grid; place-items: center; width: 100%; height: auto; max-width: none; max-height: none; margin: 0; padding: max(20px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left)); border: 0; background: rgba(11, 29, 48, .56); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.logspec-progress-overlay::backdrop { background: transparent; }
dialog.logspec-progress-overlay:not([open]) { display: none; }
.progress-overlay-card { width: min(100%, 440px); padding: 30px 28px 26px; border: 1px solid #d8e4ef; border-radius: 12px; background: #fff; color: #142644; box-shadow: 0 24px 80px rgba(4, 25, 48, .32); text-align: center; outline: none; }
.progress-overlay-mark { width: 40px; height: 40px; margin: 0 auto 16px; border: 3px solid #d8eaf8; border-top-color: #087fce; border-radius: 50%; animation: logspec-progress-spin .9s linear infinite; }
.progress-overlay-mark span { display: block; width: 6px; height: 6px; margin: 6px; border-radius: 50%; background: #087fce; }
.progress-overlay-kicker { margin: 0 0 7px; color: #50708d; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.progress-overlay-card h2 { margin: 0; color: #132447; font-size: 21px; line-height: 1.3; }
.progress-overlay-detail { min-height: 42px; margin: 9px 0 19px; color: #5c718d; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.progress-overlay-track { position: relative; height: 7px; overflow: hidden; border-radius: 20px; background: #e8f0f6; }
.progress-overlay-track span { display: block; width: 100%; height: 100%; border-radius: inherit; background: #0784d8; transform: scaleX(0); transform-origin: left center; transition: transform .22s ease; }
.progress-overlay-track:not(.is-determinate) span { width: 34%; transform: none; animation: logspec-progress-sweep 1.15s ease-in-out infinite alternate; }
.progress-overlay-eta { margin: 12px 0 0; color: #087fce; font-size: 13px; font-weight: 600; }
@keyframes logspec-progress-spin { to { transform: rotate(360deg); } }
@keyframes logspec-progress-sweep { from { transform: translateX(-15%); } to { transform: translateX(210%); } }
@media(max-width:480px) { .progress-overlay-card { padding: 26px 20px 22px; border-radius: 10px; } .progress-overlay-card h2 { font-size: 19px; } }
@media(prefers-reduced-motion:reduce) { .progress-overlay-mark,.progress-overlay-track:not(.is-determinate) span { animation:none; } .progress-overlay-track:not(.is-determinate) span { transform:translateX(95%); } }
