/* AffiniBilling MVC UI · gentle colourful, responsive and dependency-free */
:root{color-scheme:light;--bg:#f5f7fb;--surface:#fff;--ink:#192a40;--muted:#768598;--line:#e7edf4;--brand:#258c91;--brand-dark:#126e77;--brand-pale:#e7f7f4;--blue:#5467c8;--orange:#f1a84f;--coral:#e99b85;--shadow:0 8px 25px rgba(32,63,93,.045);font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif;font-synthesis:none}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;color:var(--ink);background:var(--bg);font-size:14px;line-height:1.55}
a{text-decoration:none;color:var(--brand-dark)}
a:hover{color:var(--brand)}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.5}
input,select,textarea{max-width:100%}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #70d6c6;outline-offset:2px}
.shell{min-height:100vh;display:flex}
.sidebar{width:260px;background:#fff;border-right:1px solid #e5edf2;flex-shrink:0;position:sticky;height:100vh;top:0;display:flex;flex-direction:column;box-shadow:4px 0 20px rgba(27,55,70,.017);z-index:30}
.brand{padding:26px 22px 24px;display:flex;gap:12px;align-items:center;color:#172b42;border-bottom:1px solid #edf1f5}
.brand-mark{width:44px;height:44px;display:grid;place-items:center;color:#fff;background:linear-gradient(140deg,#24a3a2,#3b82b6);border-radius:13px;box-shadow:0 8px 15px rgba(26,150,155,.17)}
.brand-text{font-size:21px;font-weight:850;letter-spacing:-1px;line-height:1.05}
.brand-text>span{color:var(--brand)}
.brand-text small{display:block;letter-spacing:1.65px;color:#91a3b3;font-weight:750;font-size:8px;margin-top:8px}
.sidebar nav{padding:0 12px 14px;overflow-y:auto;scrollbar-width:thin;flex:1}
.nav-heading{font-size:10px;color:#a8b2be;font-weight:850;letter-spacing:1.25px;padding:24px 24px 10px}
.nav-heading-inner{padding:20px 16px 8px}
.nav-link{display:flex;align-items:center;gap:12px;color:#516076;font-weight:650;padding:10px 14px;margin:3px 0;border-radius:10px;border-left:3px solid transparent;white-space:nowrap;transition:background .16s,color .16s}
.nav-link:hover{color:var(--brand-dark);background:#f2f9f9}
.nav-link.active{color:#137d80;background:#e9f8f6;border-color:#2a9d96;font-weight:750}
.nav-symbol{font-size:18px;width:22px;display:inline-grid;place-items:center;font-weight:700;opacity:.78}
.sidebar-bottom{padding:14px 17px 22px;margin-top:auto;border-top:1px solid #eef1f4}
.sidebar-bottom small{display:block;color:#a1afbe;text-align:center;font-size:10px;margin-top:15px}
.sidebar-note{background:linear-gradient(120deg,#e6f6f5,#f2f0ff);color:#4c657a;padding:14px;border-radius:13px;font-weight:650;font-size:12px}
.sidebar-note span{font-size:20px;color:#31999b;margin-right:7px}
.main-area{min-width:0;flex:1;display:flex;flex-direction:column}
.topbar{height:73px;min-height:73px;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 31px;background:rgba(255,255,255,.96);border-bottom:1px solid #e8eef4;position:sticky;top:0;z-index:20}
.topbar-heading{display:flex;flex-direction:column;gap:2px;flex:1}.topbar-heading small{font-size:10px;color:#a3abb8;font-weight:800;letter-spacing:1px}.topbar-heading b{font-size:15px;color:#2a3d55}
.topbar-right{display:flex;gap:13px;align-items:center;min-width:0}
.topbar-chip,.small-pill,.count-pill{display:inline-flex;align-items:center;padding:6px 12px;border-radius:20px;font-size:11px;font-weight:750;background:#ecf7f6;color:#21847e;white-space:nowrap}
.user-avatar{border-radius:50%;background:linear-gradient(130deg,#87bff1,#5e96c7);color:#fff;width:33px;height:33px;display:grid;place-items:center;font-weight:800}
.user-name{font-weight:700;color:#465670;white-space:nowrap;max-width:170px;overflow:hidden;text-overflow:ellipsis}
.logout{border:none;background:transparent;color:#8794a5;font-weight:650;padding:8px}.logout:hover{color:#d14e60}
.sidebar-toggle{display:none;border:1px solid #e3eaf1;color:#385775;background:white;border-radius:9px;padding:6px 10px;font-size:18px}
.content{padding:27px 32px 32px;flex:1;width:100%;max-width:1770px;margin:0 auto}
.footer{padding:13px 32px;border-top:1px solid #e8edf3;display:flex;gap:15px;justify-content:space-between;color:#a1aebe;font-size:11px}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:24px}
.page-heading h1{font-size:27px;font-weight:840;margin:1px 0 5px;line-height:1.3;letter-spacing:-.7px}
.page-heading p{color:#8190a3;margin:0;font-size:13px}
.eyebrow{color:#3a9b9e;font-weight:850;letter-spacing:1.5px;font-size:10px}
.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:17px;margin-bottom:21px}
.stat-card{border:1px solid #e8edf4;border-radius:16px;display:flex;align-items:center;gap:16px;padding:20px;background:#fff;min-width:0;box-shadow:var(--shadow)}
.stat-icon{display:grid;place-items:center;width:50px;height:50px;flex-shrink:0;font-size:26px;border-radius:15px}
.stat-card small{display:block;font-weight:800;color:#75879b;font-size:11px;margin-bottom:5px}.stat-card strong{display:block;font-size:22px;line-height:1.2;letter-spacing:-.5px;font-weight:850;white-space:nowrap}.stat-card span:last-child{font-size:11px;color:#a2afbc}
.stat-indigo .stat-icon{background:#ecedff;color:#5664c7}.stat-teal .stat-icon{background:#e3f7f4;color:#2c9c94}.stat-orange .stat-icon{background:#fff5e8;color:#edab57}.stat-rose .stat-icon{background:#fff0ed;color:#dc837c}
.panel{background:#fff;border-radius:16px;border:1px solid #e8edf4;box-shadow:var(--shadow);padding:21px 23px;margin-bottom:20px;min-width:0}
.panel-head{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;margin-bottom:21px}
.panel-head h2{font-size:16px;line-height:1.25;font-weight:820;margin:0 0 4px}
.panel-head p{margin:0;color:#9ba7b6;font-size:12px}
.panel-footer{border-top:1px solid #edf1f5;padding-top:15px;display:flex;justify-content:flex-end;gap:7px;color:#7c8998;font-size:12px}
.table-scroll{overflow-x:auto;scrollbar-width:thin}
.data-table{border-spacing:0;width:100%;min-width:620px;text-align:left;border-collapse:collapse;font-size:12px}
.data-table th{background:#f7f9fc;text-transform:uppercase;letter-spacing:.7px;color:#91a0b0;font-size:10px;font-weight:850;padding:13px 13px;white-space:nowrap;border-bottom:1px solid #e9edf2}
.data-table td{padding:14px 13px;border-bottom:1px solid #edf0f5;color:#536175;vertical-align:middle}
.data-table tbody tr:hover td{background:#fbfdfd}
.data-table tbody tr:last-child td{border-bottom:0}
.data-table td b{color:#253851;font-weight:750}.data-table small{display:block;color:#9cabb8;font-size:11px;margin-top:2px;max-width:240px}
.data-table .empty{text-align:center;color:#9ba9ba;padding:36px 15px;font-weight:600}.data-table .num{text-align:right}
.table-link{font-weight:800;color:#21858b;white-space:nowrap}
.tag{font-size:10px;font-weight:850;border-radius:22px;padding:5px 9px;display:inline-block;white-space:nowrap}
.tag.success{color:#24877d;background:#e0f7f0}.tag.warning{color:#a76e19;background:#fff2dd}.tag.danger{color:#c15a64;background:#fdecef}.tag.neutral{color:#74859b;background:#f0f3f8}
.btn{display:inline-flex;justify-content:center;align-items:center;gap:7px;appearance:none;padding:10px 16px;border-radius:10px;border:1px solid transparent;font-weight:800;line-height:1.3;font-size:12px;white-space:nowrap;transition:background .15s,transform .15s,box-shadow .15s}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:linear-gradient(115deg,#239797,#167c90);color:#fff;box-shadow:0 6px 13px rgba(26,135,143,.13)}
.btn-primary:hover{color:#fff;background:linear-gradient(115deg,#187f8b,#116879);box-shadow:0 6px 20px rgba(26,135,143,.2)}
.btn-soft{background:#edf6f6;border-color:#e5f0f1;color:#257a7f}.btn-soft:hover{background:#e0f1f1;color:#176873}
.btn-success{background:#e4f6ef;color:#13816a}.btn-success:hover{background:#ceeede;color:#09624d}
.btn-outline-danger{background:#fff;border-color:#f4d7db;color:#c9686b}.btn-outline-danger:hover{background:#fff0f1}
.btn-mini{padding:7px 11px;font-size:11px;border-radius:8px}
.btn-white{background:#fff;color:#287d81}.btn-white:hover{background:#f6fffd}
.btn-wide{width:100%;padding:14px;font-size:14px}
.form-stack{display:flex;flex-direction:column;gap:15px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 17px}
.form-grid.cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.form-grid.cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.span-2{grid-column:span 2}
.field{display:flex;flex-direction:column;min-width:0;gap:5px}
.field label{font-size:11px;color:#66768c;font-weight:800}
.field small{font-size:11px;color:#9ba8b7}
.field input,.field select,.field textarea,.invoice-lines input,.invoice-lines select,.date-filter input{width:100%;background:#fff;color:#30445a;border-radius:9px;border:1px solid #dae4ec;padding:10px 11px;outline:none;min-height:39px;transition:border .16s,box-shadow .16s}
.field input:focus,.field select:focus,.field textarea:focus,.invoice-lines input:focus,.invoice-lines select:focus,.date-filter input:focus{border-color:#54b0b4;box-shadow:0 0 0 3px rgba(46,159,163,.10)}
.field input::placeholder{color:#abb7c4}
.field textarea{resize:vertical;min-height:76px}
.field-bottom{justify-content:flex-end}.field-bottom button{width:100%}
.check-field{display:flex;align-items:center;gap:9px;color:#607184;font-weight:650}.check-field input{accent-color:#29989a}
.row-actions,.action-row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}.row-actions form{margin:0}
.date-filter{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap}.date-filter label{color:#8c9aaa;font-size:10px;font-weight:750;display:flex;flex-direction:column;gap:4px}.date-filter input{padding:7px 9px;min-height:32px;font-size:12px}
.notice{border-radius:11px;padding:11px 14px;margin-bottom:16px;font-size:12px;font-weight:650}
.success-msg{border:1px solid #c4eee2;color:#176c65;background:#e9faf5}.error-msg{background:#fff0f1;color:#b65665;border:1px solid #f7d8dd}.info-msg{background:#e9f4fb;color:#39738b;border:1px solid #d9ecf7}.warning-msg{background:#fffae9;color:#9b762a;border:1px solid #f1e6b8}
.validation-summary{color:#b64f60;font-size:12px;font-weight:650}.validation-summary:empty{display:none}.validation-summary ul{padding-left:17px;margin:9px 0 15px}
.two-cols{display:grid;grid-template-columns:1.5fr 1fr;gap:20px;align-items:start}
.masters-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(310px,.75fr);gap:20px;align-items:start}
.master-editor{position:sticky;top:91px}
.inline-details{position:relative}.inline-details summary{list-style:none;cursor:pointer}.inline-details summary::-webkit-details-marker{display:none}
.inline-form{background:#fff;border:1px solid #dce7ef;border-radius:13px;padding:16px;display:flex;flex-direction:column;gap:9px;min-width:225px;max-width:265px;box-shadow:0 14px 35px rgba(30,55,70,.14);position:absolute;z-index:15;right:0;top:calc(100% + 8px)}
.inline-form .field input,.inline-form .field select{padding:7px 9px;min-height:32px}
.report-menu h3{font-size:10px;letter-spacing:1.25px;color:#a0afbf;margin:12px 14px}
.reports-layout{display:grid;grid-template-columns:255px minmax(0,1fr);align-items:start;gap:20px}
.report-menu{background:#fff;border:1px solid var(--line);border-radius:16px;padding:9px;box-shadow:var(--shadow)}
.report-type{border-radius:10px;padding:13px;display:flex;gap:10px;color:#617286;margin:3px 0;align-items:center}
.report-type>span{font-size:22px;color:#8da1b6}.report-type div{min-width:0}.report-type b,.report-type small{display:block}.report-type b{font-size:12px}.report-type small{font-size:10px;color:#a8b4c0;margin-top:3px}
.report-type:hover{background:#f4f8fa;color:#2b8489}.report-type.selected{background:#e8f7f5;color:#177b80}.report-type.selected>span{color:#27999d}
.report-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px;margin-bottom:17px}
.report-toolbar .field input{min-height:37px;padding:8px 10px}.report-toolbar .btn{min-height:37px}.export-actions{margin-left:auto;display:flex;gap:7px}
.invoice-lines{min-width:880px}.invoice-lines th,.invoice-lines td{padding:9px 7px}.invoice-lines td:first-child{min-width:210px}.invoice-lines input{padding:8px 9px;min-height:36px}
.invoice-lines td:nth-child(2){width:100px}.invoice-lines td:nth-child(3){width:125px}.invoice-lines td:nth-child(4){width:125px}
.remove-line,.remove-payment{color:#c96b6b;background:#fff3f1;border:0;border-radius:8px;width:30px;height:30px;font-size:20px;display:grid;place-items:center;flex-shrink:0}.remove-line:hover,.remove-payment:hover{background:#ffe0dd}
.tax-chip{font-size:10px;color:#489295;background:#e9f7f5;border-radius:8px;padding:5px 9px;white-space:nowrap}
.totals-strip{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:20px;align-items:center;background:#f6fafb;border-radius:11px;margin-top:16px;padding:15px 18px}
.totals-strip>div{display:flex;flex-direction:column;color:#8fa0b0;font-size:11px;font-weight:650}
.totals-strip b{font-size:16px;color:#263b54;margin-top:3px}.totals-strip .strong-total b{color:#187b82;font-size:20px}
.payment-splits{display:flex;flex-direction:column;gap:10px}.payment-row{display:grid;grid-template-columns:1fr 1fr 1.3fr 30px;gap:13px;align-items:end;padding-bottom:10px;border-bottom:1px solid #eef1f4}.payment-row .remove-payment{margin-bottom:4px}
.payment-footer{display:flex;justify-content:flex-end;gap:20px;padding-top:15px;font-size:12px;color:#74889a}.payment-footer b{font-weight:850;color:#2c5363}
.sticky-form-actions{position:sticky;bottom:12px;padding:16px 18px;background:#fff;border:1px solid #e5edf1;border-radius:13px;display:flex;align-items:center;justify-content:space-between;gap:16px;box-shadow:0 12px 30px rgba(45,70,90,.13);z-index:5}.sticky-form-actions p{font-size:11px;color:#8092a6;margin:0}
.invoice-detail-header{display:flex;justify-content:space-between;gap:20px;padding-bottom:17px;border-bottom:1px solid #e9edf2;margin-bottom:14px}
.invoice-detail-header h2{font-size:20px;margin:0 0 4px}.invoice-detail-header p{font-size:12px;color:#718496;margin:2px 0}.text-right{text-align:right}
.invoice-totals{width:345px;max-width:100%;margin:20px 0 0 auto;border-radius:13px;background:#f7fafc;padding:14px 18px}
.invoice-totals>div{display:flex;justify-content:space-between;padding:5px 0;color:#78899a;font-size:12px;gap:10px}.invoice-totals b{color:#2a4056}.invoice-totals .invoice-grand{border-top:1px solid #dfe9ed;padding:12px 0 9px;font-weight:850;color:#2c4e63}.invoice-totals .invoice-grand b{color:#268a8e;font-size:18px}.invoice-totals .invoice-due{border-top:1px solid #dfe9ed;margin-top:7px;padding-top:10px}.invoice-due b{font-size:16px;color:#ba7641}
.details-bottom{grid-template-columns:1.4fr 1fr}
.due-highlight{background:#fff6e9;padding:13px;border-radius:10px;color:#9d792e;display:flex;justify-content:space-between;font-size:12px;margin-bottom:17px}.due-highlight strong{font-size:17px;color:#b77c2e}.paid-complete{background:#e6f8f2;color:#227c6d;border-radius:10px;padding:17px;font-weight:800}
.profile-layout{grid-template-columns:1.5fr 1fr}.profile-aside>.panel{margin-bottom:20px}.logo-preview{min-height:172px;border:1px dashed #c6dbe2;background:#f9fcfd;border-radius:13px;display:grid;place-items:center;margin-bottom:17px}.logo-preview img{max-width:80%;max-height:135px;object-fit:contain}.logo-placeholder{font-size:60px;color:#bcd4da}
.info-row{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #edf0f4;padding:11px 0;gap:15px;font-size:12px}.info-row:last-child{border-bottom:0}.info-row span:first-child{color:#8b9aa9}
.feature-card{border-radius:17px;color:#fff;min-height:191px;position:relative;overflow:hidden;padding:25px 27px;margin-bottom:20px}
.feature-card h2{font-size:21px;letter-spacing:-.5px;margin:7px 0}.feature-card p{font-size:12px;color:rgba(255,255,255,.85);max-width:300px;margin:0 0 18px}.feature-card small{font-weight:800;letter-spacing:1px;font-size:10px;color:rgba(255,255,255,.75)}.feature-card>*:not(.feature-glyph){position:relative;z-index:2}.feature-teal{background:linear-gradient(115deg,#17958d,#46b5ad)}.feature-coral{background:linear-gradient(115deg,#df927b,#f0b28b)}.feature-glyph{position:absolute;right:12px;bottom:-65px;font-size:170px;color:rgba(255,255,255,.13);line-height:1}
/* Auth */
.auth-layout{display:grid;grid-template-columns:48% 52%;min-height:100vh;background:#fff}
.auth-hero{background:linear-gradient(140deg,#136d81 0%,#1e9b9d 59%,#44bba4 100%);color:#fff;min-height:100vh;display:flex;flex-direction:column;justify-content:space-between;padding:35px 55px 29px;position:relative;overflow:hidden}
.auth-hero::before{content:"";position:absolute;width:410px;height:410px;border:1px solid rgba(255,255,255,.15);border-radius:50%;bottom:-180px;right:-170px;box-shadow:0 0 0 77px rgba(255,255,255,.035),0 0 0 160px rgba(255,255,255,.029)}
.auth-hero-brand{font-size:23px;font-weight:860;letter-spacing:-.9px;display:flex;align-items:center;gap:10px}.auth-hero-brand span:last-child{color:#c4fff2}.hero-brand-icon{width:41px;height:41px;border-radius:12px;display:grid;place-items:center;font-size:25px;background:rgba(255,255,255,.2);border:1px solid rgba(255,255,255,.12)}
.auth-hero-center{position:relative;z-index:1;max-width:540px}.hero-pill{font-size:11px;font-weight:800;color:#e7fffa;letter-spacing:1.3px;padding:7px 13px;display:inline-block;border-radius:30px;background:rgba(255,255,255,.13)}
.auth-hero h1{font-size:clamp(35px,4vw,59px);line-height:1.16;letter-spacing:-1.8px;margin:24px 0;font-weight:850}.auth-hero h1 em{font-style:normal;color:#d5ffdd}
.auth-hero-center>p{font-size:15px;color:#d8f5f2;line-height:1.9;max-width:425px}.hero-features{display:flex;gap:14px;flex-direction:column;margin-top:33px;font-size:13px;font-weight:650;color:#effefa}
.auth-hero-footer{color:rgba(255,255,255,.57);font-size:10px;letter-spacing:1.8px;font-weight:800}
.auth-right{display:flex;align-items:center;justify-content:center;padding:45px 38px;max-height:100vh;overflow-y:auto}.register-layout .auth-right{max-height:none;align-items:flex-start}
.auth-card{max-width:450px;width:100%;margin:auto}.auth-card-wide{max-width:590px}
.auth-badge{color:#248b8d;display:inline-block;font-size:11px;font-weight:850;letter-spacing:1.2px;background:#e5f7f4;padding:6px 12px;border-radius:20px}.auth-card h2{font-size:26px;letter-spacing:-.7px;margin:13px 0 5px}.auth-card .muted{color:#98a7b5;margin:0 0 23px;font-size:13px}
.auth-card .field label{font-size:12px}.auth-card .field input{padding:12px 13px;min-height:45px}
.auth-switch{text-align:center;margin-top:23px;font-size:12px;color:#91a0b1}.auth-switch a{font-weight:850}
.auth-footer-note{text-align:center;color:#b0bac5;font-size:10px;margin-top:26px}.auth-logo-mobile{display:none}
.auth-layout.register-layout .auth-right{overflow-y:initial}
/* Standalone print */
.print-page{background:#fff;font-family:Arial,Helvetica,sans-serif;color:#29384c;font-size:12px}.print-shell{max-width:830px;min-height:970px;margin:0 auto;padding:35px;background:white}
.print-top{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;border-bottom:3px solid #27989c;padding-bottom:17px}
.print-seller{display:flex;align-items:center;gap:18px}.print-logo{width:70px;max-height:70px;object-fit:contain}.print-top h1{font-size:25px;color:#237e89;margin:0}.print-top p{margin:4px 0;color:#5c7080}
.print-meta{display:flex;justify-content:space-between;gap:32px;margin:24px 0 28px}.print-meta>div{min-width:0}.print-meta h2{font-size:19px;margin:0 0 15px;color:#1e8690}.print-meta h3{margin:0 0 10px}.print-meta p{margin:3px 0;color:#58687b}
.print-page .data-table{font-size:12px;min-width:0}.print-page .data-table th{background:#eaf6f6;color:#496974;font-size:11px}.print-page .data-table td{padding:12px 9px;color:#425166}
.print-totals{margin:20px 0 20px auto;width:305px;max-width:100%}.print-totals>div{display:flex;justify-content:space-between;padding:7px 9px}.print-totals .grand{font-size:16px;background:#e3f6f4;color:#16757d;font-weight:800;border-radius:5px}
.print-payments{margin:20px 0;color:#5d6f80}.print-foot{border-top:1px solid #dce5e9;margin-top:55px;padding-top:19px;text-align:center;color:#8395a5;font-size:11px}
.error-page{margin:13vh auto;background:white;padding:50px 30px;text-align:center;max-width:480px;border:1px solid var(--line);border-radius:16px}.error-page h2{margin:12px 0 4px}.error-page p{color:#7f90a1;margin:0 0 24px}.error-icon{font-size:36px;color:#d17d74}
.mobile-overlay{display:none}
@media(max-width:1350px){.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.masters-layout{grid-template-columns:minmax(0,1.4fr) minmax(295px,.8fr)}.form-grid.cols-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:1050px){.sidebar{width:223px}.brand{padding:20px 15px}.brand-text{font-size:19px}.content{padding:22px}.topbar{padding:0 22px}.masters-layout{grid-template-columns:1fr}.master-editor{position:static}.reports-layout{grid-template-columns:1fr}.report-menu{display:flex;overflow-x:auto;gap:4px}.report-menu h3{display:none}.report-type{min-width:170px}}
@media(max-width:790px){.sidebar{position:fixed;top:0;left:0;bottom:0;transform:translateX(-105%);transition:transform .2s;width:255px;height:100vh}.shell.nav-open .sidebar{transform:translateX(0)}.mobile-overlay{display:none;position:fixed;inset:0;background:rgba(20,35,45,.35);z-index:25}.shell.nav-open~.mobile-overlay{display:block}.sidebar-toggle{display:inline-flex}.topbar{height:65px;min-height:65px;padding:0 16px}.topbar-chip,.user-name{display:none}.content{padding:19px 15px}.footer{padding:13px 15px}.footer span{display:none}.two-cols,.profile-layout,.details-bottom{grid-template-columns:1fr}.auth-layout{grid-template-columns:1fr}.auth-hero{display:none}.auth-right{max-height:none;min-height:100vh;padding:40px 20px}.auth-logo-mobile{display:block;font-size:22px;font-weight:850;color:#268e8c;margin-bottom:26px}.register-layout .auth-right{padding:30px 18px}}
@media(max-width:540px){.stats-grid{grid-template-columns:1fr;gap:10px}.stat-card{padding:14px;gap:13px}.stat-icon{width:45px;height:45px}.stat-card strong{font-size:22px}.page-heading h1{font-size:23px}.panel{padding:16px;margin-bottom:14px}.form-grid,.form-grid.cols-3,.form-grid.cols-4{grid-template-columns:1fr}.span-2{grid-column:auto}.page-heading>.action-row{width:100%}.page-heading .btn{flex:1}.payment-row{grid-template-columns:1fr 1fr;gap:8px}.payment-row .field:nth-child(3){grid-column:span 2}.payment-row .remove-payment{grid-column:span 2;justify-self:end}.topbar-heading small{display:none}.topbar-heading b{font-size:13px}.topbar-right{gap:8px}.logout{font-size:11px}.user-avatar{width:30px;height:30px}.page-heading{margin-bottom:17px}.report-toolbar .export-actions{margin-left:0;width:100%}.export-actions a{flex:1}.totals-strip{justify-content:space-between;gap:13px}.sticky-form-actions{flex-wrap:wrap}.sticky-form-actions p{display:none}.auth-card h2{font-size:23px}.print-shell{padding:14px}}
@media print{body{background:white!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.no-print{display:none!important}.print-shell{max-width:none;min-height:0;padding:0;margin:0}.print-page{font-size:11px}.print-page table{page-break-inside:auto}.print-page tr{page-break-inside:avoid}.print-page td,.print-page th{padding:7px 6px!important}@page{size:A4;margin:12mm}}
/* v1.2 ERP navigation / compact icon action buttons */
.icon-sprite{position:absolute;width:0;height:0;overflow:hidden;pointer-events:none}
.nav-icon,.action-icon,.nav-chevron{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.action-icon{width:16px;height:16px}
.sidebar .nav-icon{width:20px;height:20px}
.sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px}
.sidebar-links{overflow-y:auto;padding:8px 10px 18px!important;display:block;flex:1}
.sidebar-links .nav-link{gap:11px;padding:10px 12px;min-height:42px}
.nav-group{margin:5px 0}
.nav-group summary{list-style:none;display:flex;gap:11px;align-items:center;padding:11px 12px;font-weight:800;font-size:12px;color:#53647a;border-radius:9px;cursor:pointer}
.nav-group summary::-webkit-details-marker{display:none}
.nav-group summary:hover{background:#f2f9f9;color:var(--brand-dark)}
.nav-group summary .nav-chevron{margin-left:auto;transition:transform .16s;width:14px;height:14px}
.nav-group[open] summary .nav-chevron{transform:rotate(180deg)}
.nav-group-links{border-left:1px solid #e8edf3;margin-left:19px;padding-left:7px}
.nav-group-links .nav-link{font-size:12px;min-height:37px;padding:7px 10px}
.nav-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.btn-icon{width:33px;height:33px;min-width:33px;padding:0!important;display:inline-flex;align-items:center;justify-content:center;border-radius:9px}
.permissions-table{min-width:600px}
.permissions-table th:not(:first-child),.permissions-table td:not(:first-child){text-align:center;width:90px}
.permissions-table input[type=checkbox]{width:17px;height:17px;accent-color:#21918e;cursor:pointer}
.permissions-table .muted{color:#b4c0ce}
.security-panel{max-width:560px}
.sidebar-bottom .sidebar-note-text{font-size:11px}
.sidebar{transition:width .2s ease}
.shell.nav-collapsed .sidebar{width:76px}
.shell.nav-collapsed .sidebar .brand{padding:20px 14px;justify-content:center}
.shell.nav-collapsed .sidebar .brand-text,.shell.nav-collapsed .sidebar .nav-heading,.shell.nav-collapsed .sidebar .nav-label,.shell.nav-collapsed .sidebar .sidebar-note-text,.shell.nav-collapsed .sidebar .sidebar-bottom small,.shell.nav-collapsed .sidebar .nav-chevron{display:none}
.shell.nav-collapsed .sidebar .nav-link{justify-content:center;padding:10px;margin:3px 0}
.shell.nav-collapsed .sidebar .nav-group summary{justify-content:center}
.shell.nav-collapsed .sidebar .nav-group-links{display:none}
.shell.nav-collapsed .sidebar .nav-group{margin:0}
.shell.nav-collapsed .sidebar .sidebar-note{padding:5px;text-align:center}
.shell.nav-collapsed .sidebar .sidebar-bottom{padding:10px 8px}
@media(max-width:790px){
 .shell.nav-collapsed .sidebar{width:255px}
 .shell.nav-collapsed .sidebar .brand-text,.shell.nav-collapsed .sidebar .nav-heading,.shell.nav-collapsed .sidebar .nav-label,.shell.nav-collapsed .sidebar .sidebar-note-text,.shell.nav-collapsed .sidebar .sidebar-bottom small,.shell.nav-collapsed .sidebar .nav-chevron{display:initial}
 .shell.nav-collapsed .sidebar .nav-group-links{display:block}
 .shell.nav-collapsed .sidebar .nav-link{justify-content:flex-start}
 .shell.nav-collapsed .sidebar .nav-group summary{justify-content:flex-start}
}

/* v1.2.7 dashboard analytics and invoice printing */
.period-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-bottom:24px}
.period-tile{padding:18px;border:1px solid #dce8f0;border-radius:13px;background:linear-gradient(125deg,#f5fbfa,#f5f7ff);display:flex;flex-direction:column;gap:6px}
.period-tile small{color:#61798a;font-weight:700}.period-tile strong{font-size:24px;color:#183b52}.period-tile span{font-size:12px;color:#728497}
.analytics-subtitle{font-size:15px;margin-bottom:10px}.sales-trend{height:145px;display:flex;align-items:flex-end;gap:4px;border-bottom:1px solid #cedce6;padding:0 2px 0}
.trend-column{flex:1;height:100%;display:flex;align-items:flex-end}.trend-bar{width:100%;min-height:3px;background:linear-gradient(#23b5aa,#246da7);border-radius:4px 4px 0 0}
.ranking{padding:3px 8px;background:#e6f4f5;border-radius:12px;color:#126a7b;font-weight:800}
.checkbox-line{display:flex;align-items:center;gap:10px;margin:14px 0;font-weight:650}
.print-toolbar button{border:1px solid #b7d4dc;border-radius:8px;padding:9px 15px;cursor:pointer;background:#e5f4f3;color:#16445a;font-weight:700}
@media(max-width:690px){.period-grid{grid-template-columns:1fr}.sales-trend{height:110px}}
