.wp-sheet { color:var(--text,#243740); font-size:14px; line-height:1.45; }
.wp-dialog { width:min(980px,calc(100vw - 24px)); max-height:92dvh; margin:auto; padding:20px; border:1px solid #d4dfdf; border-radius:10px; box-shadow:0 16px 60px #16333330; }
.wp-dialog::backdrop { background:#18323366; }
.wp-sheet h2 { font-size:20px; margin:0; }
.wp-sheet h3 { font-size:14px; margin:18px 0 6px; }
.wp-sheet header,.wp-period,.wp-setting-row { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:12px; }
.wp-sheet header>div { flex:1; }
.wp-sheet p { margin:5px 0 12px; }
.wp-sheet .wp-muted { color:#65747d; font-size:12px; }
.wp-sheet button,.wp-sheet input,.wp-sheet select { min-height:40px; border:1px solid #cbd5da; border-radius:5px; background:#fff; padding:7px 10px; font:inherit; color:inherit; max-width:100%; }
.wp-sheet button { cursor:pointer; }
.wp-sheet button.wp-primary { background:#235e63; color:white; border-color:#235e63; }
.wp-sheet button:disabled { opacity:.55; cursor:wait; }
.wp-sheet label { display:grid; gap:4px; font-size:12px; }
.wp-sheet table { width:100%; border-collapse:collapse; font-size:13px; }
.wp-sheet th,.wp-sheet td { padding:7px 10px; border-bottom:1px solid #e0e7e9; text-align:start; }
.wp-sheet th { background:#f1f5f5; font-weight:600; }
.wp-sheet .wp-num { text-align:end; font-variant-numeric:tabular-nums; white-space:nowrap; }
.wp-sheet .wp-subtotal { background:#edf4f3; font-weight:700; border-top:2px solid #c8d9d7; }
.wp-sheet .wp-positive { color:#237052; }
.wp-sheet .wp-attention { color:#995b1d; }
.wp-sheet .wp-warning { border-inline-start:3px solid #b88838; background:#fff8e9; padding:8px 12px; margin:8px 0; }
.wp-sheet details { border-bottom:1px solid #dbe3e5; margin:5px 0; }
.wp-sheet summary { padding:10px 0; cursor:pointer; font-weight:600; }
.wp-scroll { overflow:auto; max-width:100%; }
.wp-scroll table { min-width:610px; }
.wp-scroll .wp-detail-table { min-width:860px; }
.wp-detail-table th { white-space:nowrap; }
.wp-detail-table td:first-child { white-space:nowrap; }
.wp-dialog.wp-sheet { box-sizing:border-box; max-width:calc(100vw - 24px); }
.wp-companies input[type=text] { min-width:100px; width:100%; }
.wp-companies input[type=number] { width:115px; }
.wp-companies { min-width:790px!important; }
.wp-settings-actions { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.wp-visual-settings { margin:14px 0 18px; padding:12px; border:1px solid #d4e0e1; border-radius:8px; background:#f8fbfb; }
.wp-visual-settings h4 { margin:0 0 4px; }
.wp-visual-settings p { margin:0 0 10px; }
.wp-visual-settings table { min-width:520px; max-width:650px; background:#fff; }
.wp-visual-settings td:first-child strong,.wp-visual-settings td:first-child small { display:block; }
.wp-visual-settings td:first-child small { margin-top:2px; color:#65747d; }
.wp-visual-settings input[type=number] { width:92px; text-align:end; }
.wp-color-control { display:flex!important; align-items:center; gap:8px!important; }
.wp-color-control input[type=color] { width:46px; min-height:32px; padding:2px; }
.wp-color-control span,.wp-visual-settings output { font-variant-numeric:tabular-nums; }
.wp-visual-settings form>button { margin-top:10px; }
html:has(.mai-dialog[open]) { overflow:hidden; }
.mai-dialog { position:fixed; inset:0 auto auto 0; flex-direction:column; width:100dvw; max-width:none; height:100dvh; max-height:none; margin:0; padding:12px 16px; box-sizing:border-box; overflow:hidden; overscroll-behavior:contain; border:0; border-radius:0; background:#fff; }
.mai-dialog[open] { display:flex; }
.mai-dialog,.mai-dialog * { box-sizing:border-box; }
.mai-dialog::backdrop { background:#eef3f3; }
.mai-dialog>header { flex:0 0 auto; margin:0 0 6px; padding-bottom:7px; border-bottom:1px solid #dbe3e5; }
.mai-dialog>header .wp-muted { display:block; line-height:1.25; }
.mai-dialog>[role=alert]:empty { display:none; }
.mai-dialog [data-mai-body] { display:flex; flex:1 1 auto; flex-direction:column; min-width:0; min-height:0; overflow:hidden; }
.mai-dialog [data-mai-body]>.wp-warning { flex:0 0 auto; margin:0 0 6px; }
.mai-dialog .wp-scroll { flex:1 1 auto; min-width:0; min-height:180px; overflow:auto; scrollbar-gutter:stable; overscroll-behavior:contain; border:1px solid #d6e0e2; border-radius:5px; background:#fff; }
.mai-dialog .wp-scroll::-webkit-scrollbar { width:12px; height:12px; }
.mai-dialog .wp-scroll::-webkit-scrollbar-thumb { border:3px solid #f4f7f7; border-radius:999px; background:#8da4a8; }
.mai-dialog .wp-scroll::-webkit-scrollbar-corner { background:#f4f7f7; }
.mai-upload { display:grid; grid-template-columns:minmax(240px,1fr) auto; gap:10px; align-items:end; margin:14px 0; }
.mai-drop { border:2px dashed #9eb6b9; border-radius:7px; padding:14px; background:#f8fbfb; }
.mai-drop input { width:100%; margin-top:7px; }
.mai-summary { display:grid; flex:0 0 auto; grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:5px; margin:0 0 6px; }
.mai-metric { min-width:0; border:1px solid #dbe3e5; border-radius:5px; padding:5px 7px; overflow-wrap:anywhere; background:#f8fafb; line-height:1.25; }
.mai-metric span { color:#65747d; font-size:11px; }
.mai-metric strong { display:block; margin-top:2px; font-size:14px; font-variant-numeric:tabular-nums; }
.mai-table { min-width:1420px!important; table-layout:fixed; }
.mai-table th:nth-child(1) { width:190px; }
.mai-table th:nth-child(2) { width:230px; }
.mai-table th:nth-child(3) { width:140px; }
.mai-table th:nth-child(4) { width:205px; }
.mai-table th:nth-child(5) { width:235px; }
.mai-table th:nth-child(6) { width:270px; }
.mai-table th:nth-child(7) { width:150px; }
.mai-table th,.mai-table td { padding:6px 8px; vertical-align:top; }
.mai-table thead { position:sticky; top:0; z-index:1; box-shadow:0 1px 0 #cbd7d9; }
.mai-table select { min-width:170px; max-width:220px; }
.mai-table input[type=checkbox] { min-height:auto; width:auto; padding:0; }
.mai-table .mai-hours { min-width:120px; }
.mai-status { display:inline-block; padding:2px 6px; margin:1px; border-radius:999px; background:#fff1d7; color:#845719; font-size:11px; white-space:nowrap; }
.mai-status-ok { background:#dff3e9; color:#216a4f; }
.mai-inline { display:flex; gap:5px; align-items:center; flex-wrap:wrap; margin-top:4px; }
.mai-inline[hidden] { display:none; }
.mai-inline input[type=text],.mai-inline input[type=tel] { width:145px; min-height:34px; }
.mai-days { margin-top:5px; font-size:12px; }
.mai-days label { display:flex; grid-template-columns:auto 1fr; align-items:center; gap:5px; padding:2px 0; }
.mai-days input { min-height:auto; }
.mai-days summary { padding:4px 0; font-weight:500; }
.mai-state-counts { margin-top:4px; }
.mai-change { margin-top:4px; padding:4px 6px; border-inline-start:3px solid #b88838; background:#fff8e9; font-size:11px; white-space:nowrap; }
.mai-current { display:block; margin:3px 0; color:#6a4d20; }
.mai-worker-name strong,.mai-worker-name small,.mai-unresolved strong,.mai-unresolved small { display:block; overflow-wrap:anywhere; }
.mai-worker-name small,.mai-unresolved small,.mai-resolution-field>small { margin-top:2px; color:#65747d; }
.mai-resolution-field+.mai-resolution-field { margin-top:7px; padding-top:7px; border-top:1px solid #e3e9ea; }
.mai-resolved { display:flex; align-items:center; flex-wrap:wrap; gap:2px 6px; padding:4px 6px; border-radius:5px; background:#edf7f2; color:#245d4b; }
.mai-resolved strong { flex:1 1 140px; overflow-wrap:anywhere; }
.mai-resolved small { flex:1 1 100%; color:#527069; }
.mai-resolved .wp-link { margin-inline-start:auto; }
.mai-unresolved { margin-bottom:5px; padding:5px 7px; border-inline-start:3px solid #b88838; background:#fff8e9; color:#764d18; }
.mai-differences label { display:flex; grid-template-columns:auto 1fr; align-items:flex-start; gap:5px; margin-bottom:5px; line-height:1.3; }
.mai-differences input { flex:0 0 auto; margin-top:2px; }
.mai-row-audit { margin-top:5px!important; font-size:11px; color:#65747d; }
.mai-row-audit summary { padding:3px 0!important; font-size:11px; font-weight:500!important; }
.mai-footer { display:flex; flex:0 0 auto; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px 14px; min-height:48px; margin-top:6px; padding:7px 10px; background:#f7faf9; border-top:1px solid #cfdcda; box-shadow:0 -2px 8px #17393b0f; }
.mai-footer [data-mai-counts] { flex:1 1 600px; font-size:12px; line-height:1.35; }
.mai-footer [data-mai-confirm] { flex:0 0 auto; }
.mai-result { padding:18px; text-align:center; background:#edf7f2; border:1px solid #b9d8c9; border-radius:7px; }
.wp-cost-config { margin:0; }
.wp-cost-config table { table-layout:fixed; }
.wp-cost-config th:nth-child(1) { width:28%; }
.wp-cost-config th:nth-child(2) { width:20%; }
.wp-cost-config th:nth-child(3) { width:31%; }
.wp-cost-config th:nth-child(4) { width:21%; }
.wp-cost-config input[type=number] { width:118px; min-height:34px; padding:4px 7px; text-align:end; }
.wp-editable-row { background:#fbfefd; }
.wp-locked-row { background:#f6f7f8; color:#46555c; }
.wp-locked,.wp-calculated,.wp-source { display:inline-block; border-radius:999px; padding:2px 7px; background:#e9eef0; color:#52636a; font-size:11px; }
.wp-source-override { background:#fff0d9; color:#875010; }
.wp-link { min-height:auto!important; padding:2px 5px!important; border:0!important; color:#1f676d!important; text-decoration:underline; }
.wp-include { display:flex!important; grid-template-columns:auto 1fr; align-items:center; gap:5px!important; white-space:nowrap; }
.wp-include input { min-height:auto!important; width:auto; }
.wp-performance-result { font-size:15px; border-block:2px solid #8fb8b4; }
.wp-performance-result .wp-num { font-size:18px; }
.wp-formula { margin-top:4px!important; }
.wp-formula summary { color:#586a72; font-size:12px; font-weight:500!important; }
.wp-sheet [role=alert] { color:#9f3d23; }
.wp-sheet [role=status] { font-size:12px; }
.wp-assignment { grid-column:1/-1; padding:10px 0; }
.wp-assignment .wp-setting-row { margin:0; }
.wp-benchmark { margin-top:16px; padding:10px; background:#f4f6f7; }
.mai-create-worker { display:block; margin-block:6px; width:100%; }
.mai-unknown-worker { display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:8px; border-top:1px solid #ddd; }
.mai-unknown-worker strong { min-width:160px; }
.mai-worker-form { box-sizing:border-box; width:min(520px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; padding:20px; }
.mai-worker-form form { display:grid; gap:12px; }
.mai-worker-form label { display:grid; gap:4px; }
.mai-worker-form input,.mai-worker-form select { box-sizing:border-box; width:100%; min-height:36px; }
.mai-worker-form .mai-verify { display:flex; align-items:center; }
.mai-worker-form .mai-verify input { width:auto; }
.mai-worker-form footer { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; }
@media(max-width:640px) { .wp-dialog { padding:12px; } .mai-dialog { padding:8px; } .mai-dialog>header { flex-wrap:nowrap; } .mai-dialog>header button { min-height:36px; padding:5px 8px; } .mai-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .mai-footer { align-items:stretch; } .mai-footer [data-mai-counts] { flex-basis:100%; } .mai-footer [data-mai-confirm] { width:100%; } .wp-sheet h2 { font-size:17px; } .wp-sheet td,.wp-sheet th { padding:7px 5px; } .mai-table th,.mai-table td { padding:5px 7px; } .wp-period label { flex:1; min-width:125px; } .wp-period input,.wp-period select { width:100%; } .wp-cost-config table { min-width:650px; } .wp-performance-result .wp-num { font-size:16px; } .wp-visual-settings { padding:9px; } }
