:root{--bg:#f3f5f8;--ink:#1a2940;--muted:#738096;--border:#e3e8ee;--blue:#3267e3;--nav:#122238;--green:#15856a}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;font-size:14px;color:var(--ink);background:var(--bg)}button,input,select,textarea{font:inherit}button{cursor:pointer;padding:10px 16px;border:1px solid var(--border);border-radius:7px;background:#fff;color:var(--ink);font-weight:600}button:hover{background:#eef3ff;border-color:#a9bfed}button:disabled{opacity:.5;cursor:wait}.primary{background:var(--blue);border-color:var(--blue);color:white}.primary:hover{background:#2455c5;color:#fff}button:focus-visible,a:focus-visible{outline:3px solid #7da6ff;outline-offset:3px}[hidden]{display:none!important}.brand{display:flex;align-items:center;font-size:20px;font-weight:700;letter-spacing:-.7px;white-space:nowrap}.brand span{color:#72a5ff}.logo{display:grid;place-items:center;border:1px solid #4c75a0;border-radius:10px;width:38px;height:38px;margin-right:11px;font-size:16px;letter-spacing:-1px;background:#29415d;color:white}.login{display:grid;grid-template-columns:1.1fr 1fr;min-height:100vh;background:#fff}.login-intro{position:relative;overflow:hidden;background:var(--nav);color:white;padding:60px 12%}.login-intro h1{font-size:52px;line-height:1.18;margin-top:100px;letter-spacing:-2px;position:relative;z-index:1}.login-intro em{font-style:normal;color:#8db2ff}.login-intro p{line-height:1.8;color:#acbbd0}.login-form{align-self:center;width:min(400px,90%);margin:auto}.login-form h2{font-size:30px;margin-bottom:10px}.login-form>p{color:var(--muted);margin-bottom:28px}.login-form button{width:100%;margin-top:20px}.login-form label{margin-top:18px}.layers{position:absolute;right:-90px;bottom:50px;transform:rotate(-25deg)}.layers i{display:block;width:300px;height:80px;border:1px solid #3e5f82;transform:skew(35deg);margin-top:-30px;background:#ffffff03}aside{width:246px;background:var(--nav);color:#dce5f3;padding:28px 18px;position:fixed;inset:0 auto 0 0;display:flex;flex-direction:column}aside .brand{margin:0 8px 44px}small{font-size:10px;letter-spacing:1.7px;font-weight:700;color:var(--muted)}aside>small{padding:0 14px;color:#7891ae;margin-bottom:14px}nav button{display:flex;align-items:center;gap:14px;width:100%;text-align:left;background:transparent;color:#aebed1;border:0;margin:4px 0;padding:13px 15px;font-weight:500}nav button .navicon{font-size:20px;width:24px;line-height:20px}nav button.active{background:#27466e;color:white}nav button:hover{background:#233d5d;color:white}.aside-bottom{margin-top:auto;border-top:1px solid #2b3b51;padding:24px 10px 0}.aside-bottom b{font-size:12px}.aside-bottom p{font-size:11px;line-height:1.6;color:#7891ae}.aside-bottom button{background:transparent;color:#9fb3cd;border-color:#31445d;width:100%;margin-top:10px;font-size:12px}main{margin-left:246px;min-height:100vh}header{display:flex;justify-content:space-between;align-items:center;padding:19px 34px;background:white;border-bottom:1px solid var(--border);font-size:11px;color:var(--muted)}header>div{display:flex;align-items:center;gap:8px}header b{color:var(--ink);font-weight:500}.dot{background:#2ab78f;border-radius:50%;width:6px;height:6px}.avatar{display:grid;place-items:center;background:#edf2fa;border-radius:50%;width:32px;height:32px;color:#4c6385;margin-left:20px;font-size:11px;font-weight:700}#page{padding:34px;min-height:calc(100vh - 130px);max-width:1600px;margin:auto}.page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:27px;gap:16px}.page-title h1{font-size:28px;letter-spacing:-.8px;margin:0 0 8px}.page-title p{color:var(--muted);margin:0;line-height:1.6}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:25px}.stat{background:white;border:1px solid var(--border);border-radius:10px;padding:22px}.stat .stat-title{display:flex;justify-content:space-between;color:var(--muted);font-size:12px}.stat strong{display:block;font-size:30px;letter-spacing:-1px;margin:19px 0 8px}.stat small{font-size:11px;letter-spacing:0;font-weight:400}.stat .symbol{background:#edf2ff;color:var(--blue);padding:6px 9px;border-radius:6px;margin-top:-7px}.dashboard-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:22px}.panel{background:white;border:1px solid var(--border);border-radius:10px;overflow:hidden;margin-bottom:22px}.panel-head{display:flex;justify-content:space-between;align-items:center;padding:21px 23px;border-bottom:1px solid var(--border)}h3{font-size:15px;margin:0}.panel-head button{font-size:12px;padding:6px 10px}.empty{padding:48px 20px;text-align:center;color:var(--muted);line-height:1.8}.empty strong{color:var(--ink);display:block}.empty .empty-icon{font-size:32px;color:#b2c5e2;margin-bottom:10px}.quick{padding:24px;background:#eaf0ff;border:1px solid #d9e3fc;border-radius:10px}.quick small{color:var(--blue)}.quick h2{font-size:23px;line-height:1.3;margin:15px 0}.quick p{font-size:13px;color:#61738c;line-height:1.7}.quick button{margin-top:12px}.steps{padding:6px 23px 22px}.step{display:flex;align-items:center;gap:12px;padding-top:21px}.step .num{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#eff3f8;color:#7a8ba3;font-size:12px}.step.done .num{background:#dff5ed;color:var(--green)}.step strong{font-size:12px}.step p{font-size:11px;color:var(--muted);margin:4px 0}.step button{margin-left:auto;padding:5px 9px;font-size:11px}.toolbar{padding:18px 22px;display:flex;gap:14px;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border)}.toolbar input{max-width:350px;background:#f8f9fb}.toolbar select{max-width:200px}.table-scroll{overflow:auto}table{border-collapse:collapse;width:100%;white-space:nowrap}th{font-size:10px;text-transform:uppercase;letter-spacing:.8px;background:#f9fafc;color:#7e8a9c;text-align:left;padding:15px 22px;font-weight:600}td{padding:18px 22px;border-top:1px solid #eff1f5;font-size:12px}td strong{display:block;font-weight:600}td small{font-size:10px;letter-spacing:0;font-weight:400;display:block;margin-top:4px}.actions{display:flex;gap:5px}.actions button{padding:5px 8px;font-size:11px;font-weight:500}.actions .danger{color:#b74747}.badge{display:inline-block;font-size:10px;padding:5px 9px;border-radius:20px;background:#edf3ff;color:#4b70b1}.badge.green{color:#18765a;background:#e1f5eb}.badge.red{color:#a54b4b;background:#fbeaea}.badge.orange{color:#a46e27;background:#fff3de}.table-footer{padding:14px 22px;color:var(--muted);font-size:11px;border-top:1px solid var(--border)}footer{font-size:10px;display:flex;justify-content:space-between;color:#8d98a9;padding:18px 34px}dialog{border:0;border-radius:14px;padding:0;width:850px;max-width:95vw;max-height:92vh;box-shadow:0 30px 90px #10213a55}dialog::backdrop{background:#12223877;backdrop-filter:blur(3px)}#editor{padding:28px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:26px}.modal-head h2{font-size:24px;margin:7px 0 0}.icon{border:0;font-size:26px;background:#f4f6f9;padding:4px 12px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}label{font-size:12px;font-weight:600;display:flex;flex-direction:column;gap:7px;color:#4b5b72}input,select,textarea{width:100%;background:white;border:1px solid #dbe2ec;border-radius:6px;padding:10px 12px;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--blue);box-shadow:0 0 0 3px #3267e315}textarea{min-height:75px;resize:vertical}label small{letter-spacing:0;font-size:10px;font-weight:400}.full{grid-column:1/-1}.section-label{grid-column:1/-1;border-top:1px solid var(--border);padding-top:20px;color:var(--blue);font-size:11px;letter-spacing:1px;font-weight:700}.hint{background:#f0f5fc;border-radius:6px;padding:12px 15px;font-size:12px;line-height:1.7;color:#5a7193;font-weight:400}.check{display:flex;flex-direction:row;align-items:center;padding:10px 0}.check input{width:16px;height:16px}.modal-actions{display:flex;justify-content:flex-end;gap:10px;border-top:1px solid var(--border);padding-top:20px;margin-top:22px}#formError,#loginError{color:#b33737;font-size:12px}#calcResult:empty{display:none}#calcResult{margin-top:22px;border:1px solid #d9e5f8;border-radius:9px;overflow:hidden}.calc-top{background:#142a47;padding:22px;color:white;display:flex;justify-content:space-between;align-items:center}.calc-top small{color:#acc3e2;letter-spacing:0}.calc-top strong{display:block;font-size:28px;margin-top:6px}.calc-lines{padding:18px;display:grid;grid-template-columns:1fr 1fr;gap:13px}.calc-lines div{display:flex;justify-content:space-between;gap:20px;font-size:12px}.calc-note{font-size:11px;color:var(--muted);padding:0 18px 16px;line-height:1.6}#toast{position:fixed;bottom:25px;right:25px;padding:16px 24px;background:#183e32;color:white;border-radius:9px;box-shadow:0 10px 30px #0002;z-index:99}#printArea{display:none}.error-panel{background:#fff2f2;border:1px solid #ebc6c6;padding:24px;border-radius:10px;color:#a34242}@media(max-width:1100px){aside{width:210px;padding:24px 12px}aside .brand{font-size:17px}main{margin-left:210px}.stats{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}#page{padding:24px}}@media(max-width:700px){aside{position:static;width:100%;padding:14px}aside .brand{margin:0 0 14px}aside>small,.aside-bottom{display:none}nav{display:flex;overflow:auto}nav button{width:auto;white-space:nowrap;font-size:12px;padding:10px}nav .navicon{display:none}main{margin:0}header{padding:15px}header>div{font-size:0}.avatar{font-size:10px}#page{padding:20px 14px}.page-title{align-items:flex-start}.page-title h1{font-size:23px}.page-title button{font-size:12px;white-space:nowrap}.stats{gap:10px}.stat{padding:16px}.stat strong{font-size:25px}.fields{grid-template-columns:1fr}.toolbar{flex-wrap:wrap}.login{grid-template-columns:1fr}.login-intro{display:none}.login-form{padding:40px 0}#editor{padding:20px}.calc-top strong{font-size:22px}.calc-lines{grid-template-columns:1fr}footer{padding:15px;font-size:9px}footer span{display:none}}
@media print{body>*{display:none!important}#printArea{display:block!important;background:white;padding:30px;color:#111}#printArea h1{font-size:25px}#printArea p{line-height:1.8}#printArea table{white-space:normal}#printArea th,#printArea td{padding:12px;border:1px solid #ddd}#printArea .print-note{margin-top:35px;font-size:12px;color:#666}}
.top-space{margin-top:22px}
.import-action{display:flex;align-items:flex-end}.order-item{padding:18px;border:1px solid var(--border);border-radius:9px;background:#fafbfd;margin-bottom:14px}.item-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.item-heading button{font-size:11px;padding:5px 9px;color:#ac4848}.order-summary{display:flex;align-items:center;justify-content:space-between;gap:14px}.order-summary strong{font-size:17px}.hint button{padding:4px 8px;font-size:11px;margin-left:8px}aside{overflow-y:auto}nav button{padding-top:10px;padding-bottom:10px}.aside-bottom{padding-top:16px}
.company-layout{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(290px,1fr);gap:22px}.company-form,.certificate-content{padding:24px}.certificate-content p{line-height:1.7}.certificate-content label{margin:18px 0}.form-message{color:#b33737;font-size:12px;line-height:1.6}.remove-certificate{color:#a44040;margin-top:15px}.fiscal-notice{margin-bottom:22px}.company-form>button{margin-top:10px}.company-layout small{letter-spacing:0;font-weight:400}.certificate-content input[type=file]{font-size:11px;padding:10px 5px}@media(max-width:1150px){.company-layout{grid-template-columns:1fr}}
.brand-avatar{width:54px;height:54px;object-fit:contain;border-radius:50%;background:white;padding:3px;flex-shrink:0}.brand-company{font-size:13px;white-space:normal;margin-left:10px;max-width:135px}.logo-preview{width:120px;height:100px;object-fit:contain}.permission-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.permission-grid label{font-size:11px}.print-logo{width:140px;max-height:85px;object-fit:contain;float:right}.modal-actions{flex-wrap:wrap}aside .brand{margin-bottom:20px}nav button{padding-top:8px;padding-bottom:8px}.aside-bottom{flex-shrink:0}@media(max-width:700px){.permission-grid{grid-template-columns:1fr 1fr}}

details.panel{padding:18px;margin:18px 0}summary{cursor:pointer;font-weight:700}.fiscal-key{max-width:300px;overflow-wrap:anywhere}.actions{flex-wrap:wrap}
.setup{max-width:780px;margin:40px auto;padding:30px}.setup form{display:grid;gap:18px}.setup label{display:grid;gap:8px}.setup pre{white-space:pre-wrap}

/* Management dashboard */
.report-section{margin-top:32px}.report-section>p{color:#536575;font-size:14px;line-height:1.6}.report-section h2{font-size:22px}.report-section .stats{grid-template-columns:repeat(auto-fit,minmax(205px,1fr))}.report-section .stat strong{font-size:25px;overflow-wrap:anywhere}.report-section .stat small{line-height:1.5}.report-section .dashboard-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-bars{display:grid;gap:14px;margin-top:18px}.report-bar{display:grid;grid-template-columns:64px minmax(60px,1fr) 110px;gap:10px;align-items:center;font-size:12px}.report-bar svg{width:100%;height:18px}.report-bar b{text-align:right}.report-track{fill:#e8eef4}.report-fill{fill:#176b80}.report-empty{padding:24px;color:#637381}.report-section .hint{margin-top:16px}.report-section table{min-width:440px}#reportFilters{margin-bottom:20px}#reportFilters button{margin-top:12px}@media(max-width:850px){.report-section .dashboard-grid{grid-template-columns:1fr}.report-section .panel-head{flex-wrap:wrap;gap:12px}}
