:root {
    color-scheme: light;
    --primary: #1f5fbf;
    --scrollbar-thumb: #b6cae5;
    --scrollbar-hover: #9eb8db;
    --primary-hover: #1c56ac;
    --primary-ink: #1f5fbf;
    --primary-soft: #eaf2ff;
    --ink: #1f2937;
    --muted: #4b5563;
    --line: #dfe4eb;
    --bg: #f5f7fa;
    --danger: #c83e3e;
    --green: #218a5a;
    --surface: #fff;
    --surface-soft: #f8fafc;
    --hover-surface: #f1f4f8;
    --row-alt: #fafbfc;
    --control-border: #dfe4eb;
    --selection-bg: #f2f3f5;
    --primary-button-text: #fff;
    --brand: #123b7a;
    --nav-text: #1f2937;
    --nav-heading: #1f2937;
    --nav-active-ink: #1f5fbf;
    --shadow: 0 7px 22px rgba(31, 41, 55, .055);
    --save-bg: #1f5fbf;
    --edit-bg: #eaf2fc;
    --edit-line: #bfd3ef;
    --edit-ink: #285f9c;
    --edit-hover: #dfeafb;
    --delete-bg: #d84a4a;
    --delete-hover: #c94141;
    --secondary-bg: #eef1f5;
    --secondary-line: #d4dae2;
    --secondary-ink: #3e4a59;
    --secondary-hover: #e4e8ee;
}
* { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) var(--surface-soft); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-soft); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border: 2px solid var(--surface-soft); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-hover); }
::-webkit-scrollbar-corner { background: var(--surface-soft); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: Pretendard, "Noto Sans KR", "Malgun Gothic", Arial, sans-serif; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #a8c5ed; outline-offset: 2px; }
.sidebar { width: 242px; background: var(--surface); color: var(--nav-text); border-right: 1px solid var(--line); position: fixed; inset: 0 auto 0 0; padding: 28px 14px 24px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 12px; align-items: center; color: var(--brand); font-size: 19px; font-weight: 800; letter-spacing: 0; padding: 0 12px; white-space: nowrap; }
.brand small { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .5px; margin-top: 3px; }
.brand-mark { font-size: 31px; font-weight: 800; letter-spacing: -5px; width: 36px; line-height: 1; }
.brand-mark span { color: var(--primary); }
.sidebar > nav { margin-top: 26px; }
.nav-label { color: var(--nav-heading); font-size: 12px; font-weight: 400; letter-spacing: 0; padding: 0 13px; margin: 24px 0 9px; }
.nav-divider { border: 0; border-top: 1px solid var(--line); margin: 18px 12px; }
.nav-link { display: flex; gap: 13px; align-items: center; padding: 11px 13px; margin: 4px 0; border-radius: 10px; font-size: 14px; font-weight: 400; color: var(--nav-text); transition: background .15s; }
.nav-link:hover { color: var(--nav-text); background: var(--hover-surface); }
.nav-link.active { background: var(--primary-soft); color: var(--nav-active-ink); }
.nav-link svg { width: 18px; height: 18px; opacity: .9; }
.nav-group { margin: 10px 0; }
.nav-group summary { display: flex; align-items: center; gap: 13px; padding: 11px 13px; border-radius: 10px; background: var(--surface-soft); color: var(--nav-text); font-size: 14px; font-weight: 400; cursor: pointer; list-style: none; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: var(--hover-surface); }
.nav-group summary:focus-visible { outline: 3px solid #a8c5ed; outline-offset: 2px; }
.nav-group summary svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--primary-ink); }
.nav-chevron { margin-left: auto; color: var(--muted); transition: transform .15s; }
.nav-group[open] > summary .nav-chevron { transform: rotate(90deg); }
.nav-children { margin-top: 5px; margin-left: 18px; padding-left: 8px; border-left: 1px solid var(--line); }
.nav-children .nav-link { padding: 9px 10px; gap: 9px; font-size: 13px; }
.nav-children .nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.approval-user { display: flex; align-items: center; gap: 16px; margin: -10px 0 18px; font-size: 13px; }
.approval-user a { color: var(--primary-ink); }
.tabs.approval-tabs { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 18px; }
.approval-tab { display: flex; justify-content: center; align-items: center; gap: 10px; min-width: 150px; min-height: 37px; padding: 6px 18px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--surface-soft); color: var(--nav-text); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.approval-tab:hover { background: var(--hover-surface); border-color: var(--primary); }
.approval-tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.approval-tab.active { border-color: var(--save-bg); background: var(--save-bg); color: var(--primary-button-text); font-weight: 600; }
.approval-tab span { font-size: 12px; color: inherit; opacity: .8; }
.approval-status { color: var(--primary-ink); font-size: 12px; }
.approval-approved { color: var(--green); }
.approval-rejected { color: var(--danger); }
#editor.approval-dialog { width: 950px; }
.approval-route-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.approval-step { width: 38px; color: var(--muted); font-size: 12px; }
.approval-route-row select { flex: 1; min-width: 120px; }
.approval-subcategory { margin-bottom: 12px; padding: 14px; border-radius: 6px; background: var(--surface); }
.approval-subcategory:last-child { margin-bottom: 0; }
.approval-subcategory-row > input { flex: 1; min-width: 120px; }
.approval-checks { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.approval-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; }
.approval-check input { width: 15px; height: 15px; min-height: 0; padding: 0; accent-color: var(--primary); }
.approval-signatures { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.approval-sign { display: flex; flex-direction: column; gap: 8px; min-width: 115px; padding: 14px; background: var(--surface-soft); border-radius: 6px; font-size: 13px; }
.approval-sign small { color: var(--muted); font-size: 11px; }
.approval-line-state { color: var(--primary-ink); }
.approval-body { padding: 18px; border-radius: 6px; background: var(--surface-soft); line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.approval-file { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; font-size: 13px; overflow-wrap: anywhere; }
.approval-file small { color: var(--muted); }
.approval-category + .approval-category { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.sidebar-bottom { margin-top: auto; padding: 30px 12px 0; }
.prototype-pill { background: #27324a; color: #b7c1d7; padding: 5px 9px; font-size: 10px; border-radius: 4px; }
.sidebar-bottom p { font-size: 10px; color: #8591aa; line-height: 1.9; margin: 12px 0 0; }
.shell { margin-left: 242px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 68px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 28px; display: flex; justify-content: space-between; align-items: center; }
.breadcrumb { display: flex; gap: 14px; align-items: center; font-size: 12px; color: var(--muted); }
.breadcrumb strong { color: #50596c; font-weight: 500; }
.slash { color: #c9ced8; }
.topbar-right { display: flex; align-items: center; gap: 25px; }
.login-info { display: flex; align-items: center; gap: 10px; padding-right: 22px; min-width: 0; }
.login-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); font-size: 12px; font-weight: 600; }
.local-label { font-size: 11px; color: var(--muted); }
.local-label i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #42a88c; margin-right: 4px; }
.avatar { display: grid; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-ink); width: 33px; height: 33px; font-size: 11px; font-weight: 700; }
main { padding: 34px 38px 45px; width: 100%; max-width: none; min-width: 0; margin: 0 auto; flex: 1; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
h1 { font-size: 25px; letter-spacing: -1px; margin: 0; font-weight: 700; }
.heading-date { color: var(--muted); font-size: 12px; margin-top: 5px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn { border: 1px solid var(--control-border); background: var(--surface); color: var(--ink); padding: 0 10px; min-height: 32px; min-width: 64px; border-radius: 4px; font-size: 13px; line-height: 1.25; font-weight: 400; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--hover-surface); }
.btn.primary { border-color: var(--save-bg); background: var(--save-bg); color: var(--primary-button-text); }
.btn.primary:hover { background: var(--save-bg); filter: brightness(.96); }
.btn.edit { color: var(--edit-ink); border-color: var(--edit-line); background: var(--edit-bg); }
.btn.edit:hover { background: var(--edit-hover); }
.btn.secondary { color: var(--secondary-ink); border-color: var(--secondary-line); background: var(--secondary-bg); }
.btn.secondary:hover { background: var(--secondary-hover); }
.btn.query { color: var(--primary-ink); background: var(--primary-soft); border-color: var(--control-border); }
.btn.query:hover { border-color: var(--primary); }
.btn.transfer { color: var(--transfer-ink, #218a5a); border-color: var(--transfer-border, #badfc9); background: var(--transfer-bg, #eaf8f1); }
.btn.transfer:hover { background: var(--transfer-hover, #dcefe4); }
.btn.danger { color: #fff; border-color: var(--delete-bg); background: var(--delete-bg); }
.btn.danger:hover { background: var(--delete-hover); border-color: var(--delete-hover); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.btn svg { width: 14px; height: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.month-picker { display: flex; align-items: center; gap: 8px; }
.dashboard-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 8px; }
.dashboard-filter .field { gap: 4px; }
.dashboard-filter label { font-size: 12px; }
.dashboard-filter input { width: 145px; min-height: 36px; height: 36px; padding: 6px 10px; }
input, select, textarea { border: 1px solid var(--control-border); border-radius: 6px; background: var(--surface); color: #394255; padding: 9px 12px; min-height: 40px; min-width: 0; font-size: 13px; line-height: 1.5; }
input[type="month"] { width: 155px; font-size: 12px; }
.input-validation-tooltip { position: fixed; z-index: 10000; display: flex; align-items: center; gap: 10px; width: max-content; max-width: min(340px, calc(100vw - 24px)); padding: 11px 14px; border: 0; border-radius: 9px; background: var(--surface); color: var(--ink); box-shadow: 0 5px 24px #142b4a24; font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.55; pointer-events: none; }
.input-validation-tooltip::before { content: ''; position: absolute; left: var(--validation-arrow-left, 20px); width: 9px; height: 9px; background: inherit; transform: rotate(45deg); }
.input-validation-tooltip[data-placement="below"]::before { top: -4px; }
.input-validation-tooltip[data-placement="above"]::before { bottom: -4px; }
.validation-icon { display: flex; align-items: center; justify-content: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-ink); }
.validation-icon svg { width: 20px; height: 20px; }
.validation-message { overflow-wrap: anywhere; }
input.validation-invalid, select.validation-invalid, textarea.validation-invalid, .calendar-trigger.validation-invalid { border-color: var(--primary); }
@media print { .input-validation-tooltip { display: none !important; } }
.calendar-field { position: relative; width: 100%; max-width: 100%; min-width: 0; }
.calendar-source { position: absolute !important; width: 1px !important; height: 1px !important; min-width: 0 !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; opacity: 0; clip-path: inset(50%); pointer-events: none; }
.calendar-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--control-border); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 400; white-space: nowrap; }
.calendar-trigger span { overflow: hidden; text-overflow: ellipsis; }
.calendar-trigger svg { flex: 0 0 22px; width: 22px; height: 22px; color: var(--primary-ink); }
.calendar-trigger:hover { border-color: var(--primary); }
.calendar-trigger:disabled { opacity: .5; cursor: not-allowed; }
.calendar-empty .calendar-trigger span { color: var(--muted); }
.report-filter .calendar-field, .dashboard-filter .calendar-field { width: 174px; }
.report-filter .calendar-trigger, .dashboard-filter .calendar-trigger, .month-picker .calendar-trigger { min-height: 36px; height: 36px; padding: 6px 9px; }
.month-picker .calendar-field { width: 155px; }
#calendar-popup { width: 360px; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; }
#calendar-popup .dialog-head { padding: 16px 18px; }
.calendar-content { padding: 16px; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 14px; }
.calendar-toolbar .icon-button { width: 36px; height: 36px; font-size: 24px; padding: 0; }
.calendar-toolbar .icon-button:disabled { opacity: .35; cursor: not-allowed; }
.calendar-period { display: flex; justify-content: center; gap: 8px; }
.calendar-period select { min-height: 36px; padding: 6px 8px; font-size: 14px; }
.calendar-weekdays, .calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.calendar-weekdays { margin-bottom: 7px; color: var(--muted); font-size: 13px; text-align: center; }
.calendar-weekdays span { padding: 4px 0; }
.calendar-day, .calendar-month { min-width: 0; height: 40px; padding: 0; border: 0; border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 14px; font-weight: 400; }
.calendar-day:not(:disabled):hover, .calendar-month:not(:disabled):hover { background: var(--primary-soft); }
.calendar-sunday { color: var(--danger); }
.calendar-saturday { color: var(--primary-ink); }
.calendar-day.calendar-outside { color: var(--muted); opacity: .5; }
.calendar-today { box-shadow: inset 0 0 0 1px var(--primary); }
.calendar-day[aria-pressed="true"], .calendar-month[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-ink); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 600; opacity: 1; }
.calendar-day:disabled, .calendar-month:disabled { opacity: .25; cursor: not-allowed; }
.calendar-months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.calendar-month { height: 48px; }
.calendar-selection { margin: 16px 0 0; min-height: 20px; color: var(--primary-ink); text-align: center; font-size: 13px; }
#calendar-popup .calendar-actions { justify-content: space-between; padding: 13px 16px; }
@media (max-width: 480px) {
    .report-filter .calendar-field, .dashboard-filter .calendar-field { width: 100%; }
    .calendar-trigger { font-size: 12px; }
}
input::placeholder, textarea::placeholder { color: #a1a7b3; }
.icon-button { border: 0; background: transparent; padding: 4px 6px; color: var(--muted); font-size: 17px; border-radius: 5px; }
.icon-button:hover { background: var(--hover-surface); }
.icon-button.danger { color: var(--danger); }
.icon-button.danger:hover { background: #fff1f3; }
.mobile-menu { display: none; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.metric { border: 0; border-radius: 10px; background: var(--surface); padding: 14px 16px; box-shadow: var(--shadow); }
.metric-title { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; font-weight: 500; gap: 7px; }
.metric-icon { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); border-radius: 7px; width: 24px; height: 24px; }
.metric-icon svg { width: 14px; height: 14px; }
.metric-value { margin: 6px 0 4px; font-size: clamp(20px, 1.7vw, 24px); line-height: 1.3; font-weight: 700; letter-spacing: -.8px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric-value small { font-size: 12px; font-weight: 400; color: #8a91a0; margin-left: 4px; }
.metric-note { font-size: 11px; color: var(--muted); line-height: 1.5; }
.metric.accent { background: var(--primary-soft); }
.metric.accent .metric-value { color: var(--primary-ink); }
.metric.accent .metric-icon { background: var(--primary-soft); color: var(--primary); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; margin-bottom: 26px; overflow: hidden; box-shadow: var(--shadow); }
.panel-head { padding: 19px 23px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
h2 { font-size: 16px; margin: 0; font-weight: 650; letter-spacing: -.3px; }
.link-button { border: 0; background: transparent; color: var(--primary-ink); font-size: 11px; cursor: pointer; }
.panel-body { padding: 24px; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 23px; }
.split .panel { margin-bottom: 23px; }
.channel-row { display: grid; grid-template-columns: 100px 1fr 110px; gap: 13px; align-items: center; margin: 22px 0; font-size: 12px; }
.channel-row:first-child { margin-top: 3px; }
.channel-row:last-child { margin-bottom: 5px; }
.bar-track { height: 8px; border-radius: 4px; background: #eef1f6; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: var(--primary); transform-origin: left center; transform: scaleX(0); }
.bar-fill.is-growing { animation: sales-bar-grow 2.4s cubic-bezier(.2, .65, .3, 1) .25s both; }
.channel-row:nth-child(2) .bar-fill { background: #709bd9; animation-delay: .18s; }
.channel-row:nth-child(3) .bar-fill { background: #b6cdef; animation-delay: .36s; }
@keyframes sales-bar-grow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) {
    .bar-fill.is-growing { animation-duration: 1.2s; }
}
@media print {
    .bar-fill, .bar-fill.is-growing { animation: none; transform: none; }
}
.channel-amount { text-align: right; font-variant-numeric: tabular-nums; }
.sales-comparison { display: flex; flex-direction: column; justify-content: center; gap: 22px; width: 100%; min-height: 190px; margin: 0; padding: 24px 16px; }
.sales-comparison .channel-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 16px; margin: 0; font-size: 13px; }
.sales-comparison .bar-track { grid-column: 1 / -1; grid-row: 2; height: 18px; border-radius: 6px; }
.sales-comparison .channel-amount { grid-column: 2; grid-row: 1; font-size: 14px; }
.product-sales-caption { color: var(--muted); font-size: 12px; }
.product-sales-chart { padding: 22px 24px; max-height: 380px; overflow-y: auto; }
.product-sales-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(100px, 2.5fr) minmax(125px, 1fr); align-items: center; gap: 20px; margin-bottom: 18px; }
.product-sales-row:last-child { margin-bottom: 0; }
.product-sales-name { min-width: 0; font-size: 13px; overflow-wrap: anywhere; }
.product-sales-name small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.product-sales-track { height: 14px; border-radius: 5px; background: var(--surface-soft); overflow: hidden; }
.product-sales-track .bar-fill { background: #8497b5; }
.product-sales-row:hover .bar-fill { background: #6f83a4; }
[data-theme="dark"] .product-sales-track .bar-fill { background: #95a8c5; }
[data-theme="dark"] .product-sales-row:hover .bar-fill { background: #adbed7; }
.product-sales-amount { text-align: right; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.product-sales-amount small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; }
.product-sales-unit { margin-left: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
@media (max-width: 760px) {
    .product-sales-chart { padding: 18px 17px; }
    .product-sales-row { grid-template-columns: minmax(0, 1fr) auto; gap: 9px 12px; margin-bottom: 20px; }
    .product-sales-track { grid-column: 1 / -1; grid-row: 2; height: 12px; }
    .product-sales-amount { grid-column: 2; grid-row: 1; }
    .product-sales-caption { font-size: 11px; }
}
.balance-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; font-size: 12px; }
.balance-row span { color: #777f90; }
.balance-row strong { font-size: 15px; font-weight: 650; }
.balance-row.total { border-top: 1px solid var(--line); margin-top: 7px; padding-top: 17px; }
.balance-row.total strong { color: var(--primary-ink); }
.tabs { display: flex; gap: 23px; border-bottom: 1px solid var(--line); padding: 0 23px; overflow-x: auto; }
.tab { padding: 16px 1px 13px; color: var(--muted); border: 0; background: none; border-bottom: 2px solid transparent; font-size: 13px; white-space: nowrap; }
.tab.active { border-bottom-color: var(--primary); color: var(--primary-ink); font-weight: 650; }
.filters { display: flex; justify-content: flex-start; align-items: center; padding: 19px 23px; gap: 12px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.filters .filter-fields { flex: 1 1 auto; justify-content: flex-start; }
.filters .filter-upload { flex: 0 0 auto; width: auto; margin-left: auto; justify-content: flex-end; }
.filters .list-upload { margin: 0; }
.search { width: 260px; font-size: 13px; background: var(--surface); }
.count { font-size: 13px; color: var(--muted); }
.count strong { color: var(--primary-ink); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; white-space: nowrap; }
th { background: var(--row-alt); color: var(--muted); font-weight: 800; font-size: 12px; padding: 8px 11px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--control-border); text-align: left; }
td { padding: 10px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: var(--row-alt); }
tbody tr:hover, tbody tr:nth-child(even):hover { background: var(--hover-surface); }
.number { text-align: right; font-variant-numeric: tabular-nums; }
.money-unit, th .money-unit, .field .money-unit { color: var(--muted); font-size: .8em; font-weight: 400; white-space: nowrap; }
.muted { color: var(--muted); }
.strong { font-weight: 600; }
.purple { color: var(--primary-ink); }
.red { color: var(--danger); }
.badge { display: inline-block; border: 0; font-size: 11px; font-weight: 500; border-radius: 4px; padding: 4px 8px; color: var(--primary-ink); background: var(--primary-soft); }
.badge.green { color: #218a5a; background: #eaf8f1; }
.badge.gray { color: #7c879b; background: #f0f3f8; }
.badge.orange { color: #dc7a22; background: #fff4e8; }
.empty { padding: 53px 20px 50px; text-align: center; white-space: normal; }
.empty-symbol { display: grid; place-items: center; margin: 0 auto 15px; width: 47px; height: 47px; border: 0; border-radius: 12px; background: #f5f7fb; color: #879bb8; }
.empty-symbol svg { width: 23px; height: 23px; }
.empty strong { display: block; font-size: 13px; color: #677083; font-weight: 500; }
.empty p { color: var(--muted); font-size: 12px; margin: 8px 0 18px; line-height: 1.7; }
.table-foot { padding: 14px 23px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 15px; background: var(--surface-soft); }
.table-foot.pagination { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; }
.pagination > .actions { grid-column: 2; justify-content: center; }
.notice { padding: 13px 16px; border: 0; border-radius: 7px; background: #f2f5fa; color: #50688c; font-size: 12px; margin-bottom: 20px; }
.notice.error { background: #fff5f6; color: #ad4552; }
footer { padding: 18px 38px; display: flex; justify-content: space-between; gap: 12px; color: #9ca3b0; font-size: 10px; border-top: 1px solid var(--line); letter-spacing: .2px; }
dialog { padding: 0; border: 0; border-radius: 13px; width: 700px; max-width: calc(100% - 30px); max-height: calc(100% - 40px); box-shadow: 0 25px 100px #111b3b35; color: var(--ink); }
dialog::backdrop { background: #121c3a66; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 20px 25px; gap: 12px; background: var(--surface-soft); }
.dialog-head h2 { font-size: 18px; }
.dialog-head { cursor: grab; user-select: none; }
dialog.is-positioned { position: fixed; inset: auto; left: var(--dialog-left); top: var(--dialog-top); margin: 0; }
dialog.is-dragging .dialog-head { cursor: grabbing; }
dialog.is-fullscreen .dialog-head { cursor: default; }
.dialog-head .icon-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 5px; }
.dialog-head .icon-button svg { width: 18px; height: 18px; }
.dialog-body { padding: 24px 25px; }
.dialog-actions { padding: 17px 25px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-soft); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted); }
.field label { color: var(--ink); font-weight: 600; }
.required { color: var(--primary-ink); }
.full { grid-column: 1 / -1; }
.product-autocomplete { position: relative; }
.product-autocomplete input { width: 100%; }
.product-suggestions { margin-top: 4px; max-height: 260px; overflow-y: auto; padding: 4px; border: 1px solid var(--control-border); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.suggestion-empty { padding: 10px; color: var(--muted); font-size: 12px; }
.product-suggestions[hidden] { display: none; }
.product-suggestion { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; border-radius: 4px; background: var(--surface); color: var(--ink); font-size: 13px; text-align: left; }
.product-suggestion span { overflow-wrap: anywhere; }
.product-suggestion small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.product-suggestion:hover, .product-suggestion[aria-selected="true"] { background: var(--primary-soft); color: var(--primary-ink); }
.field small, .help { font-size: 12px; color: var(--muted); line-height: 1.7; }
textarea { resize: vertical; min-height: 72px; }
.money-summary { margin-top: 24px; border: 0; border-radius: 7px; background: var(--primary-soft); padding: 17px 18px; display: flex; justify-content: space-between; gap: 15px; font-size: 13px; flex-wrap: wrap; }
.money-summary strong { color: var(--primary-ink); }
.section-label { margin: 26px 0 14px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.section-label h3 { font-size: 13px; margin: 0; }
.input-section { margin-bottom: 16px; padding: 16px; border-radius: 8px; background: var(--surface-soft); }
.input-section:last-child { margin-bottom: 0; }
.input-section > .input-section-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 14px; padding: 0; border: 0; }
.input-section-head h3 { margin: 0; color: var(--primary-ink); font-size: 13px; font-weight: 600; }
.input-section .form-grid { gap: 14px 16px; }
.input-section .field { gap: 6px; min-width: 0; }
.input-section .field > label { font-size: 12px; }
.input-section .field:has([required]) > label:not(:has(.required))::after { content: ' *'; color: var(--primary-ink); }
.input-section .field :is(input:not([type="checkbox"]), select, textarea) { width: 100%; }
.input-section :is(input, select, textarea):focus { border-color: var(--primary); }
.input-section .field:focus-within > label, #output-reason .field:focus-within > label { color: var(--primary-ink); }
.input-section .field[hidden], .input-section[hidden] { display: none; }
.input-section .help { line-height: 1.65; }
.input-section .help:last-child { margin-bottom: 0; }
.input-section .money-summary { margin-top: 0; padding: 13px 14px; }
.input-section .table-scroll { background: var(--surface); border-radius: 6px; }
.input-section #contacts .contact-row { margin-bottom: 10px; padding: 12px; border: 0; border-radius: 6px; background: var(--surface); }
.input-section #contacts .contact-row:last-child { margin-bottom: 0; }
.input-section .approval-route-row { padding: 8px; border-radius: 6px; background: var(--surface); }
.input-section .approval-check { gap: 7px; padding: 5px 0; }
.input-section .upload-drop { padding: 20px 16px; background: var(--surface); }
.input-section-results:has(> #upload-preview:empty), .input-section-results:has(> #op-payment-preview:empty) { display: none; }
.input-section .preview { margin-top: 0; }
.input-section-plain { padding: 14px 16px; }
#editor .approval-category > h3 { margin: 0 0 14px; color: var(--ink); font-size: 15px; }
@media (max-width: 760px) {
    .input-section { padding: 14px 12px; margin-bottom: 14px; }
    .input-section .form-grid { gap: 13px; }
    .input-section > .input-section-head { flex-wrap: wrap; }
    .input-section #contacts .contact-row { padding: 10px; }
}
.contact-row { display: grid; grid-template-columns: .9fr .8fr 1fr 1.3fr 30px; gap: 8px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.contact-row input { width: 100%; font-size: 12px; }
.contact-row > .field { min-width: 0; gap: 5px; color: var(--ink); font-size: 12px; font-weight: 500; }
.contact-row input { font-weight: 400; }
.contact-row > button { align-self: end; height: 36px; }
.upload-drop { display: block; border: 1px dashed #b6c4d9; border-radius: 9px; background: #f9fafd; padding: 28px 20px; text-align: center; }
.upload-drop input { display: block; margin: 17px auto 0; max-width: 100%; font-size: 12px; background: var(--surface); }
.upload-drop strong { font-size: 13px; }
.upload-drop p { margin: 6px 0; font-size: 11px; color: var(--muted); }
.preview { margin-top: 18px; }
.preview .table-scroll { max-height: 230px; border: 1px solid var(--line); border-radius: 6px; }
.preview td, .preview th { padding: 6px 10px; }
.preview ul { padding-left: 18px; max-height: 130px; overflow: auto; }
.form-error { font-size: 12px; color: var(--danger); margin: 0 0 15px; }
.form-error:empty { display: none; }
.toast { position: fixed; bottom: 28px; left: calc(50% + 100px); transform: translateX(-50%) translateY(20px); background: #28334b; color: #fff; padding: 12px 22px; border-radius: 8px; font-size: 12px; box-shadow: 0 7px 25px #17203a20; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; max-width: 90vw; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.detail-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; font-size: 12px; }
.detail-summary > div { padding: 15px 17px; border: 0; border-radius: 7px; background: var(--surface-soft); }
.detail-summary span { color: var(--muted); display: block; margin-bottom: 5px; }
.detail-summary strong { font-size: 20px; }
@media (min-width: 1600px) { main { padding-top: 42px; } }
@media (max-width: 1200px) { .sidebar { width: 215px; padding-inline: 15px; } .shell { margin-left: 215px; } main { padding: 28px 24px; } .topbar { padding: 0 24px; } .metrics { gap: 12px; } .metric { padding: 14px 15px; } .split { gap: 16px; } }
@media (max-width: 1000px) { .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: 1fr; gap: 0; } .page-heading { align-items: flex-start; } .page-heading > .actions { justify-content: flex-end; } }
@media (max-width: 760px) { .sidebar { transform: translateX(-100%); transition: transform .2s; width: 242px; box-shadow: 15px 0 40px #101b3722; } .sidebar.open { transform: translateX(0); } .shell { margin-left: 0; } .topbar { height: 62px; padding: 0 18px; } .mobile-menu { display: block; } .breadcrumb { gap: 10px; } .breadcrumb > span:not(.slash) { display: none; } .breadcrumb .slash { display: none; } .topbar-right { gap: 12px; } main { padding: 24px 16px; } h1 { font-size: 22px; } .page-heading { flex-direction: column; gap: 16px; margin-bottom: 21px; } .page-heading > .actions { width: 100%; justify-content: flex-start; } .metrics { gap: 10px; margin-bottom: 18px; } .metric { padding: 12px 13px; } .metric-value { font-size: 20px; } .metric-title { font-size: 12px; } .metric-icon { width: 22px; height: 22px; } .metric-note { font-size: 11px; } .panel-head { padding: 17px; } .panel-body { padding: 20px 17px; } .filters { padding: 15px 17px; flex-wrap: wrap; } .search { width: 100%; } .filters .actions { width: 100%; } .filters .actions .search { flex: 1; width: 150px; } .tabs { padding: 0 17px; gap: 20px; } th, td { padding: 8px 13px; } .channel-row { grid-template-columns: 88px 1fr 85px; gap: 8px; font-size: 11px; } footer { padding: 18px 16px; font-size: 9px; } .form-grid { grid-template-columns: 1fr; gap: 15px; } .dialog-body { padding: 20px; } .contact-row { grid-template-columns: 1fr 1fr 28px; } .contact-row > .field:nth-child(3) { grid-row: 2; grid-column: 1; } .contact-row > .field:nth-child(4) { grid-row: 2; grid-column: 2; } .contact-row button { grid-column: 3; grid-row: 1; } .contact-row { padding-bottom: 12px; border-bottom: 1px solid var(--line); } .toast { left: 50%; } .table-foot { padding-inline: 17px; } }

dialog { background: var(--surface); }
.header-tools { display: flex; align-items: center; gap: 7px; }
.sidebar { overflow-y: auto; }
.report-filter { display: flex; justify-content: flex-start; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; padding: 14px 18px; }
.report-filter .field { flex: 0 0 auto; min-width: 0; gap: 4px; }
.report-filter label { font-size: 12px; }
#approval-filter-form .field > label { font-size:12px; font-weight:600; color:var(--ink); }
@media (min-width:761px) {
    #approval-filter-form input, #approval-filter-form select { width:171.6px; }
}
.report-filter input, .report-filter select { width: 132px; max-width: 100%; min-height: 36px; height: 36px; padding: 6px 10px; font-size: 13px; }
.report-filter #report-kind, .report-filter #report-customer { width: 170px; }
.report-filter #report-product { width: 180px; }
.report-filter input[type="date"] { width: 145px; }
.report-filter-actions { gap: 6px; }
.report-filter .form-error { flex-basis: 100%; margin: 0; }
.report-criteria { padding: 16px 23px; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; border-bottom: 1px solid var(--line); }
.report-result td { max-width: 300px; white-space: normal; overflow-wrap: anywhere; min-width: 80px; }
.report-result td.number { white-space: nowrap; }
.report-result tfoot td { background: var(--primary-soft); font-weight: 650; border-top: 2px solid var(--control-border); }
.report-note { color: var(--muted); font-size: 12px; line-height: 1.8; margin-top: -5px; }
.report-output { max-width: 100%; }
.dialog-actions { flex-wrap: wrap; }
.tool-button { min-height: 32px; }
.tool-icon { display: inline-flex; }
.tool-button svg { width: 15px; height: 15px; }
#editor[open] { display: flex; flex-direction: column; }
#editor:not([open]) { display: none; }
#editor.customer-dialog { width: 910px; }
#output-reason { width: 420px; }
#output-reason .dialog-body { padding: 16px 20px; }
#output-reason .dialog-actions { padding: 12px 20px; }
#output-reason-text { min-height: 64px; }
.print-warning { display: none; }
#dialog-content { display: flex; flex-direction: column; width: 100%; min-height: 0; max-height: calc(100dvh - 40px); }
#dialog-content > form { display: flex; flex-direction: column; min-height: 0; }
.dialog-head, .dialog-actions { flex-shrink: 0; }
.dialog-body { min-height: 0; overflow-y: auto; }
#editor.is-fullscreen { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
#editor.is-fullscreen #dialog-content { height: 100%; max-height: none; }
#editor.is-fullscreen #dialog-content > form { flex: 1; }
#editor.is-fullscreen .dialog-body { flex: 1; }
.screen-locked { overflow: hidden; }
.screen-locked .sidebar, .screen-locked .shell, .screen-locked #editor, .screen-locked #toast { visibility: hidden; }
#screen-lock { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 24px; border-radius: 0; background: var(--bg); }
#screen-lock[open] { display: grid; place-items: center; }
#screen-lock::backdrop { background: var(--bg); }
.lock-card { width: 100%; max-width: 380px; text-align: center; padding: 38px 24px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.lock-symbol { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 18px; background: var(--primary-soft); color: var(--primary-ink); margin: 0 auto 22px; }
.lock-symbol svg { width: 30px; height: 30px; }
.lock-card h2 { font-size: 21px; }
.lock-card p { font-size: 12px; color: var(--muted); margin: 12px 0 25px; }
.lock-card .field { margin: 0 0 20px; text-align: left; }
.lock-card .field[hidden] { display: none; }
.lock-card .field p { margin: 0; line-height: 1.5; }
.lock-card .field .form-error { color: var(--danger); }
.lock-card .field .form-error:empty { display: none; }
.lock-card .btn { width: 100%; }
.lock-card small { display: block; font-size: 10px; color: var(--muted); margin-top: 17px; }

:root[data-theme="dark"] {
    --selection-bg: #27313d;
    color-scheme: dark;
    --primary: #6ea0ed;
    --scrollbar-thumb: #7287a3;
    --scrollbar-hover: #8a9db7;
    --primary-hover: #8bb4f2;
    --primary-ink: #6ea0ed;
    --primary-soft: #203a63;
    --ink: #e8edf5;
    --muted: #aeb9c8;
    --line: #344153;
    --bg: #111827;
    --danger: #f08a8a;
    --green: #75d5a7;
    --surface: #182231;
    --surface-soft: #151f2d;
    --hover-surface: #223148;
    --row-alt: #202c3b;
    --control-border: #3a485b;
    --primary-button-text: #fff;
    --brand: #d8e6ff;
    --nav-text: #d3dbe7;
    --nav-heading: #aeb9c8;
    --nav-active-ink: #b9d4ff;
    --shadow: 0 8px 24px rgba(0, 0, 0, .22);
    --save-bg: #4b8fd3;
    --edit-bg: #203754;
    --edit-line: #3f628e;
    --edit-ink: #b7d7f5;
    --edit-hover: #294568;
    --delete-bg: #a94343;
    --delete-hover: #963b3b;
    --secondary-bg: #273241;
    --secondary-line: #3a4759;
    --secondary-ink: #d9e1eb;
    --secondary-hover: #303e50;
}
[data-theme="dark"] .nav-link.active { background: var(--primary-soft); color: var(--nav-active-ink); }
[data-theme="dark"] .breadcrumb strong, [data-theme="dark"] .btn, [data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea, [data-theme="dark"] .field label, [data-theme="dark"] .empty strong { color: var(--ink); }
[data-theme="dark"] .btn.primary { color: var(--primary-button-text); }
[data-theme="dark"] .btn.edit { color: var(--edit-ink); }
[data-theme="dark"] .btn.query { color: var(--primary-ink); }
[data-theme="dark"] .btn.secondary { color: var(--secondary-ink); }
[data-theme="dark"] .btn.transfer { --transfer-ink: #75d5a7; --transfer-border: #3e6b5c; --transfer-bg: #183b30; --transfer-hover: #204a3c; color: var(--transfer-ink); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: #111b29; }
[data-theme="dark"] .metric-title, [data-theme="dark"] .field, [data-theme="dark"] .balance-row span, [data-theme="dark"] .metric-note, [data-theme="dark"] th { color: var(--muted); }
[data-theme="dark"] th { color: var(--ink); }

[data-theme="dark"] .metric-icon, [data-theme="dark"] .metric.accent .metric-icon, [data-theme="dark"] .empty-symbol, [data-theme="dark"] .avatar { background: var(--primary-soft); color: var(--primary-ink); border-color: var(--line); }
[data-theme="dark"] .notice, [data-theme="dark"] .money-summary, [data-theme="dark"] .upload-drop { background: var(--surface-soft); color: var(--primary-ink); border-color: var(--control-border); }
[data-theme="dark"] .notice.error { background: #492327; border-color: #6c404d; color: var(--danger); }
[data-theme="dark"] .btn.danger { color: #fff; border-color: var(--delete-bg); }
[data-theme="dark"] .btn.danger:hover { background: var(--delete-hover); border-color: var(--delete-hover); }
[data-theme="dark"] .icon-button.danger:hover { background: #492327; }
[data-theme="dark"] .badge.green { background: #183b30; color: #75d5a7; }
[data-theme="dark"] .badge.gray { background: #303d4d; color: #d5dde8; }
[data-theme="dark"] .badge.orange { background: #482f1b; color: #f2ad68; }
[data-theme="dark"] .bar-track { background: var(--surface-soft); }
[data-theme="dark"] .contact-row { border-color: var(--line); }

@media (max-width: 1100px) {
    .table-foot.pagination { display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 8px; }
    .header-tools .tool-label, .topbar-right .local-label { display: none; }
    .header-tools .btn { width: 32px; min-width: 32px; padding: 6px; }
    .topbar-right { gap: 12px; }
    .login-info { padding-right: 16px; gap: 8px; }
    .login-name { max-width: 120px; }
    .breadcrumb > span { display: none; }
    .breadcrumb { min-width: 0; }
    .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 480px) {
    .dashboard-filter { width: 100%; }
    .dashboard-filter .field { flex: 1 1 135px; }
    .dashboard-filter input { width: 100%; }
    .breadcrumb { min-width: 0; gap: 5px; }
    .breadcrumb strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-right { flex-shrink: 0; gap: 8px; }
    .header-tools { gap: 5px; }
    .topbar-right .avatar { display: none; }
    .login-info { padding-right: 10px; }
    .login-name { max-width: 86px; font-size: 11px; }
    .dialog-head { padding-inline: 18px; }
    .dialog-head h2 { font-size: 16px; }
    .dialog-head { flex-wrap: wrap; }
    .report-filter { padding: 12px; }
    .report-filter .field { flex: 1 1 145px; }
    .report-filter input, .report-filter select, .report-filter #report-kind, .report-filter #report-customer, .report-filter #report-product, .report-filter input[type="date"] { width: 100%; }
    .report-filter-actions { flex-basis: 100%; }
}

.auth-entry { color: var(--primary-ink); font-size: 12px; white-space: nowrap; }
.auth-entry:hover, .auth-support a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-page { min-height: 100dvh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 15% 20%, rgba(31, 95, 191, .06), transparent 48%), radial-gradient(ellipse at 90% 85%, rgba(31, 95, 191, .04), transparent 42%), var(--bg); }
.auth-header { display: flex; justify-content: flex-end; align-items: center; padding: 26px 32px; }
.auth-main > .brand { justify-content: center; padding: 0; font-size: 26px; text-align: center; }
.auth-main > .brand small { font-size: 12px; margin-top: 5px; }
.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 28px; width: 100%; padding: 25px 20px 55px; margin: 0; max-width: none; flex: 1; }
.auth-card { position: relative; width: 100%; max-width: 430px; padding: 34px; background: var(--surface); border-radius: 18px; box-shadow: 0 16px 48px rgba(31, 41, 55, .08); }
.auth-view[hidden], .auth-feedback[hidden] { display: none; }
.auth-title { display: flex; align-items: center; gap: 12px; padding-bottom: 24px; margin-bottom: 25px; border-bottom: 1px solid var(--line); }
.auth-title-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; background: var(--primary-soft); color: var(--primary-ink); }
.auth-title-icon svg { width: 22px; height: 22px; }
.auth-title h1 { font-size: 25px; }
.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form input { width: 100%; min-height: 44px; }
.auth-form input:focus { border-color: var(--primary); }
.auth-remember { display: inline-flex; align-items: center; gap: 7px; width: fit-content; color: var(--muted); font-size: 12px; cursor: pointer; }
.auth-form .auth-remember input { width: 16px; height: 16px; min-height: 16px; margin: 0; accent-color: var(--primary); }
.auth-submit { width: 100%; min-height: 38px; }
.auth-feedback { margin: 0; line-height: 1.8; }
.auth-support { display: flex; flex-direction: column; align-items: center; gap: 13px; margin-top: 24px; padding-top: 21px; border-top: 1px solid var(--line); font-size: 12px; text-align: center; }
.auth-support a { color: var(--primary-ink); }
.auth-support span { color: var(--muted); }
.auth-footer { justify-content: center; border: 0; padding: 20px; }
[data-theme="dark"] .auth-page { background: radial-gradient(ellipse at 15% 20%, rgba(110, 160, 237, .09), transparent 48%), radial-gradient(ellipse at 90% 85%, rgba(110, 160, 237, .05), transparent 42%), var(--bg); }
[data-theme="dark"] .auth-card { box-shadow: 0 18px 50px rgba(0, 0, 0, .25); }
@media print {
    #calendar-popup { display: none !important; }
    body:not(.print-authorized) > * { display: none !important; }
    body:not(.print-authorized) > .print-warning { display: block !important; padding: 24px; color: #1f2937; background: #fff; }
    body.print-authorized .sidebar, body.print-authorized .topbar, body.print-authorized footer, body.print-authorized .btn, body.print-authorized .icon-button, body.print-authorized #toast, body.print-authorized #output-reason, body.print-authorized #screen-lock, body.print-authorized .print-warning { display: none !important; }
    body.print-authorized .shell { margin: 0; }
    body.print-authorized main { padding: 0; max-width: none; }
    body.print-authorized:has(#editor[open]) .shell { display: none; }
    body.print-authorized #editor[open] { position: static; width: 100%; max-width: none; max-height: none; height: auto; margin: 0; box-shadow: none; }
    body.print-authorized #dialog-content { max-height: none; }
    body.print-authorized .dialog-body { overflow: visible; }
    body.print-authorized dialog::backdrop { background: none; }
}
@media (max-width: 480px) {
    .auth-header { padding: 16px; }
    .auth-header .btn { font-size: 12px; }
    .auth-main > .brand { font-size: 22px; }
    .auth-main > .brand small { font-size: 11px; }
    .auth-main { padding: 20px 16px 35px; gap: 22px; }
    .auth-card { padding: 27px 23px; }
}

#sa-select-all, [data-sa-select] { width: 20px; height: 20px; min-height: 20px; margin: 0; padding: 0; vertical-align: middle; accent-color: var(--primary); cursor: pointer; }
#sa-select-all:disabled, [data-sa-select]:disabled { cursor: default; }

.pagination .page-number { min-width: 32px; padding: 0 8px; }
.pagination > .actions { gap: 6px; }
.table-foot.upload-detail-pagination { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; padding: 12px 0; }
.upload-detail-pagination > span { flex-shrink: 0; white-space: nowrap; font-size: 12px; }
.upload-detail-pagination > .actions { flex: 1 1 auto; flex-wrap: wrap; justify-content: center; gap: 4px; }
.upload-detail-pagination .btn.small { min-width: 26px; min-height: 28px; padding: 0 6px; font-size: 12px; }

.report-builder-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 650px; border: 0; }
.report-builder-frame.is-modal-fullscreen { position:fixed; inset:0; width:100vw; height:100dvh; min-height:0; z-index:110; background:var(--surface); }
.report-builder-frame.has-open-dialog { position:fixed; inset:0; width:100vw; height:100dvh; min-height:0; z-index:110; background:transparent; }
.nav-generated-report > span { display:flex; align-items:center; gap:6px; flex:1; min-width:0; }
.nav-custom-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.custom-report-mark { flex-shrink:0; color:var(--primary-ink); font-size:9px; font-weight:400; }
.nav-children .nav-link[href="#report-builder"] { margin-bottom:10px; border:1px solid var(--control-border); border-radius:6px; background:var(--surface-soft); color:var(--nav-text); }
.nav-children .nav-link[href="#report-builder"]:hover { background:var(--hover-surface); }
.nav-children .nav-link[href="#report-builder"].active { border-color:var(--primary); background:var(--primary); color:var(--primary-button-text); }

:root :is(select, input[readonly], input:disabled, textarea[readonly], textarea:disabled, input[type="date"], input[type="month"], input[type="file"], .calendar-trigger) { background:var(--selection-bg); }
