:root{font-family:Inter,"Avenir Next",system-ui,sans-serif;color:#182d28;background:#f6f8f5;font-size:16px;--green:#155944;--muted:#566b64;--line:#dfe7e1;--paper:#fff;--dark:#112d25}
*{box-sizing:border-box}body{margin:0;display:grid;grid-template-columns:240px 1fr;min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.6;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid #22846b;outline-offset:3px}button{border:1px solid var(--line);border-radius:9px;background:#fff;color:var(--dark);padding:10px 15px;font-size:.875rem;font-weight:650;display:inline-flex;gap:8px;align-items:center;justify-content:center}button:hover{filter:brightness(.96)}.primary{background:var(--green);color:white;border-color:var(--green)}.sidebar{background:var(--dark);color:#dce9e0;position:sticky;top:0;height:100vh;padding:32px 17px 20px;display:flex;flex-direction:column}.brand{display:flex;align-items:center;gap:12px;padding:0 10px;font-family:Georgia,serif;font-size:1.65rem;font-weight:bold;line-height:1}.brand b{width:34px;height:34px;display:flex;align-items:end;justify-content:center;gap:3px;background:#daf4ae;border-radius:9px;padding-bottom:8px}.brand b span{width:4px;background:#214534;border-radius:2px;height:8px}.brand b span:nth-child(2){height:13px}.brand b span:nth-child(3){height:18px}.brand small{display:block;font:650 .63rem system-ui;letter-spacing:.2em;margin-top:5px;color:#a9c1b4}.workspace,.sidebar-end{display:flex;gap:10px;align-items:center;font-size:.875rem}.workspace{margin:35px 0 25px;padding:12px;background:#1b3a30;border:1px solid #315146;border-radius:10px}.workspace-icon,.avatar{display:grid;place-items:center;border-radius:8px;width:33px;height:33px;background:#31594b;color:#d9f1e0;flex:none}.workspace small,.sidebar-end small{display:block;color:#a9c1b4;margin-top:3px;font-size:.75rem}nav p{margin:14px 12px 9px;font-weight:650;font-size:.7rem;letter-spacing:.13em;color:#a0b9ad}nav a{display:flex;align-items:center;gap:11px;padding:11px 12px;margin:3px 0;border-radius:8px;font-size:.88rem}nav a[aria-current],nav a:hover{background:#254a3d;color:#ecfbcf}nav p:not(:first-child){margin-top:28px}.sidebar-end{margin-top:auto;border-top:1px solid #315146;padding:16px 6px 0}.avatar{border-radius:50%}.top{display:flex;justify-content:space-between;align-items:center;padding:17px clamp(20px,4vw,58px);background:white;border-bottom:1px solid var(--line);font-size:.875rem;color:var(--muted)}.top i{margin:0 8px;color:#9aa9a1}.top strong{color:var(--dark)}main{min-width:0}.content{max-width:1470px;margin:auto;padding:36px clamp(20px,4vw,58px) 55px}.heading{display:flex;justify-content:space-between;align-items:end;gap:12px;margin-bottom:24px}.heading p,.section-head p{color:var(--muted);margin:8px 0 0}.eyebrow{letter-spacing:.13em;font-size:.75rem;font-weight:750;color:#466a59;text-transform:uppercase}h1,h2,p{margin:0}h1,h2{font-family:Georgia,serif;font-weight:500}h1{font-size:clamp(2.1rem,4vw,3.15rem);letter-spacing:-.04em;margin-top:5px}h2{font-size:1.55rem;letter-spacing:-.025em}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:22px}.stat{background:white;border:1px solid var(--line);border-radius:13px;padding:18px 20px;min-width:0}.stat-top{display:flex;align-items:center;gap:9px;color:#435e53;font-size:.875rem;font-weight:650}.stat-icon{display:grid;place-items:center;width:32px;height:32px;border-radius:8px;background:#e9f2ed;color:#215845}.stat:nth-child(3) .stat-icon{background:#fff0df;color:#925d2a}.value{font:500 clamp(1.5rem,3vw,2.25rem) Georgia,serif;letter-spacing:-.04em;margin:12px 0 5px;overflow-wrap:anywhere}.stat small{color:var(--muted);font-size:.8rem}.schedule-banner{position:relative;overflow:hidden;border:1px solid #d8e7c9;background:#e9f3df;border-radius:13px;padding:19px 21px;margin-bottom:24px;display:flex;align-items:center;gap:15px}.schedule-banner::after{content:"";position:absolute;width:230px;height:230px;border:1px solid #d4e6c7;border-radius:50%;right:11%;top:-90px;box-shadow:0 0 0 16px #e3eed8,0 0 0 17px #d4e6c7,0 0 0 37px #e3eed8,0 0 0 38px #d4e6c7;pointer-events:none}.schedule-banner>*{z-index:1}.schedule-banner .stat-icon{width:42px;height:42px;background:#d9e9c9;flex:none}.schedule-banner p{margin-top:5px;color:#466054;font-size:.875rem}.schedule-banner button{margin-left:auto;white-space:nowrap}.panel{background:white;border:1px solid var(--line);border-radius:13px;overflow:hidden}.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:19px 21px}.section-head p{font-size:.875rem}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:nowrap;font-size:.875rem}th,td{padding:13px 17px;border-top:1px solid var(--line)}th{background:#f6f8f6;color:#53665e;font-weight:650}td:first-child,th:first-child{padding-left:22px}td:last-child,th:last-child{text-align:right}.tag{display:inline-flex;padding:4px 9px;border-radius:16px;background:#edf0ee;color:#455a51;font-size:.875rem}.tag.paid,.tag.active,.tag.sent{background:#e7f3e8;color:#23573a}.tag.overdue,.tag.failed{background:#ffede1;color:#90451f}.tag.queued{background:#edf0fa;color:#3b4e86}.table-btn{padding:5px 9px}.empty{text-align:center!important;padding:32px 20px!important;color:var(--muted);white-space:normal}.tools{display:flex;gap:10px;flex-wrap:wrap}.tools input{max-width:210px}input,select,textarea{border:1px solid #cbd8cf;border-radius:8px;background:white;color:var(--dark);min-width:0;padding:9px 10px;width:100%}select{width:auto;max-width:100%}.form-grid select{width:100%}label{display:grid;gap:6px;font-size:.875rem;font-weight:650}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.full{grid-column:1/-1}.form-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:17px}.note{font-size:.875rem;color:var(--muted);line-height:1.5}.items{display:grid;gap:8px}.item{display:grid;grid-template-columns:2fr .7fr 1fr auto;gap:8px}.settings{max-width:720px;padding:22px}.settings form{margin-top:14px}.settings hr{border:0;border-top:1px solid var(--line);margin:20px 0}dialog{border:1px solid var(--line);border-radius:15px;padding:0;color:var(--dark);width:min(650px,calc(100vw - 24px));max-height:90vh;box-shadow:0 25px 90px #10272040}dialog::backdrop{background:#112d2580}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}#dialog-body{padding:22px}.close{padding:5px 10px;font-size:1.1rem}#toast{position:fixed;right:20px;bottom:20px;background:#183d31;color:white;max-width:calc(100vw - 40px);padding:12px 15px;border-radius:9px;z-index:3}#toast:empty{display:none}svg{width:18px;height:18px;flex:none}.detail{display:grid;gap:10px}.detail table{white-space:normal}.detail h3{margin:0}
@media(max-width:840px){body{grid-template-columns:64px 1fr}.sidebar{padding:18px 8px}.brand{padding:0;justify-content:center}.brand>span,.workspace,.sidebar-end,nav p,nav a span{display:none}nav{margin-top:28px}nav a{justify-content:center;padding:12px 0}.stats{gap:9px}.stat{padding:12px}.stat-top{flex-wrap:wrap}.heading{align-items:start}}@media(max-width:570px){body{display:block}.sidebar{position:static;height:auto;flex-direction:row;align-items:center;justify-content:space-between;padding:9px 14px}.sidebar nav{display:flex;margin:0;gap:4px}.sidebar nav a{width:37px}.top{padding:10px 14px}.content{padding:20px 14px 40px}.stats{grid-template-columns:1fr}.stat{display:grid;grid-template-columns:1fr auto;align-items:center;gap:5px}.value{margin:0}.stat small{grid-column:1/-1}.schedule-banner{flex-wrap:wrap}.schedule-banner button{margin-left:0}.section-head{flex-wrap:wrap}.heading{flex-wrap:wrap}.form-grid{grid-template-columns:1fr}.item{grid-template-columns:minmax(90px,2fr) minmax(45px,.8fr) minmax(60px,1fr) auto}}@media print{body{display:block;background:white}body>aside,body>main,#toast,.form-actions,.close{display:none!important}dialog[open]{position:static;display:block;width:100%;max-height:none;border:0;box-shadow:none}dialog::backdrop{display:none}}

/* Alvire Billing workspace theme */
:root{color:#172a46;background:#f1f6fc;--green:#1459b5;--muted:#516783;--line:#d9e4f1;--paper:white;--dark:#142c4e}
body{grid-template-columns:224px minmax(0,1fr)}
.sidebar{background:#102846;color:#d7e5f9;padding:23px 14px 12px}
.brand{font-family:inherit;font-size:1.4rem;letter-spacing:-.045em;color:#fff}
.brand b{background:#c9eeff}.brand b span{background:#1e5f9d}
.brand small{letter-spacing:.12em;color:#b2c8e7}
.workspace{margin:23px 0 10px;background:#193856;border-color:#345477}
.workspace-icon,.avatar{background:#284b78;color:#e2edff}.workspace small,.sidebar-end small,nav p{color:#a9c1df}
nav{min-height:0;overflow:auto;scrollbar-width:thin;scrollbar-color:#5680aa transparent;margin:0 -4px;padding:0 4px}
nav p{font-size:.65rem;margin:12px 10px 4px}nav p:not(:first-child){margin-top:14px}nav a{font-size:.84rem;padding:7px 9px;gap:9px;margin:1px 0}nav a svg{width:16px;height:16px}
nav a[aria-current],nav a:hover{background:#295a91;color:#fff}
.sidebar-end{border-color:#345477;padding-top:11px}
.top{background:#fff}.top i{color:#8598b3}.content{padding-top:29px}
h1,h2{font-family:inherit;font-weight:720;letter-spacing:-.045em}
h1{font-size:clamp(2rem,4vw,2.85rem);margin:0}
h2{font-size:1.25rem}
.stat-top,.section-head p{color:#4f6481}.stat-icon{background:#e4efff;color:#2462a7}.value{font-family:inherit;font-weight:670}
.schedule-banner{background:#e1efff;border-color:#c9dcf6}
.schedule-banner::after{border-color:#c6dcf9;box-shadow:0 0 0 16px #d7e8fb,0 0 0 17px #c6dcf9,0 0 0 37px #d7e8fb,0 0 0 38px #c6dcf9}
.schedule-banner .stat-icon{background:#cfe3fd}.schedule-banner p{color:#405d84}
th{background:#f1f6fd;color:#445e7e}.tag.partial{background:#e8f0ff;color:#205bb4}
input,select,textarea{border-color:#c9d8e9}#toast{background:#173d6a}
.text-link{color:#1256aa;font-size:.875rem;font-weight:700;text-decoration:underline;text-underline-offset:3px}
.report-tools{display:flex;flex-wrap:wrap;gap:12px;padding:0 21px 17px}
.activity{margin-top:20px}
.chart-legend{display:flex;flex-wrap:wrap;gap:14px;padding:0 21px 8px;font-size:.875rem;color:var(--muted)}
.chart-legend span::before{display:inline-block;content:"";width:10px;height:10px;border-radius:3px;background:#3278cb;margin-right:6px}
.chart-legend span+span::before{background:#8db2e3}
.cash-chart{display:grid;grid-template-columns:repeat(6,1fr);gap:5px;padding:8px 19px 16px;text-align:center;color:var(--muted);font-size:.875rem}
.bars{height:92px;display:flex;justify-content:center;align-items:flex-end;gap:4px;border-bottom:1px solid var(--line);margin-bottom:6px}
.bars i{display:block;width:min(37%,22px);height:var(--height,0);background:#3278cb;border-radius:4px 4px 0 0}
.bars i+i{background:#8db2e3}
.bars i[data-height="1"]{--height:8%}
.bars i[data-height="2"]{--height:16%}
.bars i[data-height="3"]{--height:25%}
.bars i[data-height="4"]{--height:33%}
.bars i[data-height="5"]{--height:41%}
.bars i[data-height="6"]{--height:50%}
.bars i[data-height="7"]{--height:58%}
.bars i[data-height="8"]{--height:66%}
.bars i[data-height="9"]{--height:75%}
.bars i[data-height="10"]{--height:83%}
.bars i[data-height="11"]{--height:91%}
.bars i[data-height="12"]{--height:100%}
@media(max-width:840px){
 body{grid-template-columns:60px minmax(0,1fr)}.sidebar{padding:14px 6px}.sidebar nav{margin-top:15px}nav a{padding:7px 0}
}
@media(max-width:570px){
 body{display:block}.sidebar{padding:7px 9px;gap:9px}.sidebar nav{margin:0;overflow:auto;scrollbar-width:none}.sidebar nav a{flex:0 0 32px}.report-tools{padding:0 12px 12px}.cash-chart{padding-inline:8px}
}

.logo-settings{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:12px;background:#f1f6fc;border-radius:8px}
.logo-settings .invoice-logo{max-width:160px;max-height:70px}
.logo-settings .note{margin-top:5px}
.remove-logo{display:flex;align-items:center;gap:7px;margin-top:7px}
.remove-logo input{width:auto}
.invoice-dialog{width:min(820px,calc(100vw - 24px))}
.invoice-toolbar{margin-bottom:10px}
.invoice-preview{border:1px solid #d9e0e9;border-radius:5px;overflow:hidden}
#invoice-print{display:none}
.invoice-paper{font:10.5pt/1.35 Arial,sans-serif;color:#080808;background:#fff;padding:clamp(15px,5vw,48px);overflow-wrap:anywhere}
.invoice-brand{display:flex;justify-content:space-between;align-items:start;gap:18px;min-height:104px;margin-bottom:48px}
.invoice-logo{display:block;max-width:44%;width:auto;max-height:74px;object-fit:contain;object-position:top left}
.invoice-wordmark{font-size:22pt;line-height:1.05;max-width:48%}
.invoice-sender{text-align:right;max-width:49%}
.invoice-meta{display:grid;grid-template-columns:1.38fr .94fr 1fr 1.12fr;gap:12px;align-items:start;margin-bottom:38px}
.invoice-accent,.invoice-lines thead th,.invoice-total-due dt{color:#ca3304}
.invoice-due-date{margin-top:9px}
.invoice-balance{text-align:right}
.invoice-balance strong{font-size:clamp(16pt,4vw,27pt);font-weight:400;line-height:1.03}
.invoice-lines{width:100%;border-collapse:collapse;border-top:2px solid #e44417;white-space:normal;font:inherit}
.invoice-lines th,.invoice-lines td{padding:7px 0 7px 10px;text-align:right;border:0;background:white;vertical-align:top}
.invoice-lines th:first-child,.invoice-lines td:first-child{text-align:left;padding-left:0;width:54%}
.invoice-lines th{font-weight:400}
.invoice-lines td{border-bottom:1px solid #c5ccd4}
.invoice-lines th:not(:first-child),.invoice-lines td:not(:first-child){white-space:nowrap}
.invoice-totals{margin:22px 0 0 auto;width:50%;break-inside:avoid}
.invoice-totals div{display:grid;grid-template-columns:minmax(0,1fr) minmax(76px,38%);text-align:right;gap:10px;padding:1px 0}
.invoice-totals dd{margin:0}
.invoice-totals .invoice-total-divider{border-top:1px solid #c5ccd4;margin-top:6px;padding-top:6px}
.invoice-totals .invoice-total-due{border-top:3px double #c5ccd4;margin-top:5px;padding-top:7px}
.invoice-footnote{margin-top:18px;white-space:pre-wrap;break-inside:avoid}
@media screen and (max-width:570px){
 .invoice-brand{min-height:70px;margin-bottom:18px}
 .invoice-meta{grid-template-columns:1fr 1fr;margin-bottom:20px}
 .invoice-totals{width:70%}
 .invoice-paper{font-size:9pt}
}
@page{size:letter;margin:0.70in}
@media print{
 body.printing-invoice>dialog{display:none!important}
 body.printing-invoice #invoice-print{display:block}
 #invoice-print .invoice-paper{padding:0;font-size:10pt}
 #invoice-print .invoice-brand{min-height:1.42in;margin-bottom:.67in}
 #invoice-print .invoice-logo{max-height:.95in}
 #invoice-print .invoice-meta{margin-bottom:.52in}
 #invoice-print .invoice-balance strong{font-size:27pt}
 #invoice-print .invoice-lines tr{break-inside:avoid}
 #invoice-print .invoice-lines thead{display:table-header-group}
}

.smtp-settings{margin-top:18px}

.smtp-test-result:not(:empty){margin-top:14px}

.smtp-settings [hidden]{display:none}

.invoice-recipients,.additional-contacts{min-width:0;margin:0;padding:10px 12px 12px;border:1px solid var(--line);border-radius:8px}
.invoice-recipients legend,.additional-contacts legend{padding:0 4px;font-weight:650;font-size:.875rem}
.recipient-choice{display:flex;align-items:flex-start;gap:8px;padding:5px 0;overflow-wrap:anywhere}
.recipient-choice input{width:auto;margin-top:3px}
.recipient-choice small{display:block;color:#53647a;font-weight:400}
.client-contact{padding:9px 0;margin-bottom:6px;border-bottom:1px solid var(--line)}
.contact-actions{align-self:end;justify-self:end}
.invoice-toolbar .note{margin-top:6px;overflow-wrap:anywhere}

.signin-page{display:grid;min-height:100vh;place-items:center;padding:24px;background:#edf4fb}
.signin-card{max-width:460px;padding:36px}
.signin-card h1{margin:8px 0 12px}
.signin-card p:not(.eyebrow){color:#53647a;line-height:1.5}
.signin-link{display:inline-block;margin-top:20px;padding:10px 15px;border-radius:8px;color:white;font-weight:650}
.workspace-actions{display:flex;align-items:center;gap:12px}
