:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Arial,sans-serif;color:#172638;background:#f6f8fb;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.shell{display:flex;min-height:100vh}.sidebar{width:246px;background:#fff;border-right:1px solid #e6eaf0;padding:28px 18px;position:sticky;top:0;height:100vh;flex-shrink:0}.logo{font-size:26px;font-weight:850;letter-spacing:-1.4px;margin:0 8px 34px}.logo span{color:#e88235}.nav{display:flex;flex-direction:column;gap:5px}.nav button{width:100%;border:0;background:transparent;text-align:left;padding:13px 15px;border-radius:9px;color:#59697d;font-weight:600}.nav button.active,.nav button:hover{background:#eef5fc;color:#2165a4}.main{flex:1;min-width:0;max-width:1400px;padding:35px 38px;margin:auto;width:100%}.top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:24px}h1{font-size:26px;letter-spacing:-.8px;margin:0 0 5px}h2{font-size:18px;margin:0 0 18px}p.sub{margin:0;color:#8290a0}.card{background:#fff;border:1px solid #e5eaf0;border-radius:13px;padding:22px;margin-bottom:18px;box-shadow:0 3px 15px #122b4510}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px}.stat .label{color:#738296;font-size:12px}.stat strong{display:block;font-size:23px;letter-spacing:-.7px;margin:14px 0 7px}.stat small{color:#8997a6}.btn{border:1px solid #d9e2eb;background:white;border-radius:9px;padding:10px 15px;color:#314357;font-weight:650}.btn.primary{background:#236da9;color:white;border-color:#236da9}.btn.danger{color:#b23b3b}.actions{display:flex;gap:8px;flex-wrap:wrap}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;text-align:left}th{font-size:11px;text-transform:uppercase;letter-spacing:.6px;color:#8492a2;background:#f8fafc}th,td{padding:13px;border-bottom:1px solid #edf0f4}td{font-size:13px}tr:last-child td{border-bottom:0}.muted{color:#8190a0}.pill{font-size:11px;padding:5px 9px;border-radius:20px;background:#fff5e9;color:#9b611c;display:inline-block}.pill.paid{background:#e9f8f0;color:#237a4c}.pill.void{background:#f3f3f3;color:#777}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.field{display:flex;flex-direction:column;gap:7px}.field label{font-size:12px;font-weight:650;color:#536377}.field input,.field select,.field textarea{border:1px solid #dbe3ec;border-radius:8px;background:#fff;padding:11px 12px;min-width:0;color:#203247;width:100%}.field textarea{min-height:78px}.full{grid-column:1/-1}.section-title{font-weight:750;margin:20px 0 12px}.item-row{display:grid;grid-template-columns:2fr .65fr .8fr .7fr .65fr auto;gap:9px;align-items:end;margin-bottom:12px}.summary{margin-left:auto;max-width:350px}.sumrow{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #e9edf2}.sumrow.total{font-size:20px;font-weight:750}.empty{text-align:center;padding:35px;color:#7e8da0}.notice{background:#eef6fc;border:1px solid #d6e8f7;border-radius:9px;padding:12px;color:#426a8b;margin-bottom:18px}.error{background:#fff0f0;color:#9f3232;padding:12px;border-radius:8px;margin-bottom:15px}.auth{max-width:430px;margin:9vh auto;padding:32px}.auth .logo{margin:0 0 30px}.auth .field{margin-bottom:14px}.mobile-nav{display:none}.invoice-paper{background:#fff;border:1px solid #e3e7ed;padding:40px;max-width:850px;margin:auto;color:#1a2b3d}.invoice-head{display:flex;justify-content:space-between;gap:15px;border-bottom:2px solid #276b9e;padding-bottom:20px}.invoice-head h1{color:#236da9;font-size:22px}.invoice-meta{display:flex;justify-content:space-between;gap:15px;margin:25px 0}.invoice-meta>div{width:48%}.invoice-paper table{margin:20px 0}.invoice-paper td,.invoice-paper th{padding:11px}.invoice-paper .summary{margin:15px 0 20px auto}.invoice-foot{border-top:1px solid #e4e8ee;margin-top:35px;padding-top:18px;color:#6a7b8c;white-space:pre-line}.loading{padding:30px}.hideprint{}@media(max-width:1000px){.stats{grid-template-columns:repeat(2,1fr)}.main{padding:24px}.sidebar{width:205px}}@media(max-width:720px){.sidebar{display:none}.main{padding:18px 14px 95px}.top{align-items:flex-start}.top h1{font-size:23px}.stats{gap:9px}.card{padding:16px}.stat strong{font-size:19px}.formgrid{grid-template-columns:1fr}.item-row{grid-template-columns:repeat(2,1fr);padding:12px;border:1px solid #e6eaf0;border-radius:10px}.item-row .field:first-child{grid-column:1/-1}.item-row .btn{align-self:end}.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:white;border-top:1px solid #e4e8ef;z-index:9;justify-content:space-around;padding:9px 3px max(9px,env(safe-area-inset-bottom))}.mobile-nav button{background:none;border:0;color:#7a8b9c;font-size:11px;padding:7px}.mobile-nav button.active{color:#236da9;font-weight:750}.invoice-paper{padding:16px}.invoice-meta{flex-direction:column}.invoice-meta>div{width:100%}.invoice-paper table{font-size:11px}.invoice-paper td,.invoice-paper th{padding:7px 4px}}@media print{@page{size:A4;margin:13mm}body{background:white}.sidebar,.mobile-nav,.hideprint,.top,.notice{display:none!important}.main{padding:0;margin:0;max-width:none}.invoice-paper{border:0;padding:0;max-width:none}.invoice-paper table{font-size:11px}.invoice-paper .invoice-head{break-inside:avoid}.card{box-shadow:none}}

