:root{--tm-navy:#0b2942;--tm-navy-2:#123f56;--tm-emerald:#087f72;--tm-mint:#dff4ee;--tm-cream:#fffaf0;--tm-sky:#eaf4fb;--tm-gold:#f3b640;--tm-coral:#e98262;--tm-card:#fffefb;--tm-line:#cfe0dc;--canvas:#edf5f2;--paper:var(--tm-card);--line:var(--tm-line);--ink:#102a43;--muted:#587083}
body{background:
 radial-gradient(circle at 5% 0%,rgba(8,127,114,.12),transparent 30rem),
 radial-gradient(circle at 100% 12%,rgba(243,182,64,.12),transparent 27rem),
 linear-gradient(145deg,#edf7f4 0%,#f7f5ed 48%,#eef5fa 100%);background-attachment:fixed;color:var(--ink)}
.tendero-navbar{background:linear-gradient(105deg,var(--tm-navy),var(--tm-navy-2) 68%,#0d625f);border:0;box-shadow:0 8px 24px rgba(11,41,66,.18)}
.tendero-title-brand{background:#fffdf6;border-radius:12px;padding:.28rem .5rem;box-shadow:0 3px 12px rgba(0,0,0,.13)}
.navbar .nav-link{color:#eaf8f5!important}.navbar .nav-link:hover,.navbar .nav-link:focus,.navbar .nav-link.show{color:#fff!important;background:rgba(255,255,255,.13)}
.navbar .frequent-menu{background:var(--tm-gold)!important;color:#183247!important;box-shadow:0 5px 14px rgba(243,182,64,.25)}
.branch-chip{color:#fff;border-color:rgba(255,255,255,.25)}.branch-chip span{color:#bcd8dc}.account-security-link,.logout-button{color:#e0f2f1}.account-security-link:hover,.logout-button:hover{color:#ffe18a}.language-link{color:#fff;background:rgba(255,255,255,.1);border-color:rgba(255,255,255,.4)}
.navbar-toggler{background:#f8fffd;border-color:rgba(255,255,255,.5)}
.tendero-menu,.tendero-mega-menu{background:#fffdf8;border-color:#c9ded8;box-shadow:0 22px 55px rgba(9,42,60,.24)}.tendero-mega-menu section:nth-child(1){background:#eef8f4}.tendero-mega-menu section:nth-child(2){background:#f2f7fc}.tendero-mega-menu section:nth-child(3){background:#fff8e9}.tendero-mega-menu section{border-radius:11px}.tendero-mega-menu .dropdown-item:hover{background:#fff;color:#056b61;box-shadow:0 3px 10px rgba(15,64,76,.09)}
.app-container{padding-top:1.75rem}.setup-card,.panel-card,.metric-card,.invoice-list article,.product-table-wrap,.flow-table-wrap,.master-report-table,.payment-card,.help-grid article,.help-empty{background:linear-gradient(155deg,rgba(255,255,255,.98),rgba(255,253,246,.94));border-color:var(--tm-line);box-shadow:0 8px 24px rgba(27,69,79,.065)}
.setup-card:hover,.metric-card:hover,.invoice-list article:hover{border-color:#a9cec4;box-shadow:0 12px 30px rgba(27,69,79,.1)}
.product-heading h1,.setup-heading h1,.page-heading h1{color:var(--tm-navy)}.product-heading .eyebrow,.setup-heading .eyebrow,.page-heading .eyebrow{color:#087166}
.hero-panel{background:linear-gradient(125deg,var(--tm-navy),#0b6f69 72%,#149183);box-shadow:0 18px 45px rgba(12,83,87,.25)}
.btn-primary{background:linear-gradient(135deg,#087f72,#05665f);border-color:#087166;box-shadow:0 5px 13px rgba(8,127,114,.18)}.btn-primary:hover{background:linear-gradient(135deg,#066a61,#064f4b);transform:translateY(-1px)}
.btn-light{background:#fffdf8;border-color:#bfd5cf;color:#173d51}.btn-light:hover{background:var(--tm-mint);border-color:#8fbdb2;color:#075f58}
main input,main select,main textarea{background:#fbfefc;border-color:#bfd3ce!important;color:#142f46}main input:focus,main select:focus,main textarea:focus{background:#fff;border-color:#168e80!important;box-shadow:0 0 0 3px rgba(22,142,128,.13)!important}
.inventory-stats article:nth-child(4n+1),.report-kpis article:nth-child(4n+1),.flow-summary article:nth-child(4n+1){background:linear-gradient(145deg,#effaf6,#fff)}
.inventory-stats article:nth-child(4n+2),.report-kpis article:nth-child(4n+2),.flow-summary article:nth-child(4n+2){background:linear-gradient(145deg,#edf6fd,#fff)}
.inventory-stats article:nth-child(4n+3),.report-kpis article:nth-child(4n+3),.flow-summary article:nth-child(4n+3){background:linear-gradient(145deg,#fff8e8,#fff)}
.inventory-stats article:nth-child(4n+4),.report-kpis article:nth-child(4n+4),.flow-summary article:nth-child(4n+4){background:linear-gradient(145deg,#fff1ed,#fff)}
table thead th{background:#e8f3f0;color:#173b50!important;border-color:#c9ded8!important}table tbody tr:nth-child(even){background:rgba(237,247,244,.52)}table tbody tr:hover{background:#e4f4ef}
.status-pill{border:1px solid #a9d7cc;background:#e8f7f3;color:#056b61}.validation-summary{background:#fff0ed;border-color:#f0b9aa}.setup-success,.success-message{background:#e4f7ee;border-color:#9ed4c3}
.subscription-reminder{background:linear-gradient(100deg,#fff4d6,#fffaf0);border-color:#e9bd56;box-shadow:0 6px 18px rgba(126,88,16,.1)}
.tendero-footer{background:rgba(11,41,66,.94);color:#c9dcdf;border:0}.global-guide-button{background:linear-gradient(135deg,#f1ad2f,#e18b25);color:#172f42!important;box-shadow:0 12px 30px rgba(154,92,20,.28)}
@media(max-width:991px){.tendero-navbar .navbar-collapse{margin-top:.55rem;padding:.65rem;background:rgba(255,255,255,.06);border-radius:12px}.tendero-mega-menu section{margin-bottom:.35rem}}
@media print{body{background:#fff!important}.tendero-navbar,.tendero-footer{background:#fff!important}.setup-card,.panel-card,.invoice-list article{box-shadow:none!important;background:#fff!important}}

/* Tenant-selectable complete palettes */
body.theme-ocean{--theme-dark:#123b69;--theme-mid:#1769aa;--theme-soft:#e8f4ff;--theme-canvas:#eef6fc;--theme-warm:#d8f1ff}
body.theme-royal{--theme-dark:#352260;--theme-mid:#6d3fc0;--theme-soft:#f1eaff;--theme-canvas:#f7f3fc;--theme-warm:#eadcff}
body.theme-sunset{--theme-dark:#6d2f24;--theme-mid:#c2522b;--theme-soft:#fff0e6;--theme-canvas:#fff7ee;--theme-warm:#ffedbd}
body.theme-classic{--theme-dark:#1e293b;--theme-mid:#475569;--theme-soft:#f1f5f9;--theme-canvas:#f5f7fa;--theme-warm:#e2e8f0}
body.theme-emerald{--theme-dark:#0b2942;--theme-mid:#087f72;--theme-soft:#dff4ee;--theme-canvas:#edf5f2;--theme-warm:#fff1bf}
body[class*="theme-"]{background:radial-gradient(circle at 4% 0%,var(--theme-soft),transparent 31rem),radial-gradient(circle at 100% 10%,var(--theme-warm),transparent 29rem),linear-gradient(145deg,var(--theme-canvas),#fffdf8 52%,var(--theme-soft));background-attachment:fixed}
body[class*="theme-"] .tendero-navbar{background:linear-gradient(105deg,var(--theme-dark),var(--theme-mid) 76%,var(--tenant-primary))}
body[class*="theme-"] .hero-panel{background:linear-gradient(125deg,var(--theme-dark),var(--theme-mid) 72%,color-mix(in srgb,var(--theme-mid) 72%,var(--theme-dark)))}
body[class*="theme-"] .btn-primary{background:linear-gradient(135deg,var(--theme-mid),var(--tenant-primary));border-color:var(--theme-mid)}
body[class*="theme-"] table thead th{background:var(--theme-soft)}

/* Keep foreground text readable when a tenant changes the complete palette. */
body[class*="theme-"] .hero-panel,
body[class*="theme-"] .hero-panel h1{
    color:#fff!important;
}
body[class*="theme-"] .hero-panel h1{
    text-shadow:0 1px 2px rgba(0,0,0,.24);
}
body[class*="theme-"] .hero-panel h1 span{
    color:#ffe58a!important;
    text-shadow:0 1px 2px rgba(0,0,0,.3);
}
body[class*="theme-"] .hero-panel .eyebrow{
    color:#c7fff1!important;
}
body[class*="theme-"] .hero-panel p{
    color:#f1fffb!important;
}
body[class*="theme-"] .hero-panel a:not(.btn){
    color:#fff!important;
}
body[class*="theme-"] .metric-card,
body[class*="theme-"] .panel-card,
body[class*="theme-"] .setup-card{
    color:#17364b;
}
body[class*="theme-"] .metric-card strong,
body[class*="theme-"] .panel-card h2,
body[class*="theme-"] .setup-card h2{
    color:#102a43;
}
body[class*="theme-"] .metric-card small,
body[class*="theme-"] .panel-card p,
body[class*="theme-"] .setup-card p{
    color:#526b7a;
}

.theme-choice-grid{display:grid;grid-template-columns:repeat(5,minmax(145px,1fr));gap:.75rem;margin:1rem 0 1.25rem}
.theme-choice{position:relative;display:flex;min-height:150px;flex-direction:column;gap:.28rem;padding:1rem;border:2px solid #d6e2df;border-radius:15px;background:#fff;cursor:pointer;transition:.18s ease}
.theme-choice:hover{transform:translateY(-2px);box-shadow:0 10px 22px rgba(19,56,70,.1)}
.theme-choice input{position:absolute;opacity:0;pointer-events:none}
.theme-choice strong{font-size:1rem;color:#17364b}.theme-choice small{color:#617687;line-height:1.35}.theme-choice b{display:none;margin-top:auto;color:#087f72;font-size:.78rem}
.theme-choice:has(input:checked){border-color:var(--tenant-primary,#087f72);box-shadow:0 0 0 3px rgba(8,127,114,.12)}.theme-choice:has(input:checked) b{display:block}
.theme-swatch{display:flex;height:42px;overflow:hidden;border-radius:9px;margin-bottom:.4rem}.theme-swatch i{flex:1}
.theme-choice-emerald .theme-swatch i:nth-child(1){background:#0b2942}.theme-choice-emerald .theme-swatch i:nth-child(2){background:#087f72}.theme-choice-emerald .theme-swatch i:nth-child(3){background:#f3b640}
.theme-choice-ocean .theme-swatch i:nth-child(1){background:#123b69}.theme-choice-ocean .theme-swatch i:nth-child(2){background:#1769aa}.theme-choice-ocean .theme-swatch i:nth-child(3){background:#38bdf8}
.theme-choice-royal .theme-swatch i:nth-child(1){background:#352260}.theme-choice-royal .theme-swatch i:nth-child(2){background:#6d3fc0}.theme-choice-royal .theme-swatch i:nth-child(3){background:#d8b4fe}
.theme-choice-sunset .theme-swatch i:nth-child(1){background:#6d2f24}.theme-choice-sunset .theme-swatch i:nth-child(2){background:#c2522b}.theme-choice-sunset .theme-swatch i:nth-child(3){background:#f6b94a}
.theme-choice-classic .theme-swatch i:nth-child(1){background:#1e293b}.theme-choice-classic .theme-swatch i:nth-child(2){background:#475569}.theme-choice-classic .theme-swatch i:nth-child(3){background:#cbd5e1}
.theme-options{padding-top:1rem;border-top:1px solid #dce7e4}
.preview-welcome{
    color:#fff!important;
    text-shadow:0 1px 3px rgba(0,0,0,.55);
}
@media(max-width:1100px){.theme-choice-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.theme-choice-grid{grid-template-columns:1fr 1fr}.theme-choice{min-height:135px;padding:.8rem}}
@media(max-width:420px){.theme-choice-grid{grid-template-columns:1fr}}
