/* Compact workspace: neutral surfaces, orange actions, semantic amounts. */
:root {
  color-scheme: dark;
  --bg: #0d0e10; --white: #17191d; --surface: #1d2025; --surface-hover: #23262c;
  --navy: #111215; --navy-soft: #1c1e23; --ink: #f1f2f4; --muted: #a2a7b1;
  --line: #30333b; --border: var(--line); --accent: #ff9d45; --accent-hover: #ffb66e; --accent-soft: #33271d;
  --green: #75d5ac; --green-dark: #57bc92; --green-light: #1b3028;
  --amber: #ffc078; --amber-light: #35291d; --red: #ff929a; --red-light: #382126;
  --blue: #9cbfff; --blue-light: #222e42; --shadow: 0 2px 8px #00000012; --radius: 10px;
  font-family: Inter, "Segoe UI", Arial, sans-serif; color: var(--ink); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 13px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: #ff9d4540; color: #fff; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: 25px; line-height: 1.2; letter-spacing: -.7px; margin-bottom: 6px; font-weight: 650; }
h2 { font-size: 16px; letter-spacing: -.25px; font-weight: 650; }
h3 { font-size: 13px; font-weight: 650; }
p { margin-bottom: 10px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.mono, .money { font-variant-numeric: tabular-nums; }
.money { white-space: nowrap; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; background: var(--accent); color: #1d140c; padding: 10px 16px; border-radius: 6px; font-weight: 650; }
.skip-link:focus { top: 10px; }
.eyebrow { display: block; color: var(--accent); font-size: 10px; font-weight: 650; letter-spacing: 1.2px; margin-bottom: 10px; }
.eyebrow.light { color: var(--accent); }
.brand { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.6px; line-height: 1.2; }
.brand::before { content: ""; width: 7px; height: 22px; border-radius: 2px; background: var(--accent); }
.brand:hover { text-decoration: none; }
.app-layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { width: 208px; position: fixed; inset: 0 auto 0 0; background: var(--navy); border-right: 1px solid var(--line); color: var(--muted); padding: 25px 15px 0; display: flex; flex-direction: column; z-index: 30; overflow-y: auto; }
.workspace-card { margin: 28px 0 20px; padding: 10px 11px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; }
.sidebar-label { font-size: 10px; letter-spacing: .8px; color: var(--muted); font-weight: 550; }
.workspace-card select { width: 100%; margin: 4px 0 0; padding: 0 16px 0 0; border: 0; background: transparent; color: var(--ink); font-size: 13px; font-weight: 600; box-shadow: none; min-height: 25px; }
.workspace-card select:disabled { opacity: 1; }
.workspace-card select option { background: var(--surface); color: var(--ink); }
.workspace-role { font-size: 11px; color: var(--muted); }
.main-nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); text-align: left; border-radius: 6px; padding: 9px 10px; font-size: 12px; font-weight: 550; white-space: nowrap; min-height: 38px; }
.nav-item:hover { background: var(--surface); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); border-color: #654122; color: var(--accent); }
.nav-icon { width: 18px; text-align: center; font-size: 20px; line-height: 18px; font-weight: 400; }
.nav-count { margin-left: auto; background: var(--accent); color: #23180e; font-size: 10px; min-width: 19px; padding: 1px 5px; border-radius: 4px; font-weight: 750; }
.nav-section-label { display: block; margin: 22px 11px 8px; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.status-dot { display: inline-block; background: var(--green); width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.profile { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 16px 0; }
.profile > div { min-width: 0; }
.profile strong { font-size: 11px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.profile span:not(.avatar) { font-size: 10px; color: var(--muted); }
.profile form { margin-left: auto; flex-shrink: 0; }
.avatar { display: grid; place-items: center; width: 29px; height: 29px; border: 1px solid #4f3d2c; background: var(--accent-soft); border-radius: 7px; font-size: 10px; font-weight: 650; color: var(--accent); flex-shrink: 0; }
.logout-button { background: transparent; color: var(--muted); border: 0; border-radius: 5px; font-size: 19px; padding: 5px; }
.logout-button:hover { color: var(--accent); background: var(--surface); }
.main-layout { margin-left: 208px; min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { height: 56px; flex-shrink: 0; background: var(--navy); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 26px; gap: 12px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 11px; }
.breadcrumb { font-size: 11px; color: var(--muted); }
.breadcrumb span { margin: 0 8px; color: #666d78; }
.breadcrumb strong { font-weight: 550; color: var(--ink); }
.sync-label { font-size: 10px; color: var(--muted); }
.icon-button { border: 1px solid var(--line); background: var(--white); color: var(--muted); border-radius: 6px; height: 30px; min-width: 30px; padding: 0 7px; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.icon-button:hover { background: var(--surface-hover); color: var(--ink); }
.mobile-only { display: none; }
main#main-content { padding: 24px 26px 32px; flex: 1; outline: none; max-width: 1640px; width: 100%; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-heading h1 { margin: 0 0 5px; }
.page-heading p { font-size: 11px; color: var(--muted); margin: 0; }
.page-heading p:empty { display: none; }
.heading-actions, .button-row { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.button { min-height: 35px; padding: 8px 12px; border: 1px solid #636b78; background: var(--surface); color: var(--ink); border-radius: 6px; font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1.35; text-decoration: none; }
.button:hover { background: var(--surface-hover); border-color: #626873; text-decoration: none; }
.button.primary { color: #23170d; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.danger { background: var(--red-light); color: var(--red); border-color: #69404a; }
.button.danger:hover { background: #4c2a32; }
.button.small { padding: 6px 9px; min-height: 29px; font-size: 10px; }
.button.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.button.ghost:hover { background: var(--accent-soft); }
.button.full { width: 100%; }
.button .plus { font-size: 17px; line-height: 10px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; min-width: 0; }
.card-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.card-header h2, .card-header h3 { margin: 0; }
.card-header p { font-size: 11px; color: var(--muted); margin: 3px 0 0; }
.card-header p:empty { display: none; }
.card-body { padding: 17px; }
.card-footer { border-top: 1px solid var(--line); padding: 11px 17px; font-size: 10px; color: var(--muted); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metrics-grid { display: grid; grid-template-columns: repeat(var(--metric-columns,4),minmax(0,1fr)); gap: 12px; margin-bottom: 16px; }
.metric { padding: 16px 17px; position: relative; }
.metric-label { font-size: 11px; color: var(--muted); font-weight: 550; }
.metric-value { font-size: clamp(22px,2.2vw,30px); letter-spacing: -.8px; font-weight: 650; margin: 10px 0 5px; line-height: 1.2; }
.metric-note { font-size: 10px; color: var(--muted); margin: 0; }
.metric-note:empty { display: none; }
.metric.primary-metric { background: #231d17; border-color: #76512d; box-shadow: inset 3px 0 0 var(--accent); }
.primary-metric .metric-value { color: var(--accent); }
.primary-metric .metric-label { color: #e4ccb6; }
.metric-decoration { display: none; }
.two-columns { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(280px,1fr); gap: 16px; margin-bottom: 16px; }
.equal-columns { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 16px; margin-bottom: 16px; }
.section-gap { margin-top: 16px; }
.reconciliation-lines { display: grid; gap: 0; }
.reconciliation-line { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; gap: 12px; color: var(--muted); font-size: 12px; }
.reconciliation-line strong { font-size: 12px; color: var(--ink); font-weight: 550; }
.reconciliation-line.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; color: var(--ink); font-weight: 600; }
.reconciliation-line.total strong { font-size: 21px; color: var(--accent); font-weight: 650; }
.line-sign { display: inline-block; width: 16px; color: var(--muted); }
.formula-tag { padding: 7px 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); font-size: 10px; color: var(--muted); display: inline-block; margin-top: 10px; }
.overview-action { padding: 12px; border: 1px solid var(--line); border-radius: 7px; display: flex; gap: 11px; margin-bottom: 10px; align-items: flex-start; }
.action-symbol { width: 29px; height: 29px; background: var(--accent-soft); color: var(--accent); border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; font-size: 18px; }
.overview-action h3 { font-size: 12px; margin: 0 0 3px; }
.overview-action p { font-size: 11px; color: var(--muted); margin: 0; }
.overview-action .button { margin-top: 6px; margin-left: -9px; }
.account-preview { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.account-preview:first-child { padding-top: 0; }
.account-preview:last-child { border: 0; padding-bottom: 0; }
.account-preview strong { font-size: 11px; font-weight: 550; }
.account-preview small { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; }
.account-preview .money { font-size: 12px; }
.bank-initial { display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; min-width: 29px; height: 29px; color: var(--accent); font-size: 11px; font-weight: 650; }
.account-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.table-wrap { width: 100%; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #555b65 transparent; }
.data-table { border-collapse: collapse; width: 100%; font-size: 12px; text-align: left; }
.data-table th { padding: 10px 14px; color: var(--muted); background: var(--navy-soft); font-weight: 550; font-size: 10px; border-bottom: 1px solid var(--line); text-transform: uppercase; letter-spacing: .55px; white-space: nowrap; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid #2b2e35; vertical-align: middle; color: #d5d8df; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #1c1f24; }
.data-table .entry-description { font-weight: 550; color: var(--ink); max-width: 300px; overflow-wrap: anywhere; }
.data-table .entry-sub { display: block; font-size: 10px; color: var(--muted); margin-top: 3px; font-weight: 400; }
.data-table .amount-cell { font-weight: 600; color: var(--ink); white-space: nowrap; text-align: right; }
.text-right { text-align: right !important; }
.actions-cell { white-space: nowrap; }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; align-items: flex-start; }
.badge { font-size: 10px; font-weight: 600; padding: 3px 7px; border-radius: 4px; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; background: #2a2e35; color: #c0c5cf; line-height: 1.35; }
.badge.success { background: var(--green-light); color: var(--green); }
.badge.warning { background: var(--amber-light); color: var(--amber); }
.badge.danger { background: var(--red-light); color: var(--red); }
.badge.info { background: var(--blue-light); color: var(--blue); }
.toolbar { padding: 12px 15px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.search-box { flex: 1; min-width: 210px; }
.toolbar select { width: auto; min-width: 145px; }
.toolbar input, .toolbar select { min-height: 35px; font-size: 11px; }
.result-count { font-size: 10px; color: var(--muted); margin-left: auto; white-space: nowrap; }
input, select, textarea { display: block; width: 100%; border: 1px solid #636b78; border-radius: 6px; background: #111317; color: var(--ink); min-height: 38px; padding: 8px 10px; outline: none; transition: border-color .15s; }
input::placeholder, textarea::placeholder { color: #8d95a1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 2px #ff9d451c; }
input:disabled, select:disabled, textarea:disabled { color: var(--muted); }
input[type=checkbox] { display: inline-block; appearance: auto; min-height: 0; width: 16px; height: 16px; accent-color: var(--accent); margin: 0; vertical-align: middle; }
textarea { resize: vertical; min-height: 76px; }
label { display: block; font-size: 12px; font-weight: 550; color: #d3d7de; }
label input, label select, label textarea { margin-top: 5px; font-weight: 400; }
label small, .field-help { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 5px; }
.stack { display: flex; flex-direction: column; gap: 15px; }
.form-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 13px; }
.form-grid .span-2 { grid-column: 1/-1; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 3px; flex-wrap: wrap; }
.form-actions > .section-note { margin-right: auto; align-self: center; }
.notice { font-size: 12px; padding: 11px 13px; border-radius: 7px; border: 1px solid var(--line); margin-bottom: 14px; line-height: 1.55; background: var(--surface); color: #c7cbd3; overflow-wrap: anywhere; }
.notice.warning { background: #2c241c; border-color: #655037; color: var(--amber); }
.notice.danger { background: #302024; border-color: #6d3e46; color: var(--red); }
.notice.success { background: #1d2d26; border-color: #3c624e; color: var(--green); }
.notice strong { font-weight: 650; }
.empty-state { text-align: center; padding: 30px 20px; color: var(--muted); }
.empty-state .empty-symbol { display: grid; place-items: center; width: 36px; height: 36px; background: var(--surface); color: var(--accent); border-radius: 8px; font-size: 21px; margin: 0 auto 11px; }
.empty-state h3 { font-size: 13px; color: var(--ink); margin: 0 0 5px; }
.empty-state p { font-size: 11px; max-width: 420px; margin: 0 auto 12px; }
.empty-state p:empty { display: none; }
.loading-state { text-align: center; padding: 72px 20px; color: var(--muted); }
.loading-state h2 { font-size: 16px; color: var(--ink); margin-top: 17px; }
.loading-state p { font-size: 12px; }
.spinner { display: inline-block; width: 24px; height: 24px; border: 2px solid #3f3328; border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.upload-layout { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(250px,1fr); gap: 16px; margin-bottom: 16px; }
.upload-layout > .card:only-child, .compact-upload > .card { grid-column: 1/-1; }
.compact-upload { grid-template-columns: minmax(0,1fr); }
.drop-zone { display: block; text-align: center; background: #1c1916; border: 1px dashed #79512e; border-radius: 8px; padding: 19px 16px; color: var(--ink); margin-bottom: 16px; }
.drop-zone .upload-symbol { display: block; font-size: 26px; line-height: 1; margin-bottom: 8px; color: var(--accent); }
.drop-zone strong { display: block; font-size: 13px; margin-bottom: 5px; }
.drop-zone p { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.drop-zone input { background: #141414; max-width: 430px; margin: auto; font-size: 11px; padding: 6px; min-height: 35px; }
input::file-selector-button { border: 1px solid #4e4339; border-radius: 4px; padding: 6px 9px; background: var(--accent-soft); color: var(--accent); margin-right: 10px; font-size: 11px; font-weight: 650; cursor: pointer; }
.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 10px; }
.step-number { border: 1px solid #61452d; color: var(--accent); border-radius: 6px; width: 24px; height: 24px; display: grid; place-items: center; font-size: 10px; font-weight: 650; flex-shrink: 0; }
.step h3 { font-size: 12px; margin: 1px 0 3px; }
.step p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; }
.progress-track { height: 4px; background: #34302a; border-radius: 5px; overflow: hidden; margin-top: 7px; }
.progress-track progress { display: block; width: 100%; height: 4px; accent-color: var(--accent); border: 0; }
.progress-track progress::-webkit-progress-bar { background: #34302a; }
.progress-track progress::-webkit-progress-value { background: var(--accent); }
.progress-track progress::-moz-progress-bar { background: var(--accent); }
.upload-status { font-size: 11px; color: var(--accent); margin: 8px 0 0; }
.video-meta { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; }
.video-meta div { min-width: 100px; }
.video-meta dt { font-size: 10px; color: var(--muted); margin-bottom: 4px; }
.video-meta dd { font-size: 12px; color: var(--ink); margin: 0; font-weight: 550; }
.detail-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 15px; }
.detail-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 7px; padding: 11px 13px; }
.detail-stat small { display: block; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
.detail-stat strong { font-size: 18px; font-weight: 650; }
.selection-note { min-width: 170px; min-height: 33px; font-size: 11px; padding: 6px 8px; }
.selected-row { background: #2a231b !important; }
.section-note { font-size: 11px; color: var(--muted); line-height: 1.55; }
.request-card { padding: 17px; border-bottom: 1px solid var(--line); }
.request-card:last-child { border-bottom: 0; }
.request-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.request-top h3 { font-size: 13px; margin: 0 0 4px; }
.request-details { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 10px; }
.request-note { margin: 10px 0 0; background: var(--surface); border-left: 2px solid #805832; padding: 10px 12px; color: #d2d6dd; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.decision-note { margin-top: 10px; color: #d2d6dd; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-footer { display: flex; gap: 12px; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 10px; color: var(--muted); }
.issue-card { border-bottom: 1px solid var(--line); padding: 16px 17px; display: flex; gap: 11px; align-items: flex-start; }
.issue-card:last-child { border-bottom: 0; }
.issue-card h3 { font-size: 12px; margin-bottom: 4px; }
.issue-card p { font-size: 12px; line-height: 1.55; color: var(--muted); margin-bottom: 8px; }
.issue-icon { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 6px; background: var(--amber-light); color: var(--amber); flex-shrink: 0; font-size: 12px; }
.issue-copy { min-width: 0; flex: 1; }
.audit-event { padding: 12px 17px; border-bottom: 1px solid var(--line); }
.audit-event:last-child { border-bottom: 0; }
.audit-event strong { font-size: 11px; }
.audit-event small { font-size: 10px; color: var(--muted); display: block; margin-top: 3px; }
.audit-event p { font-size: 11px; margin: 6px 0 0; color: #c4c9d2; white-space: pre-wrap; overflow-wrap: anywhere; }
.toast { position: fixed; bottom: 22px; right: 22px; z-index: 90; max-width: min(430px,calc(100vw - 32px)); padding: 12px 16px; background: #24262c; border: 1px solid #65503b; color: var(--ink); font-size: 12px; box-shadow: 0 8px 30px #0008; border-radius: 8px; }
.toast.error { background: #3b2329; border-color: #874550; color: #ffb3ba; }
dialog { width: min(600px,calc(100vw - 32px)); max-height: 90vh; max-height: 90dvh; padding: 0; border: 1px solid #454953; border-radius: 12px; box-shadow: 0 24px 100px #0009; color: var(--ink); background: var(--white); overflow-y: auto; }
dialog::backdrop { background: #000b; backdrop-filter: blur(3px); }
.dialog-header { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 12px; }
.dialog-header h2 { font-size: 17px; margin: 0; }
.dialog-header .icon-button { border: 0; font-size: 24px; }
#modal-content { padding: 18px 20px 20px; }
.inline-choice { display: flex; align-items: center; gap: 9px; }
.inline-choice input { margin: 0; flex-shrink: 0; }
.no-wrap { white-space: nowrap; }
.break-word { overflow-wrap: anywhere; }
.back-button { margin-bottom: 15px; }
.pill-tabs { display: flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: var(--navy); }
.pill-tabs button { border: 0; background: transparent; padding: 6px 10px; border-radius: 4px; font-size: 11px; color: var(--muted); }
.pill-tabs button.active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.source-details { margin: 0 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--navy); }
.source-details summary { padding: 9px 11px; cursor: pointer; font-size: 11px; color: var(--muted); font-weight: 550; line-height: 1.5; }
.source-details summary:hover { color: var(--accent); }
.source-details pre { margin: 0; padding: 11px; border-top: 1px solid var(--line); max-height: 240px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; font-size: 10px; line-height: 1.55; color: #b6bdc8; font-family: "Cascadia Code", Consolas, monospace; }
.source-details.section-gap { margin-top: 12px; }
.source-details > .detail-stats { margin: 0; padding: 0 11px 11px; }
.analysis-details { margin-top: 14px; }
.analysis-details > .detail-analysis-progress { margin: 0 11px 11px; }
.account-history-note { padding: 10px 17px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.55; }
.frame-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
.frame-preview { display: block; min-width: 0; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--surface); }
.frame-preview:hover { border-color: var(--accent); text-decoration: none; }
.frame-preview img { display: block; width: 100%; height: 160px; object-fit: contain; background: #0b0c0e; }
.frame-preview span { display: block; font-size: 10px; text-align: center; padding: 7px; color: var(--accent); }
.upload-batch { margin-bottom: 16px; }
.batch-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; }
.batch-summary strong { font-weight: 600; }
.batch-total-track { margin-top: 10px; height: 5px; }
.batch-total-track progress { height: 5px; }
.upload-file-list { margin: 14px 0; max-height: 370px; overflow-y: auto; border: 1px solid var(--line); border-radius: 7px; }
.upload-file { padding: 11px 13px; border-bottom: 1px solid var(--line); }
.upload-file:last-child { border: 0; }
.upload-file-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.upload-file-name { font-size: 12px; font-weight: 550; overflow-wrap: anywhere; min-width: 0; }
.upload-file-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; margin-top: 6px; }
.upload-file-message { font-size: 10px; color: var(--muted); line-height: 1.5; margin: 7px 0 0; }
.upload-file-message.negative { color: var(--red); }
.video-progress { min-width: 190px; display: grid; gap: 8px; }
.progress-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); }
.progress-caption strong { font-weight: 500; color: #d2d7df; font-variant-numeric: tabular-nums; white-space: nowrap; }
.video-progress .progress-track { margin-top: 4px; }
.progress-subnote { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.detail-analysis-progress { padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: var(--navy); }
.detail-analysis-progress .video-progress { grid-template-columns: 1fr 1fr; gap: 17px; min-width: 0; }
.detail-analysis-progress .progress-caption { font-size: 11px; }
.detail-analysis-progress .review-progress { grid-column: 1/-1; }
.bank-dates { display: grid; gap: 3px; margin: 0; font-size: 10px; min-width: 155px; }
.bank-dates div { display: flex; gap: 10px; justify-content: space-between; }
.bank-dates dt { color: var(--muted); font-weight: 400; }
.bank-dates dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-description .bank-dates { margin-top: 8px; font-weight: 400; }
.file-delete-action { display: grid; justify-items: start; gap: 4px; }
.file-delete-reason { max-width: 180px; white-space: normal; line-height: 1.5; }
.table-actions .file-delete-action .button { min-height: 29px; }
.comparison-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.comparison-columns > section { min-width: 0; }
.comparison-row { border-top: 1px solid var(--line); padding: 16px 17px; }
.comparison-row-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.comparison-fields { margin: 0; display: grid; gap: 5px; }
.comparison-fields > div { display: grid; grid-template-columns: 90px minmax(0,1fr); gap: 9px; padding: 5px 7px; border-radius: 4px; }
.comparison-fields dt { color: var(--muted); font-size: 11px; }
.comparison-fields dd { margin: 0; overflow-wrap: anywhere; font-size: 12px; }
.comparison-fields .changed-field { background: #382b1e; box-shadow: inset 2px 0 0 var(--accent); }
.comparison-empty { padding: 16px; border: 1px dashed #4f5661; border-radius: 6px; color: var(--muted); }
.comparison-counts { display: flex; gap: 8px; flex-wrap: wrap; }
.comparison-unchanged > summary { cursor: pointer; padding: 14px 17px; border-top: 1px solid var(--line); }
.login-page { background: var(--bg); }
.login-simple { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 22px; }
.login-simple-card { width: 100%; max-width: 340px; }
.login-simple-card .stack { gap: 20px; }
.login-simple-card label { font-size: 12px; color: #d5d8df; }
.login-simple-card input { min-height: 46px; font-size: 16px; padding: 10px 12px; background: var(--white); }
.login-simple-card .button { min-height: 44px; justify-content: center; font-size: 13px; margin-top: 2px; }
.login-simple-card .notice { margin-bottom: 20px; }
@media (min-width: 1550px) {
  main#main-content { padding: 28px 34px 36px; }
  .topbar { padding: 0 34px; }
}
@media (max-width: 1190px) {
  .sidebar { width: 192px; padding: 23px 12px 0; }
  .main-layout { margin-left: 192px; }
  main#main-content { padding: 22px 20px 28px; }
  .topbar { padding: 0 20px; }
  .metrics-grid { gap: 10px; }
  .metric { padding: 14px; }
  .two-columns { grid-template-columns: minmax(0,1.25fr) minmax(250px,1fr); gap: 14px; }
  .data-table th, .data-table td { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 960px) {
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .two-columns, .equal-columns, .upload-layout { grid-template-columns: 1fr; }
  .page-heading { align-items: flex-start; }
  .heading-actions { justify-content: flex-end; }
  .metric-value { font-size: 26px; }
}
@media (max-width: 720px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 224px; box-shadow: 12px 0 45px #0009; }
  .sidebar.open { transform: translateX(0); }
  .main-layout { margin-left: 0; }
  .mobile-only { display: inline-flex; }
  .topbar { height: 54px; padding: 0 15px; }
  .sync-label { display: none; }
  .breadcrumb { font-size: 11px; }
  .breadcrumb span { margin: 0 5px; }
  main#main-content { padding: 20px 14px 28px; }
  .page-heading { display: block; margin-bottom: 16px; }
  .page-heading h1 { font-size: 24px; }
  .heading-actions { justify-content: flex-start; margin-top: 12px; }
  .metrics-grid { gap: 9px; margin-bottom: 14px; }
  .metric { padding: 13px; }
  .metric-value { font-size: 23px; }
  .metric-note, .metric-label { font-size: 10px; }
  .two-columns, .equal-columns, .upload-layout { gap: 14px; margin-bottom: 14px; }
  .card-header, .card-body { padding: 14px; }
  .card-header h2 { font-size: 15px; }
  .card-header { flex-wrap: wrap; }
  .toolbar { padding: 11px; gap: 7px; }
  .toolbar .search-box { min-width: 100%; width: 100%; }
  .toolbar select { flex: 1; min-width: 120px; }
  .result-count { margin-left: 0; width: 100%; }
  .data-table { font-size: 11px; }
  .data-table .entry-description { min-width: 145px; max-width: 230px; }
  .button { min-height: 38px; }
  .button.small { min-height: 33px; }
  .icon-button { min-width: 36px; height: 36px; }
  .nav-item { min-height: 42px; }
  .form-grid { gap: 12px; }
  .detail-stats { gap: 7px; }
  .detail-stat { padding: 10px; }
  .detail-stat strong { font-size: 17px; }
  .video-meta { gap: 14px; }
  .request-top { gap: 10px; }
  .request-card, .comparison-row { padding: 14px; }
  .request-footer { flex-wrap: wrap; }
  .toast { right: 16px; bottom: 16px; }
  #modal-content { padding: 16px; }
  .dialog-header { padding: 14px 16px; }
  .card-footer { padding: 10px 14px; flex-wrap: wrap; }
  .comparison-columns { grid-template-columns: 1fr; }
  .comparison-columns > section + section { border-top: 1px dashed #4f5661; padding-top: 12px; }
  .comparison-fields > div { grid-template-columns: 80px minmax(0,1fr); }
}
@media (max-width: 520px) {
  .form-grid { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px; }
  .toolbar input, .toolbar select { font-size: 14px; }
  .detail-analysis-progress .video-progress { grid-template-columns: 1fr; gap: 12px; }
  .upload-file { padding: 10px; }
  .upload-file-heading { gap: 8px; }
  .upload-file-name { font-size: 11px; }
  .login-simple { padding: 24px; }
  .upload-batch { margin-bottom: 14px; }
  .frame-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-stat small { overflow-wrap: anywhere; }
  .metric-value { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.analysis-doubt-dot{display:inline-block;width:8px;height:8px;margin-left:7px;border-radius:50%;background:#ff9d3b;box-shadow:0 0 0 1px #181a1d;vertical-align:middle;flex-shrink:0}
