:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;color:#202b42;background:#f5f7fb;font-size:14px;--blue:#3766e8;--green:#168a6b;--muted:#7b8496;--line:#e8ecf3;--red:#d85b60;--nav:222px}
*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}a{color:var(--blue);text-decoration:none}h1,h2,h3,p{margin:0}button:focus-visible,a:focus-visible{outline:3px solid #9fb8ff;outline-offset:3px}input,select,textarea{border:1px solid #dce2ed;border-radius:8px;padding:10px 12px;background:white;color:inherit;max-width:100%}input:focus,select:focus,textarea:focus{outline:2px solid #bed0ff;border-color:var(--blue)}button{border:none}small{font-size:12px}.muted{color:var(--muted)}.positive{color:var(--green)}.negative{color:var(--red)}.mono{font-variant-numeric:tabular-nums}.right{text-align:right}.nowrap{white-space:nowrap}.empty-cell{color:#b2b8c5}.sub{font-size:12px;line-height:1.6;color:var(--muted);margin-top:5px}.initial{padding:80px;text-align:center}.hidden{display:none!important}
.sidebar{width:var(--nav);background:#fff;border-right:1px solid var(--line);height:100vh;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column;padding:24px 14px;z-index:20}.brand{display:flex;align-items:center;gap:11px;padding:0 12px 25px;font-size:22px;letter-spacing:-.7px;font-weight:720;color:#182642}.brand-mark{display:grid;place-items:center;background:var(--blue);color:#fff;width:33px;height:33px;border-radius:10px;font-size:23px;font-weight:650}.workspace{border:1px solid var(--line);margin:0 6px 25px;border-radius:9px;padding:12px;display:flex;align-items:center;gap:10px;font-size:12px}.workspace .dot{width:9px;height:9px;background:#57b792;border-radius:50%}.workspace strong{font-size:13px;display:block;margin-bottom:3px}.navlabel{padding:15px 15px 8px;color:#a1a8b4;font-size:10px;text-transform:uppercase;letter-spacing:1px;font-weight:650}.navlink{display:flex;align-items:center;gap:12px;color:#616b80;border-radius:7px;padding:11px 14px;margin:3px 0;font-size:13px}.navlink svg{width:18px;height:18px;flex:none}.navlink.active{background:#edf2ff;color:var(--blue);font-weight:600}.navlink:hover{background:#f3f6fc}.navlink .badge{margin-left:auto;font-size:10px;background:#f1f3f7;padding:2px 5px;border-radius:4px}.sidebar-footer{margin-top:auto;border-top:1px solid var(--line);padding:16px 9px 0;display:flex;align-items:center;gap:10px;font-size:12px}.avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:#eaf0ff;color:var(--blue);font-weight:650}.sidebar-footer small{display:block;color:var(--muted);margin-top:3px;font-size:10px}
.main{margin-left:var(--nav);min-height:100vh}.topbar{height:67px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;gap:16px}.breadcrumb{font-size:12px;color:var(--muted);display:flex;gap:10px;align-items:center}.top-actions{display:flex;gap:12px;align-items:center;font-size:12px}.local-dot{width:6px;height:6px;border-radius:50%;background:#23a577;display:inline-block;margin-right:6px}.content{max-width:1580px;margin:auto;padding:30px 34px 40px}.heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:25px}.heading h1{font-size:27px;font-weight:640;letter-spacing:-.7px}.heading p{font-size:13px;color:var(--muted);margin-top:8px;line-height:1.6}.heading-actions,.toolbar,.filters,.row-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.btn{border-radius:7px;background:#fff;border:1px solid #dfe5ef;color:#4c5870;padding:10px 14px;display:inline-flex;align-items:center;justify-content:center;gap:8px;font-weight:500;font-size:12px;white-space:nowrap}.btn svg{width:15px;height:15px}.btn:hover{background:#f5f7fb}.btn.primary{color:#fff;background:var(--blue);border-color:var(--blue);box-shadow:0 2px 4px #3766e819}.btn.primary:hover{background:#2d58cf}.btn.text{border-color:transparent;background:none;color:var(--blue);padding:7px 0}.btn.small{padding:6px 10px;font-size:11px}.btn.icon{padding:8px}.filters{margin-bottom:22px}.filters input,.filters select{font-size:12px;padding:9px 11px}.spacer{flex:1}.tabs{display:inline-flex;background:#edf0f6;padding:3px;border-radius:8px;gap:2px}.tabs button{font-size:12px;padding:8px 13px;border-radius:6px;color:#788196;background:transparent}.tabs button.active{background:#fff;color:#263d68;box-shadow:0 1px 5px #10254a10}.notice{border:1px solid #e1e8f8;background:#eef3ff;border-radius:9px;padding:12px 16px;font-size:12px;line-height:1.6;color:#546b99;display:flex;gap:10px;align-items:flex-start;margin-bottom:22px}.notice.warning{background:#fffbef;border-color:#f3e7c9;color:#8b7449}.notice svg{width:17px;height:17px;flex:none;margin-top:1px}.notice strong{font-weight:600}.notice a{font-weight:600}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:22px}.kpi{background:white;border:1px solid var(--line);border-radius:11px;padding:20px 19px;position:relative;min-height:128px}.kpi-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:15px;color:#768198;font-size:12px}.kpi-top svg{width:18px;height:18px;color:#95a6c1}.kpi-value{font-size:26px;font-weight:610;letter-spacing:-.8px;white-space:nowrap;font-variant-numeric:tabular-nums}.kpi-value.missing{font-size:22px;color:#b0b8c6;font-weight:450}.kpi small{display:block;margin-top:10px;color:#8b94a5;font-size:10px}.kpi.highlight{border-color:#d4dffb;background:#fbfcff}.grid-main{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(300px,1fr);gap:22px;margin-bottom:22px}.panel{background:#fff;border:1px solid var(--line);border-radius:11px;overflow:hidden}.panel-head{padding:20px 22px 15px;display:flex;justify-content:space-between;align-items:center;gap:10px}.panel-head h2{font-size:15px;font-weight:600;letter-spacing:-.15px}.panel-body{padding:0 22px 22px}.legend{display:flex;gap:15px;font-size:10px;color:#8993a6}.legend i{width:7px;height:7px;display:inline-block;border-radius:2px;margin-right:5px}.chart{height:245px;width:100%;display:block}.chart text{font:10px -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;fill:#9aa4b6}.chart .gridline{stroke:#edf0f6;stroke-width:1}.chart-foot{display:flex;gap:20px;border-top:1px solid var(--line);padding-top:15px;font-size:11px;line-height:1.5;color:var(--muted)}.chart-foot strong{color:#526383;font-weight:550}.direction-row{padding:14px 0;border-bottom:1px solid #f0f2f7}.direction-row:last-child{border:none}.direction-label{display:flex;justify-content:space-between;gap:10px;align-items:baseline;margin-bottom:9px;font-size:12px}.direction-label strong{font-size:13px;font-weight:600;white-space:nowrap}.progress{height:5px;border-radius:10px;background:#eff2f8;overflow:hidden}.progress span{display:block;height:100%;background:#5481ef;border-radius:10px}.direction-row small{font-size:10px;color:var(--muted);display:block;margin-top:7px}.bottom-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.empty{padding:45px 25px;text-align:center;line-height:1.7;color:var(--muted);font-size:13px}.empty .empty-icon{width:46px;height:46px;background:#f1f5fd;color:#809ccc;border-radius:12px;display:grid;place-items:center;margin:0 auto 15px}.empty h3{font-size:15px;color:#54647e;font-weight:550;margin-bottom:7px}.empty p{max-width:450px;margin:0 auto 18px}.empty svg{width:22px;height:22px}.compact-empty{padding:22px 0 12px;display:flex;align-items:center;gap:15px}.compact-empty svg{width:24px;height:24px;color:#9daecc}.compact-empty h3{font-size:12px;font-weight:500;margin-bottom:5px}.compact-empty p{font-size:11px;color:#98a2b4;line-height:1.5}
.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse;font-size:12px}th{font-size:10px;letter-spacing:.15px;color:#8a95a8;font-weight:550;text-align:left;padding:13px 17px;white-space:nowrap;background:#fbfcfe;border-bottom:1px solid var(--line)}td{padding:13px 17px;border-bottom:1px solid #f0f2f7;vertical-align:middle}tr:last-child td{border-bottom:none}tbody tr:hover{background:#fcfdff}td.number{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}td .sub{font-size:10px}.report-table th:first-child,.report-table td:first-child{position:sticky;left:0;background:#fff;z-index:1;min-width:275px;max-width:380px}.report-table .section td{background:#f3f6fb;font-weight:600;padding-top:15px;padding-bottom:15px}.report-table .section td:first-child{background:#f3f6fb}.report-table .total td{font-weight:650;border-top:1px solid #e2e8f2}.report-table .article td:first-child{padding-left:30px}.report-table .number{min-width:122px}.report-table button{background:transparent;color:inherit;font:inherit;text-align:inherit;padding:0;cursor:pointer}.report-table button:hover{color:var(--blue)}.pill{display:inline-block;font-size:10px;border-radius:5px;background:#f2f5fa;color:#7d899e;padding:4px 7px;white-space:nowrap}.pill.green{background:#eaf7f1;color:#3b9274}.pill.blue{background:#eef3ff;color:#5780d3}.pill.amber{background:#fff5df;color:#ad873d}.tag{display:inline-flex;align-items:center;gap:5px;font-size:10px;color:#617da8}.tag:before{content:'';width:5px;height:5px;border-radius:50%;background:#6e91dc}.row-link{background:none;color:var(--blue);font-size:12px;padding:0;text-align:left}.search{min-width:210px}.list-count{font-size:11px;color:var(--muted);padding:12px 20px;border-top:1px solid var(--line)}
.calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.calendar .weekday{padding:13px 12px;border-bottom:1px solid var(--line);background:#fbfcfe;color:var(--muted);font-size:11px}.cal-day{min-height:115px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);padding:11px;font-size:11px;overflow:hidden}.cal-day:nth-child(7n){border-right:0}.cal-day.blank{background:#fbfcfe}.cal-day .date{display:flex;justify-content:space-between;color:#8390a5;margin-bottom:10px}.cal-day .date button{background:transparent;color:#8ea4c8;font-size:15px;line-height:1}.cal-payment{display:block;width:100%;background:#eef6f4;color:#3e896f;border-radius:4px;margin-bottom:5px;padding:5px 7px;text-align:left;font-size:10px;line-height:1.4}.cal-payment.expense{background:#fff0f0;color:#bc696e}.cal-payment.completed{opacity:.55}.account-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.account-card{padding:22px}.account-card h3{font-size:14px;margin-bottom:7px}.account-card .amount{font-size:23px;margin:23px 0 8px;font-weight:600}.integration{display:flex;align-items:center;gap:15px;padding:22px;border-bottom:1px solid var(--line)}.integration:last-child{border:none}.integration .logo{width:43px;height:43px;display:grid;place-items:center;background:#fff1b7;border-radius:10px;font-size:18px;font-weight:650}.integration .info{flex:1}.integration h3{font-size:13px;margin-bottom:5px}.integration p{color:var(--muted);font-size:12px;line-height:1.6}
.backdrop{position:fixed;inset:0;background:#13233a45;z-index:50;display:flex;align-items:center;justify-content:center;padding:24px;backdrop-filter:blur(2px)}.dialog{width:min(620px,100%);max-height:90vh;overflow:auto;background:#fff;border-radius:13px;box-shadow:0 22px 80px #172b4e25}.dialog.wide{width:min(1020px,100%)}.dialog-header{padding:23px 25px 17px;display:flex;align-items:center;justify-content:space-between}.dialog-header h2{font-size:19px;font-weight:600}.dialog-header button{background:none;color:#93a0b5;font-size:25px}.dialog-body{padding:0 25px 25px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:flex;flex-direction:column;gap:7px;font-size:12px;color:#63728c}.field.full{grid-column:1/-1}.field input,.field select,.field textarea{width:100%;font-size:13px}.field textarea{resize:vertical;min-height:75px}.form-actions{display:flex;justify-content:flex-end;gap:10px;padding-top:24px}.error-box{color:#c45a62;background:#fff1f1;border-radius:7px;padding:10px 13px;margin-bottom:15px;font-size:12px;line-height:1.6}.error-box:empty{display:none}.dropzone{border:1.5px dashed #c9d5eb;background:#f9fbff;border-radius:10px;padding:32px 20px;text-align:center;color:#7788a3;margin:15px 0}.dropzone h3{font-size:15px;font-weight:550;color:#536787;margin-bottom:8px}.dropzone p{font-size:12px;margin-bottom:20px}.step{font-size:11px;text-transform:uppercase;letter-spacing:1px;color:#91a0b9;margin-bottom:15px}.preview-small{max-height:260px;overflow:auto;margin-top:15px;border:1px solid var(--line);border-radius:8px}.preview-small table{font-size:11px}.preview-small td,.preview-small th{padding:8px 10px}.source-detail{display:flex;gap:15px;flex-wrap:wrap;margin:12px 0}.source-detail div{background:#f6f8fc;border-radius:8px;padding:13px 15px;min-width:150px}.source-detail small{display:block;color:var(--muted);margin-bottom:5px}.source-detail strong{font-size:18px}.help-text{font-size:12px;color:var(--muted);line-height:1.7;margin-bottom:18px}#toast{position:fixed;bottom:26px;right:28px;padding:13px 20px;border-radius:9px;background:#233651;color:white;box-shadow:0 5px 25px #1232;z-index:100;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none;max-width:500px;font-size:13px}#toast.visible{opacity:1;transform:translateY(0)}.loadbar{height:7px;background:#edf1f7;border-radius:10px;margin:8px 0;width:120px;overflow:hidden}.loadbar i{display:block;height:100%;background:#6c95ee}.loadbar.over i{background:#e99b5f}.login{max-width:370px;margin:15vh auto;background:white;border:1px solid var(--line);border-radius:14px;padding:32px}.login h1{font-size:24px;margin-bottom:22px}.login input{display:block;width:100%;margin:15px 0}.login .btn{width:100%}
@media(min-width:1550px){.kpi-value{font-size:30px}.content{padding-top:35px}}
@media(max-width:1180px){:root{--nav:190px}.content{padding:24px}.topbar{padding:0 24px}.kpis{gap:11px}.kpi{padding:16px 13px}.kpi-value{font-size:23px}.grid-main{grid-template-columns:1.5fr 1fr}.legend{gap:8px}}
@media(max-width:920px){:root{--nav:72px}.sidebar{padding:20px 8px}.brand{padding:0 10px 24px}.brand-name,.workspace,.navlabel,.navlink span,.sidebar-footer .identity{display:none}.navlink{padding:13px;justify-content:center}.sidebar-footer{padding:12px 10px}.kpis{grid-template-columns:repeat(2,1fr)}.grid-main,.bottom-grid{grid-template-columns:1fr}.heading{flex-wrap:wrap}.breadcrumb{display:none}.topbar{justify-content:flex-end}.account-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.content{padding:20px 15px}.heading h1{font-size:23px}.kpis{gap:9px}.kpi-value{font-size:20px}.kpi-top{font-size:10px}.kpi small{font-size:9px}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.backdrop{padding:10px}.calendar{min-width:650px}.panel-head{padding:16px}.panel-body{padding:0 16px 16px}.topbar{height:54px;padding:0 15px}.account-grid{grid-template-columns:1fr}.top-actions .muted{display:none}}

.panel-head>svg{width:18px;height:18px;flex:none;color:#91a2bb}.dropzone>svg{width:27px;height:27px;margin-bottom:12px}.sidebar{overflow-y:auto}.navlink{padding-top:9px;padding-bottom:9px}.navlabel{padding-top:12px}

/* Analytical workspace, inspired by the public Adesk dashboard structure. */
.analytics-pair{display:grid;gap:20px;margin-bottom:20px;align-items:stretch}.profit-pair{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}.expense-pair{grid-template-columns:minmax(0,1fr) minmax(0,1.35fr)}.analytics-wide{margin-bottom:20px}.analytic-chart{width:100%;height:auto;display:block;min-height:180px}.analytic-chart text,.direction-chart text{font:11px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;fill:#7c8aa2}.analytic-chart .gridline{stroke:#eaf0f7;stroke-width:1}.analytic-chart .tiny{font-size:9px}.analytic-chart .bar-total,.direction-chart .bar-total{fill:#4b6182;font-size:10px}.direction-chart{width:100%;height:235px;display:block}.paired-chart{min-width:750px}.kpi-comparison{font-size:10px;line-height:1.5;margin-top:9px;min-height:30px}.expense-composition{display:flex;align-items:center;gap:12px;min-height:245px}.donut{width:46%;min-width:130px;max-width:210px;flex-shrink:0}.donut-sum{font-size:19px;font-weight:600;fill:#243951}.donut-unit{font-size:10px;fill:#8b99ae}.donut-legend{min-width:0;flex:1}.donut-legend>div{display:flex;align-items:center;gap:7px;font-size:11px;margin:14px 0}.donut-legend i,.direction-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;flex-shrink:0}.donut-legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;color:#6f7f98}.donut-legend strong{font-size:11px;font-weight:550}.expense-ranking{display:flex;flex-direction:column;gap:7px;padding-top:8px}.expense-item{display:grid;grid-template-columns:minmax(90px,1.1fr) minmax(40px,1fr) 90px;align-items:center;gap:10px;width:100%;padding:5px 0;background:transparent;text-align:left;font-size:10px}.expense-item:hover{background:#f5f8ff}.expense-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#65758f}.expense-track{height:8px;background:#f1f5fb;border-radius:3px;overflow:hidden}.expense-track i{display:block;height:100%;border-radius:3px}.expense-item strong{font-weight:550;text-align:right;color:#546783}.direction-legend{display:flex;flex-wrap:wrap;gap:16px;margin-top:14px;font-size:10px;color:#8190a6}.direction-legend i{margin-right:5px}.sub{color:#8a96a9;font-size:10px;line-height:1.6;margin-top:9px}.sparkline{height:40px;width:100%;display:block;margin-top:8px}.kpi{padding-bottom:12px}.dashboard-hero{border-radius:12px;background:linear-gradient(110deg,#263d60,#537496);padding:24px 25px;margin-bottom:20px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:15px}.dashboard-hero h2{font-size:20px;font-weight:520;margin-bottom:7px}.dashboard-hero p{color:#d2dfef;font-size:12px}.hero-tag{background:#ffffff18;border:1px solid #ffffff30;border-radius:20px;padding:8px 13px;font-size:11px;white-space:nowrap}.margin-row{display:flex;align-items:center;justify-content:space-between;padding:13px 0;border-bottom:1px solid #edf1f7;gap:12px;font-size:12px}.margin-row:last-child{border:0}.margin-row span{color:#71809a}.margin-row strong{font-size:17px;font-weight:550}.cash-pair{grid-template-columns:minmax(0,1.65fr) minmax(0,1fr)}
@media(max-width:1150px){.expense-pair,.profit-pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.expense-composition{flex-direction:column;gap:0}.donut{width:150px}.donut-legend{width:100%}.expense-item{grid-template-columns:minmax(70px,1fr) 55px 85px}}
@media(max-width:850px){.analytics-pair{grid-template-columns:1fr}.expense-composition{flex-direction:row}.donut{width:40%}.hero-tag{display:none}.direction-chart{height:210px}.expense-item{grid-template-columns:minmax(80px,1fr) minmax(50px,1fr) 85px}}
.analytic-chart text{font-size:15px}.analytic-chart .bar-total{font-size:12px}.analytic-chart .tiny{font-size:11px}.direction-chart text{font-size:18px}.direction-chart .bar-total{font-size:16px}

/* Full direction names and readable values at every viewport width. */
.profit-pair{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.expense-pair{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
.profit-directions{display:flex;flex-direction:column;gap:20px;padding:10px 0 15px}.profit-direction-label{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:7px 16px;margin-bottom:10px}.profit-direction-label span{font-size:14px;line-height:1.5;color:#4b5e79;flex:1 1 180px;overflow-wrap:anywhere}.profit-direction-label strong{font-size:17px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}.profit-direction-track{position:relative;height:10px;background:#f0f4fa;border-radius:4px}.profit-direction-track i{position:absolute;top:0;bottom:0;display:block;border-radius:4px}.profit-zero{position:absolute;top:-3px;bottom:-3px;border-left:1px solid #bcc9db}
.direction-expenses{display:flex;align-items:center;gap:22px;padding:10px 0 12px;flex-wrap:wrap}.direction-donut{width:170px;height:170px;flex:0 0 170px;margin:auto}.direction-expense-list{flex:1 1 220px;min-width:0}.direction-expense-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #edf1f7}.direction-expense-row:last-child{border:0}.direction-expense-row>i{width:10px;height:10px;border-radius:3px;flex-shrink:0}.direction-expense-row>div{flex:1;min-width:0}.direction-expense-row span{display:block;font-size:14px;line-height:1.5;overflow-wrap:anywhere;color:#4b5e79}.direction-expense-row small{display:block;font-size:12px;color:#8a96a9;margin-top:4px}.direction-expense-row strong{font-size:17px;font-weight:600;white-space:nowrap}.margin-row span{font-size:14px;line-height:1.5}.expense-name{white-space:normal;overflow:visible;line-height:1.5}.expense-item{font-size:12px;grid-template-columns:minmax(100px,1.4fr) minmax(35px,.7fr) 95px;gap:10px}.expense-ranking{gap:9px}.panel-head h2{line-height:1.45}.sub{font-size:11px}
@media(max-width:1000px){.profit-pair,.expense-pair{grid-template-columns:1fr}.direction-expenses{flex-wrap:nowrap}.direction-donut{width:190px;height:190px;flex-basis:190px}}
@media(max-width:600px){.direction-expenses{flex-wrap:wrap}.direction-expense-list{flex-basis:100%}.profit-direction-label span{flex-basis:100%}.expense-item{grid-template-columns:minmax(90px,1fr) 35px 85px;font-size:11px}}

/* Финансы. Точка сборки — рабочий стол. */
:root{--blue:#487ce5;--nav:232px}.sidebar{background:#222938;border-right-color:#222938;color:#eef3fd;padding-top:25px}.sidebar .brand{color:#fff;font-size:24px;line-height:1.1;align-items:center;padding-left:9px}.brand-mark{background:linear-gradient(140deg,#598cec,#4368da);box-shadow:0 4px 12px #10192c33;flex-shrink:0}.brand-subtitle{display:block;font-size:11px;font-weight:400;letter-spacing:.6px;margin-top:7px;color:#aebbd2}.sidebar .workspace{background:#ffffff06;border-color:#ffffff13;margin-bottom:18px}.sidebar .workspace strong{color:#d7e1f2}.sidebar .workspace .muted{color:#8b9bb5}.navlink{color:#a9b6cc;padding-top:11px;padding-bottom:11px}.navlink:hover{background:#ffffff09;color:#fff}.navlink.active{background:#477ae526;color:#a7c5ff}.navlink.active svg{color:#7aa7ff}.navlabel{color:#687c9c}.sidebar-footer{border-color:#ffffff12;color:#dbe4f4}.sidebar-footer small{color:#8495b1}.sidebar .avatar{background:#35445f;color:#bdcef0}.sidebar .badge{background:#344462;color:#d2dffc}.dashboard-view{background:linear-gradient(155deg,#9bafc5 0,#718cac 410px,#dce4ef 900px,#edf1f7 1500px)}.dashboard-view .topbar{background:#ffffff10;border-color:#ffffff20}.dashboard-view .breadcrumb,.dashboard-view .top-actions>.muted{color:#eef4fc}.dashboard-view .content{padding-top:33px}.dashboard-view .heading{align-items:center;margin-bottom:23px}.dashboard-view .heading h1{font-size:30px;font-weight:540;color:#fff;letter-spacing:-.5px}.dashboard-view .heading p{color:#edf3fc;font-size:13px}.dashboard-view .heading-actions .btn:not(.primary){background:#ffffff15;border-color:#ffffff65;color:#fff}.dashboard-view .filters{margin-bottom:16px}.dashboard-view .notice.warning{background:#fffaf0f5;border-color:#fff0d7;color:#84734f;font-size:11px;margin-bottom:18px}.dashboard-view .kpi{border:0;box-shadow:0 4px 18px #24375a0c;border-radius:8px;background:#fff}.dashboard-view .kpis{gap:14px;margin-bottom:19px}.dashboard-view .kpi.highlight{background:#fff}.dashboard-view .kpi-value{font-size:27px}.dashboard-view .kpi-top{color:#5b6b82;font-size:12px}.dashboard-view .panel{border-color:#dbe3ef;box-shadow:0 4px 15px #24375a04;border-radius:8px}.dashboard-view .panel-head h2{font-size:16px;color:#334561}.dashboard-view .panel-head{padding-top:22px}.dashboard-view .kpi-comparison .muted{color:#8c98aa}.login .brand-subtitle{color:#7b8496}
@media(max-width:1180px){:root{--nav:210px}.sidebar .brand{font-size:21px}.dashboard-view .kpi-value{font-size:24px}}
@media(max-width:920px){:root{--nav:72px}.sidebar .brand{padding-left:10px}.dashboard-view .heading h1{font-size:27px}}
@media(max-width:600px){.dashboard-view .heading h1{font-size:24px}.dashboard-view .kpi-value{font-size:20px}.dashboard-view .kpi-top{font-size:10px}}
/* Daily liquidity and payment planning. */
.calendar-kpi-value{font-size:23px;font-weight:600;letter-spacing:-.4px}.gap-kpi{background:#fff4f5;border-color:#efc1c8}.gap-kpi .calendar-kpi-value{color:#c34f5f}.calendar-chart-panel{margin-bottom:20px}.calendar-chart-panel .legend{flex-wrap:wrap;justify-content:flex-end}.liquidity-chart{display:block;width:100%;min-width:620px;max-height:250px}.liquidity-chart text{fill:#8290a7;font:12px -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.liquidity-grid{display:grid;grid-template-columns:repeat(7,minmax(150px,1fr));min-width:1050px}.liquidity-weekday{padding:12px 14px;background:#f4f7fc;color:#65778f;font-weight:600;font-size:12px;border-top:1px solid #e8edf4;border-bottom:1px solid #e8edf4;position:sticky;top:0}.liquidity-weekday.weekend{color:#9b7890;background:#f8f5f9}.liquidity-day{padding:12px 10px 15px;border-right:1px solid #e8edf4;border-bottom:1px solid #e8edf4;min-height:260px;background:#fff;min-width:0}.liquidity-day.is-weekend{background:#fbfcfe}.liquidity-day.has-gap{background:#fff3f4}.liquidity-day.is-today{box-shadow:inset 0 3px #497ee5}.liquidity-blank{background:#f7f9fc;border-right:1px solid #e8edf4;border-bottom:1px solid #e8edf4}.liquidity-date{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.liquidity-date button{background:none;color:#506a91;font-size:16px;font-weight:600;padding:3px}.liquidity-date small{font-size:10px;margin-left:6px;font-weight:400;color:#8997ad}.liquidity-date button:last-child{width:25px;height:25px;border-radius:6px;background:#eef3fc;color:#4779d5;font-size:20px;font-weight:400}.liquidity-summary{display:block;text-align:left;width:100%;background:transparent;padding:0}.liquidity-summary>span:not(.day-mode){display:flex;flex-wrap:wrap;justify-content:space-between;gap:3px 6px;padding:5px 0}.liquidity-summary small{font-size:10px;color:#8895aa}.liquidity-summary b{font-size:11px;font-weight:550;white-space:nowrap}.day-mode{display:block;font-size:9px;color:#8999b1;text-transform:uppercase;letter-spacing:.6px;margin-bottom:7px}.liquidity-summary .day-closing{border-top:1px solid #e4eaf4;margin-top:4px;padding-top:8px!important}.day-closing b{font-weight:650;color:#34516f}.has-gap .day-closing b{color:#c84f61}.gap-label{display:block;font-size:10px;font-weight:550;line-height:1.7;color:#c34f5f;background:#ffe1e6;padding:6px 7px;border-radius:5px;margin-top:6px}.day-plan-list{display:flex;flex-direction:column;gap:7px;margin-top:13px}.day-plan{display:block;width:100%;padding:7px 8px;border-radius:5px;text-align:left;background:#edf6f2;border-left:2px solid #64ad92;color:#5b7d71}.day-plan.expense{background:#f9eff0;border-left-color:#cc8e98;color:#9a6370}.day-plan span{display:block;font-size:10px;line-height:1.4;overflow-wrap:anywhere}.day-plan strong{display:block;font-size:11px;margin-top:4px;font-weight:600}.day-plan small{display:block;font-size:9px;line-height:1.4;margin-top:3px;opacity:.8}.day-plan.is-paid{opacity:.6}.day-more{background:transparent;color:#4c7dd7;font-size:11px}.week-view .liquidity-day{min-height:310px}.liquidity-summary:hover{background:#497ee508}
@media(max-width:600px){.calendar-kpi-value{font-size:19px}.calendar-chart-panel .panel-head{flex-wrap:wrap}.calendar-chart-panel .legend{justify-content:flex-start}}
.liquidity-grid{grid-template-columns:repeat(7,minmax(120px,1fr));min-width:840px}
.automation-banner{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 18px;margin-bottom:18px;border-radius:8px;background:#f4f7ff;border:1px solid #dce6fa}.automation-banner strong{font-size:13px;color:#3f5d8e}.automation-banner p{font-size:11px;color:#7890b4;margin-top:5px;line-height:1.6}.rules-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}.rule-card{padding:22px;border-top:1px solid var(--line)}.rule-card-heading{display:flex;align-items:center;gap:13px;flex-wrap:wrap}.rule-card-heading h3{font-size:15px;margin-bottom:7px}.rule-priority{display:grid;place-items:center;width:36px;height:36px;border-radius:9px;background:#edf3ff;color:#4b78c9;font-weight:600}.rule-expression{font-size:12px;color:#6b7f9c;line-height:1.8;margin-top:15px;overflow-wrap:anywhere}.rule-actions-text{font-size:12px;color:#396994;margin-top:10px;line-height:1.8}.rules-projects{margin-top:20px}.rule-group{border:1px solid #dce5f3;border-left:3px solid #82a3df;background:#f7f9fe;padding:15px;border-radius:8px;margin-top:18px}.rule-group .rule-group{background:#fff;border-left-color:#a9b7d6;margin-top:10px}.rule-group-heading{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:12px}.rule-group-heading strong{font-size:13px}.rule-group-heading select{font-size:12px;max-width:220px}.rule-condition{display:grid;grid-template-columns:minmax(130px,1.1fr) minmax(120px,1fr) minmax(130px,1.3fr) 32px;gap:8px;align-items:center;margin-bottom:10px}.rule-condition input,.rule-condition select{width:100%;font-size:12px;padding:9px}.rule-condition .btn{padding:8px;min-width:28px}.rule-group-buttons{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.rule-section-title{font-size:15px;margin:24px 0 15px}.rule-test-box{background:#fafbfd;border:1px solid #e3e9f3;border-radius:8px;padding:16px;margin:18px 0}.rule-test-box summary{font-size:13px;color:#596f91;cursor:pointer;margin-bottom:15px}.rule-test-box>.btn{margin-top:15px}#rule-test-result{margin-top:14px}.rule-preview-scroll{max-height:380px;overflow:auto;margin-top:18px}.rule-preview-scroll table{font-size:12px}.rule-preview-scroll td{white-space:normal;max-width:300px}.rule-preview-scroll td p{margin:6px 0;line-height:1.6}.rule-preview-scroll input[type=checkbox]{width:17px;height:17px}.rule-preview-scroll small{font-size:10px;color:#8290a7}.rules-list .pill{font-size:10px}
@media(max-width:700px){.rule-condition{grid-template-columns:1fr 1fr}.rule-condition input,.rule-condition select:nth-child(3){grid-column:1}.rule-group{padding:10px}.automation-banner{align-items:flex-start;flex-direction:column}}

/* Monthly financial reports: stable labels and expandable hierarchy. */
.report-controls{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin-bottom:16px}.report-controls label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#71809a}.report-controls select{max-width:290px}.report-controls .tabs{margin-bottom:1px}.report-months{display:flex;gap:4px;overflow:auto;padding:5px;background:#eaf0f8;border-radius:10px;margin-bottom:20px}.report-months button{flex:1;min-width:51px;background:none;color:#71839f;border-radius:7px;padding:10px 12px;font-size:12px}.report-months button.active{background:#fff;color:#386dcf;box-shadow:0 2px 7px #1a355313;font-weight:650}.report-panel .panel-head{align-items:center;gap:20px;flex-wrap:wrap}.report-tools{display:flex;gap:8px;flex-wrap:wrap}.report-scroll{overflow:auto;max-height:65vh;border-top:1px solid #e5ebf4}.financial-report{border-collapse:separate;border-spacing:0;width:100%;font-size:12px;min-width:880px}.financial-report th,.financial-report td{border-bottom:1px solid #eaf0f6;padding:12px 16px;vertical-align:middle}.financial-report thead th{background:#f5f8fc;position:sticky;top:0;z-index:3;font-size:11px;white-space:nowrap;color:#677d9f}.financial-report thead th small{display:block;font-weight:400;font-size:10px;margin-top:5px;color:#91a0b6}.financial-report th:first-child{position:sticky;left:0;min-width:300px;max-width:390px;width:35%;z-index:2;text-align:left;background:#fff;font-weight:400;padding-left:calc(16px + var(--depth,0)*16px);box-shadow:2px 0 0 #e9eef6}.financial-report thead th:first-child{z-index:4;background:#f5f8fc;font-weight:600}.financial-report .report-section th,.financial-report .report-section td{background:#edf3fc;font-weight:600;padding-top:16px;padding-bottom:16px}.financial-report .report-subtotal th,.financial-report .report-subtotal td{background:#fafbfd;font-weight:550}.financial-report .number{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12px}.report-fold{display:flex;align-items:baseline;text-align:left;gap:10px;background:none;color:#3b5478;font-weight:inherit;line-height:1.55;padding:0;width:100%}.report-fold span{font-size:14px;color:#7296c9;min-width:10px}.report-leaf{display:block;line-height:1.6;padding-left:20px;overflow-wrap:anywhere}.report-value{padding:3px 0;background:transparent;font-size:inherit;font-weight:inherit;color:inherit;text-align:right;border-bottom:1px dotted #b5c4d9}.report-value:hover{color:#3264c3;border-color:#3264c3}.report-missing{color:#a0aabd}.report-derived{font-size:9px;display:block;font-weight:400;color:#8a99af;margin:3px 0 0 20px}.report-footnote{padding:18px 22px;font-size:11px;color:#7d8da4;line-height:1.8;border-top:1px solid #e9eef5}.report-ruble{font-size:17px;font-weight:400;color:#8e9db3}.report-kpis .kpi-value{font-size:24px;overflow-wrap:anywhere}.report-annual{min-width:2250px}.report-annual th:first-child{min-width:310px;max-width:310px;width:310px}.report-annual th:not(:first-child),.report-annual td{min-width:140px}.report-kpis .kpi-top{min-height:30px}.report-delta{color:#76869b}
@media(max-width:600px){.report-controls label{width:100%}.report-controls select{max-width:none}.report-kpis .kpi-value{font-size:19px}.financial-report th:first-child{min-width:210px;max-width:210px;width:210px}.report-scroll{max-height:68vh}.report-tools .btn{font-size:10px;padding:8px}.report-months button{min-width:50px}}
/* Monthly review and source comparison. */
.monthly-panel{margin-bottom:22px}.monthly-panel .panel-body p{line-height:1.6;margin:0 0 16px}.monthly-panel li{margin-bottom:10px;line-height:1.5}#monthly-review-form textarea{width:100%;font:inherit;line-height:1.5;padding:14px;border:1px solid #dbe2ed;border-radius:10px;resize:vertical}
/* Projects: paired fact and plan rows, with a shared name and direction. */
.project-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:18px 0}.project-toolbar input{min-width:240px}.projects-panel{margin-bottom:18px}.project-table{width:100%;min-width:950px;border-collapse:collapse}.project-table th{font-size:11px;text-transform:uppercase;letter-spacing:.4px;padding:20px 18px}.project-table td{padding:8px 18px;border-bottom:0;vertical-align:top;font-size:13px}.project-table .project-start td{padding-top:25px;border-top:1px solid var(--line)}.project-table .project-end td{padding-bottom:25px}.project-table .project-name{width:29%;min-width:230px;vertical-align:middle;padding-bottom:25px}.project-name>button{font-size:15px;font-weight:600;color:#344b6a;text-align:left;background:transparent;line-height:1.5;overflow-wrap:anywhere}.project-name p{font-size:12px;line-height:1.6;color:#7b8ba1;margin:6px 0}.project-name small{display:block;color:#8191a9;font-size:12px;margin-top:6px}.project-links button{background:transparent;color:var(--blue);font-size:11px;margin-top:12px}.project-table .number{white-space:nowrap;font-variant-numeric:tabular-nums}.project-table tfoot{background:#f7f9fd;border-top:1px solid var(--line)}.project-table tfoot td{padding:12px 18px;font-weight:600}.project-table tbody tr:hover{background:#fafcff}.project-table .muted{font-size:12px}.project-table .negative{color:#ce5963}.project-table .positive{color:#30917e}
/* Operation correction history. */
.operation-history-entry{padding:18px 0;border-bottom:1px solid var(--line)}.operation-history-entry h3{font-size:14px;margin-bottom:10px}.operation-history-entry p{font-size:12px;color:#6b7f9c;line-height:1.6;margin-bottom:10px}.operation-history-entry td{max-width:290px;white-space:normal;overflow-wrap:anywhere;vertical-align:top}
.counterparty-reports{margin:24px 0}.counterparty-toolbar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:18px}.counterparty-toolbar>div{flex:1;min-width:200px}.counterparty-toolbar h2{font-size:20px;color:#fff;margin-bottom:5px}.counterparty-toolbar p,.counterparty-toolbar label{font-size:12px;color:#edf3fc}.counterparty-toolbar label{display:flex;flex-direction:column;gap:6px}.counterparty-toolbar select{min-width:190px;color:#475873}.counterparty-pair{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px}.counterparty-card .panel-head h2{font-size:16px;line-height:1.5}.counterparty-card .panel-head{min-height:85px;align-items:flex-start}.counterparty-total{display:flex;justify-content:space-between;gap:12px;align-items:baseline;padding-bottom:16px;margin-bottom:8px;border-bottom:1px solid #edf1f7}.counterparty-total span{font-size:12px;color:#8090a6}.counterparty-total strong{font-size:18px;color:#344a67;white-space:nowrap}.counterparty-bars{display:flex;flex-direction:column;gap:17px}.counterparty-bar{background:transparent;display:block;width:100%;text-align:left;border-radius:5px;padding:4px 0}.counterparty-bar:hover,.counterparty-bar:focus-visible{background:#f1f6fd;outline:2px solid #dce8fa;outline-offset:3px}.counterparty-row-label{display:flex;justify-content:space-between;align-items:baseline;gap:12px;color:#34465f;font-size:13px;line-height:1.5;margin-bottom:7px}.counterparty-row-label>span{overflow-wrap:anywhere;min-width:0}.counterparty-row-label strong{white-space:nowrap;font-size:13px;font-weight:550}.counterparty-bar-track{height:12px;background:repeating-linear-gradient(to right,#f0f4f9 0,#f0f4f9 1px,transparent 1px,transparent 25%);display:block;border-radius:4px}.counterparty-bar-track i{display:block;height:100%;background:linear-gradient(90deg,#249afa,#066fec);border-radius:0 4px 4px 0}.counterparty-card.expense .counterparty-bar-track i{background:linear-gradient(90deg,#f46f68,#df514f)}.counterparty-row-caption{display:block;font-size:10px;color:#8390a3;margin-top:5px}.counterparty-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:11px;color:#8390a3;margin-top:22px}.counterparty-missing{margin-top:18px}.counterparty-missing button{white-space:normal;text-align:left}.counterparty-note{font-size:11px;line-height:1.7;color:#526880;background:#eaf0f8;padding:12px 16px;border-radius:7px;margin-top:12px}.counterparty-name-link{background:transparent;color:#447fe1;text-align:left;line-height:1.6;overflow-wrap:anywhere}.counterparty-card .empty{padding:35px 10px}@media(max-width:1000px){.counterparty-pair{grid-template-columns:1fr}.counterparty-card .panel-head{min-height:0}}@media(max-width:600px){.counterparty-row-label{display:block}.counterparty-row-label strong{display:block;margin-top:3px}.counterparty-toolbar label{width:100%}}
.counterparty-toolbar{background:#f4f7fc;border:1px solid #dfe7f2;border-radius:8px;padding:16px 20px}.counterparty-toolbar h2{color:#344a67}.counterparty-toolbar p,.counterparty-toolbar label{color:#657891}
.budget-name{background:transparent;color:#3975d3;text-align:left;line-height:1.5;overflow-wrap:anywhere}.budget-actions{display:flex;flex-wrap:wrap;gap:6px}.budget-groups{margin-top:24px}.budget-detail-title{margin-bottom:20px}.budget-detail-title h2{font-size:22px;margin:12px 0 7px;color:#344a67}.budget-detail-title p{font-size:13px;color:#73839b}.budget-detail-title>a{font-size:12px;color:#487ce5}.budget-kpis{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}.budget-kpis .margin-row strong{font-size:16px}@media(max-width:700px){.budget-kpis{grid-template-columns:1fr}}

.financial-report .report-vat th,.financial-report .report-vat td{background:#f0f6ff;color:#345e9b}.budget-tax{margin-top:20px}

/* Financial cells never wrap digits; wide tables scroll inside their own panel. */
.panel,.main,.content,.dialog-body{min-width:0}.table-scroll{max-width:100%;overflow-x:auto}
.table-scroll table{min-width:720px}.table-scroll th,.table-scroll td{vertical-align:top;padding:14px 18px;line-height:1.5}
.table-scroll .number,.financial-report .number{min-width:145px;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums lining-nums;letter-spacing:0}
.number button,.number .budget-name{text-align:right;white-space:nowrap;width:auto;font-variant-numeric:tabular-nums}.table-scroll th.right{text-align:right;white-space:nowrap}
.kpis{grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr))}.kpi-value{font-size:clamp(19px,2vw,28px);word-break:normal;overflow-wrap:normal;line-height:1.4;font-variant-numeric:tabular-nums}
.margin-row{flex-wrap:wrap}.margin-row strong{white-space:nowrap}.budget-kpis{grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr))}
.costing-panel{margin-top:24px}.specialists-table{min-width:1100px!important}.estimate-line{border:1px solid #dbe4f2;border-radius:10px;padding:16px;margin:12px 0}.estimate-line legend{color:#506581;font-weight:600;padding:0 8px}.estimate-line [hidden]{display:none}.estimate-line .field{margin-bottom:12px}.estimate-totals{padding:15px 0}.estimate-totals p{display:flex;justify-content:space-between;gap:16px}.estimate-totals strong{white-space:nowrap}
@media(max-width:700px){.table-scroll th,.table-scroll td{padding:12px}.dialog.wide{width:calc(100vw - 24px)}.estimate-totals p{flex-wrap:wrap}.table-scroll .number{min-width:132px}}

/* Monthly payroll: keep each monetary value on one line. */
.payroll-table,.group-economics-table{min-width:1550px}.payroll-table td:first-child{min-width:210px}.payroll-table td:nth-child(9){min-width:250px;line-height:1.6}.pay-allocation{padding:16px;border:1px solid var(--border,#e5e7eb);border-radius:10px;margin:12px 0}.pay-allocation legend{padding:0 6px}.pay-allocation .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

/* Compact navigation with a persistent, keyboard-accessible toggle. */
#app.nav-collapsed{--nav:72px}
#app.nav-expanded{--nav:232px}
.sidebar-toggle{position:sticky;top:0;z-index:1;display:flex;align-items:center;gap:10px;flex-shrink:0;width:100%;min-height:36px;padding:8px 12px;margin-bottom:16px;border-radius:7px;background:#2b3548;color:#dbe4f4;font-size:12px;text-align:left}
.sidebar-toggle:hover{background:#35445f;color:#fff}
.sidebar-toggle svg{width:20px;height:20px;flex:none}
.nav-collapsed .sidebar{padding:16px 8px}
.nav-collapsed .sidebar-toggle{justify-content:center;padding:8px}
.nav-collapsed .sidebar-toggle svg{transform:rotate(180deg)}
.nav-collapsed .sidebar-toggle span,.nav-collapsed .brand-name,.nav-collapsed .workspace,.nav-collapsed .navlabel,.nav-collapsed .navlink span,.nav-collapsed .sidebar-footer .identity{display:none}
.nav-collapsed .sidebar .brand{padding:0 0 16px;justify-content:center}
.nav-collapsed .navlink{padding:11px;justify-content:center;min-height:40px}
.nav-collapsed .sidebar-footer{padding:12px 0 0;justify-content:center}
.nav-expanded .sidebar{padding:16px 14px 24px}
.nav-expanded .brand-name,.nav-expanded .navlabel,.nav-expanded .navlink span,.nav-expanded .sidebar-footer .identity{display:block}
.nav-expanded .workspace{display:flex}
.nav-expanded .navlink{padding:11px 14px;justify-content:flex-start}
.nav-expanded .sidebar-footer{padding:16px 9px 0}
@media(max-width:1180px){#app.nav-expanded{--nav:210px}}

.pay-history-months{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.pay-history-months small{font-size:10px;opacity:.7}
.pay-history-kpis .kpi-value{font-size:23px}
.pay-history-table{min-width:1120px}
.pay-history-table th{max-width:160px;white-space:normal;line-height:1.5;min-width:110px}
.pay-history-table td:first-child,.pay-history-table th:first-child{position:sticky;left:0;z-index:1;background:#fff;min-width:210px;max-width:250px;white-space:normal;box-shadow:2px 0 4px #15233b0a}
.pay-history-table td:nth-child(2){min-width:155px}
.pay-history-table td.number{min-width:145px}
.pay-history-check{margin-top:20px}
.pay-history-check summary{padding:18px;cursor:pointer}
.pay-source-details{min-width:700px}
.pay-source-details .source-formula{max-width:400px;overflow-wrap:anywhere;white-space:normal}

.pay-history-kpis .kpi{min-height:100px;padding:13px}
.pay-history-kpis .kpi-top{margin-bottom:10px}
.pay-history-kpis .kpi small{margin-top:7px}
.pay-history-issues{display:block;padding:12px 16px}
.pay-history-issues summary{cursor:pointer;font-weight:600}
.pay-history-issues ul{margin-bottom:0}

.pay-history-scroll{max-height:65vh;overflow:auto}
.pay-history-table th{position:sticky;top:0;z-index:2;background:#fbfcfe}
.pay-history-table th:first-child{z-index:3}
.pay-history-table-summary{min-width:940px}
.pay-history-table-summary th,.pay-history-table-summary td{padding:12px 10px;min-width:90px}
.pay-history-table-summary th:first-child,.pay-history-table-summary td:first-child{min-width:190px}
.pay-history-table-summary td:nth-child(2),.pay-history-table-summary th:nth-child(2){min-width:130px}
.pay-history-table-summary td:nth-child(3),.pay-history-table-summary th:nth-child(3){min-width:60px}
.pay-history-table-summary td.number{min-width:110px}

.pay-terms-table{min-width:1020px}.pay-terms-table th{white-space:normal}.pay-terms-table td:nth-child(6){min-width:180px;max-width:320px;white-space:normal;overflow-wrap:anywhere}.pay-terms-table td:last-child{min-width:150px}.pay-terms-table td .btn{margin:3px 0}.pay-terms-table .number{min-width:120px}.payroll-table{min-width:1800px}

.pay-terms-table td:nth-child(3){white-space:nowrap;overflow-wrap:normal}

.pay-component-rule,.pay-revenue-row{border:1px solid #dce2ed;border-radius:10px;padding:16px;margin:12px 0;min-width:0}.pay-component-rule>legend,.pay-revenue-row>legend{font-weight:600}.pay-component-rule .pay-allocation{background:#f8faff}.pay-component-rule p{margin:12px 0}.pay-terms-table td:nth-child(6){min-width:240px}

.payroll-sheet-scroll{max-height:70vh;overflow:auto}.payroll-sheet{min-width:2300px;table-layout:fixed}.payroll-sheet th{position:sticky;top:0;z-index:2;background:#f3f6fb;white-space:normal}.payroll-sheet td{vertical-align:top;padding:10px;white-space:normal}.payroll-sheet td:first-child,.payroll-sheet th:first-child{position:sticky;left:0;width:245px;z-index:1;background:#fff}.payroll-sheet th:first-child{z-index:3;background:#f3f6fb}.payroll-sheet th:nth-child(3){width:190px}.payroll-sheet th:nth-child(7),.payroll-sheet th:nth-child(8){width:240px}.payroll-sheet th:last-child{width:230px}.payroll-sheet input,.payroll-sheet select{width:100%;min-width:90px;padding:7px;margin:2px 0;font-variant-numeric:tabular-nums}.payroll-sheet input[type=checkbox]{width:auto;min-width:0}.sheet-confirm{display:block;font-size:12px;margin-top:8px}.sheet-extra{display:grid;gap:8px;margin-top:12px}.sheet-extra label{font-size:12px}.sheet-extra textarea{width:100%;min-height:65px}.payroll-sheet td:focus-within{background:#eef4ff}.payroll-sheet details summary{cursor:pointer;color:#496acb}.sheet-revenue{margin:8px 0}.payroll-sheet td:first-child input{font-weight:500}
.table-scroll table.payroll-sheet{min-width:2300px;width:2300px}.payroll-sheet-scroll th,.payroll-sheet-scroll td{padding:10px}.payroll-sheet-scroll td:first-child{font-size:12px}.payroll-sheet-scroll td:first-child input,.payroll-sheet-scroll td:first-child select{padding:5px}.payroll-sheet-scroll{scroll-padding-top:72px}

/* Compact payroll: one line per person, frozen name, independent horizontal scroll. */
.sheet-month-bar{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin:12px 0 18px}.sheet-month-bar .field{margin:0;width:190px}.sheet-month-bar .btn{min-height:42px}.sheet-archive{margin-bottom:16px;color:#60718c;font-size:12px}.sheet-archive summary{cursor:pointer;margin-bottom:8px}.sheet-instruction{padding:8px 20px;color:#77859a;font-size:12px}.payroll-compact-panel .panel-head{padding:14px 20px}.payroll-compact-panel .filters{padding:0 20px;margin:8px 0 12px}.table-scroll table.payroll-sheet{table-layout:fixed;width:3600px;min-width:3600px}.payroll-sheet-scroll{max-height:65vh}.payroll-sheet-scroll .payroll-sheet th,.payroll-sheet-scroll .payroll-sheet td{padding:5px 8px;height:42px;vertical-align:middle;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px}.payroll-sheet-scroll .payroll-sheet th{height:44px;background:#f3f6fb}.payroll-sheet-scroll .payroll-sheet th:first-child,.payroll-sheet-scroll .payroll-sheet td:first-child{width:235px;min-width:235px;box-shadow:2px 0 4px #1d32531a}.payroll-sheet-scroll .payroll-sheet th:not(:first-child){width:150px}.payroll-sheet-scroll .payroll-sheet th:nth-child(2){width:185px}.payroll-sheet-scroll .payroll-sheet th:nth-child(3),.payroll-sheet-scroll .payroll-sheet th:nth-child(4),.payroll-sheet-scroll .payroll-sheet th:nth-child(7){width:180px}.payroll-sheet-scroll .payroll-sheet th:nth-child(5){width:90px}.payroll-sheet-scroll .payroll-sheet th:last-child{width:250px}.payroll-sheet-scroll .payroll-sheet input,.payroll-sheet-scroll .payroll-sheet select{height:30px;margin:0;padding:4px 6px;font-size:12px;min-width:0;border-color:transparent;border-radius:4px}.payroll-sheet-scroll .payroll-sheet input:hover,.payroll-sheet-scroll .payroll-sheet select:hover{border-color:#dce2ed}.payroll-sheet-scroll .payroll-sheet input:focus{border-color:#6b8ee9}.payroll-sheet-scroll .sheet-confirm{display:flex;justify-content:center;margin:0}.payroll-sheet-scroll input[type=checkbox]{height:17px;width:17px}.payroll-sheet-scroll .sheet-total{text-align:right;font-variant-numeric:tabular-nums}.payroll-sheet-scroll details{display:inline-block}.payroll-sheet-scroll details .sheet-extra{position:fixed;right:24px;top:165px;width:390px;max-height:calc(100vh - 200px);overflow:auto;background:white;border:1px solid #d6e0ef;box-shadow:0 12px 45px #13233b38;border-radius:10px;padding:20px;z-index:50;white-space:normal;margin:0}.payroll-sheet-scroll details .sheet-extra input,.payroll-sheet-scroll details .sheet-extra select{border-color:#dce2ed}.payroll-sheet-scroll td .btn{padding:4px 6px;font-size:10px;min-height:26px}.payroll-sheet-scroll .sheet-status{color:#788698}.payroll-sheet-scroll tr:hover td{background:#f7faff}

.sheet-common-norm{font-size:13px;padding:9px 12px;background:#edf3ff;border-radius:6px;color:#365a91}.payroll-sheet-scroll .payroll-sheet th:nth-child(7){width:145px}

/* Conditions stay beside the frozen employee name without increasing row height. */
.payroll-sheet-scroll .payroll-sheet th:first-child,.payroll-sheet-scroll .payroll-sheet td:first-child{width:330px;min-width:330px}
.sheet-person{display:flex;align-items:center;gap:8px}.sheet-person>input{flex:1;min-width:0}.sheet-person>.sheet-conditions{flex:none}.sheet-conditions>summary{list-style:none;text-decoration:underline;text-underline-offset:3px}.sheet-conditions>summary::-webkit-details-marker{display:none}.sheet-conditions>summary:focus-visible{outline:2px solid #496acb;outline-offset:3px}
.payroll-sheet-scroll details .sheet-condition-card{width:min(440px,calc(100vw - 48px));box-sizing:border-box;text-align:left}.sheet-condition-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.sheet-condition-heading strong{overflow-wrap:anywhere}.sheet-condition-card p{line-height:1.5;margin:0 0 10px;overflow-wrap:anywhere}.sheet-condition-card textarea{box-sizing:border-box;min-height:100px;resize:vertical}.sheet-condition-card .sub{font-size:12px;margin:0}

.payroll-sheet-scroll .payroll-sheet td:first-child:has(.sheet-conditions[open]){z-index:5}

.table-scroll table.payroll-sheet{width:3900px;min-width:3900px}.payroll-sheet-scroll .payroll-sheet th:nth-child(12),.payroll-sheet-scroll .payroll-sheet th:nth-child(13){width:235px}.sheet-tax-cell{display:flex;align-items:center;gap:6px}.payroll-sheet-scroll .sheet-tax-cell select{width:120px;flex:none}.sheet-tax-cell .sheet-tax-value{font-variant-numeric:tabular-nums}.sheet-tax-cell input{min-width:70px}

/* Employment terms have their own compact column next to the contract. */
.table-scroll table.payroll-sheet{width:4200px;min-width:4200px}.payroll-sheet-scroll .payroll-sheet th:nth-child(4){width:300px}.payroll-sheet-scroll .payroll-sheet th:nth-child(5){width:180px}.payroll-sheet-scroll .payroll-sheet th:nth-child(6){width:90px}.payroll-sheet-scroll .payroll-sheet th:nth-child(7){width:150px}.payroll-sheet-scroll .payroll-sheet th:nth-child(12){width:150px}.payroll-sheet-scroll .payroll-sheet th:nth-child(13),.payroll-sheet-scroll .payroll-sheet th:nth-child(14){width:235px}.sheet-employment>summary{max-width:290px;overflow:hidden;text-overflow:ellipsis}.sheet-employment-card p{line-height:1.5;white-space:normal}.sheet-employment-card textarea{box-sizing:border-box;min-height:90px}

/* Salary plan, monthly accrual and dated payments share one frozen name column. */
.table-scroll table.payroll-sheet.payroll-simple{table-layout:fixed;min-width:0;width:6400px}.table-scroll table.payroll-simple.view-plan{width:1800px}.table-scroll table.payroll-simple.view-fact{width:3200px}.table-scroll table.payroll-simple.view-payments{width:2300px}
.payroll-simple col{width:165px}.payroll-simple col.sheet-person-col{width:330px}.payroll-simple col.sheet-status-col{width:270px}.payroll-simple col.col-employment{width:300px}.payroll-simple col.col-ndfl,.payroll-simple col.col-contributions{width:240px}.payroll-simple col.col-commission{width:260px}.payroll-simple col.col-settings{width:230px}.payroll-simple col.col-kpiApproved,.payroll-simple col.col-confirmed{width:110px}
.payroll-sheet-scroll .payroll-simple thead tr:first-child th{height:34px;top:0;width:auto;min-width:0}.payroll-sheet-scroll .payroll-simple thead tr:nth-child(2) th.sheet-col{top:44px;left:auto;width:auto;min-width:0;box-shadow:none;z-index:2;white-space:normal;font-size:11px}.payroll-sheet-scroll .payroll-simple thead tr:first-child th:first-child{width:330px;min-width:330px;z-index:4}.payroll-sheet-scroll .payroll-simple .sheet-group{text-align:left;font-size:12px;color:#365a91;background:#eaf1fc}.payroll-sheet-scroll .payroll-simple .sheet-group-fact{background:#e7f3ec;color:#31634a}.payroll-sheet-scroll .payroll-simple .sheet-group-payments{background:#fff3df;color:#835c22}.payroll-sheet-scroll .payroll-simple .sheet-group-cost{background:#eee9f8;color:#61527e}.payroll-sheet-scroll .payroll-simple td:first-child{width:330px;min-width:330px}.payroll-simple .sheet-total{font-variant-numeric:tabular-nums}.payroll-simple .col-commission details{margin-left:8px}.payroll-simple .col-commission summary{font-size:11px}.payroll-simple input[type=date]{font-size:11px}
