:root {
    color-scheme: dark;
    --page: #151515;
    --surface: #151515;
    --surface-subtle: #1b1a1a;
    --sidebar: #202020;
    --ink: #b1b1b1;
    --muted: #727272;
    --line: #282828;
    --line-strong: #393939;
    --green: #46a83b;
    --green-dark: #319526;
    --blue: #678de3;
    --amber: #d9a354;
    --coral: #fa5c7c;
    --danger: #ff2847;
    --shadow: 0 12px 42px rgba(0,0,0,.38);
    font-family: "Segoe UI", Arial, sans-serif;
    font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--page); color: var(--ink); }
body { font-size: 12px; overflow: auto; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 20px; line-height: 1.2; letter-spacing: 0; }
h2 { font-size: 14px; line-height: 1.3; letter-spacing: 0; }
.page-stack { min-height: 100%; display: grid; align-content: start; gap: 13px; max-width: none; margin: 0; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.page-header p { margin-top: 5px; color: var(--muted); }
.eyebrow { display: block; margin-bottom: 7px; color: var(--green-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.button { min-height: 30px; padding: 0 11px; border: 1px solid #393939; border-radius: 2px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #969696; background: #2c2c2c; text-decoration: none; cursor: pointer; font-size: 12px; font-weight: 400; transition: background .12s ease, border-color .12s ease; }
.button svg { width: 16px; height: 16px; }
.button.primary { color: #fff; background: #46a83b; border-color: #3c9d31; }
.button.primary:hover { background: #319526; border-color: #298a1e; }
.button.secondary { color: #969696; background: #2c2c2c; border-color: #393939; }
.button.secondary:hover { color: #fff; background: #343434; }
.button:disabled { opacity: .55; cursor: wait; }
.button.wide { width: 100%; min-height: 32px; }
.icon-button { width: 32px; height: 30px; padding: 0; border: 1px solid #393939; border-radius: 2px; display: inline-grid; background: #2c2c2c; color: #969696; place-items: center; cursor: pointer; }
.icon-button svg { width: 19px; height: 19px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-height: 116px; padding: 14px; border: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: none; display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 7px 12px; }
.metric-icon { grid-column: 2; grid-row: 1 / span 2; width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; }
.metric-icon svg { width: 18px; height: 18px; }
.accent-green .metric-icon { color: var(--green-dark); background: #e9f4eb; }
.accent-blue .metric-icon { color: var(--blue); background: #e9f2f8; }
.accent-amber .metric-icon { color: var(--amber); background: #faf0df; }
.accent-coral .metric-icon { color: var(--coral); background: #faece9; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-card strong { font-size: 26px; line-height: 1.15; }
.metric-card small { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 14px; }
.surface { min-width: 0; border: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: none; }
.surface-header { min-height: 67px; padding: 15px 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.surface-header p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--green-dark); font-size: 11px; font-weight: 700; text-decoration: none; }
.text-link svg { width: 14px; height: 14px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { height: 34px; padding: 0 8px; background: #171717; color: #d0d0d0; border-right: 1px solid #282828; border-bottom: 1px solid #303030; text-align: left; font-size: 11px; font-weight: 400; text-transform: none; }
.data-table td { height: 33px; padding: 0 8px; border-right: 1px solid #242424; border-bottom: 1px solid #282828; color: #b1b1b1; font-size: 11px; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover td { background: #262626; }
.data-table .numeric { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.row-link { color: var(--blue); font-weight: 800; text-decoration: none; }
.status-badge { padding: 2px 6px; border: 1px solid #3d7241; border-radius: 2px; color: #84c78b; background: #1b2a1c; font-size: 10px; font-weight: 600; }
.empty-cell { height: 100px !important; text-align: center; color: var(--muted); }
.quick-actions { align-self: start; }
.quick-actions > a { min-height: 66px; padding: 10px 14px; display: grid; grid-template-columns: 34px 1fr 16px; align-items: center; gap: 11px; border-bottom: 1px solid #edf0ee; text-decoration: none; }
.quick-actions > a:last-child { border-bottom: 0; }
.quick-actions > a:hover { background: #fafcfb; }
.quick-actions > a > svg { width: 15px; color: #9aa39d; }
.quick-actions strong, .quick-actions small { display: block; }
.quick-actions strong { font-size: 12px; }
.quick-actions small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.quick-icon { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; }
.quick-icon svg { width: 17px; }
.quick-icon.green { color: var(--green-dark); background: #e9f4eb; }
.quick-icon.blue { color: var(--blue); background: #e9f2f8; }
.quick-icon.amber { color: var(--amber); background: #faf0df; }
.quick-icon.coral { color: var(--coral); background: #faece9; }
.auth-layout { min-height: 100vh; padding: 32px 18px 60px; background: #171a18; display: grid; place-items: center; align-content: center; }
.auth-brand { margin-bottom: 22px; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; }
.auth-brand .brand-mark { width: 36px; height: 36px; border: 1px solid #4c8655; border-radius: 6px; display: grid; place-items: center; color: #77cd80; background: #202a22; }
.auth-brand .brand-mark svg { width: 21px; }
.auth-brand small { align-self: flex-start; margin-top: 6px; color: #70c678; font-size: 8px; }
.auth-panel { width: min(100%, 430px); padding: 28px; border: 1px solid #313733; border-radius: 7px; background: #f9fbfa; box-shadow: 0 24px 70px rgba(0,0,0,.28); }
.setup-panel { width: min(100%, 550px); }
.auth-heading { margin-bottom: 23px; }
.auth-heading h1 { font-size: 24px; }
.auth-heading p { margin-top: 8px; color: var(--muted); line-height: 1.55; font-size: 12px; }
.form-stack { display: grid; gap: 15px; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { color: #8a8a8a; font-size: 11px; font-weight: 400; }
.field input, .field select, .field textarea, select, input, textarea { width: 100%; min-height: 30px; padding: 0 8px; border: 1px solid #393939; border-radius: 0; color: #d0d0d0; background: #191919; outline: none; }
.field textarea { padding-top: 10px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, select:focus, input:focus, textarea:focus { border-color: #0874b9; box-shadow: inset 0 0 0 1px #0874b9; }
.check-field { display: flex; align-items: center; gap: 9px; color: #4e5952; font-size: 11px; cursor: pointer; }
.check-field input { width: 16px; height: 16px; accent-color: var(--green); }
.validation-summary { color: var(--danger); font-size: 11px; }
.validation-summary ul { margin: 0; padding-left: 18px; }
.alert { padding: 10px 12px; border: 1px solid; border-radius: 5px; font-size: 12px; line-height: 1.45; }
.alert.danger { color: #8f2f2b; background: #fff0ee; border-color: #ecc6c1; }
.alert.success { color: #2f6f39; background: #ecf7ed; border-color: #c7dfca; }
.auth-footnote { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font-size: 10px; line-height: 1.5; }
.connection-note { display: flex; align-items: center; justify-content: center; gap: 6px; }
.connection-note svg { width: 13px; }
.auth-loading, .route-loading { padding: 30px 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
.skeleton-card { background: linear-gradient(90deg, #fff 25%, #f2f5f3 45%, #fff 70%); background-size: 240% 100%; animation: shimmer 1.4s infinite; }
.error-state, .empty-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; }
.error-state p, .empty-page p { color: var(--muted); }
.error-icon { color: var(--danger); }
.error-icon svg { width: 34px; height: 34px; }
#blazor-error-ui { display: none; position: fixed; z-index: 1000; inset: auto 18px 18px auto; max-width: 420px; padding: 12px 14px; background: #3a1715; color: white; border-radius: 6px; box-shadow: var(--shadow); }
#blazor-error-ui .reload { color: #a8dcae; margin-left: 8px; }
#blazor-error-ui .dismiss { margin-left: 8px; cursor: pointer; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -240% 0; } }
@media (max-width: 1180px) { .metric-grid { grid-template-columns: repeat(2, 1fr); } .dashboard-grid { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
    h1 { font-size: 22px; }
    .page-header { align-items: stretch; flex-direction: column; }
    .header-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .metric-grid { grid-template-columns: 1fr; }
    .metric-card { min-height: 116px; }
    .form-grid.two-columns { grid-template-columns: 1fr; }
    .auth-panel { padding: 22px 18px; }
}
.modal-backdrop { position: fixed; z-index: 200; inset: 0; padding: 24px; display: grid; place-items: safe center; overflow: auto; background: rgba(0,0,0,.58); }
.modal-backdrop.assortment-editor-layer { z-index: 1420; }
.modal-panel { width: min(100%, 650px); max-height: calc(100dvh - 48px); display: grid; grid-template-rows: auto minmax(0, 1fr); border: 1px solid #0874b9; border-radius: 0; background: #151515; box-shadow: 0 18px 60px rgba(0,0,0,.5); overflow: hidden; }
.modal-panel.wide { width: min(100%, 1080px); }
.modal-panel.price-label-picker-modal { width: min(100%, 980px); height: min(760px, calc(100dvh - 48px)); }
.modal-panel.reference-counterparty { width: min(100%, 456px); }
.modal-panel.reference-member { width: min(100%, 676px); }
.modal-panel.reference-service { width: min(100%, 618px); }
.modal-panel.reference-person { width: min(100%, 566px); }
.modal-panel.reference-department { width: min(100%, 356px); }
.modal-panel.reference-state { width: min(100%, 396px); }
.modal-panel.reference-group { width: min(100%, 436px); }
.modal-panel.company-editor { width: min(100%, 536px); }
.modal-panel[class*="reference-"] .modal-header { min-height: 36px; padding: 5px 10px; }
.modal-panel[class*="reference-"] .modal-header h2 { font-size: 12px; font-weight: 500; }
.modal-header { min-height: 42px; padding: 7px 12px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 17px; }
.modal-header p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.modal-heading { min-width: 0; }
.modal-heading h2, .modal-heading p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-window-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; }
.modal-window-actions .icon-button { width: 30px; height: 28px; }
.modal-panel.modal-movable,
[data-movable-modal].modal-movable { transform: translate3d(var(--modal-translate-x, 0), var(--modal-translate-y, 0), 0); }
.modal-panel.modal-dragging,
[data-movable-modal].modal-dragging { box-shadow: 0 22px 72px rgba(0,0,0,.68); }
.modal-drag-handle { cursor: move; user-select: none; touch-action: none; }
.modal-backdrop.modal-backdrop-minimized { inset: auto 18px 18px auto; width: min(360px, calc(100vw - 36px)); padding: 0; display: block; overflow: visible; background: transparent; pointer-events: none; }
.modal-backdrop-minimized .modal-panel { width: 100% !important; min-width: 0; min-height: 0; max-height: none; transform: none !important; border-color: #42604a; pointer-events: auto; }
.modal-backdrop-minimized .modal-header { min-height: 42px; border-bottom: 0; cursor: pointer; }
.modal-backdrop-minimized .modal-body { display: none; }
@media screen and (min-width: 901px) {
    [data-movable-modal-overlay].modal-backdrop-minimized { inset: auto 18px 18px auto !important; width: min(360px, calc(100vw - 36px)) !important; height: auto !important; padding: 0 !important; display: block !important; overflow: visible !important; background: transparent !important; pointer-events: none !important; }
    [data-movable-modal-overlay].modal-backdrop-minimized [data-movable-modal] { width: 100% !important; min-width: 0 !important; min-height: 0 !important; height: auto !important; max-height: none !important; display: block !important; transform: none !important; border-color: #42604a !important; pointer-events: auto !important; }
    [data-movable-modal].modal-minimized > :not([data-movable-modal-handle]) { display: none !important; }
    [data-movable-modal].modal-minimized > [data-movable-modal-handle] { min-height: 42px !important; height: 42px !important; padding: 5px 8px 5px 12px !important; display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 8px !important; border-bottom: 0 !important; overflow: hidden !important; }
    [data-movable-modal].modal-minimized > [data-movable-modal-handle] > :not(:first-child):not(.movable-modal-window-actions) { display: none !important; }
    [data-movable-modal].modal-minimized > [data-movable-modal-handle] > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    [data-movable-modal].modal-minimized > [data-movable-modal-handle] > :first-child > :not(:first-child) { display: none !important; }
}
.modal-body { min-height: 0; overflow-y: auto; }
.composer-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: 510px; }
.composer-form { min-width: 0; padding: 18px; display: grid; align-content: start; gap: 16px; }
.composer-summary { padding: 16px; border-left: 1px solid var(--line); background: #171717; display: flex; flex-direction: column; align-items: stretch; gap: 11px; }
.composer-summary > span { color: var(--muted); font-size: 11px; }
.composer-summary > strong { font-size: 25px; }
.composer-summary dl { margin: 8px 0 auto; display: grid; gap: 9px; }
.composer-summary dl div { display: flex; justify-content: space-between; gap: 10px; }
.composer-summary dt, .composer-summary dd { margin: 0; font-size: 11px; }
.composer-summary dt { color: var(--muted); }
.composer-summary dd { font-weight: 700; }
.line-editor { display: grid; grid-template-columns: minmax(180px, 1fr) 90px 120px 90px auto; align-items: end; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 0; background: #171717; }
.line-editor:has(.small-field:nth-of-type(3):last-of-type) { grid-template-columns: minmax(180px, 1fr) 90px 120px auto; }
.add-line-button { white-space: nowrap; }
.composer-table { min-height: 185px; max-height: 270px; border: 1px solid var(--line); border-radius: 0; overflow: auto; }
.cell-subtext { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.row-actions { width: 45px; text-align: right; }
.row-actions .icon-button { width: 30px; height: 30px; }
.row-actions .icon-button svg { width: 15px; }
.danger-icon { color: var(--danger); }
@media screen and (max-width: 900px) {
    .modal-backdrop { padding: 0; place-items: stretch; }
    .modal-panel, .modal-panel.wide, .modal-panel[class*="reference-"] { width: 100%; max-height: 100dvh; min-height: 100dvh; border: 0; border-radius: 0; }
    .composer-layout { grid-template-columns: 1fr; }
    .composer-summary { border-left: 0; border-top: 1px solid var(--line); }
    .line-editor { grid-template-columns: 1fr 1fr; }
    .line-editor .member-field { grid-column: 1 / -1; }
    .line-editor .add-line-button { grid-column: 1 / -1; }
}
.compact-surface { padding: 11px 13px; }
.toolbar { display: flex; align-items: center; gap: 10px; }
.toolbar > select { width: auto; min-width: 170px; }
.search-box { min-width: 240px; flex: 1; position: relative; }
.search-box svg { width: 16px; height: 16px; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #89928c; }
.search-box input { padding-left: 36px; }
.result-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.roomy-table td { height: 58px; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--blue); font-weight: 800; cursor: pointer; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; }
.editor-main { padding: 18px; }
.editor-aside { padding: 18px; border-left: 1px solid var(--line); background: var(--surface-subtle); display: flex; flex-direction: column; gap: 11px; }
.editor-aside .button:first-of-type { margin-top: auto; }
.editor-note { padding: 11px; display: flex; align-items: flex-start; gap: 8px; color: var(--muted); background: #eef4f0; border-radius: 5px; font-size: 10px; line-height: 1.45; }
.editor-note svg { width: 15px; flex: 0 0 15px; }
.repair-details { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 650px; }
.repair-overview { padding: 18px; border-right: 1px solid var(--line); background: var(--surface-subtle); }
.details-list { margin: 0; display: grid; gap: 13px; }
.details-list div { display: grid; gap: 3px; }
.details-list dt, .details-notes span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.details-list dd { margin: 0; font-size: 12px; font-weight: 700; }
.details-notes { margin-top: 20px; padding-top: 17px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.details-notes div { display: grid; gap: 5px; }
.details-notes p { font-size: 11px; line-height: 1.5; white-space: pre-wrap; }
.repair-workspace { min-width: 0; padding: 18px; display: grid; align-content: start; gap: 14px; }
.subsection-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.subsection-header h3 { font-size: 13px; }
.subsection-header p { margin-top: 3px; color: var(--muted); font-size: 10px; }
.inline-editor { display: grid; gap: 8px; align-items: center; }
.repair-line-editor { grid-template-columns: minmax(170px, 1fr) 80px 105px 80px auto; }
.inset-table { border: 1px solid var(--line); border-radius: 6px; max-height: 240px; }
.details-columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr); gap: 20px; margin-top: 5px; padding-top: 17px; border-top: 1px solid var(--line); }
.status-editor { margin-top: 10px; display: grid; grid-template-columns: 135px minmax(100px, 1fr) auto; gap: 7px; }
.timeline { margin-top: 14px; display: grid; max-height: 250px; overflow-y: auto; }
.timeline-item { display: grid; grid-template-columns: 14px 1fr; gap: 8px; min-height: 64px; }
.timeline-item > span { width: 8px; height: 8px; margin-top: 4px; border: 2px solid white; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #9fc4a4; position: relative; }
.timeline-item > span::after { content: ""; width: 1px; height: 53px; position: absolute; top: 8px; left: 2px; background: var(--line); }
.timeline-item:last-child > span::after { display: none; }
.timeline-item strong { font-size: 11px; }
.timeline-item small { margin-left: 8px; color: var(--muted); font-size: 9px; }
.timeline-item p { margin-top: 5px; color: #414b45; font-size: 10px; line-height: 1.45; }
.upload-button { min-height: 40px; margin-top: 10px; padding: 0 12px; border: 1px dashed var(--line-strong); border-radius: 5px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--green-dark); background: var(--surface-subtle); cursor: pointer; font-size: 11px; font-weight: 700; }
.upload-button svg { width: 15px; }
.upload-button input { display: none; }
.attachment-list { margin-top: 8px; display: grid; gap: 5px; }
.attachment-list > a { min-height: 44px; padding: 7px 9px; display: grid; grid-template-columns: 18px 1fr 15px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; text-decoration: none; }
.attachment-list > a svg { width: 15px; }
.attachment-list strong, .attachment-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-list strong { font-size: 10px; }
.attachment-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.empty-note { padding: 18px 0; color: var(--muted); text-align: center; font-size: 10px; }
.modal-loading { min-height: 340px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); }
@media (max-width: 980px) {
    .editor-grid, .repair-details { grid-template-columns: 1fr; }
    .editor-aside, .repair-overview { border: 0; border-top: 1px solid var(--line); }
    .repair-overview { order: 2; }
    .details-columns { grid-template-columns: 1fr; }
}
@media screen and (max-width: 720px) {
    .toolbar { align-items: stretch; flex-direction: column; }
    .toolbar > select, .search-box { width: 100%; min-width: 0; }
    .repair-line-editor, .status-editor { grid-template-columns: 1fr 1fr; }
    .repair-line-editor select, .status-editor input { grid-column: 1 / -1; }
    .repair-line-editor .button, .status-editor .button { grid-column: 1 / -1; }
}
.segmented-tabs { display: flex; align-items: center; gap: 3px; padding: 4px; overflow-x: auto; border: 1px solid var(--line); border-radius: 7px; background: #e8ece9; align-self: start; }
.segmented-tabs button { min-height: 35px; padding: 0 12px; border: 0; border-radius: 5px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted); background: transparent; cursor: pointer; white-space: nowrap; font-size: 11px; font-weight: 700; }
.segmented-tabs button svg { width: 15px; }
.segmented-tabs button span { min-width: 18px; padding: 2px 5px; border-radius: 9px; color: #68716c; background: rgba(255,255,255,.65); font-size: 9px; }
.segmented-tabs button.active { color: var(--ink); background: white; box-shadow: 0 1px 3px rgba(24,32,27,.12); }
.status-badge.negative { color: #933d35; background: #fae9e6; }
.status-badge.warning { color: #8b5a17; background: #faefd9; }
.status-badge.blue { color: #2f688f; background: #e6f0f7; }
.stock-value { font-size: 14px !important; }
.danger-text { color: var(--danger) !important; }
.success-text { color: var(--green-dark) !important; }
.warning-text { color: #9a651d !important; }
.link-icon { display: inline-grid; }
.warehouse-actions { flex-wrap: wrap; justify-content: flex-end; }
.toolbar-check { margin-left: auto; padding: 0 5px; }
.stock-editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: 500px; }
.stock-editor-main { padding: 18px; display: grid; align-content: start; gap: 16px; }
.stock-line-editor { grid-template-columns: minmax(180px, 1fr) 120px auto; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-subtle); }
.summary-number { display: grid; gap: 4px; }
.summary-number span { color: var(--muted); font-size: 11px; }
.summary-number strong { font-size: 28px; }
.order-create-group select { min-width: 175px; }
.compact-metrics .metric-card { min-height: 112px; }
.task-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 620px; }
.task-board { display: grid; gap: 8px; }
.task-row { min-height: 76px; padding: 13px 15px; display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.task-row.completed { opacity: .72; }
.task-state { color: var(--amber); }
.task-row.completed .task-state { color: var(--green); }
.task-state svg { width: 20px; }
.task-content strong { font-size: 13px; }
.task-content p { margin-top: 5px; color: #525d56; font-size: 11px; line-height: 1.45; }
.task-content small { margin-top: 7px; display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }
.task-content small svg { width: 12px; }
.done-date { color: var(--muted); font-size: 10px; }
.compact-empty { min-height: 280px; }
.compact-empty > svg { width: 32px; color: #a5aea8; }
.modal-form { padding: 18px; }
.modal-actions, .settings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.payment-methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.payment-methods label { display: flex; align-items: center; gap: 6px; }
.payment-methods label svg { width: 14px; }
.payment-total { padding: 14px; border-radius: 6px; display: grid; gap: 4px; }
.payment-total.income { color: #2f6f39; background: #eaf4eb; }
.payment-total.expense { color: #933d35; background: #fae9e6; }
.payment-total span { font-size: 10px; }
.payment-total strong { font-size: 22px; }
.small-button { min-height: 32px; padding: 0 10px; }
.report-filters { display: grid; grid-template-columns: 160px 160px minmax(180px, 1fr) auto; align-items: end; }
.report-filters input, .report-filters select { min-height: 38px; }
.filter-button { height: 38px; }
.report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.reference-tabs, .settings-tabs { max-width: 100%; }
.form-grid.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.editor-check { align-self: end; min-height: 40px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; }
.catalog-columns { display: grid; grid-template-columns: 1fr 1fr; }
.catalog-columns > div + div { border-left: 1px solid var(--line); }
.simple-list { display: grid; }
.simple-list > button { min-height: 55px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink); background: white; text-align: left; cursor: pointer; }
.simple-list > button:hover { background: var(--surface-subtle); }
.simple-list > button strong, .simple-list > button small { display: block; }
.simple-list > button strong { font-size: 12px; }
.simple-list > button small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.simple-list > button > svg { width: 15px; color: var(--muted); }
.color-preview { width: 15px; height: 15px; margin-right: 7px; border: 1px solid rgba(0,0,0,.12); border-radius: 3px; display: inline-block; vertical-align: middle; }
.settings-surface { padding-bottom: 18px; }
.settings-heading { min-height: 82px; padding: 17px 18px; display: flex; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); }
.settings-heading > div { min-width: 0; }
.settings-heading p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.settings-icon { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 6px; display: grid; place-items: center; }
.settings-icon svg { width: 19px; }
.settings-icon.green { color: var(--green-dark); background: #e9f4eb; }
.settings-icon.blue { color: var(--blue); background: #e9f2f8; }
.settings-icon.amber { color: var(--amber); background: #faf0df; }
.settings-form { max-width: 800px; padding: 20px 18px 4px; display: grid; gap: 15px; }
.connection-grid { margin: 0; padding: 20px 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.connection-grid div { display: grid; gap: 5px; }
.connection-grid dt { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.connection-grid dd { margin: 0; font-size: 12px; font-weight: 700; }
.connection-state { display: inline-flex; align-items: center; gap: 7px; color: var(--green-dark); }
.connection-state > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.database-actions { padding: 0 18px 18px; display: flex; gap: 8px; }
.danger-zone { margin: 0 18px; padding: 14px; border: 1px solid #e9cbc6; border-radius: 6px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: #fff7f5; }
.danger-zone strong { color: #8d3831; font-size: 12px; }
.danger-zone p { margin-top: 4px; color: #8d6864; font-size: 10px; }
.danger-button { color: #9b3d35; border-color: #dfaaa4; background: white; }
.permission-heading select { width: 200px; margin-left: auto; }
.permission-groups { padding: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.permission-group { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.permission-group h3 { margin: 0; padding: 10px 12px; background: var(--surface-subtle); border-bottom: 1px solid var(--line); font-size: 11px; }
.permission-row { min-height: 48px; padding: 8px 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #edf0ee; cursor: pointer; }
.permission-row:last-child { border-bottom: 0; }
.permission-row strong, .permission-row small { display: block; }
.permission-row strong { font-size: 10px; }
.permission-row small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.permission-row input { width: 16px; height: 16px; accent-color: var(--green); }
.permission-groups + .settings-actions { padding: 0 18px; }
.mono-cell { font-family: Consolas, monospace; color: var(--muted); }
.print-layout { min-height: 100vh; padding: 24px; background: #e8ece9; }
.print-toolbar { max-width: 900px; margin: 0 auto 12px; display: flex; justify-content: flex-end; gap: 8px; }
.print-document { width: min(100%, 900px); min-height: 1180px; margin: 0 auto; padding: 48px; background: white; box-shadow: 0 10px 35px rgba(0,0,0,.12); }
.print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-bottom: 25px; border-bottom: 2px solid #202723; }
.print-logo { display: block; font-size: 20px; font-weight: 900; }
.print-header > div > small { display: block; margin-top: 5px; color: #667069; font-size: 10px; }
.print-document-title { text-align: right; }
.print-document-title span { color: #5d6761; font-size: 11px; text-transform: uppercase; }
.print-document-title h1 { margin-top: 5px; font-size: 25px; }
.print-meta { margin: 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 35px; }
.print-meta div { display: grid; grid-template-columns: 115px 1fr; gap: 10px; }
.print-meta dt { color: #667069; font-size: 10px; }
.print-meta dd { margin: 0; font-size: 11px; font-weight: 700; }
.print-table { width: 100%; border-collapse: collapse; }
.print-table th { padding: 9px 7px; border: 1px solid #bbc4be; background: #edf1ee; text-align: left; font-size: 9px; }
.print-table td { padding: 10px 7px; border: 1px solid #ccd3cf; font-size: 10px; }
.print-table th:not(:nth-child(2)), .print-table td:not(:nth-child(2)) { white-space: nowrap; }
.print-summary { width: 310px; margin: 22px 0 22px auto; display: grid; gap: 8px; }
.print-summary div { display: flex; justify-content: space-between; gap: 20px; font-size: 11px; }
.print-summary .grand-total { margin-top: 4px; padding-top: 10px; border-top: 2px solid #202723; font-size: 15px; }
.print-note, .repair-print-notes { margin: 22px 0; padding: 13px; border: 1px solid #ccd3cf; }
.print-note strong, .repair-print-notes strong { font-size: 10px; }
.print-note p, .repair-print-notes p { margin-top: 6px; font-size: 10px; line-height: 1.5; white-space: pre-wrap; }
.repair-print-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.print-footer { margin-top: 55px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; font-size: 10px; }
.print-footer p { grid-column: 1 / -1; margin-top: 25px; color: #667069; text-align: center; }
.payment-breakdown { margin: 35px 0; display: grid; gap: 12px; }
.payment-breakdown > div { padding-bottom: 10px; display: flex; justify-content: space-between; border-bottom: 1px solid #d7deda; }
.payment-breakdown .grand-total { padding: 16px; border: 2px solid #202723; font-size: 17px; }
.print-loading { min-height: 70vh; display: flex; align-items: center; justify-content: center; gap: 10px; }
.modal-panel.warranty-print-prompt { width: min(100%, 450px); }
.warranty-print-confirmation { padding: 18px; display: grid; gap: 18px; color: #b1b1b1; }
.warranty-print-message { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; }
.warranty-print-icon { width: 42px; height: 42px; border: 1px solid #416344; display: grid; place-items: center; color: #74c46d; background: #1c2b1d; }
.warranty-print-icon svg { width: 22px; height: 22px; }
.warranty-print-message div { min-width: 0; display: grid; gap: 5px; }
.warranty-print-message strong { color: #fff; font-size: 13px; }
.warranty-print-message p { margin: 0; color: #858585; font-size: 11px; line-height: 1.45; }
.warranty-print-confirmation footer { padding-top: 12px; border-top: 1px solid #303030; display: flex; justify-content: flex-end; gap: 7px; }
.warranty-print-confirmation footer button { min-height: 32px; padding: 6px 13px; border: 1px solid #414141; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #bbb; background: #292929; cursor: pointer; }
.warranty-print-confirmation footer button.primary { color: #fff; border-color: #3b8637; background: #408e3c; }
.warranty-print-confirmation footer button:hover { filter: brightness(1.12); }
.warranty-print-confirmation footer button svg { width: 14px; height: 14px; }
.repair-receipt-document { min-height: 1273px; padding: 30px 36px; display: grid; grid-template-rows: minmax(0, 1fr) 28px minmax(0, 1fr); color: #000; font-family: Arial, Helvetica, sans-serif; }
.repair-receipt-document * { box-sizing: border-box; letter-spacing: 0; }
.repair-receipt-copy { min-width: 0; display: flex; flex-direction: column; }
.repair-receipt-header { padding-bottom: 8px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; border-bottom: 3px solid #000; }
.repair-receipt-brand { display: grid; gap: 2px; }
.repair-receipt-brand > small { font-size: 8px; font-weight: 800; }
.repair-receipt-wordmark { display: flex; align-items: center; font-size: 31px; font-weight: 900; line-height: 1; }
.repair-receipt-wordmark b { width: .78em; height: .88em; margin: 0 1px; display: inline-grid; place-items: center; color: #fff; background: #000; font-size: .82em; font-style: normal; line-height: 1; transform: skew(-8deg); }
.repair-receipt-identity { display: grid; justify-items: end; text-align: right; }
.repair-receipt-identity > span { font-size: 9px; font-weight: 800; text-transform: uppercase; }
.repair-receipt-identity > strong { margin-top: 3px; font-size: 18px; line-height: 1; }
.repair-receipt-identity > small { margin-top: 4px; font-size: 7px; font-weight: 800; }
.repair-receipt-meta { margin: 0; padding: 7px 0 1px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.repair-receipt-meta > div { min-width: 0; padding-bottom: 4px; border-bottom: 1px solid #999; }
.repair-receipt-meta dt { color: #555; font-size: 7px; font-weight: 700; text-transform: uppercase; }
.repair-receipt-meta dd { margin: 2px 0 0; overflow-wrap: anywhere; font-size: 8.5px; font-weight: 700; line-height: 1.15; }
.repair-receipt-section { margin-top: 7px; }
.repair-receipt-section h2 { margin: 0 0 4px; display: flex; align-items: center; gap: 6px; font-size: 10px; line-height: 1.1; text-transform: uppercase; }
.repair-receipt-section h2 span { min-width: 23px; padding: 3px 4px 2px; display: inline-block; color: #fff; background: #000; text-align: center; font-size: 7px; }
.repair-receipt-device-grid { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(4, minmax(0, 1fr)); border: 1px solid #000; }
.repair-receipt-device-grid > div { min-width: 0; padding: 5px 6px; border-left: 1px solid #999; }
.repair-receipt-device-grid > div:first-child { border-left: 0; }
.repair-receipt-device-grid small, .repair-receipt-device-grid strong { display: block; overflow-wrap: anywhere; }
.repair-receipt-device-grid small { color: #555; font-size: 6.5px; font-weight: 700; text-transform: uppercase; }
.repair-receipt-device-grid strong { margin-top: 2px; font-size: 8px; line-height: 1.2; }
.repair-receipt-text-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.repair-receipt-text-grid > div { min-width: 0; padding: 5px 6px; border: 1px solid #999; }
.repair-receipt-text-grid strong, .repair-receipt-service-bottom strong, .repair-receipt-terms > strong { display: block; font-size: 7px; text-transform: uppercase; }
.repair-receipt-text-grid p, .repair-receipt-service-bottom p, .repair-receipt-terms p { margin: 3px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 7.5px; line-height: 1.25; }
.repair-receipt-finance { margin-top: 6px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 2px solid #000; border-bottom: 1px solid #000; }
.repair-receipt-finance > div { padding: 5px 7px; display: flex; align-items: center; justify-content: space-between; gap: 6px; border-left: 1px solid #999; }
.repair-receipt-finance > div:first-child { border-left: 0; }
.repair-receipt-finance span { font-size: 6.5px; font-weight: 700; }
.repair-receipt-finance strong { white-space: nowrap; font-size: 8.5px; }
.repair-receipt-client-bottom { margin-top: 6px; display: grid; grid-template-columns: minmax(0, 1fr) 86px; gap: 9px; align-items: stretch; }
.repair-receipt-terms { padding: 6px 7px; border: 1px solid #000; }
.repair-receipt-terms p + p { margin-top: 4px; }
.repair-receipt-qr { display: grid; justify-items: center; align-content: center; text-align: center; }
.repair-receipt-qr img { width: 67px; height: 67px; display: block; image-rendering: pixelated; }
.repair-receipt-qr strong { margin-top: 1px; font-size: 7px; text-transform: uppercase; }
.repair-receipt-qr small { margin-top: 1px; color: #555; font-size: 6px; }
.repair-receipt-service-bottom { margin-top: 6px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr); gap: 4px; }
.repair-receipt-service-bottom > div { min-width: 0; padding: 5px 6px; border: 1px solid #999; }
.repair-receipt-service-bottom .repair-receipt-diagnostic { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: end; }
.repair-receipt-diagnostic i { height: 11px; display: block; border-bottom: 1px solid #777; }
.repair-receipt-signatures { margin-top: auto; padding-top: 7px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.repair-receipt-signatures > div { display: grid; grid-template-columns: auto 1fr; gap: 6px; align-items: end; }
.repair-receipt-signatures span { font-size: 7px; font-weight: 700; }
.repair-receipt-signatures i { height: 12px; display: block; border-bottom: 1px solid #000; }
.repair-receipt-signatures small { grid-column: 2; margin-top: -4px; color: #555; font-size: 6px; text-align: center; }
.repair-receipt-footer { margin-top: 5px; padding-top: 4px; border-top: 1px solid #999; overflow-wrap: anywhere; text-align: center; font-size: 6px; }
.repair-receipt-cut { display: flex; align-items: center; gap: 8px; color: #555; }
.repair-receipt-cut::before, .repair-receipt-cut::after { content: ""; flex: 1; border-top: 1px dashed #777; }
.repair-receipt-cut span { font-size: 6px; font-weight: 700; }
.repair-receipt-dense .repair-receipt-text-grid p, .repair-receipt-dense .repair-receipt-service-bottom p, .repair-receipt-dense .repair-receipt-terms p { font-size: 6.8px; line-height: 1.18; }
.warranty-document { padding-top: 30px; box-sizing: border-box; color: #000; font-family: Arial, Helvetica, sans-serif; }
.warranty-document * { box-sizing: border-box; letter-spacing: 0; }
.warranty-header { padding-bottom: 15px; display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; border-bottom: 4px solid #000; }
.warranty-brand { display: grid; gap: 3px; }
.warranty-brand small { font-size: 10px; font-weight: 700; letter-spacing: 1.2px; }
.warranty-wordmark { display: flex; align-items: center; color: #000; font-size: 42px; font-weight: 900; line-height: 1; }
.warranty-wordmark b { width: .78em; height: .88em; margin: 0 1px; display: inline-grid; place-items: center; color: #fff; background: #000; font-size: .82em; font-style: normal; line-height: 1; transform: skew(-8deg); }
.warranty-identity { display: grid; justify-items: end; text-align: right; }
.warranty-identity > span { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.warranty-identity > strong { margin-top: 4px; font-size: 28px; line-height: 1; }
.warranty-identity > small { margin-top: 7px; font-size: 11px; }
.warranty-meta { margin: 0; padding: 11px 0 2px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.warranty-meta > div { min-width: 0; padding-bottom: 7px; border-bottom: 1px solid #999; }
.warranty-meta dt { color: #555; font-size: 9.5px; font-weight: 700; text-transform: uppercase; }
.warranty-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 11.5px; font-weight: 700; }
.warranty-section { margin-top: 15px; }
.warranty-section h2 { margin: 0 0 8px; display: flex; align-items: center; gap: 8px; color: #000; font-size: 14px; line-height: 1.2; text-transform: uppercase; }
.warranty-section h2 span { min-width: 29px; padding: 4px 4px 3px; display: inline-block; color: #fff; background: #000; text-align: center; font-size: 10px; }
.warranty-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.warranty-table th, .warranty-table td { padding: 7px 6px; border: 1px solid #000; color: #000; vertical-align: top; text-align: left; font-size: 10.5px; line-height: 1.3; overflow-wrap: anywhere; }
.warranty-table th { color: #fff; background: #000; font-size: 9px; text-transform: uppercase; }
.warranty-table th:nth-child(1), .warranty-table td:nth-child(1) { width: 28px; text-align: center; }
.warranty-table th:nth-child(2), .warranty-table td:nth-child(2) { width: 38%; }
.warranty-table th:nth-child(3), .warranty-table td:nth-child(3) { width: 13%; }
.warranty-table th:nth-child(4), .warranty-table td:nth-child(4) { width: 18%; }
.warranty-table th:nth-child(5), .warranty-table td:nth-child(5) { width: 9%; text-align: center; }
.warranty-table th:nth-child(6), .warranty-table td:nth-child(6) { width: 15%; }
.warranty-caption, .warranty-empty { margin: 7px 0 0; font-size: 9.5px; line-height: 1.4; }
.warranty-empty { padding: 12px; border: 1px solid #000; font-weight: 700; }
.warranty-service-text { margin: 0; padding: 9px 10px; border-top: 1px solid #000; border-bottom: 1px solid #000; font-size: 10px; line-height: 1.4; }
.warranty-refusal > p { margin: 0 0 7px; font-size: 10px; line-height: 1.4; }
.warranty-refusal ol { margin: 0; padding: 8px 8px 8px 25px; columns: 2; column-gap: 28px; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.warranty-refusal li { margin: 0 0 6px; padding-left: 2px; break-inside: avoid; font-size: 9.5px; line-height: 1.4; }
.warranty-legal-note { margin-top: 8px; padding: 8px 10px; display: grid; grid-template-columns: 48px 1fr; gap: 9px; border: 2px solid #000; }
.warranty-legal-note strong { font-size: 10px; text-transform: uppercase; }
.warranty-legal-note p { margin: 0; font-size: 9.5px; font-weight: 600; line-height: 1.4; }
.warranty-sale-note { margin-top: 10px; padding-top: 7px; border-top: 1px solid #000; }
.warranty-sale-note strong { font-size: 10px; text-transform: uppercase; }
.warranty-sale-note p { margin: 3px 0 0; white-space: pre-wrap; font-size: 9.5px; line-height: 1.35; }
.warranty-acceptance { margin-top: 13px; padding-top: 8px; border-top: 3px solid #000; font-size: 10px; font-weight: 700; }
.warranty-signatures { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 38px; align-items: end; }
.warranty-signatures > div { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: end; }
.warranty-signatures span { font-size: 10px; font-weight: 700; }
.warranty-signatures i { height: 18px; display: block; border-bottom: 1px solid #000; }
.warranty-signatures small { grid-column: 2; margin-top: -5px; color: #555; font-size: 8.5px; text-align: center; }
.warranty-footer { margin-top: 14px; padding-top: 8px; display: grid; gap: 3px; border-top: 1px solid #000; text-align: center; }
.warranty-footer p { margin: 0; font-size: 8px; line-height: 1.3; }
.warranty-footer small { color: #555; font-size: 7.5px; }
.repair-warranty-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 7px; }
.repair-warranty-summary { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.repair-warranty-summary > div { min-width: 0; padding: 8px 10px; border: 1px solid #000; }
.repair-warranty-summary strong { display: block; font-size: 9px; text-transform: uppercase; }
.repair-warranty-summary p { margin: 4px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: 9.5px; line-height: 1.35; }
.repair-warranty-table th:nth-child(1), .repair-warranty-table td:nth-child(1) { width: 28px; }
.repair-warranty-table th:nth-child(2), .repair-warranty-table td:nth-child(2) { width: 9%; }
.repair-warranty-table th:nth-child(3), .repair-warranty-table td:nth-child(3) { width: 42%; }
.repair-warranty-table th:nth-child(4), .repair-warranty-table td:nth-child(4) { width: 18%; }
.repair-warranty-table th:nth-child(5), .repair-warranty-table td:nth-child(5) { width: 8%; }
.repair-warranty-table th:nth-child(6), .repair-warranty-table td:nth-child(6) { width: 15%; }
.repair-warranty-code { margin-top: 2px; display: block; color: #555; font-size: 8px; font-weight: 400; }
.business-document .warranty-identity { min-width: 0; max-width: 60%; overflow-wrap: anywhere; }
.business-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; }
.business-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.business-table th, .business-table td { padding: 8px 6px; border: 1px solid #000; color: #000; vertical-align: top; overflow-wrap: anywhere; text-align: left; font-size: 10.5px; line-height: 1.35; }
.business-table th { background: #000; color: #fff; font-size: 9px; text-transform: uppercase; }
.business-table .numeric { text-align: right; font-variant-numeric: tabular-nums; }
.business-table .line-number { width: 5%; }
.business-table .item-code { width: 15%; }
.business-table .item-quantity { width: 8%; }
.business-table .item-money { width: 15%; }
.business-table .item-discount { width: 8%; }
.business-document .print-summary { width: min(100%, 330px); margin: 18px 0 22px auto; }
.business-document .print-summary .grand-total { border-color: #000; }
.business-document .print-note, .business-document .repair-print-notes { padding: 10px 0; border: 0; border-top: 1px solid #000; border-bottom: 1px solid #000; }
.business-document .print-note p, .business-document .repair-print-notes p { margin-bottom: 0; overflow-wrap: anywhere; }
.business-document .print-note strong, .business-document .repair-print-notes strong { text-transform: uppercase; }
.business-document .payment-breakdown { margin: 0; gap: 0; font-size: 12px; }
.business-document .payment-breakdown > div { gap: 16px; padding: 12px 0; border-color: #999; }
.business-document .payment-breakdown .grand-total { margin-top: 8px; padding: 14px 0; border: 0; border-top: 3px solid #000; border-bottom: 1px solid #000; }
#crmcore-grid-print { display: none; }
.grid-print-context { margin: 4mm 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 9pt; line-height: 1.4; }
.grid-print-context label { display: block; }
.grid-print-context span, .grid-print-context strong, .grid-print-context b { margin-right: 8px; }
.grid-print-document .business-table { margin-top: 5mm; table-layout: auto; }
@media print {
    html, body { background: #fff !important; color: #000; color-scheme: light; }
    body:has(> #crmcore-grid-print) > :not(#crmcore-grid-print) { display: none !important; }
    body:has(> #crmcore-grid-print) { margin: 0; padding: 0; min-width: 0; background: #fff; }
    #crmcore-grid-print { display: block; page: journal-document; }
    .grid-print-document .business-table th, .grid-print-document .business-table td { font-size: 7pt; }
    .print-layout { min-height: 0; height: auto; padding: 0; background: white; }
    .print-toolbar { display: none; }
    .print-document { width: 100%; min-height: 0; padding: 0; box-shadow: none; }
    .repair-receipt-document { page: auto; width: 210mm; height: 297mm; padding: 5mm 8mm !important; grid-template-rows: minmax(0, 1fr) 5mm minmax(0, 1fr); overflow: hidden; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .repair-receipt-copy { min-height: 0; break-inside: avoid; }
    .repair-receipt-header { padding-bottom: 2mm; gap: 6mm; border-bottom-width: .8mm; }
    .repair-receipt-brand { gap: .3mm; }
    .repair-receipt-brand > small { font-size: 6.6pt; }
    .repair-receipt-wordmark { font-size: 25pt; }
    .repair-receipt-identity > span { font-size: 8pt; }
    .repair-receipt-identity > strong { margin-top: .8mm; font-size: 15pt; }
    .repair-receipt-identity > small { margin-top: .9mm; font-size: 6.4pt; }
    .repair-receipt-meta { padding: 1.9mm 0 .3mm; gap: 3mm; }
    .repair-receipt-meta > div { padding-bottom: 1.2mm; }
    .repair-receipt-meta dt { font-size: 6pt; }
    .repair-receipt-meta dd { margin-top: .5mm; font-size: 7.6pt; line-height: 1.15; }
    .repair-receipt-section { margin-top: 2mm; }
    .repair-receipt-section h2 { margin-bottom: 1mm; gap: 1.6mm; font-size: 8.4pt; }
    .repair-receipt-section h2 span { min-width: 6.6mm; padding: .8mm .9mm .6mm; font-size: 6.1pt; }
    .repair-receipt-device-grid > div { padding: 1.5mm 1.4mm; }
    .repair-receipt-device-grid small { font-size: 5.5pt; }
    .repair-receipt-device-grid strong { margin-top: .6mm; font-size: 7.1pt; line-height: 1.2; }
    .repair-receipt-text-grid { gap: 1mm; }
    .repair-receipt-text-grid > div { padding: 1.3mm 1.5mm; }
    .repair-receipt-text-grid strong, .repair-receipt-service-bottom strong, .repair-receipt-terms > strong { font-size: 6.1pt; }
    .repair-receipt-text-grid p, .repair-receipt-service-bottom p, .repair-receipt-terms p { margin-top: .7mm; font-size: 6.8pt; line-height: 1.25; }
    .repair-receipt-finance { margin-top: 1.7mm; border-top-width: .6mm; }
    .repair-receipt-finance > div { padding: 1.3mm 1.4mm; }
    .repair-receipt-finance span { font-size: 5.7pt; }
    .repair-receipt-finance strong { font-size: 7.5pt; }
    .repair-receipt-client-bottom { margin-top: 1.7mm; grid-template-columns: minmax(0, 1fr) 27mm; gap: 2.5mm; }
    .repair-receipt-terms { padding: 1.4mm 1.6mm; }
    .repair-receipt-terms p + p { margin-top: 1mm; }
    .repair-receipt-qr img { width: 22mm; height: 22mm; }
    .repair-receipt-qr strong { margin-top: .3mm; font-size: 6pt; }
    .repair-receipt-qr small { margin-top: .2mm; font-size: 5.2pt; }
    .repair-receipt-service-bottom { margin-top: 1.7mm; gap: 1mm; }
    .repair-receipt-service-bottom > div { padding: 1.3mm 1.5mm; }
    .repair-receipt-service-bottom .repair-receipt-diagnostic { gap: 2mm; }
    .repair-receipt-diagnostic i { height: 3.5mm; }
    .repair-receipt-signatures { padding-top: 2mm; gap: 8mm; }
    .repair-receipt-signatures > div { gap: 1.5mm; }
    .repair-receipt-signatures span { font-size: 6.3pt; }
    .repair-receipt-signatures i { height: 4mm; }
    .repair-receipt-signatures small { margin-top: -1mm; font-size: 5.3pt; }
    .repair-receipt-footer { margin-top: 1mm; padding-top: .8mm; font-size: 5.3pt; }
    .repair-receipt-cut { gap: 2mm; }
    .repair-receipt-cut span { font-size: 4.8pt; }
    .repair-receipt-dense .repair-receipt-text-grid p, .repair-receipt-dense .repair-receipt-service-bottom p, .repair-receipt-dense .repair-receipt-terms p { font-size: 6.1pt; line-height: 1.18; }
    .warranty-document { page: auto; width: 100%; padding: 5mm 8mm 8mm !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .print-document:not(.warranty-document):not(.repair-receipt-document) { padding: 14mm !important; }
    .warranty-header { padding-bottom: 2.5mm; gap: 8mm; border-bottom-width: .8mm; }
    .warranty-brand { gap: .4mm; }
    .warranty-brand small { font-size: 7.5pt; letter-spacing: .7pt; }
    .warranty-wordmark { font-size: 30pt; }
    .warranty-identity > span { font-size: 8.5pt; }
    .warranty-identity > strong { margin-top: .7mm; font-size: 19pt; }
    .warranty-identity > small { margin-top: 1mm; font-size: 7.6pt; }
    .warranty-meta { padding: 2mm 0 0; gap: 4mm; }
    .warranty-meta > div { padding-bottom: 1.2mm; }
    .warranty-meta dt { font-size: 6.6pt; }
    .warranty-meta dd { margin-top: .6mm; font-size: 8.2pt; }
    .warranty-section { margin-top: 2.8mm; }
    .warranty-section h2 { margin-bottom: 1.3mm; gap: 1.8mm; font-size: 9.4pt; }
    .warranty-section h2 span { min-width: 7.5mm; padding: 1mm 1mm .8mm; font-size: 7pt; }
    .warranty-table th, .warranty-table td { padding: 1.25mm 1.2mm; font-size: 7.8pt; line-height: 1.17; }
    .warranty-table th { font-size: 6.7pt; }
    .warranty-table th:nth-child(1), .warranty-table td:nth-child(1) { width: 6mm; }
    .warranty-table th:nth-child(2), .warranty-table td:nth-child(2) { width: 42%; }
    .warranty-table th:nth-child(3), .warranty-table td:nth-child(3) { width: 13%; }
    .warranty-table th:nth-child(4), .warranty-table td:nth-child(4) { width: 19%; }
    .warranty-table th:nth-child(5), .warranty-table td:nth-child(5) { width: 8%; }
    .warranty-table th:nth-child(6), .warranty-table td:nth-child(6) { width: 14%; }
    .warranty-caption, .warranty-empty { margin-top: 1.2mm; font-size: 6.8pt; line-height: 1.28; }
    .warranty-service-text { padding: 1.6mm 2mm; font-size: 7.2pt; line-height: 1.28; }
    .warranty-refusal > p { margin-bottom: 1.2mm; font-size: 7.2pt; line-height: 1.28; }
    .warranty-refusal ol { padding: 1.5mm 1.8mm 1.2mm 5.5mm; columns: 2; column-gap: 8mm; }
    .warranty-refusal li { margin-bottom: 1mm; padding-left: .4mm; font-size: 6.9pt; line-height: 1.23; }
    .warranty-legal-note { margin-top: 1.5mm; padding: 1.7mm 2mm; grid-template-columns: 12mm 1fr; gap: 1.8mm; }
    .warranty-legal-note strong { font-size: 7.1pt; }
    .warranty-legal-note p { font-size: 6.8pt; line-height: 1.25; }
    .warranty-sale-note { margin-top: 1.8mm; padding-top: 1.2mm; }
    .warranty-sale-note strong { font-size: 7.1pt; }
    .warranty-sale-note p { margin-top: .6mm; font-size: 6.8pt; line-height: 1.25; }
    .warranty-acceptance { margin-top: 2.5mm; padding-top: 1.6mm; border-top-width: .7mm; font-size: 7.2pt; }
    .warranty-signatures { margin-top: 3.5mm; grid-template-columns: 1fr 1fr; gap: 12mm; }
    .warranty-signatures > div { grid-template-columns: auto 1fr; gap: 2mm; }
    .warranty-signatures span { font-size: 7.4pt; }
    .warranty-signatures i { height: 6mm; }
    .warranty-signatures small { margin-top: -1.2mm; font-size: 6.2pt; }
    .warranty-footer { margin-top: 3mm; padding-top: 1.5mm; gap: .5mm; }
    .warranty-footer p { font-size: 6.4pt; }
    .warranty-footer small { font-size: 5.9pt; }
    .warranty-many-items .warranty-table th, .warranty-many-items .warranty-table td { padding-top: 1mm; padding-bottom: 1mm; font-size: 7.2pt; }
    .warranty-many-items .warranty-table th { font-size: 6.2pt; }
    .repair-warranty-document { padding-top: 4mm !important; padding-bottom: 5mm !important; }
    .repair-warranty-meta { padding-top: 1.5mm; row-gap: 1mm; }
    .repair-warranty-summary { margin-top: 1.2mm; gap: 1.5mm; }
    .repair-warranty-summary > div { padding: 1.3mm 1.7mm; }
    .repair-warranty-summary strong { font-size: 6.4pt; }
    .repair-warranty-summary p { margin-top: .6mm; font-size: 6.8pt; line-height: 1.22; }
    .repair-warranty-table th:nth-child(1), .repair-warranty-table td:nth-child(1) { width: 6mm; }
    .repair-warranty-table th:nth-child(2), .repair-warranty-table td:nth-child(2) { width: 9%; }
    .repair-warranty-table th:nth-child(3), .repair-warranty-table td:nth-child(3) { width: 42%; }
    .repair-warranty-table th:nth-child(4), .repair-warranty-table td:nth-child(4) { width: 18%; }
    .repair-warranty-table th:nth-child(5), .repair-warranty-table td:nth-child(5) { width: 8%; }
    .repair-warranty-table th:nth-child(6), .repair-warranty-table td:nth-child(6) { width: 15%; }
    .repair-warranty-code { margin-top: .3mm; font-size: 5.8pt; }
    .repair-warranty-refusal ol { column-gap: 6mm; }
    .repair-warranty-dense .warranty-header { padding-bottom: 2mm; }
    .repair-warranty-dense .warranty-meta dt { font-size: 6.1pt; }
    .repair-warranty-dense .warranty-meta dd { font-size: 7.5pt; }
    .repair-warranty-dense .warranty-section { margin-top: 2.2mm; }
    .repair-warranty-dense .warranty-section h2 { margin-bottom: 1mm; font-size: 8.7pt; }
    .repair-warranty-dense .warranty-table th, .repair-warranty-dense .warranty-table td { padding: .75mm .9mm; font-size: 6.7pt; line-height: 1.12; }
    .repair-warranty-dense .warranty-table th { font-size: 5.9pt; }
    .repair-warranty-dense .warranty-caption, .repair-warranty-dense .warranty-service-text, .repair-warranty-dense .warranty-refusal > p { font-size: 6.4pt; line-height: 1.2; }
    .repair-warranty-dense .warranty-refusal li { margin-bottom: .6mm; font-size: 6.2pt; line-height: 1.16; }
    .repair-warranty-dense .warranty-legal-note { margin-top: 1mm; padding: 1.2mm 1.5mm; }
    .repair-warranty-dense .warranty-legal-note p { font-size: 6.1pt; line-height: 1.18; }
    .repair-warranty-dense .warranty-acceptance { margin-top: 1.7mm; font-size: 6.5pt; }
    .repair-warranty-dense .warranty-signatures { margin-top: 2.2mm; }
    .repair-warranty-dense .warranty-footer { margin-top: 1.8mm; }
    .warranty-table thead { display: table-header-group; }
    .warranty-table tr, .warranty-section h2, .warranty-service-text, .warranty-legal-note, .warranty-acceptance, .warranty-signatures, .repair-warranty-summary, .repair-warranty-bottom { break-inside: avoid; }
    .business-document { page: business-document; padding: 0 !important; }
    .business-table thead { display: table-header-group; }
    .business-table th, .business-table td { padding: 1.7mm 1.3mm; font-size: 8pt; line-height: 1.3; }
    .business-table th { font-size: 6.8pt; }
    .business-table tr, .business-document .print-summary, .business-document .payment-breakdown, .business-document .warranty-footer { break-inside: avoid; }
    .business-document .warranty-section h2 { break-after: avoid; }
    .business-document .print-note, .business-document .repair-print-notes { margin: 4mm 0; padding: 2.5mm 0; }
    .business-document .print-note p, .business-document .repair-print-notes p { font-size: 8pt; orphans: 3; widows: 3; }
    .business-document .payment-breakdown { font-size: 9pt; }
    .business-document .payment-breakdown > div { padding: 3mm 0; }
    .business-document .payment-breakdown .grand-total { padding: 3.5mm 0; font-size: 12pt; }
    @page { size: A4 portrait; margin: 0; }
    @page business-document { size: A4 portrait; margin: 8mm; }
    @page journal-document { size: A4 landscape; margin: 8mm; }
    @page price-label { size: 40mm 30mm; margin: 0; }
}
@media screen and (max-width: 900px) {
    .stock-editor-layout { grid-template-columns: 1fr; }
    .report-grid, .catalog-columns { grid-template-columns: 1fr; }
    .catalog-columns > div + div { border-left: 0; border-top: 1px solid var(--line); }
    .permission-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 720px) {
    .header-actions, .warehouse-actions, .order-create-group { width: 100%; grid-template-columns: 1fr; }
    .order-create-group { display: grid; }
    .order-create-group select { width: 100%; }
    .stock-line-editor, .payment-methods, .report-filters, .form-grid.three-columns, .form-grid.four-columns, .checkbox-grid, .connection-grid, .permission-groups { grid-template-columns: 1fr; }
    .stock-line-editor select { grid-column: 1 / -1; }
    .task-metrics { grid-template-columns: 1fr; max-width: none; }
    .task-row { grid-template-columns: 22px minmax(0, 1fr); }
    .task-row > .button, .task-row > .done-date { grid-column: 2; justify-self: start; }
    .database-actions, .danger-zone { align-items: stretch; flex-direction: column; }
    .permission-heading { flex-wrap: wrap; }
    .permission-heading select { width: 100%; margin-left: 51px; }
    .print-layout { padding: 0; }
    .print-document { min-height: 100vh; padding: 24px 18px; }
    .print-header, .print-meta { grid-template-columns: 1fr; }
    .print-meta div { grid-template-columns: 95px 1fr; }
    .repair-print-notes { grid-template-columns: 1fr; }
    .warranty-header { gap: 15px; }
    .warranty-meta, .warranty-signatures { grid-template-columns: 1fr; }
    .warranty-identity > strong { font-size: 17px; }
    .warranty-refusal ol { columns: 1; }
    .warranty-signatures > div { grid-template-columns: 105px 1fr; }
}

/* CRMCORE v.05 desktop visual language */
.page-header { padding: 0 0 3px; align-items: center; }
.page-header .eyebrow { margin-bottom: 3px; color: #678de3; letter-spacing: 0; }
.page-header h1 { color: #d0d0d0; font-size: 18px; font-weight: 600; }
.page-header p { font-size: 11px; }
.compact-surface { padding: 7px 9px; }
.toolbar { min-height: 42px; border-color: #282828; background: #181818; }
.search-box input { background: #181818; }
.data-table { background: #181818; }
.data-table tbody tr:nth-child(even) td { background: #191919; }
.data-table tbody tr:nth-child(even):hover td { background: #262626; }
.roomy-table td { height: 36px; }
.surface-header { min-height: 48px; padding: 9px 12px; }
.text-link, .row-link, .link-button { color: #91a6d3; }
.segmented-tabs { gap: 0; padding: 0; border-radius: 0; border-color: #393939; background: #252525; }
.segmented-tabs button { min-height: 30px; border-right: 1px solid #393939; border-radius: 0; color: #a0a0a0; }
.segmented-tabs button.active { color: #fff; background: #3a3a3a; box-shadow: none; }
.quick-actions > a,
.task-row,
.simple-list > button { border-color: #282828; color: #b1b1b1; background: #181818; }
.quick-actions > a:hover,
.simple-list > button:hover { background: #262626; }
.status-badge.negative { color: #ff7e91; background: #2d171b; }
.status-badge.warning { color: #e6b96f; background: #2a241a; }
.status-badge.blue { color: #9ab0e0; background: #1c2332; }
.editor-grid,
.repair-details,
.stock-editor-layout { background: #151515; }
.editor-aside,
.repair-overview { background: #181818; }
.editor-note { color: #8d9a91; background: #1c251f; border-radius: 0; }
.inset-table,
.upload-button,
.attachment-list > a,
.permission-group,
.checkbox-grid,
.stock-line-editor { border-radius: 0; background: #181818; }
.timeline-item > span { border-color: #151515; }
.timeline-item p,
.task-content p { color: #a0a0a0; }
.alert { border-radius: 0; }
.alert.danger { color: #ff93a3; background: #2c171b; border-color: #6f2936; }
.alert.success { color: #8ed895; background: #17291a; border-color: #315f36; }
.payment-total.income { color: #8ed895; background: #17291a; }
.payment-total.expense { color: #ff93a3; background: #2c171b; }
.settings-heading,
.permission-group h3 { background: #181818; }
.danger-zone { border-radius: 0; background: #26191a; }
.auth-layout { background: #151515; }
.auth-panel { border-color: #303030; border-radius: 0; color: #b1b1b1; background: #181818; }

.legacy-loading {
    min-height: calc(100vh - 170px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #727272;
}

.dashboard-home {
    width: 100%;
    min-width: 0;
    padding-bottom: 18px;
    display: grid;
    align-content: start;
    gap: 12px;
}

.dashboard-heading {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.dashboard-title { min-width: 0; display: grid; gap: 3px; }
.dashboard-kicker { color: #6baf73; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.dashboard-title-line { display: flex; align-items: baseline; gap: 12px; }
.dashboard-title-line h1 { color: #e4e4e4; font-size: 22px; }
.dashboard-title-line time { color: #8a8a8a; font-size: 12px; }
.dashboard-updated { color: #626262; font-size: 10px; }
.dashboard-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; }
.dashboard-actions a,
.dashboard-actions button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #393939;
    border-radius: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #bdbdbd;
    background: #222;
    text-decoration: none;
    cursor: pointer;
}
.dashboard-actions a:hover,
.dashboard-actions button:hover { border-color: #4b4b4b; color: #fff; background: #292929; }
.dashboard-actions button { width: 36px; padding: 0; }
.dashboard-actions button:disabled { opacity: .55; cursor: wait; }
.dashboard-actions svg { width: 15px; height: 15px; }
.dashboard-alert { margin: 0; }

.dashboard-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 8px; }
.dashboard-metric {
    --metric-accent: #8fa4d1;
    --metric-tint: #1d222c;
    min-width: 0;
    min-height: 96px;
    padding: 13px 14px 11px 16px;
    border: 1px solid #303030;
    border-left: 3px solid var(--metric-accent);
    border-radius: 2px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30px;
    grid-template-rows: auto 1fr auto;
    gap: 2px 10px;
    background: #171717;
}
.dashboard-metric.repair { --metric-accent: #d05b9d; --metric-tint: #2a1b25; }
.dashboard-metric.overdue { --metric-accent: #ed6676; --metric-tint: #2b1c1f; }
.dashboard-metric.ready { --metric-accent: #74a2db; --metric-tint: #1b2430; }
.dashboard-metric.payment { --metric-accent: #d4a152; --metric-tint: #292318; }
.dashboard-metric.sales { --metric-accent: #69b681; --metric-tint: #1a281e; }
.dashboard-metric.orders { --metric-accent: #65a5c8; --metric-tint: #19262d; }
.dashboard-metric.chats { --metric-accent: #d58b5d; --metric-tint: #2a211b; }
.dashboard-metric-icon { grid-column: 2; grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; color: var(--metric-accent); background: var(--metric-tint); }
.dashboard-metric-icon svg { width: 16px; height: 16px; }
.dashboard-metric-label { min-width: 0; color: #8c8c8c; font-size: 11px; }
.dashboard-metric > strong { align-self: end; color: #e1e1e1; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.dashboard-metric > small { min-width: 0; color: #6f6f6f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-summary-grid { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(270px, .85fr); gap: 8px; }
.dashboard-panel { min-width: 0; border: 1px solid #303030; border-radius: 2px; background: #171717; overflow: hidden; }
.dashboard-panel-header {
    min-height: 58px;
    padding: 10px 12px;
    border-bottom: 1px solid #2c2c2c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.dashboard-panel-header > div { min-width: 0; }
.dashboard-panel-header > div > span { display: block; margin-bottom: 3px; color: #666; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0; }
.dashboard-panel-header h2 { min-width: 0; color: #d2d2d2; font-size: 13px; font-weight: 600; }
.dashboard-panel-header h2 b { margin-left: 5px; color: #788da9; font-size: 11px; }
.dashboard-panel-header > a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; color: #7ea6d8; font-size: 10px; text-decoration: none; }
.dashboard-panel-header > a:hover { color: #a9c7ea; }
.dashboard-panel-header > a svg { width: 13px; height: 13px; }

.dashboard-chart-panel { display: grid; grid-template-rows: auto auto auto; }
.dashboard-chart-total { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.dashboard-chart-total strong { color: #dcdcdc; font-size: 20px; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-chart-total > span { padding: 3px 5px; border-radius: 2px; font-size: 9px; white-space: nowrap; }
.dashboard-chart-total .positive { color: #79c481; background: #1b291d; }
.dashboard-chart-total .negative,
.dashboard-chart-total strong.negative { color: #f17b88; }
.dashboard-chart-total > span.negative { background: #2b1c1f; }
.dashboard-chart-total .neutral { color: #777; background: #222; }
.dashboard-chart { min-height: 220px; padding: 8px 10px 0; display: grid; grid-template-rows: minmax(0, 1fr) 28px; }
.dashboard-chart svg { width: 100%; height: 190px; overflow: visible; }
.dashboard-chart line { vector-effect: non-scaling-stroke; }
.dashboard-chart line.grid { stroke: #2a2a2a; stroke-width: 1; }
.dashboard-chart line.zero { stroke: #555; stroke-width: 1; stroke-dasharray: 3 4; }
.dashboard-chart polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.dashboard-chart .previous-week { stroke: #70809f; }
.dashboard-chart .current-week { stroke: #1e8ed1; }
.dashboard-chart .current-point { fill: #171717; stroke: #26a0e5; stroke-width: 2; vector-effect: non-scaling-stroke; }
.dashboard-chart-dates { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: start; text-align: center; }
.dashboard-chart-dates span { min-width: 0; display: grid; gap: 1px; }
.dashboard-chart-dates b { color: #979797; font-size: 9px; font-weight: 600; text-transform: uppercase; }
.dashboard-chart-dates small { color: #5f5f5f; font-size: 9px; }
.dashboard-chart-legend { min-height: 38px; padding: 0 13px; border-top: 1px solid #252525; display: flex; align-items: center; gap: 18px; color: #727272; font-size: 10px; }
.dashboard-chart-legend span::before { content: ""; width: 14px; height: 2px; margin-right: 6px; display: inline-block; vertical-align: middle; }
.dashboard-chart-legend .current::before { background: #1e8ed1; }
.dashboard-chart-legend .previous::before { background: #70809f; }

.dashboard-finance-panel { display: grid; grid-template-rows: auto auto 1fr auto; }
.dashboard-finance-panel > .dashboard-panel-header > svg { width: 21px; height: 21px; color: #7ca684; }
.dashboard-day-total { padding: 15px 13px 13px; display: grid; gap: 5px; border-bottom: 1px solid #292929; }
.dashboard-day-total span { color: #777; font-size: 10px; }
.dashboard-day-total strong { color: #80c589; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.dashboard-day-total strong.negative { color: #f17b88; }
.dashboard-payment-methods { margin: 0; padding: 12px 13px; display: grid; align-content: start; gap: 11px; }
.dashboard-payment-methods div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dashboard-payment-methods dt { display: inline-flex; align-items: center; gap: 7px; color: #818181; }
.dashboard-payment-methods dt svg { width: 13px; height: 13px; }
.dashboard-payment-methods dd { margin: 0; color: #bcbcbc; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-payment-methods dd.positive { color: #79c481; }
.dashboard-payment-methods dd.negative { color: #f17b88; }
.dashboard-payment-methods dd.neutral { color: #777; }
.dashboard-turnover { padding: 11px 13px; border-top: 1px solid #292929; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; background: #151515; }
.dashboard-turnover div { min-width: 0; display: grid; gap: 3px; }
.dashboard-turnover div + div { padding-left: 10px; border-left: 1px solid #2b2b2b; }
.dashboard-turnover span { color: #696969; font-size: 9px; text-transform: uppercase; }
.dashboard-turnover strong { color: #aaa; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dashboard-commerce-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .9fr); align-items: start; gap: 8px; }
.dashboard-order-list,
.dashboard-chat-list { max-height: 310px; overflow: auto; }
.dashboard-order-row {
    min-height: 54px;
    padding: 7px 10px;
    border-bottom: 1px solid #282828;
    display: grid;
    grid-template-columns: 82px minmax(150px, 1fr) 128px 96px;
    align-items: center;
    gap: 10px;
    color: #bcbcbc;
    text-decoration: none;
}
.dashboard-order-row:last-child,
.dashboard-chat-row:last-child { border-bottom: 0; }
.dashboard-order-row:hover,
.dashboard-chat-row:hover { background: #1f1f1f; }
.dashboard-order-number { color: #79a4d5; font-size: 10px; font-weight: 700; white-space: nowrap; }
.dashboard-order-copy,
.dashboard-chat-copy { min-width: 0; display: grid; gap: 3px; }
.dashboard-order-copy strong,
.dashboard-order-copy small,
.dashboard-chat-copy strong,
.dashboard-chat-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-order-copy strong,
.dashboard-chat-copy strong { color: #bdbdbd; font-size: 11px; font-weight: 600; }
.dashboard-order-copy small,
.dashboard-chat-copy small { color: #686868; font-size: 9px; }
.dashboard-order-status { justify-self: start; padding: 3px 5px; border: 1px solid #393939; color: #888; font-size: 9px; white-space: nowrap; }
.dashboard-order-status.new { border-color: #415b76; color: #82add7; background: #1b232c; }
.dashboard-order-status.ready { border-color: #365d3d; color: #7cc486; background: #19261b; }
.dashboard-order-status.moving { border-color: #5e522f; color: #d2b261; background: #292418; }
.dashboard-order-status.payment { border-color: #663742; color: #ef7b8a; background: #2a1b1e; }
.dashboard-order-total { color: #c3c3c3; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }

.dashboard-chat-row {
    min-height: 54px;
    padding: 7px 10px;
    border-bottom: 1px solid #282828;
    display: grid;
    grid-template-columns: 47px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    color: #bcbcbc;
    text-decoration: none;
}
.dashboard-chat-channel { min-height: 23px; padding: 0 5px; border: 1px solid #3c4c40; display: grid; place-items: center; color: #7eaa84; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.dashboard-chat-channel.vk { border-color: #344c65; color: #78a5d5; }
.dashboard-chat-channel.avito { border-color: #58416b; color: #bd91d2; }
.dashboard-chat-row time { padding: 3px 5px; border: 1px solid #5b3429; color: #dc916b; background: #271c18; font-size: 9px; white-space: nowrap; }
.dashboard-commerce-empty { min-height: 142px; }

.dashboard-work-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(300px, .8fr); align-items: start; gap: 8px; }
.dashboard-repair-list,
.dashboard-task-list { max-height: 360px; overflow: auto; }
.dashboard-repair-head,
.dashboard-repair-row { display: grid; grid-template-columns: 88px minmax(170px, 1.15fr) minmax(170px, 1fr) 110px 58px; align-items: center; gap: 10px; }
.dashboard-repair-head { min-height: 31px; padding: 0 10px; position: sticky; z-index: 1; top: 0; border-bottom: 1px solid #303030; color: #666; background: #191919; font-size: 9px; text-transform: uppercase; }
.dashboard-repair-row { min-height: 54px; padding: 6px 10px; border-bottom: 1px solid #282828; }
.dashboard-repair-row:last-child { border-bottom: 0; }
.dashboard-repair-row:hover { background: #1d1d1d; }
.dashboard-repair-row > * { min-width: 0; }
.dashboard-repair-row .repair-number { color: #7fa6d8; text-decoration: none; font-weight: 600; }
.dashboard-repair-row .repair-client,
.dashboard-repair-row .repair-device { display: grid; gap: 3px; }
.dashboard-repair-row .repair-client strong,
.dashboard-repair-row .repair-device strong,
.dashboard-repair-row .repair-client small,
.dashboard-repair-row .repair-device small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-repair-row .repair-client strong,
.dashboard-repair-row .repair-device strong { color: #bdbdbd; font-size: 11px; font-weight: 500; }
.dashboard-repair-row .repair-client small,
.dashboard-repair-row .repair-device small { color: #666; font-size: 9px; }
.dashboard-repair-row .repair-sum { color: #a9b8cd; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-repair-row .repair-actions { display: flex; align-items: center; justify-content: flex-end; gap: 3px; }
.dashboard-repair-row .repair-actions a { width: 25px; height: 25px; display: grid; place-items: center; color: #777; text-decoration: none; }
.dashboard-repair-row .repair-actions a:hover { color: #c5c5c5; background: #292929; }
.dashboard-repair-row .repair-actions svg { width: 14px; height: 14px; }

.dashboard-task-row { min-height: 62px; padding: 9px 10px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; border-bottom: 1px solid #282828; color: #b7b7b7; text-decoration: none; }
.dashboard-task-row:last-child { border-bottom: 0; }
.dashboard-task-row:hover { background: #1f1f1f; }
.dashboard-task-icon { width: 28px; height: 28px; border-radius: 4px; display: grid; place-items: center; color: #d39f52; background: #292318; }
.dashboard-task-row.overdue .dashboard-task-icon { color: #ef7482; background: #2b1c1f; }
.dashboard-task-icon svg { width: 15px; height: 15px; }
.dashboard-task-copy { min-width: 0; display: grid; gap: 4px; }
.dashboard-task-copy strong,
.dashboard-task-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-task-copy strong { color: #bebebe; font-size: 11px; font-weight: 600; }
.dashboard-task-copy small { color: #696969; font-size: 9px; }
.dashboard-task-row time { padding: 3px 5px; border: 1px solid #333; color: #777; font-size: 9px; white-space: nowrap; }
.dashboard-task-row time.overdue { border-color: #5a2e35; color: #ef7482; background: #25191b; }
.dashboard-empty { min-height: 178px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #626262; text-align: center; }
.dashboard-empty > svg { width: 25px; height: 25px; margin-bottom: 3px; color: #55745b; }
.dashboard-empty strong { color: #909090; font-size: 12px; }
.dashboard-empty span { font-size: 10px; }
.dashboard-empty > a { margin-top: 7px; padding: 6px 9px; border: 1px solid #3d553f; color: #7fb684; text-decoration: none; }
.legacy-empty { min-height: 100%; display: grid; place-items: center; color: #585858; font-size: 11px; }

@media (max-width: 1240px) {
    .dashboard-summary-grid,
    .dashboard-commerce-grid,
    .dashboard-work-grid { grid-template-columns: 1fr; }
    .dashboard-finance-panel { grid-template-columns: minmax(210px, .8fr) 1.2fr; grid-template-rows: auto auto auto; }
    .dashboard-finance-panel > .dashboard-panel-header { grid-column: 1 / -1; }
    .dashboard-payment-methods { grid-column: 2; grid-row: 2 / span 2; border-left: 1px solid #292929; }
    .dashboard-turnover { grid-column: 1; }
}

@media (max-width: 760px) {
    .dashboard-heading { align-items: stretch; flex-direction: column; gap: 10px; }
    .dashboard-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 36px; }
    .dashboard-actions a { min-width: 0; }
    .dashboard-metrics { grid-template-columns: 1fr 1fr; }
    .dashboard-finance-panel { display: grid; grid-template-columns: 1fr; grid-template-rows: auto auto auto auto; }
    .dashboard-finance-panel > .dashboard-panel-header,
    .dashboard-payment-methods,
    .dashboard-turnover { grid-column: auto; grid-row: auto; }
    .dashboard-payment-methods { border-left: 0; }
    .dashboard-chart-total { align-items: flex-end; flex-direction: column; gap: 4px; }
    .dashboard-repair-head { display: none; }
    .dashboard-repair-row { min-height: 70px; grid-template-columns: 60px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 8px; }
    .dashboard-repair-row .repair-number { grid-column: 1; grid-row: 1 / span 2; align-self: start; padding-top: 2px; }
    .dashboard-repair-row .repair-client { grid-column: 2; grid-row: 1; }
    .dashboard-repair-row .repair-device { grid-column: 2 / 4; grid-row: 2; }
    .dashboard-repair-row .repair-sum { grid-column: 3; grid-row: 1; }
    .dashboard-repair-row .repair-actions { display: none; }
    .dashboard-order-row { min-height: 66px; grid-template-columns: 68px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 8px; }
    .dashboard-order-number { grid-row: 1 / span 2; align-self: start; padding-top: 3px; }
    .dashboard-order-copy { grid-column: 2 / 4; }
    .dashboard-order-status { grid-column: 2; grid-row: 2; }
    .dashboard-order-total { grid-column: 3; grid-row: 2; }
}

@media (max-width: 520px) {
    .dashboard-home { gap: 8px; }
    .dashboard-title-line { align-items: flex-start; flex-direction: column; gap: 2px; }
    .dashboard-title-line h1 { font-size: 19px; }
    .dashboard-actions { grid-template-columns: 1fr 1fr; }
    .dashboard-actions button { width: auto; }
    .dashboard-metric { min-height: 92px; padding: 11px 10px 9px 12px; }
    .dashboard-metric > strong { font-size: 25px; }
    .dashboard-metric > small { font-size: 9px; }
    .dashboard-panel-header { min-height: 54px; padding: 9px 10px; }
    .dashboard-chart-total strong { font-size: 17px; }
    .dashboard-chart { min-height: 196px; padding-inline: 4px; }
    .dashboard-chart svg { height: 168px; }
    .dashboard-chart-dates span:nth-child(even) small { visibility: hidden; }
    .dashboard-chart-legend { min-height: 45px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 4px; padding-block: 7px; }
    .dashboard-turnover { grid-template-columns: 1fr; }
    .dashboard-turnover div + div { padding: 7px 0 0; border-top: 1px solid #2b2b2b; border-left: 0; }
    .dashboard-task-row { grid-template-columns: 26px minmax(0, 1fr); }
    .dashboard-task-row time { grid-column: 2; justify-self: start; }
    .dashboard-chat-row { grid-template-columns: 42px minmax(0, 1fr); }
    .dashboard-chat-row time { grid-column: 2; justify-self: start; }
}
