:root{--bg:#f3f5f7;--panel:#fff;--line:#d9dee5;--text:#18212b;--muted:#657180;--nav:#17222d;--blue:#1769aa;--green:#178255;--red:#bd3434;--radius:7px}*{box-sizing:border-box}html{font-family:Segoe UI,Arial,sans-serif;color:var(--text);background:var(--bg)}body{margin:0;font-size:14px}button,input,select,textarea{font:inherit;letter-spacing:0}a{color:inherit;text-decoration:none}aside{position:fixed;inset:0 auto 0 0;width:230px;background:var(--nav);color:#dce5ed;padding:18px 12px;display:flex;flex-direction:column;z-index:10}.brand{display:flex;align-items:center;gap:10px;padding:0 8px 20px}.brand i,.auth-brand i{display:grid;place-items:center;width:34px;height:34px;border-radius:6px;background:#fff;color:#18354b;font-style:normal;font-weight:800;font-size:13px}.brand strong,.brand small,.auth-brand strong,.auth-brand small{display:block}.brand small,.auth-brand small{font-size:10px;color:#96a8b8;margin-top:2px}aside nav{display:grid;gap:4px}.nav-link{height:40px;display:flex;align-items:center;gap:10px;padding:0 10px;border-radius:6px;color:#bac9d5}.nav-link:hover,.nav-link.active{background:#263948;color:#fff}.nav-link b{display:grid;place-items:center;width:22px;height:22px;border:1px solid #607488;border-radius:5px;font-size:11px}.nav-link.active b{background:#fff;color:#1b3448;border-color:#fff}aside footer{margin-top:auto;padding:14px 10px 2px;border-top:1px solid #334554;display:grid;gap:3px}aside footer small{color:#91a4b4;text-transform:uppercase;font-size:10px}aside footer a{color:#fff;margin-top:8px}.app{margin-left:230px;padding:0 26px 40px;min-width:760px}.app>header{height:78px;display:flex;align-items:center;justify-content:space-between}.app>header h1{font-size:23px;margin:0}.app>header p{margin:3px 0 0;color:var(--muted)}.sync{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px}.sync em{width:8px;height:8px;border-radius:50%;background:#25a56f}.metrics{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:12px;margin-bottom:14px}.metrics>div{background:#fff;border:1px solid var(--line);border-left:3px solid var(--blue);border-radius:var(--radius);padding:14px 16px;box-shadow:0 1px 3px #16202b17}.metrics .risk{border-left-color:var(--red)}.metrics span,.metrics small{display:block;color:var(--muted)}.metrics strong{display:block;font-size:26px;margin:4px 0 2px}.panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 1px 3px #16202b17;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;padding:15px 17px;border-bottom:1px solid var(--line)}.panel-head h2{font-size:16px;margin:0}.panel-head p{font-size:12px;color:var(--muted);margin:3px 0 0}.legend{display:flex;gap:7px}.legend i{font-style:normal;font-size:11px;padding:4px 7px;border-radius:4px;border:1px solid}.legend i:nth-child(1){background:#fee9e7;border-color:#efbbb6;color:#96251e}.legend i:nth-child(2){background:#fff0d8;border-color:#efc790;color:#8b4c0b}.legend i:nth-child(3){background:#fff8d6;border-color:#e3d27f;color:#6a5300}.filters{display:flex;align-items:end;gap:8px;padding:11px 16px;background:#f8f9fa;border-bottom:1px solid var(--line);flex-wrap:wrap}.filters label,.stack label,.auth-card label,dialog label{display:grid;gap:5px;font-size:11px;font-weight:650;color:#52606d}.filters input,.filters select,.stack input,.stack select,.auth-card input,dialog input,dialog select,dialog textarea{height:35px;border:1px solid #bdc6d0;border-radius:5px;background:#fff;color:var(--text);padding:0 9px;min-width:120px}.filters label:first-child input{width:210px}dialog textarea{height:auto;padding:9px;resize:vertical}.btn{height:35px;border:1px solid #bac4ce;border-radius:5px;background:#fff;color:#263746;padding:0 12px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-weight:600;white-space:nowrap}.btn:hover{background:#f0f3f5}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.btn.success{background:var(--green);border-color:var(--green);color:#fff}.btn.danger{background:var(--red);border-color:var(--red);color:#fff}.btn.small{height:29px;padding:0 9px;font-size:12px}.btn.icon{width:34px;padding:0;font-size:18px}.table-wrap{overflow:auto;max-height:calc(100vh - 305px)}table{width:100%;border-collapse:separate;border-spacing:0}th{position:sticky;top:0;z-index:2;background:#eef1f4;color:#4d5c69;text-align:left;font-size:11px;text-transform:uppercase;padding:9px 10px;border-bottom:1px solid #cbd2d9;white-space:nowrap}td{padding:9px 10px;border-bottom:1px solid #e3e7eb;vertical-align:middle}tbody tr:hover td{background:#f8fbfd}td strong,td small{display:block}td small{color:var(--muted);font-size:11px;margin-top:2px}.client{max-width:270px}.client strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.actions{text-align:right;white-space:nowrap}.inline{display:inline-flex;margin-left:4px}.company,.status,.reason{display:inline-flex;align-items:center;min-height:22px;border-radius:4px;padding:2px 7px;font-size:11px;font-weight:700}.company.prod{background:#e5f0fa;color:#195c91}.company.serv{background:#eee7f8;color:#694399}.status{background:#edf0f3;color:#4a5864}.status.ok{background:#e4f5ec;color:#126842}.status.warn{background:#fff0d8;color:#90520e}.age-old td:first-child{box-shadow:inset 4px 0 var(--red)}.age-previous td:first-child{box-shadow:inset 4px 0 #df8a2b}.age-current td:first-child{box-shadow:inset 4px 0 #d4b520}.empty{min-height:190px;display:grid;place-content:center;text-align:center;color:var(--muted);gap:5px}.empty strong{color:var(--text)}.alert{margin:0 0 12px;background:#e7f2fb;border:1px solid #b9d9ee;color:#245b7e;border-radius:6px;padding:10px 13px}.batch{font-size:12px;background:#eef1f4;border-radius:5px;padding:7px 9px}.finalize{display:flex;justify-content:flex-end;align-items:center;gap:14px;padding:12px 16px;background:#f8f9fa}.finalize span{color:var(--muted)}.finalize button:disabled{opacity:.45}.split{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:14px}.compact{align-self:start}.stack{display:grid;gap:12px;padding:16px}.stack input,.stack select{width:100%}.setup-link{display:flex;align-items:center;gap:12px;background:#e7f4ec;border:1px solid #add8bd;border-radius:6px;padding:12px 14px;margin-bottom:12px}.setup-link code{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.auth{min-height:100vh;display:grid;place-items:center;background:#eef2f5}.auth-shell{width:min(420px,calc(100% - 28px))}.auth-brand{display:flex;align-items:center;gap:10px;margin:0 0 14px 3px}.auth-brand small{color:var(--muted)}.auth-card{background:#fff;border:1px solid var(--line);border-radius:7px;padding:24px;box-shadow:0 10px 26px #1423321a;display:grid;gap:15px}.auth-card h1{font-size:21px;margin:0}.auth-card p{color:var(--muted);margin:-8px 0 2px}.auth-card input{width:100%;height:40px}.btn.wide{width:100%;height:40px}dialog{border:0;border-radius:7px;padding:0;width:min(480px,calc(100% - 24px));box-shadow:0 20px 55px #0004}dialog::backdrop{background:#0c141c7a}dialog form{padding:18px;display:grid;gap:14px}.dialog-head,.dialog-actions{display:flex;align-items:center;justify-content:space-between}.dialog-head h2{font-size:17px;margin:0}.dialog-head button{border:0;background:transparent;font-size:24px}.dialog-actions{justify-content:flex-end;gap:8px}.check{display:flex!important;align-items:center;gap:8px!important}.check input{width:16px!important;height:16px!important;min-width:0!important}
@media(max-width:1050px){.metrics{grid-template-columns:repeat(2,1fr)}.split{grid-template-columns:1fr}.filters label:first-child input{width:165px}}@media(max-width:760px){aside{width:58px;padding:12px 7px}.brand{padding:0 5px 18px}.brand span,.nav-link span,aside footer span,aside footer small{display:none}.nav-link{padding:0;justify-content:center}.app{margin-left:58px;min-width:0;padding:0 10px 28px}.app>header{height:68px}.app>header h1{font-size:19px}.sync span{display:none}.metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.metrics>div{padding:10px}.metrics strong{font-size:21px}.legend{display:none}.filters{display:grid;grid-template-columns:1fr 1fr}.filters label:first-child,.filters label:first-child input{width:100%;grid-column:1/-1}.filters input,.filters select{min-width:0;width:100%}.table-wrap{max-height:none}.client{min-width:190px}.split{display:block}.compact{margin-top:12px}}

/* GO design, shared with mobile. Existing columns and operational values are preserved. */
:root{--primary:#4338ca;--ink:#172343;--muted:#64708a;--border:#e0e5f0;--surface:#fff;--bg:#f4f6fb}body{background:var(--bg);color:var(--ink);font-family:system-ui,Arial,sans-serif}.go-logo{width:88px;height:46px;object-fit:contain;background:white;border-radius:10px}.workflow-test{display:inline-block!important;font-size:10px!important;background:#ede9fe;color:#5b21b6;padding:3px 7px;border-radius:20px}.workflow-notice{background:#e8edff;color:#302b77;border-radius:12px;padding:12px 16px;margin-bottom:20px;font-size:13px;line-height:1.5}.panel,.auth-card{border-radius:18px;border:1px solid #e0e5f0;box-shadow:0 3px 12px #14214606}.btn.primary{background:#4338ca;border-color:#4338ca}.nav-link.active{background:#e8e7ff;color:#4338ca}.receipt-form{display:grid;gap:7px;margin:10px 0;min-width:170px}.receipt-form label{display:block;font-size:12px}.receipt-form input[type=checkbox]{width:auto;display:inline}.receipt-form input{max-width:220px}.message{padding:14px;background:#f4f6fc;border-radius:12px;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere}.message.agent{border-left:3px solid #4338ca}.message.operator,.message.admin{border-left:3px solid #0f766e}.events{font-size:13px;color:#5f6c86}form.stack{display:grid;gap:14px}form.stack textarea{width:100%;min-height:110px}.status{white-space:normal}.actions{white-space:normal;min-width:190px}@media(max-width:700px){.workflow-notice{font-size:12px}.go-logo{width:72px}.receipt-form{min-width:150px}}
.panel>p,.panel>h3,.panel>details,.panel>.message{margin-left:18px;margin-right:18px}.panel>form:not(.filters):not(.stack):not(.finalize){display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:16px;background:#f5f7fc;border-radius:12px;margin:12px 18px}.panel>form>label{display:flex;align-items:center;gap:8px}.panel>form textarea{font:inherit;min-width:300px;min-height:78px;padding:10px;border:1px solid #c7d0e1;border-radius:10px}.panel>form.stack{margin:18px}.panel>form.stack label{display:grid;gap:8px}.panel>form.stack textarea{min-width:0}.panel>details{padding-bottom:16px}@media(max-width:700px){.panel>form textarea{min-width:0;width:100%}}

/* Compact proof card shared by the agent gateway and desktop conversation. */
.evidence-card{display:grid;gap:12px;min-width:0;max-width:100%;margin:16px 0;padding:14px;border:1px solid #d6dcec;border-radius:14px;background:#f4f6fb;overflow:hidden}
.evidence-card figcaption{font-weight:650;line-height:1.5;overflow-wrap:anywhere;min-width:0}
.evidence-card__preview{display:flex;align-items:center;justify-content:center;min-width:0;max-width:100%;overflow:hidden;border:1px solid #d6dcec;border-radius:10px;background:#fff;text-decoration:none}
.evidence-card__preview img{display:block;width:auto;height:auto;max-width:100%;max-height:240px;object-fit:contain;object-position:center}
.evidence-card .evidence-card__open{justify-self:start;max-width:100%;min-width:0;min-height:44px;height:auto;white-space:normal;line-height:1.35}
.conversation-panel>.evidence-card{margin:16px 18px;max-width:calc(100% - 36px)}
.conversation-panel .panel-head{flex-wrap:wrap;gap:12px}
.conversation-panel .panel-head>div{min-width:0;max-width:100%;overflow-wrap:anywhere}
.conversation-panel .panel-head .status{max-width:100%;overflow-wrap:anywhere}
@media(max-width:600px){.evidence-card{padding:12px}.evidence-card .evidence-card__open{justify-self:stretch}.resolution-panel .actions{display:grid}.resolution-panel .actions .btn{width:100%;white-space:normal}}

/* Conversation adapts to tablet widths without changing invoice table layouts. */
.app.conversation-view{min-width:0}
.conversation-view>header{height:auto;min-height:78px;padding:16px 0;flex-wrap:wrap;gap:12px}
.conversation-view>header>div{min-width:0;max-width:100%}
.conversation-view>header h1{overflow-wrap:anywhere}
.conversation-view .conversation-panel>form textarea{max-width:100%}

/* Audited correction, isolated to the invoice dialog/finalization. */
#issueCorrectionForm{border-top:1px solid #e0e5f0;background:#fff8f7}#issueCorrectionForm[hidden]{display:none}#issueCorrectionForm h3{font-size:15px;margin:0}#issueCorrectionForm p{font-size:12px;color:#64708a;margin:0;line-height:1.5}.finalize{flex-wrap:wrap}.finalize span small{display:block;max-width:460px;line-height:1.4;margin-top:4px}.finalize .check{font-size:12px}.finalize .check input{flex-shrink:0}.events p{overflow-wrap:anywhere}

.payment-awaiting{font-size:12px;padding:9px;border-radius:9px;background:#fff5e6;color:#80520a;text-align:left;line-height:1.4}.receipt-form small{font-size:11px;white-space:normal}.receipt-form .check{white-space:normal;text-align:left}.receipt-form .check input{flex-shrink:0}

/* Compact invoice workspace: documents receive the available screen. */
.app.invoice-density{padding:0 16px 14px}
.invoice-density>header{height:48px;gap:12px}
.invoice-density>header>div{display:flex;align-items:baseline;gap:16px;min-width:0}
.invoice-density>header h1{font-size:20px}
.invoice-density>header p{margin:0;font-size:12px;white-space:nowrap}
.invoice-density .panel{border-radius:10px}
.invoice-density .panel-head{padding:8px 12px;min-height:42px;gap:10px}
.invoice-density .panel-head h2{font-size:14px}
.invoice-density .panel-head p{margin:2px 0 0;font-size:11px}
.invoice-density .invoice-list-head{flex-wrap:wrap}
.age-filters{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin-left:auto}
.age-filter{display:inline-flex;align-items:center;justify-content:center;min-height:29px;padding:5px 9px;border:1px solid;border-radius:5px;font-size:11px;line-height:1.2;font-weight:700;white-space:nowrap}
.age-filter.selected{outline:2px solid #172343;outline-offset:1px}
.age-filter:hover{filter:brightness(.97)}
.age-filter.age-recent{background:#e4effc;color:#164f8b;border-color:#a9c8ed}
.age-filter.age-week{background:#fff7d7;color:#735800;border-color:#e7d38d}
.age-filter.age-month{background:#ffedda;color:#864407;border-color:#edbe87}
.age-filter.age-old{background:#ffe5e5;color:#942525;border-color:#e9aaaa}
.invoice-density .filters{padding:7px 10px;gap:6px}
.invoice-density .filters label{font-size:10px;gap:3px}
.invoice-density .filters input,.invoice-density .filters select{height:30px;font-size:12px;padding:0 7px;min-width:105px}
.invoice-density .filters label:first-child input{width:205px}
.invoice-density .filters .btn{height:30px;padding:0 9px;font-size:12px}
.invoice-density .table-wrap{max-height:calc(100vh - 182px)}
.invoice-density th{padding:7px 8px;font-size:10px}
.invoice-density td{padding:5px 8px;font-size:12px;line-height:1.25}
.invoice-density td small{font-size:10px;line-height:1.25;margin-top:2px}
.invoice-density td .company,.invoice-density td .status,.invoice-density td .reason{font-size:10px;min-height:19px;padding:2px 5px}
.invoice-density .client{max-width:300px}
.invoice-density .client strong{max-width:100%;font-size:12px}
.invoice-density td .btn.small{height:27px;padding:0 7px;font-size:11px}
.invoice-density td.actions{min-width:140px;white-space:nowrap}
.invoice-density td.actions .btn+.btn{margin-left:5px}
.invoice-density .row-number{width:36px;text-align:right;font-variant-numeric:tabular-nums;color:#455266;white-space:nowrap}
.invoice-density tr.age-recent{--invoice-row-bg:#edf5ff;--invoice-row-hover:#dfeeff;--invoice-row-edge:#558dce}
.invoice-density tr.age-week{--invoice-row-bg:#fff9e6;--invoice-row-hover:#fff3cd;--invoice-row-edge:#d5ae35}
.invoice-density tr.age-month{--invoice-row-bg:#fff0e1;--invoice-row-hover:#ffe3c8;--invoice-row-edge:#dd944e}
.invoice-density tr.age-old{--invoice-row-bg:#ffeded;--invoice-row-hover:#ffdfdf;--invoice-row-edge:#ce6565}
.invoice-density tbody tr[class^="age-"] td{background:var(--invoice-row-bg)}
.invoice-density tbody tr[class^="age-"]:hover td{background:var(--invoice-row-hover)}
.invoice-density tbody tr[class^="age-"] td:first-child{box-shadow:inset 3px 0 var(--invoice-row-edge)}
.invoice-density .alert{padding:7px 10px;margin-bottom:7px;font-size:12px}
@media(max-width:1050px){.invoice-density .invoice-list-head{align-items:flex-start}.age-filters{margin-left:0}.invoice-density .filters{align-items:end}.invoice-density td.actions{white-space:normal;min-width:120px}.invoice-density td.actions .btn{margin-bottom:3px}}

.penalty-editor{display:inline-flex;align-items:center;gap:5px;flex-wrap:wrap}.penalty-editor input{width:100px;min-width:75px;padding:5px 7px;font-size:12px}.penalty-editor span{font-size:11px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}

/* Penalizari: one compact, independently scrollable monthly table. */
.app.penalties-view{height:100vh;height:100dvh;display:flex;flex-direction:column;min-width:0;overflow:hidden;padding-bottom:10px}
.penalties-view>header,.penalties-view>.alert{flex-shrink:0}
.penalties-view .penalties-panel{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;max-height:100%;border-radius:10px}
.penalties-view .penalty-heading,.penalties-view .penalty-filters,.penalties-view .penalty-summary{flex-shrink:0}
.penalties-view .penalty-heading{gap:10px;padding:8px 10px;align-items:center}
.penalties-view .penalty-heading>div{min-width:0}
.penalties-view .penalty-heading p{font-size:11px;line-height:1.3}
.penalties-view .penalty-filters{padding:7px 10px;gap:6px}
.penalties-view .penalty-filters label{display:grid;gap:3px}
.penalties-view .penalty-filters label:first-child input{width:148px;min-width:130px}
.penalties-view .penalty-filters label:nth-child(2) input{width:170px}
.penalties-view .penalty-filters select[name=agent]{max-width:230px}
.penalties-view .penalty-summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;border-bottom:1px solid var(--border);background:#fff;flex-wrap:wrap}
.penalty-summary p{margin:0;font-size:12px;line-height:1.4}
.penalty-rate-value{font-size:12px}
.penalty-global-rate{display:flex;gap:6px;align-items:end;margin:0}
.penalty-global-rate label{display:flex;align-items:center;gap:7px;font-size:11px;color:var(--muted);white-space:nowrap}
.penalty-global-rate input{width:88px;min-width:0;height:28px;padding:3px 6px;border:1px solid #bdc6d0;border-radius:5px;background:#fff}
.penalty-global-rate .btn.small{height:28px;font-size:11px;padding:0 7px}
.penalties-view .penalty-table-wrap{flex:0 1 auto;min-height:0;max-height:none!important;overflow:auto;overscroll-behavior:contain}
.penalty-table{table-layout:auto;width:max-content;min-width:0}
.penalty-table th{white-space:nowrap}.penalty-table .penalty-client{max-width:210px}.penalty-table .penalty-agent{max-width:160px}
.penalties-view .penalty-table td{padding:5px 8px;vertical-align:middle;line-height:1.25;overflow-wrap:anywhere}
.penalty-table .penalty-client,.penalty-table .penalty-agent{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.penalty-invoice{font-weight:650;color:#4338ca;overflow-wrap:anywhere}.penalty-invoice:hover{text-decoration:underline}
.penalty-state{display:inline-flex;font-size:10px;font-weight:650;line-height:1.2;padding:3px 6px;border-radius:4px;white-space:nowrap}
.penalty-state.automatic{color:#146b44;background:#e6f5ec}.penalty-state.exception{color:#735b18;background:#fff5d7}
.penalty-row-exception td{background:#f8f9fc;color:#64708a}.penalty-row-exception:hover td{background:#edf0f7}
.penalty-exception-form{display:flex;margin:0;justify-content:flex-end}
.penalties-view .penalty-actions .btn.small{height:26px;padding:0 6px;font-size:11px}
.penalty-note{display:block;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.penalties-view td.penalty-empty{height:auto;padding:18px 10px;text-align:center;color:var(--muted)}
@media(max-width:1050px){.penalties-view .penalty-filters{align-items:end}.penalties-view .penalty-summary{gap:6px}.penalties-view .penalty-filters select[name=agent]{max-width:180px}}
@media(max-width:760px){.app.penalties-view{padding-right:8px;padding-left:8px}.penalties-view .penalty-heading{align-items:start}.penalties-view .penalty-filters{display:flex;flex-wrap:wrap}.penalties-view .penalty-filters label:first-child{width:auto}.penalties-view .penalty-filters label:first-child input{width:145px}.penalties-view .penalty-filters label:nth-child(2) input{width:170px}.penalties-view .penalty-filters select{min-width:110px;max-width:170px}.penalty-global-rate label{white-space:normal}.penalty-heading .btn{height:30px;padding:0 8px;font-size:12px}}

@media(max-width:500px){.penalties-view .penalty-filters label{width:calc(50% - 3px);min-width:0}.penalties-view .penalty-filters label:first-child{width:calc(50% - 3px)}.penalties-view .penalty-filters input,.penalties-view .penalty-filters select{width:100%!important;min-width:0;max-width:none!important}.penalty-global-rate{flex-wrap:wrap}.penalty-global-rate label{font-size:10px}}
