:root{--ui-surface:#fff;--ui-surface-soft:#f7faff;--ui-surface-alt:#edf3fa;--ui-text:#22324a;--ui-muted:#65788e;--ui-header:#183553;--ui-font:Tahoma,Arial,sans-serif;--ui-scale:1}
:root[data-theme=dark]{color-scheme:dark;--background:#0c1423;--foreground:#e0e8f4;--border:#2a3b51;--muted:#1b2b41;--muted-foreground:#a5b6cd;--ui-surface:#152135;--ui-surface-soft:#1a2a40;--ui-surface-alt:#20324a;--ui-text:#e0e8f4;--ui-muted:#a5b6cd;--ui-shadow:0 3px 16px #0002}
:root[data-theme=light]{color-scheme:light}
@media screen{
 body,button,input,select,textarea{font-family:var(--ui-font)}
 body{font-size:calc(14px * var(--ui-scale));color:var(--ui-text)}
 .topbar,.mc-standalone>header{background:var(--ui-header)}
 .brand>b{background:var(--primary);color:var(--primary-foreground)}
 .primary,.mc-standalone button.primary{color:var(--primary-foreground)!important}
 .workspace>aside,.panel,.kpi,.signin-card,.table-panel,.sheet-wrap,.permissions-table-wrap,table,.cell-palette,.employee-history-report{background:var(--ui-surface);border-color:var(--border)}
 button,input,select,textarea,.month-select,.mc-field input,.mc-field select,.mc-row input,.mc-row select,.mc-table input,.mc-table select,.form-grid input{background:var(--ui-surface);color:var(--ui-text);border-color:var(--border)}
 .workspace>aside button{background:transparent;color:var(--ui-muted)}
 .workspace>aside button.active{background:var(--ui-accent-soft);color:var(--ui-accent-text);box-shadow:inset -3px 0 0 var(--primary)}
 .workspace>aside button:not(.active):hover{background:var(--ui-surface-soft)}
 .kpi strong,.employee-title>b,.mc-metric b,.mc-totals b,.mc-daily-page .mc-code-list span b{color:var(--ui-accent-text)}
 .kpi{border-top-color:var(--primary)}
 .summary-grid .kpi,.mc-card,.mc-metric,.backup-panel,.mc-daily-page .mc-code-reference,.mc-daily-page .mc-totals span,.mc-summary-expenses,.mc-backup-row,.mc-audit-row{background:var(--ui-surface-soft);border-color:var(--border)}
 .mc-table tr:nth-child(even){background:var(--ui-surface-soft)}
 th,.mc-table th,.mc-daily-table th,.entry-table th,.entry-table .day-cell{background:var(--ui-surface-alt);color:var(--ui-text)}
 .entry-table .employee-group.group-0{background:var(--ui-surface)}
 .entry-table .employee-group.group-1{background:var(--ui-surface-soft)}
 .entry-table td.employee-group input:not([style*="background"]):not(.half-day):not(.day-deduction):not(.store-purchase){background:var(--ui-surface);color:var(--ui-text)}
 .entry-table input[style*="background"],.entry-table input.half-day,.entry-table input.day-deduction,.entry-table input.store-purchase{color:#182a46}
 .entry-table td,.mc-table td{border-color:var(--border)}
 .employee-heading strong,.mc-daily-table .mc-name-cell,.mc-summary-expenses summary{color:var(--ui-text)}
 .muted,.kpi span,.mc-hint,.mc-metric span,.mc-metric small,.mc-daily-page .mc-hint,.mc-cashier-head small,.mc-daily-table small,.mc-daily-page .mc-field,.form-grid label,.paid-amount,.ledger-selector label,.month-line,.page-head p,.employee-title p,.employee-heading small,.mc-daily-page .mc-code-reference>strong,.mc-daily-page .mc-code-list span,.mc-status-legend,.mc-status-legend>strong{color:var(--ui-muted)}
 .employee-title>b,.mc-totals span{background:var(--ui-accent-soft)}
 .mc-column-status{background:var(--ui-header)}
 .mc-inline-actions button{background:var(--ui-surface)}
 .mc-purchase-cell{color:#553b27}
 .mc-purchase-cell small{color:#553b27}
 .mc-notice{color:var(--ui-accent-text)}
 .mc-notice,.mc-daily-page details,.mc-summary-hero,.mc-summary-empty{background:var(--ui-surface-soft)}
 .mc-daily-page summary,.mc-audit-row strong,.mc-row-status{color:var(--ui-text)}
 .mc-audit-row p,.mc-audit-row small,.mc-backup-row small,.mc-backup-row>span,.mc-branch-report-head small,.mc-summary-empty{color:var(--ui-muted)}
 .mc-review-stat:not(.success):not(.danger):not(.warning),.mc-daily-summary-stat:not(.success):not(.absence):not(.danger):not(.purchase),.mc-branch-money span,.mc-branch-notes>div:not(.absence):not(.danger){background:var(--ui-surface-soft);border-color:var(--border)}
 .mc-review-stat:not(.success):not(.danger):not(.warning) b,.mc-daily-summary-stat:not(.success):not(.absence):not(.danger):not(.purchase) b,.mc-branch-money b{color:var(--ui-accent-text)}
 .mc-review-stat:not(.success):not(.danger):not(.warning) span,.mc-daily-summary-stat:not(.success):not(.absence):not(.danger):not(.purchase) span,.mc-daily-summary-stat:not(.success):not(.absence):not(.danger):not(.purchase) small,.mc-branch-money span{color:var(--ui-muted)}
 .mc-branch-notes>div:not(.absence):not(.danger) strong{color:var(--ui-text)}
 .mc-branch-notes>div:not(.absence):not(.danger) p{color:var(--ui-muted)}
 .mc-summary-table .mc-open-shift,.mc-summary-table .mc-open-shift .mc-row-status{color:#593d42}
 .signin-page{background:var(--background)}
 .signin-logo{background:var(--ui-header)}
 .mc-standalone{background:var(--background)}
 .mc-standalone button{border-color:var(--border)}
 .mc-daily-table{min-width:calc(1230px * var(--ui-scale))}
 .mc-daily-table th:nth-child(3){width:calc(150px * var(--ui-scale))}
 .mc-daily-table th:nth-child(4){width:calc(124px * var(--ui-scale))}
 .mc-daily-table .mc-attendance-cell{vertical-align:top;padding:12px 8px}
 .mc-attendance-time{display:block;font-weight:700;font-size:calc(13px * var(--ui-scale));line-height:1.6}
 .mc-break-control{min-width:0;width:100%;max-width:100%;align-items:stretch;gap:7px;margin-top:10px}
 .mc-break-control .mc-break-status{margin:0;padding:5px 6px;line-height:1.6;white-space:normal;overflow-wrap:anywhere;background:var(--ui-accent-soft);color:var(--ui-accent-text);border-radius:7px;font-weight:600;font-size:calc(11px * var(--ui-scale))}
 .mc-break-control button{min-width:0;max-width:100%;width:100%;white-space:normal;line-height:1.5;padding:7px 5px;font-size:calc(12px * var(--ui-scale))}
 .mc-break-control .mc-break-start{background:var(--ui-surface);color:var(--ui-accent-text);border-color:var(--border)}
 .mc-break-control .mc-break-return{background:var(--primary);color:var(--primary-foreground);border-color:var(--primary)}
 .mc-theme-open{background:#ffffff12;color:#fff;border-color:#ffffff40!important;min-height:30px;padding:5px 10px!important;font-size:calc(12px * var(--ui-scale))}
 .topbar .account{grid-template-columns:auto auto;gap:2px 10px}
 .topbar .account>span,.topbar .account>small{grid-column:1}
 .topbar .account>.mc-theme-open{grid-column:2;grid-row:1/3}
 .topbar .account>.signout-icon{grid-column:3;grid-row:1/3}
 .mc-standalone>header{gap:12px;flex-wrap:wrap}
 .mc-theme-dialog{width:min(600px,calc(100vw - 28px));max-height:calc(100dvh - 40px);margin:auto;border:1px solid var(--border);border-radius:22px;background:var(--ui-surface);color:var(--ui-text);padding:0;box-shadow:0 24px 80px #0004;overflow:auto}
 .mc-theme-dialog::backdrop{background:#07172b99;backdrop-filter:blur(3px)}
 .mc-theme-dialog-head{display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:1;padding:20px 24px;background:var(--ui-surface);border-bottom:1px solid var(--border)}
 .mc-theme-dialog-head h2{margin:3px 0 0;font-size:calc(23px * var(--ui-scale));color:var(--ui-text)}
 .mc-theme-dialog-head small{color:var(--ui-muted);font-size:calc(10px * var(--ui-scale));letter-spacing:1px}
 .mc-theme-dialog-head button{min-height:34px;padding:5px 10px}
 .mc-appearance-content{padding:22px;display:grid;gap:18px}
 .mc-theme-intro{margin:0;color:var(--ui-muted);font-size:calc(13px * var(--ui-scale));line-height:1.8}
 .mc-theme-section{display:grid;gap:10px}
 .mc-theme-section h3{margin:0;font-size:calc(14px * var(--ui-scale));color:var(--ui-text)}
 .mc-theme-choices{display:flex;flex-wrap:wrap;gap:8px}
 .mc-theme-choice{flex:1;min-width:76px;font-size:calc(13px * var(--ui-scale));min-height:42px}
 .mc-theme-choice.selected{border-color:var(--primary);background:var(--ui-accent-soft);color:var(--ui-accent-text);box-shadow:inset 0 0 0 1px var(--primary)}
 .mc-theme-swatches{display:flex;flex-wrap:wrap;gap:10px;padding:3px}
 .mc-theme-swatches .mc-theme-swatch{border-radius:50%;width:36px;height:36px;min-height:36px;padding:0;border:2px solid transparent;box-shadow:0 0 0 1px var(--border)}
 .mc-theme-swatch.selected{outline:2px solid var(--ui-text);outline-offset:3px}
 .mc-theme-custom{display:flex;align-items:center;flex-wrap:wrap;gap:8px}
 .mc-theme-custom label{display:flex;align-items:center;gap:8px;font-size:calc(12px * var(--ui-scale))}
 .mc-theme-custom input[type=color]{width:46px;height:38px;padding:3px;min-height:38px}
 .mc-theme-custom input[type=text]{width:105px;font-size:calc(12px * var(--ui-scale))}
 .mc-theme-note{margin:0;color:var(--ui-muted);font-size:calc(11px * var(--ui-scale));line-height:1.8}
 .mc-theme-preview{display:grid;gap:5px;padding:18px;border-radius:14px;background:var(--ui-surface-soft);border:1px solid var(--border)}
 .mc-theme-preview>span{color:var(--ui-muted);font-size:calc(11px * var(--ui-scale))}
 .mc-theme-preview strong{font-size:calc(20px * var(--ui-scale))}
 .mc-theme-preview p{margin:0;color:var(--ui-muted);font-size:calc(13px * var(--ui-scale))}
 .mc-theme-preview button{justify-self:start;margin-top:8px}
 .mc-theme-footer{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
 .mc-theme-footer small{color:var(--ui-muted);font-size:calc(11px * var(--ui-scale))}
 .mc-appearance-page>.panel{max-width:760px}
 @media(max-width:560px){.topbar{padding:0 12px;height:auto;min-height:72px;gap:10px}.brand small{display:none}.account small{max-width:130px;overflow-wrap:anywhere}.mc-appearance-content{padding:16px}.mc-theme-dialog-head{padding:16px}.mc-theme-custom{gap:6px}}
}
@media print{
 :root{--background:#fff!important;--foreground:#172b40!important;--ui-surface:#fff!important;--ui-surface-soft:#fff!important;--ui-surface-alt:#edf3fa!important;--ui-text:#172b40!important;--ui-muted:#5d6b7c!important;--border:#ccd7e2!important;--ui-navy:#183553!important;--ui-font:Tahoma,Arial,sans-serif!important;--ui-scale:1!important}
 .mc-theme-dialog,.mc-theme-open,.mc-appearance-page{display:none!important}
 .panel,.kpi,table,input,select{color:#172b40;background:#fff}
}
.mc-code-cell{display:flex;align-items:center;gap:12px;white-space:nowrap}
.mc-codes-page,.mc-codes-page>.panel,.mc-codes-page .mc-table-wrap{min-width:0;max-width:100%}
.mc-code-add{display:inline-flex;align-items:center;justify-content:center;min-width:34px;width:34px;height:34px;padding:0;border-radius:10px;font-size:23px;font-weight:700;color:var(--primary);background:var(--ui-accent-soft);line-height:1}
.mc-codes-table .mc-shift-close{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.mc-schedule-field{display:flex;flex-direction:column;gap:5px;min-width:122px}
.mc-schedule-field small{color:var(--ui-muted,#65788e);font-weight:500;font-size:calc(12px * var(--ui-scale,1));white-space:nowrap}
.mc-schedule-field .mc-shift-preset{font-size:calc(11px * var(--ui-scale,1));padding:5px 7px;min-height:28px;background:var(--ui-accent-soft);color:var(--primary);white-space:nowrap}
