/* F8 0.12 — shared screen design. Printed documents keep their original white paper. */
@media screen {
 :root {
  color-scheme: dark;
  --ink:#f0f3fc; --muted:#a4b2ca; --line:#28364b; --border:var(--line);
  --soft:#172234; --paper:#111c2b; --canvas:#0a101b;
  --sidebar:#0b121e; --sidebar-2:#182439;
  --accent:#d932c5; --accent-dark:#71baff; --green:#4bd8b2;
  --red:#ff8eaa; --blue:#63b4ff; --radius:16px;
  --shadow:0 12px 38px #0003;
  font-family:Inter,"Segoe UI",Arial,sans-serif;
 }
 body {background:radial-gradient(ellipse at 85% 0,#18213b66,transparent 55%),var(--canvas);color:var(--ink);}
 a {color:var(--blue);}
 ::selection {background:#814cae;color:white;}
 * {scrollbar-width:thin;scrollbar-color:#40506b transparent;}
 .app-shell {grid-template-columns:246px minmax(0,1fr);}
 .sidebar {height:100dvh;padding:18px 12px 14px;border-right:1px solid var(--line);background:linear-gradient(160deg,#101b2c 0%,#090f19 45%,#101622);z-index:25;}
 .sidebar .brand {display:flex;flex-direction:column;gap:6px;padding:0 10px 18px;text-align:center;flex:none;}
 .sidebar-logo {width:168px;height:168px;object-fit:contain;mix-blend-mode:normal;}
 .sidebar .brand-copy small {color:#7e8da7;font-size:10px;white-space:nowrap;}
 .nav {min-height:0;overflow-y:auto;gap:4px;padding:1px 0 12px;}
 .nav-item {position:relative;min-height:43px;gap:12px;border:1px solid transparent;border-radius:9px;padding:8px 13px;color:#bcc8de;font-size:13px;flex:none;}
 .nav-item:hover {background:#19263b;color:white;}
 .nav-item.is-active {background:linear-gradient(110deg,#6d257451,#15385caa);border-color:#334363;box-shadow:inset 3px 0 0 #ef24b6;color:white;}
 .nav-icon {width:22px;height:22px;border:0;color:#aabfdf;flex:none;}
 .nav-icon svg {width:22px;height:22px;}
 .nav-item.is-active .nav-icon {color:#abbdff;}
 .sidebar-foot {padding-top:10px;gap:8px;min-height:0;}
 .user-chip {border-top-color:var(--line);padding:12px 8px 4px;font-size:13px;overflow-wrap:anywhere;}
 .user-chip strong {display:block;font-weight:650;}
 .user-chip small {margin-top:3px;color:var(--muted);font-size:11px;}
 .sidebar-foot .button {font-size:12px;min-height:36px;}
 .main {min-width:0;}
 .topbar {background:#0b1321ed;border-bottom-color:#253247a6;min-height:104px;padding:24px 28px;gap:16px;backdrop-filter:blur(14px);}
 .topbar h1 {font-size:clamp(24px,2.5vw,36px);font-weight:750;letter-spacing:-.035em;line-height:1.18;}
 .topbar .eyebrow {text-transform:none;letter-spacing:0;font-size:12px;font-weight:400;color:#9eafc9;margin:0 0 7px;}
 .page-heading {display:flex;align-items:center;gap:14px;min-width:0;}
 .content {padding:22px 28px 50px;max-width:1880px;margin:auto;}
 .content > .panel + .panel,.content > .panel + .metric-grid {margin-top:20px;}
 .menu-toggle,.menu-close {display:none;}
 .menu-shade {position:fixed;inset:0;background:#030813b8;backdrop-filter:blur(4px);border:0;z-index:30;}
 .button,.cp-page button,.f8-chat .button,.f8-notifications .button {background:#1c2c44;color:#e8efff;border:1px solid #354867;border-radius:10px;min-height:42px;padding:10px 16px;font-size:13px;font-weight:600;text-decoration:none;transition:background .15s,border-color .15s,box-shadow .15s;}
 .button:hover,.cp-page button:hover {transform:none;background:#263a58;border-color:#5986bb;}
 .button-primary,.f8-chat .button-primary {color:#fff;background:linear-gradient(115deg,#e70b98,#911cef 95%);border-color:#d93ba66b;box-shadow:0 3px 18px #9c15991a;}
 .button-primary:hover,.f8-chat .button-primary:hover {background:linear-gradient(115deg,#f120a8,#a83cf4);border-color:#ee6ed1;}
 .button-secondary {background:#142136;border-color:#354867;}
 .button-danger {color:#ffa1b4;background:#7d284229;border-color:#814052;}
 .button-danger:hover {background:#68273f66;border-color:#c35e7a;}
 .button-ghost {background:transparent;color:#adbbd3;border-color:#29374d;}
 .button-small {min-height:34px;padding:7px 11px;font-size:12px;}
 .icon-button {color:#c5d0e5;background:#202c42;border:1px solid #33445f;}
 button:disabled {opacity:.5;transform:none;}
 button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible {outline:2px solid #7ebeff;outline-offset:3px;}
 .toolbar {padding:0;gap:14px;margin-bottom:20px;align-items:end;}
 .toolbar-group {gap:12px;}
 input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea,.search,.field input,.field select,.field textarea,.item-status-select,.draft-table input,.draft-table select {
  color:var(--ink);background:#0d1726;border:1px solid #32445f;border-radius:9px;min-height:42px;padding:10px 12px;outline:none;
 }
 input::placeholder,textarea::placeholder {color:#7f91ae;opacity:1;}
 input[readonly] {color:#97cfff!important;background:#12253b!important;}
 input[type=checkbox],input[type=radio] {accent-color:#ad4cdb;width:18px;height:18px;min-width:18px;min-height:18px;flex:none;}
 input[type=file] {color:var(--muted);max-width:100%;font-size:13px;}
 input[type=file]::file-selector-button {background:#1a2b44;color:#dce8ff;border:1px solid #3d5374;border-radius:8px;padding:10px;margin-right:10px;cursor:pointer;}
 .field input:focus,.field select:focus,.field textarea:focus,.search:focus {border-color:#609cf1;box-shadow:0 0 0 3px #4794ee20;}
 .field > span,.field label {color:#c0cce0;font-size:13px;font-weight:500;}
 .field {min-width:0;}
 .form-note,.muted {color:var(--muted);}
 .form-note {line-height:1.65;}
 .field textarea {min-height:90px;}
 .form-actions {flex-wrap:wrap;}
 .panel {background:linear-gradient(145deg,#131e2d,#101a28);border-color:var(--line);box-shadow:0 6px 20px #00000012;}
 .panel-head {padding:19px 22px;flex-wrap:wrap;border-bottom-color:#263449;}
 .panel-head h2,.panel-head h3 {font-size:17px;letter-spacing:-.015em;font-weight:650;}
 .panel-head .muted {font-size:12px;}
 .panel-body {padding:22px;}
 .metric-grid {gap:16px;margin-bottom:20px;}
 .metric {--tone:var(--blue);min-height:130px;padding:22px 18px 18px 76px;background:linear-gradient(135deg,#172238,#101924);border-color:#30405a;border-left:3px solid var(--tone);box-shadow:0 4px 16px #0002;}
 .metric[data-tone=pink] {--tone:#f149b8;}
 .metric[data-tone=green] {--tone:#37d6af;}
 .metric[data-tone=amber] {--tone:#ffbf5f;}
 .metric::after {display:none;}
 .metric-icon {position:absolute;left:17px;top:23px;width:44px;height:48px;border-radius:12px;display:grid;place-items:center;background:#182940;border:1px solid var(--tone);color:var(--tone);}
 .metric-icon svg {width:25px;height:25px;}
 .metric-label {font-size:12px;color:#b6c4dc;font-weight:500;line-height:1.5;}
 .metric-value {font-size:clamp(22px,2vw,30px);margin-top:7px;font-weight:750;letter-spacing:-.04em;overflow-wrap:anywhere;line-height:1.25;}
 .metric-note {font-size:10px;line-height:1.6;margin-top:5px;}
 .f8-cash-panel {margin:0 0 20px;display:flex;flex-wrap:wrap;align-items:center;gap:14px 24px;padding:20px 24px;}
 .f8-cash-panel h2 {font-size:12px;font-weight:500;color:var(--muted);width:100%;margin:0;}
 .f8-cash-panel .f8-cash-grid {flex:1;margin:0;gap:20px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}
 .f8-cash-grid > div {padding-right:20px;border-right:1px solid var(--line);}
 .f8-cash-grid > div:last-child {border:0;}
 .f8-cash-grid span {font-size:12px;color:#a7b7d3;}
 .f8-cash-grid strong {font-size:clamp(19px,2vw,26px);white-space:nowrap;letter-spacing:-.02em;}
 .f8-cash-panel .muted {width:100%;font-size:11px;margin:0;}
 .expense-breakdown {padding:15px 20px;margin:0 0 20px;gap:18px 40px;}
 .expense-breakdown small {font-size:12px;}
 .expense-breakdown strong {font-size:19px;font-weight:650;}
 .dashboard-charts {display:grid;grid-template-columns:minmax(0,1.65fr) minmax(260px,1fr);gap:18px;margin-bottom:20px;}
 .trend-chart {padding:5px 12px 14px;}
 .trend-chart svg {width:100%;display:block;overflow:visible;}
 .trend-grid {fill:none;stroke:#26384e;stroke-width:1;}
 .trend-label {fill:#a8b7d1;font-size:12px;font-family:inherit;}
 .trend-line {fill:none;stroke-width:3;stroke-linejoin:round;stroke-linecap:round;}
 .trend-line.income {stroke:#2498ff;}
 .trend-line.expense {stroke:#f02faa;}
 .trend-area.income {fill:#278ef00a;}
 .trend-area.expense {fill:#ef23ac0b;}
 .trend-point {fill:#10223b;stroke-width:2.5;}
 .trend-point.income {stroke:#57b5ff;}
 .trend-point.expense {stroke:#ff71c8;}
 .trend-values {font-size:11px;color:var(--muted);padding:0 14px;}
 .trend-values summary {cursor:pointer;width:fit-content;}
 .trend-values table {width:100%;text-align:left;margin-top:12px;border-collapse:collapse;}
 .trend-values td,.trend-values th {padding:8px;border-bottom:1px solid var(--line);}
 .chart-legend {font-size:11px;gap:14px;}
 .legend-swatch.income {background:#2498ff;}.legend-swatch.expense {background:#f02faa;}
 .upcoming-list {padding:0 20px;}
 .upcoming-item {display:flex;width:100%;align-items:center;gap:14px;border:0;border-bottom:1px solid var(--line);padding:18px 0;background:transparent;color:var(--ink);text-align:left;}
 .upcoming-item:last-child {border:0;}
 .upcoming-item:hover strong {color:#8dc5ff;}
 .upcoming-time {padding:10px 12px;border:1px solid #3268aa;border-radius:10px;background:#17345d;white-space:nowrap;font-weight:650;font-size:14px;}
 .upcoming-time small {font-size:10px;display:block;text-align:center;margin-top:3px;color:#a8bedb;}
 .upcoming-item > span:nth-child(2) {flex:1;min-width:0;}
 .upcoming-item strong {font-size:13px;display:block;}
 .upcoming-item > span:nth-child(2) small {display:block;color:var(--muted);font-size:11px;margin-top:5px;overflow-wrap:anywhere;}
 .upcoming-item svg {width:18px;height:18px;flex:none;color:#95a6c3;}
 .table-wrap {border-radius:0 0 16px 16px;}
 .data-table {font-size:13px;}
 .data-table th {padding:14px 16px;background:#1a273a;color:#aebed8;text-transform:none;font-weight:500;letter-spacing:0;font-size:12px;}
 .data-table td {padding:15px 16px;border-bottom-color:#263347;line-height:1.6;}
 .data-table td small {display:block;font-size:11px;margin-top:3px;}
 .data-table tbody tr:nth-child(even) {background:#17243a26;}
 .data-table tbody tr[data-order-id]:hover {background:#1f355452;}
 .status {font-size:11px;font-weight:500;border:1px solid #48566d;background:#243044;color:#c1cce0;min-height:26px;padding:3px 10px;}
 .status-work {background:#14395b;color:#79c7ff;border-color:#2668a0;}
 .status-ready,.status-income {background:#103d38;color:#62e6c5;border-color:#286658;}
 .status-wait {background:#4c3c21;color:#ffd485;border-color:#846335;}
 .status-closed {background:#242d3e;color:#b1bfd5;border-color:#44516a;}
 .status-expense {background:#4c2238;color:#ff9ec3;border-color:#7c3b57;}
 .money-positive {color:#5cdfb6;}.money-negative {color:#ff95b3;}
 .progress-track {background:#243148;}.progress-bar {background:linear-gradient(90deg,#288fee,#9b42ef);}
 .order-list {gap:13px;}
 .order-row {background:linear-gradient(135deg,#151f30,#101a29);border-color:#2b3b55;padding:20px;}
 .order-row:hover {border-color:#5372a2;background:#19273b;box-shadow:none;}
 .order-number {color:#99c9ff;font-weight:650;}
 .vehicle-name {font-weight:600;}
 .detail-hero {background:linear-gradient(125deg,#172744,#192139 65%,#381e3e);border:1px solid #3b4864;padding:26px;}
 .detail-total strong {color:#f3e6ff;}
 .detail-hero .eyebrow {color:#94baff;}
 .detail-actions .button-secondary {background:#17243bd9;border-color:#405572;}
 .facts {gap:12px;}
 .fact {background:#172338;border:1px solid #2a3a52;}
 .fact small {font-size:11px;}.fact strong {font-size:13px;overflow-wrap:anywhere;}
 .employee-grid {grid-template-columns:repeat(auto-fit,minmax(290px,1fr));align-items:start;gap:18px;}
 .employee-card {padding:22px;background:linear-gradient(145deg,#162137,#101b29);border-color:#31415b;}
 .employee-card-head {align-items:center;gap:12px;flex-wrap:wrap;}
 .employee-card-head > div {flex:1;min-width:90px;}
 .employee-avatar {display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:linear-gradient(145deg,#7148ba,#343d74);color:#f3eaff;font-weight:650;font-size:16px;flex:none;}
 .employee-avatar[data-tone="1"] {background:linear-gradient(145deg,#ad427a,#593c6b);}
 .employee-avatar[data-tone="2"] {background:linear-gradient(145deg,#246d9e,#303964);}
 .employee-code {font-size:10px;font-weight:500;}.employee-card h3 {font-size:18px;}
 .employee-pay {font-size:18px;line-height:1.55;margin:18px 0 10px;color:#ded7ff;font-weight:600;}
 .employee-card > p {font-size:12px;line-height:1.6;}
 .employee-stats {gap:14px;}
 .employee-stat {padding-top:14px;}
 .employee-stat small {font-size:11px;}.employee-stat strong {font-size:17px;font-weight:650;}
 .employee-payment-filter {padding:20px;margin-bottom:20px;background:#131f30;border:1px solid var(--line);border-radius:14px;}
 .manual-debt-card {border-color:var(--line);}
 .employee-card .row-actions {flex-wrap:wrap;margin-top:18px;}
 .waiting-price,.price-missing,.catalog-table .price-missing {color:#ffcf87;}
 .internal-apply,.report-notice,.f8-update-note,.callout,.cp-editor .cp-toolbar-note {color:#e9d7ae;background:#61411c2e;border:1px solid #7d664144;border-left:3px solid #c7913e;}
 .price-link {display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.5;color:#becbe3;margin-top:10px;}
 .price-link small {display:block;color:var(--muted);font-size:11px;line-height:1.6;margin-top:5px;}
 .price-link input {margin:1px 0 0;}
 .internal-price-table input[type=checkbox] {width:18px;min-width:18px;}
 .linked-price-field {min-width:210px;max-width:300px;}
 .linked-price-field input[type=number] {width:100%;}
 .internal-price-table th:nth-child(6) {min-width:230px;}
 .internal-price-table td {vertical-align:top;}
 .internal-total {padding:16px;background:#1b2340;border:1px solid #454164;border-radius:12px;}
 .internal-order-editor > h3 {font-size:16px;margin:8px 0;}
 .modal,.cp-page dialog,.f8-chat-photo-dialog {background:#111d2e;color:var(--ink);border:1px solid #3d4b65;box-shadow:0 26px 100px #0009;}
 .modal {max-height:calc(100dvh - 32px);}
 .modal-card {max-height:calc(100dvh - 34px);}
 .modal::backdrop {background:#030711c9;backdrop-filter:blur(5px);}
 .modal-head {background:#162339;border-bottom-color:#34445e;}
 .modal-head h2 {font-size:21px;font-weight:650;}
 .modal-head .eyebrow {color:#a499d3;font-size:10px;}
 .modal-body {overscroll-behavior:contain;}
 .form-error,.auth-error,.cp-editor .cp-error,.cp-error {color:#ff95ab;}
 .toast {background:#213955;color:#edf5ff;border:1px solid #476487;box-shadow:var(--shadow);font-size:13px;}
 .toast.is-error {background:#642c3e;border-color:#ce6685;}
 .editor-tabs button {background:#17243a;color:#b9c8e0;border-color:#354662;}
 .editor-tabs button[aria-selected=true] {background:linear-gradient(100deg,#593566,#243d62);border-color:#8167b4;color:white;}
 .editor-tabs [data-draft-count] {background:#845aab;color:white;}
 .editor-footer {background:#152237;border-color:#36445e;}
 .draft-table .line-comment,.draft-table .line-status {background:#132035;}
 .order-sum-note {background:#152945;border:1px solid #355070;color:#c6d9f8;}
 .catalog-groups {background:#101a2a;border-color:#2b3d55;padding:10px;gap:4px;}
 .catalog-group {border-radius:8px;padding:11px 12px;color:#b9c6de;}
 .catalog-group:hover {background:#24314b;}
 .catalog-group.is-active {background:linear-gradient(110deg,#563360,#1d4162);color:#fff;box-shadow:inset 3px 0 0 #c34bbb;}
 .catalog-table thead th {background:#1e2d43;}
 .catalog-footer,.picker-actions {background:#172438;color:#b8c7dc;}
 .catalog-table input,.category-setting select {color:var(--ink);}
 .vehicle-picker-options,.vehicle-suggestions,.vehicle-picker-list {background:#16243a;border-color:#3f5574;box-shadow:0 12px 24px #0005;}
 .vehicle-picker-options button,.vehicle-suggestions button {color:var(--ink);background:transparent;}
 .vehicle-picker-options button:hover,.vehicle-suggestions button:hover {background:#253c5c;}
 .combo-input button {background:#22324a;color:#b7c8e5;border-color:#3b506f;}
 .combo-options {background:#17273f;border-color:#45618b;box-shadow:0 12px 28px #0006;color:#e9f0ff;}
 .combo-options [role=option]:hover,.combo-options [aria-selected=true] {background:#324669;color:white;}
 .report-metric {background:linear-gradient(135deg,#19283c,#121d2e);border-color:#334560;border-radius:13px;}
 .report-metric strong {color:#f0eaff;font-weight:700;}
 .report-controls {border-color:#33425c;}
 .delete-totals,.import-row-error td {background:#642c3838;color:#ffbac6;}
 .import-row-duplicate td {background:#6b511b30;color:#efd09d;}
 .import-row-imported td {background:#1d2d3b;color:#a5b8cc;}
 .import-totals > div {background:#19283c;border-color:var(--line);}
 .import-conflict {background:#44351955;border-color:#806936;color:#e6d3ad;}
 .import-counts span {background:#1e2d45;color:#c4d2eb;}
 .import-preview-table th {background:#1b2a41;color:#bccce3;}
 .import-section {border-color:var(--line);}
 .commission-rule,.commission-recalculate {border-color:#35465e;background:#121e30;}
 .commission-rule legend,.commission-order-list small {color:#a4b5d0;}
 .commission-rule-options {border-color:#304058;}
 .appointment-card {border-left-color:#a553eb;padding:24px;}
 .appointment-time {color:#a6cfff;}
 .appointment-cancelled {opacity:.65;}
 .appointment-card h3 {font-size:18px;}.appointment-card p {font-size:13px;}
 .settings-grid {align-items:start;}
 .f8-assigned-card {background:#142237;color:var(--ink);border-color:#354660;}
 .f8-master-note {color:var(--muted);}
 .f8-connection {font-size:11px;color:#a2b4d0;padding:8px 28px;}
 .f8-connection:empty {display:none;}
 .f8-unread {background:linear-gradient(140deg,#eb267d,#a224ca);color:white;font-size:11px;min-width:23px;text-align:center;border:1px solid #f254ad70;}
 .f8-unread:empty {display:none;}
 .f8-message-thread {background:#142137;color:#e9f0ff;border-color:#34445f;padding:18px;}
 .f8-message-thread:hover {background:#1d3050;border-color:#536993;}
 .f8-message-thread small {color:var(--muted);font-size:12px;}
 .messages-layout {display:grid;grid-template-columns:290px minmax(0,1fr);overflow:hidden;min-height:540px;}
 .message-list-panel {border-right:1px solid var(--line);background:#111c2d;min-width:0;}
 .message-search {padding:20px;border-bottom:1px solid var(--line);gap:14px;}
 .message-search input {width:100%;font-size:12px;}
 #message-threads {max-height:65dvh;overflow:auto;padding:8px;}
 .messages-layout .f8-message-thread {margin:0 0 5px;border:1px solid transparent;background:transparent;border-radius:10px;padding:15px 10px;gap:10px;align-items:flex-start;}
 .messages-layout .f8-message-thread:hover {background:#1d2e49;}
 .messages-layout .f8-message-thread.is-selected {background:linear-gradient(110deg,#453159,#1a3759);border-color:#625682;}
 .thread-avatar {display:grid;place-items:center;flex:none;width:35px;height:35px;border-radius:11px;background:#2c3457;border:1px solid #525f8b;color:#c7c7ed;font-size:11px;font-weight:650;}
 .thread-copy {flex:1;min-width:0;display:block;}
 .thread-copy strong {display:block;font-size:13px;}.thread-copy>span{display:block;font-size:10px;margin-top:3px;color:#a7b7d1;}
 .thread-copy small {display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px;margin-top:8px;}
 .conversation-placeholder {height:100%;min-height:420px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;}
 .conversation-placeholder>span {font-size:36px;font-weight:800;color:#d96aba;background:#2e2340;border:1px solid #553452;border-radius:22px;padding:20px;margin-bottom:20px;}
 .conversation-placeholder h2 {font-size:22px;font-weight:650;margin:0 0 10px;}.conversation-placeholder p{font-size:13px;color:var(--muted);line-height:1.7;}
 #message-conversation {min-width:0;}
 #message-conversation .f8-chat {border:0;border-radius:0;box-shadow:none;}
 .conversation-toolbar {padding:12px 18px;display:flex;justify-content:space-between;gap:10px;background:#142238;border-bottom:1px solid var(--line);}
 .conversation-toolbar [data-chat-back] {display:none;}
 #message-conversation .f8-chat-messages {max-height:52dvh;min-height:270px;}
 .f8-chat {background:#122037;color:var(--ink);border-color:#3a4864;box-shadow:0 10px 35px #0002;}
 .f8-chat-heading {background:#18263e;border-color:#35435d;}
 .f8-chat-icon {background:#293155;color:#b9b4ff;}
 .f8-chat-heading p {color:#a3b3d0;}
 .f8-chat-messages {background:radial-gradient(ellipse at 70% 100%,#38224044,transparent 70%),#0c1626;scrollbar-color:#3e526f transparent;min-height:290px;}
 .f8-chat-day {color:#b0c0d9;}.f8-chat-day span {background:#1b2940;border:1px solid #2e405b;}
 .f8-chat-message {background:#1c2b43;border-color:#3a4b69;color:#eaf0ff;box-shadow:none;}
 .f8-chat-message.is-own {background:linear-gradient(125deg,#442351,#2d2553);border-color:#694071;}
 .f8-chat-message header,.f8-chat-message.is-own header {color:#b3b5df;}
 .f8-chat-message time,.f8-chat-message.is-own time {color:#a2accd;}
 .f8-chat-form {background:#142139;border-color:#334660;}
 .f8-chat-form textarea {background:#0d182a;border-color:#3d5172;color:#f0f3ff;}
 .f8-chat-form textarea:focus {border-color:#ac76e4;box-shadow:0 0 0 3px #b955e520;}
 .f8-chat-form textarea::placeholder {color:#9baac4;}
 .f8-chat-file,.f8-chat-attachment span {color:#b1bfd7;}
 .f8-chat-attachment {background:#202e48;}.f8-chat-attachment button {background:#344360;color:#e4ecff;}
 .f8-chat-empty {color:#aab9d2;}.f8-chat-empty > span {background:#1c2b44;color:#a091d5;}.f8-chat-empty strong {color:#d1ddf2;}
 .f8-chat [data-chat-older] {background:#20324b;color:var(--ink);}
 .f8-notifications {padding:0 0 18px;}.f8-notifications p {color:var(--muted);font-size:12px;}
 .cp-page {background:radial-gradient(ellipse at top,#1c2940 0%,#0a111e 65%);color:var(--ink);font-family:Inter,"Segoe UI",Arial,sans-serif;}
 .cp-brand {background:#151b2b url('/f8-auto-club-v13.png') center/contain no-repeat;color:transparent;width:70px;height:70px;border-radius:14px;border:1px solid #34465f;}
 .cp-header small {color:var(--muted);}
 .cp-view {color:#e8edfa;font-family:inherit;}
 .cp-hero {background:linear-gradient(125deg,#1a3156,#29213e);border:1px solid #465176;}
 .cp-card {background:#131f31;border-color:#344360;}
 .cp-stage {background:linear-gradient(115deg,#bf2384,#7130c1);color:white;}
 .cp-dot {background:#f0c8ff;}
 .cp-view th {background:#1c2b43;color:#b0c2dd;}
 .cp-view th,.cp-view td {border-color:#34435e;}
 .cp-view td small,.cp-facts small,.cp-muted,.cp-document-head>span,.cp-contact {color:#a6b6d2;}
 .cp-total {border-color:#b88bd8;}
 .cp-photo img {background:#0d1726;}
 .cp-editor .cp-preview-wrap {background:#0b1423;border:1px solid #32445f;}
 .cp-edit-photo {border-color:#394967;background:#172439;}
 .cp-editor .cp-status {color:#5ee1b7;}
 .cp-page dialog button {background:#223451;color:#e5eeff;border-color:#43597b;}
 @media(min-width:1400px) {.app-shell{grid-template-columns:264px minmax(0,1fr)}.sidebar-logo{width:188px;height:188px}.nav-item{font-size:14px;min-height:46px}.topbar,.content{padding-left:32px;padding-right:32px}}
 @media(max-height:820px) and (min-width:901px) {.sidebar-logo{width:108px;height:108px}.sidebar .brand{padding-bottom:12px}.nav-item{min-height:39px;padding-top:6px;padding-bottom:6px}.sidebar{padding-top:12px}}
 @media(min-width:1121px) and (max-width:1390px) {.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
 @media(min-width:601px) and (max-width:1200px) {.order-row{grid-template-columns:80px minmax(160px,1fr) 105px 130px 20px}.order-row .order-client{display:none}.order-row .order-status,.order-row .order-money{display:block}}
 @media(max-width:1200px) {.dashboard-charts{grid-template-columns:minmax(0,1fr)}.upcoming-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 22px}.f8-cash-panel .f8-cash-grid{min-width:100%}.f8-cash-panel .row-actions{margin-top:4px}}
 @media(max-width:900px) {
  .app-shell {display:block;padding-bottom:0;}
  .sidebar {position:fixed;top:0;bottom:0;left:0;right:auto;width:min(300px,85vw);height:100dvh;transform:translateX(-102%);visibility:hidden;z-index:40;padding:16px 14px 18px;box-shadow:20px 0 70px #0006;}
  .menu-open .sidebar {transform:none;visibility:visible;}
  .menu-open {overflow:hidden;}
  .sidebar .brand {display:flex;padding:0 12px 14px;}.sidebar-logo{width:128px;height:128px;}
  .sidebar-foot {display:grid;margin-top:auto;}
  .nav {display:grid;overflow-y:auto;overflow-x:hidden;gap:4px;}
  .nav-item {display:flex;min-width:0;justify-items:unset;text-align:left;font-size:14px;min-height:43px;padding:9px 13px;gap:14px;}
  .nav-item.is-active {box-shadow:inset 3px 0 0 #e837c0;}
  .nav-icon {width:22px;height:22px;}
  .menu-toggle {display:inline-flex;min-width:44px;min-height:44px;padding:10px;flex:none;}
  .menu-toggle svg {width:20px;height:20px;}.menu-toggle span{display:none;}
  .menu-close {display:block;position:absolute;top:12px;right:12px;width:36px;height:36px;}
  .topbar {padding:18px 20px;position:sticky;top:0;align-items:center;min-height:86px;flex-wrap:wrap;}
  .topbar h1 {font-size:24px;}.topbar .eyebrow{font-size:10px;margin-bottom:4px;}
  .top-actions {margin-left:auto;}.top-actions .button {min-height:42px;}
  .top-actions .button-secondary {display:inline-flex;}
  .order-row .order-money {display:block;}
  .content {padding:18px 20px 40px;}
  .grid-2,.settings-grid {grid-template-columns:minmax(0,1fr);}
  .category-settings {grid-template-columns:minmax(0,1fr);}
  .catalog-layout {grid-template-columns:minmax(0,1fr);}.catalog-groups{display:none;}.catalog-category-select{display:grid;}
  .catalog-toolbar {display:grid;grid-template-columns:minmax(0,1fr);}
  .f8-connection {padding:7px 20px;}
  .messages-layout {grid-template-columns:250px minmax(0,1fr);}
 }
 @media(max-width:600px) {
  .topbar {padding:14px;gap:14px;}.page-heading{gap:11px;width:100%;}.top-actions{justify-content:flex-start;width:100%;gap:8px;}.top-actions:empty{display:none;}
  .topbar h1 {font-size:23px;}.topbar .eyebrow{font-size:10px;}
  .top-actions .button {font-size:12px;padding:10px 13px;}
  .content {padding:16px 12px 32px;}
  .metric-grid {gap:10px;grid-template-columns:repeat(2,minmax(0,1fr));}
  .metric {padding:14px;min-height:144px;border-radius:13px;}
  .metric-icon {position:static;width:30px;height:30px;border-radius:8px;margin-bottom:9px;}.metric-icon svg{width:18px;height:18px;}
  .metric-label {font-size:11px;}.metric-value{font-size:21px;margin-top:5px;}.metric-note{font-size:9px;}
  .f8-cash-panel {padding:17px;gap:12px;}.f8-cash-panel .f8-cash-grid{grid-template-columns:1fr;gap:12px;}
  .f8-cash-grid>div {display:flex;align-items:center;justify-content:space-between;gap:8px;border-right:0;border-bottom:1px solid #2d3a51;padding:0 0 12px;}
  .f8-cash-grid strong {font-size:20px;margin:0;}.f8-cash-grid span{font-size:11px;max-width:50%;}.f8-cash-grid>div:last-child{padding-bottom:0;}
  .f8-cash-panel .row-actions {flex-wrap:wrap;gap:8px;}.f8-cash-panel .button{font-size:12px;}
  .expense-breakdown {gap:14px;padding:15px;}.expense-breakdown strong{font-size:18px;}.expense-breakdown small{font-size:11px;}.expense-breakdown button{margin-left:0;}
  .upcoming-list {display:block;padding:0 16px;}.upcoming-panel .empty{padding:26px 12px;}
  .panel-head {padding:16px;gap:12px;}.panel-head h2{font-size:16px;}.panel-body{padding:16px;}
  .chart-legend {font-size:10px;}.trend-chart{padding:8px 0 12px;}.trend-values{font-size:10px;}
  .toolbar {flex-wrap:wrap;gap:12px;}.toolbar-group{width:100%;gap:10px;}.toolbar-group>.field{flex:1;min-width:140px;}
  .search {min-width:0;width:100%;}.toolbar>.search{width:100%;}
  input:not([type=checkbox]):not([type=radio]),textarea,select,.field input,.field select,.field textarea,.draft-table input,.draft-table select {font-size:16px;}
  .item-status-select {min-width:124px;}.data-table{font-size:12px;}.data-table td,.data-table th{padding:12px;}
  .order-row {grid-template-columns:82px minmax(0,1fr) auto;gap:12px;padding:16px;}.order-row .order-money{display:block;grid-column:2;font-size:13px;}.order-row .chevron{grid-column:3;grid-row:1;}
  .order-row .order-status {display:block;grid-column:1;font-size:11px;}.order-row .order-client{display:none;}
  .detail-hero {grid-template-columns:1fr;padding:20px;gap:18px;}.detail-total{text-align:left;}.detail-total strong{font-size:28px;}.detail-actions{gap:8px;}.detail-actions .button{font-size:12px;}
  .facts {grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;}.fact{padding:12px;}
  .employee-grid {grid-template-columns:minmax(0,1fr);}.employee-card{padding:20px;}.employee-stat strong{font-size:18px;}.employee-payment-filter{padding:16px;}
  .manual-debt-card .employee-stats {grid-template-columns:repeat(3,minmax(0,1fr));}.manual-debt-card .employee-stat strong{font-size:14px;}
  .modal,.modal-wide {width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:15px;}.modal-card{max-height:calc(100dvh - 18px);}.modal-head{padding:17px 16px;}.modal-head h2{font-size:18px;}.modal-body,.modal-wide .modal-body{padding:16px;}
  .form-grid {grid-template-columns:minmax(0,1fr);}.form-actions .button{flex:1;min-height:44px;}.internal-apply{padding:12px;font-size:13px;}.internal-total{font-size:15px;text-align:left;}
  .appointment-card {grid-template-columns:72px minmax(0,1fr);gap:14px;padding:18px;}.appointment-time{font-size:21px;}.appointment-actions{grid-column:2;flex-direction:row;flex-wrap:wrap;}.appointment-card h3{font-size:16px;}
  .f8-chat-message {max-width:91%;}.f8-chat-messages{min-height:240px;max-height:50dvh;}.f8-chat-form textarea{font-size:16px;}
  .messages-layout {display:block;min-height:0;}.message-list-panel{border:0;}.messages-layout #message-conversation{display:none;}.messages-layout.has-conversation .message-list-panel{display:none;}.messages-layout.has-conversation #message-conversation{display:block;}
  .conversation-toolbar [data-chat-back] {display:inline-flex;}.conversation-toolbar{padding:12px;}.conversation-toolbar .button{font-size:11px;padding:8px;}
  .cp-header {padding:18px 14px;}.cp-brand{width:56px;height:56px;}.cp-header .cp-brand-link{gap:10px;}.cp-header .cp-actions{max-width:110px;}.cp-header button{font-size:11px;padding:8px;min-height:36px;}
  .cp-hero {padding:24px 18px;}.cp-card{padding:20px 16px;}.cp-view h1{font-size:28px;}
 }
 @media(prefers-reduced-motion:reduce) {*{scroll-behavior:auto!important;transition:none!important;animation:none!important;}}
}
@media print {.menu-toggle,.menu-close,.menu-shade,.sidebar-logo{display:none!important}}

@media screen{.cp-payment-grid>div{background:#1b2c46}.cp-payment-grid dt{color:#afc1dd}.cp-payment-grid dd{color:#f3f6ff}.cp-payment-grid .cp-payment-remaining{background:#39254c;border:1px solid #9254ad}.cp-payment-grid .cp-payment-over{background:#163b34}.telegram-settings{border-color:#405471}}

/* Employee settlement card */
.employee-name-button{font:inherit;text-align:left;cursor:pointer}.employee-car{margin:18px 0}.employee-car-heading{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;flex-wrap:wrap}.employee-car-heading h3{margin:0}.employee-car-heading>strong{font-size:22px}.employee-car details{min-width:0;max-width:100%}.employee-car details[open]{flex-basis:100%}.employee-car summary{display:inline-flex;cursor:pointer}.employee-settlement-card small{display:block}.employee-settlement-card .report-metric{min-width:140px}.employee-settlement-card table{min-width:500px}

/* Material lists share one finance operation and fit narrow screens. */
.material-list-fields{border:0;padding:0;margin:0;min-width:0}.material-list-fields>legend{font-size:14px;color:var(--muted);margin-bottom:12px}.material-row{display:grid;grid-template-columns:minmax(160px,2fr) repeat(3,minmax(90px,1fr));gap:12px;border:1px solid var(--line);border-radius:12px;padding:14px;margin-bottom:14px;min-width:0}.material-row .field{min-width:0}.material-row .field input{width:100%;min-width:0}.material-row-total{display:flex;gap:12px;align-items:center;flex-wrap:wrap;grid-column:1/4}.material-row-total span{color:var(--muted)}.material-total{display:flex;gap:12px;flex-wrap:wrap;align-items:center}.material-list-fields .form-note{margin:12px 0 0}.material-details{max-width:100%;margin:8px 0}.material-details summary{cursor:pointer}.material-details .table-wrap{max-width:100%;margin-top:10px}.material-details table{min-width:480px}fieldset.material-fields{min-width:0}.material-fields [hidden]{display:none!important}@media(max-width:760px){.material-row{grid-template-columns:repeat(2,minmax(0,1fr))}.material-row>.field:first-child{grid-column:1/-1}.material-row-total{grid-column:1/-1}.material-row>[data-material-remove]{grid-column:1/-1}}

.employee-car.payment-unpaid{border-left:5px solid #f06470}.employee-car.payment-partial{border-left:5px solid #f6b649}.employee-car.payment-paid{border-left:5px solid #49c58a}.employee-car.payment-waiting,.employee-car.payment-none{border-left:5px solid #a8b1c6}.employee-car.payment-overpaid{border-left:5px solid #77b4f5}.payment-state{display:inline-flex;gap:8px;align-items:center;padding:5px 10px;border-radius:8px;font-weight:650;font-size:14px;margin:2px 0 10px}.payment-state:before{content:"";display:inline-block;width:9px;height:9px;border-radius:50%;background:currentColor;flex-shrink:0}.payment-state.payment-unpaid{color:#ff9ba5;background:#542a35}.payment-state.payment-partial{color:#ffd18a;background:#4a3822}.payment-state.payment-paid{color:#80e5b2;background:#1d4237}.payment-state.payment-waiting,.payment-state.payment-none{color:#c5cee0;background:#2b3548}.payment-state.payment-overpaid{color:#a5d1ff;background:#233e5d}
.car-use-payment{width:100%;margin-top:14px;border-color:#a484d8;color:#d1b7ff;min-height:48px}
.existing-payment-list{min-width:0;margin:0;padding:0;border:0;display:grid;gap:12px;max-height:38vh;overflow:auto;overscroll-behavior:contain}
.existing-payment-list legend{margin-bottom:10px;color:#b8c2d8;font-size:13px}
.existing-payment-choice{display:flex;gap:12px;align-items:flex-start;padding:15px;border:1px solid #34465f;border-radius:14px;cursor:pointer;min-width:0;background:#131f30}
.existing-payment-choice:has(input:checked){border-color:#bb8fff;box-shadow:inset 0 0 0 1px #bb8fff;background:#211f36}
.existing-payment-choice input[type=radio]{width:22px;height:22px;flex:0 0 22px;accent-color:#b18bfa;margin:4px 0}
.existing-payment-choice>span{display:grid;gap:5px;min-width:0;overflow-wrap:anywhere}
.existing-payment-choice strong{font-size:15px}.existing-payment-choice b{color:#d4bbff}.existing-payment-choice small{font-size:12px;color:#aebbd1;white-space:pre-wrap}
.car-allocation-preview{padding:14px;border:1px solid #34465f;border-radius:12px;min-width:0}
.car-allocation-preview p{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:4px 0 10px}.car-allocation-preview p:last-child{margin-bottom:0}.car-allocation-preview strong{white-space:nowrap}