/* v3 invoice styling */
.invoice-paper .invoice-meta .bill-panel{background:#e2edf9;padding:17px;border-radius:7px;overflow-wrap:anywhere}.invoice-paper th{background:#468bd6;color:#fff;font-size:11px;letter-spacing:.2px}.invoice-paper tbody tr:nth-child(odd){background:#e5effa}.invoice-paper .invoice-foot strong{color:#337bb9}.invoice-brand{color:#ec812c;font-weight:850;letter-spacing:-1px}.invoice-brand span:last-child{color:#2676b3}.brand-symbol{color:#f08a31;font-size:27px}.qr-box{margin:12px 0 7px;min-height:116px}.qr-box img{max-width:116px}.invoice-paper .invoice-meta small{font-weight:750;color:#2776b8}.invoice-paper .summary .sumrow.total{border-top:2px solid #2e5f8c;border-bottom:2px solid #2e5f8c}.invoice-paper .invoice-foot{background:#fafcff;padding:15px}.invoice-paper .invoice-head{align-items:center}@media(max-width:720px){.invoice-paper .invoice-meta .bill-panel{padding:12px}.invoice-paper .invoice-head{flex-wrap:wrap}}

.brand-logo{display:block;width:190px;max-width:100%;height:auto;object-fit:contain;object-position:left center}.invoice-logo{width:230px;max-width:100%}.auth .brand-logo{width:240px}.invoice-paper .invoice-brand{margin-bottom:8px!important}@media(max-width:720px){.invoice-logo{width:175px}.sidebar .brand-logo{width:160px}}@media print{.invoice-logo{width:205px}}

/* v5 invoice editor and consistent PDF print colors */
.item-row{grid-template-columns:minmax(150px,1.4fr) minmax(160px,1.4fr) .55fr .8fr .65fr 1fr auto;align-items:end}
.item-total{display:flex;align-items:center;min-height:43px;white-space:nowrap;color:#145e99}
.invoice-paper .invoice-head{border:0;align-items:flex-start}
.invoice-paper .invoice-head h1{font-weight:500;color:#468bd6}
.invoice-paper .invoice-meta{margin:14px 0 22px}
.invoice-paper .bill-panel small{font-size:15px;color:#428bd0}
.invoice-paper .bill-panel h3{margin:5px 0}
.invoice-paper .service-table th{background:#468bd6!important;color:#fff!important}
.invoice-paper .service-table tbody tr:nth-child(odd){background:#e2edf9!important}
.invoice-paper .invoice-bottom{display:grid;grid-template-columns:1fr 1fr;gap:22px;align-items:start;margin-top:20px}
.invoice-paper .payment-panel{background:#e2edf9;padding:16px;border-radius:7px;overflow-wrap:anywhere}
.invoice-paper .payment-panel h3{margin:0 0 12px;color:#428bd0}
.invoice-paper .invoice-totals{width:100%}
.invoice-paper .item-description{font-size:11px;color:#5b6d7e;margin-top:6px;white-space:pre-line}
.invoice-paper .invoice-foot{margin-top:26px}
@media(max-width:850px){.item-row{grid-template-columns:repeat(2,minmax(0,1fr))}.item-row .field:nth-child(-n+2){grid-column:1/-1}}
@media(max-width:550px){.invoice-paper .invoice-bottom{grid-template-columns:1fr}.invoice-paper .invoice-head{flex-wrap:wrap}}
@media print{
 html,body,.invoice-paper,.invoice-paper *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
 .invoice-paper .service-table th{background:#468bd6!important;color:white!important}
 .invoice-paper .service-table tbody tr:nth-child(odd){background:#e2edf9!important}
 .invoice-paper .bill-panel,.invoice-paper .payment-panel{background:#e2edf9!important}
 .invoice-paper .invoice-bottom{grid-template-columns:1fr 1fr!important}
 .invoice-paper .invoice-meta{flex-direction:row!important}
 .invoice-paper .invoice-meta>div{width:48%!important}
 .invoice-paper .invoice-head,.invoice-paper .invoice-meta,.invoice-paper .invoice-bottom,.invoice-paper .service-table tr{break-inside:avoid}
}

/* Invoice history actions: desktop and mobile */
.invoice-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:190px}
.invoice-actions .btn{padding:7px 10px;font-size:12px;white-space:nowrap}
.danger-outline{border:1px solid #e6a5a5!important;color:#a82e2e!important;background:#fff!important}
.danger-outline:hover:not(:disabled){background:#fff0f0!important}
.invoice-actions button:disabled{opacity:.4;cursor:not-allowed}
@media(max-width:600px){.invoice-actions{min-width:170px}.invoice-actions .btn{padding:7px 8px}}

/* Password visibility control */
.password-wrap{position:relative;display:block;width:100%}.password-wrap input{width:100%;padding-right:76px!important}.password-toggle{position:absolute;right:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#245d9c;cursor:pointer;font:inherit;font-size:13px;font-weight:700;padding:8px;min-height:36px}.password-toggle:focus-visible{outline:2px solid #245d9c;border-radius:5px}

/* Socialnex logo layout fix: constrain intrinsic image size across all screens. */
.logo {min-width:0;max-width:100%;overflow:hidden;}
.logo img.brand-logo,
.auth .logo img.brand-logo,
.sidebar .logo img.brand-logo {display:block!important;width:100%!important;max-width:190px!important;height:auto!important;max-height:75px!important;object-fit:contain!important;object-position:left center!important;}
.auth .logo img.brand-logo {max-width:240px!important;max-height:90px!important;}
.sidebar .logo {margin:0 0 34px!important;}
.auth .logo {margin:0 0 30px!important;}
.auth {width:calc(100% - 32px);max-width:430px;overflow:hidden;}
@media(max-width:720px){.auth .logo img.brand-logo{max-width:210px!important;}.sidebar .logo img.brand-logo{max-width:160px!important;}}
