/* NIVERA UI v1 — existing HTML, controls and permissions remain authoritative. */
@font-face{font-family:'Made Mirage';src:url(fonts/made-mirage.woff2) format('woff2');font-display:swap}
@font-face{font-family:'Proxima Nova';src:url(fonts/proxima-nova.woff2) format('woff2');font-display:swap}
:root{--nv-ocean:#082f49;--nv-primary:#0369a1;--nv-aqua:#0891b2;--nv-ice:#e0f2fe;--nv-surface:#f4f7fa;--nv-white:#fff;--nv-text:#0f172a;--nv-muted:#475569;--nv-border:#dbe5ed;--nv-success:#15803d;--nv-warning:#92400e;--nv-danger:#b91c1c;--nv-radius:16px;--nv-shadow:0 2px 12px rgba(8,47,73,.055);--nv-side:258px;--nv-top:76px}
*,*::before,*::after{box-sizing:border-box}
body.nivera-shell{margin:0;background:var(--nv-surface);color:var(--nv-text);font-family:'Proxima Nova',system-ui,sans-serif;font-size:15px;line-height:1.55;min-height:100vh}
.nivera-shell h1,.nivera-shell h2,.nivera-shell h3{font-family:'Made Mirage','Proxima Nova',system-ui,sans-serif;line-height:1.25;overflow-wrap:anywhere;color:var(--nv-ocean)}
.nivera-shell h1{font-size:clamp(25px,3vw,34px);font-weight:700;letter-spacing:-.025em;margin:0 0 20px}
.nivera-shell h2{font-size:21px;font-weight:650;margin:0 0 16px}.nivera-shell h3{font-size:17px;font-weight:650;margin:0 0 12px}
.nivera-shell p{margin:8px 0;overflow-wrap:anywhere}.nivera-shell a{color:var(--nv-primary);text-underline-offset:3px}.nivera-shell a:hover{text-decoration:underline}
.nivera-shell .nivera-topbar{position:sticky;top:0;z-index:40;background:var(--nv-white);color:var(--nv-ocean);border-bottom:1px solid var(--nv-border);min-height:var(--nv-top);padding:12px 24px;display:flex;gap:10px;align-items:center;flex-wrap:wrap;box-shadow:0 2px 8px #082f4908}
.nivera-shell .nivera-brand-title{display:flex;align-items:center;gap:10px;flex:1;min-width:0;font-weight:750;font-size:18px;line-height:1.3;overflow-wrap:anywhere}
.nivera-brand-title::before{content:'';display:block;flex:none;width:32px;height:38px;background:var(--nv-primary);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 38'%3E%3Cpath d='M16 2C12 9 3 18 3 25a13 13 0 0 0 26 0C29 18 20 9 16 2Z' fill='none' stroke='black' stroke-width='2.5'/%3E%3Cpath d='M5 24c5-5 9 5 15 1 3-2 5-3 8-1' fill='none' stroke='black' stroke-width='2.5'/%3E%3C/svg%3E") center/contain no-repeat}
.nivera-topbar form{margin:0}.nivera-topbar form button,.nivera-topbar #water-install,.nivera-topbar .water-menu{background:var(--nv-ice);color:var(--nv-ocean);border:1px solid #bae6fd;margin:0;padding:8px 12px;min-height:40px;white-space:normal}
.nivera-topbar .water-menu{display:none}.nivera-topbar #water-install[hidden]{display:none!important}
.nivera-topbar .nivera-navigation{position:fixed;top:var(--nv-top);bottom:0;left:0;width:var(--nv-side);display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:4px;padding:18px 12px 26px;background:linear-gradient(165deg,#082f49,#0b3957);overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#3b7188 transparent;box-shadow:4px 0 14px #082f490c}
.nivera-topbar .nivera-navigation a{position:relative;display:flex;align-items:center;gap:12px;min-height:44px;color:#e0f2fe;font-size:14px;font-weight:550;padding:10px 13px;border-radius:10px;line-height:1.3;text-decoration:none;overflow-wrap:anywhere;border:0;transition:background .16s,color .16s}
.nivera-topbar .nivera-navigation a::before{content:'';display:inline-block;width:17px;height:17px;flex:0 0 17px;background:#7dd3fc;mask:var(--nv-icon) center/contain no-repeat;--nv-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='4' y='4' width='16' height='16' rx='3'/%3E%3Cpath d='M8 9h8M8 14h8'/%3E%3C/svg%3E")}
.nivera-topbar .nivera-navigation a.nv-nav-home::before{--nv-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E")}
.nivera-topbar .nivera-navigation a.nv-nav-customer::before{--nv-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E")}
.nivera-topbar .nivera-navigation a.nv-nav-delivery::before{--nv-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 5h12v13H3zM15 9h4l3 4v5h-7'/%3E%3Ccircle cx='7' cy='18' r='2' fill='white'/%3E%3Ccircle cx='18' cy='18' r='2' fill='white'/%3E%3C/svg%3E")}
.nivera-topbar .nivera-navigation a.nv-nav-inventory::before{--nv-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 7l9-4 9 4v10l-9 4-9-4zM3 7l9 4 9-4M12 11v10'/%3E%3C/svg%3E")}
.nivera-topbar .nivera-navigation a.nv-nav-report::before{--nv-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M3 3v18h18M7 17v-5M12 17V8M17 17V5'/%3E%3C/svg%3E")}
.nivera-topbar .nivera-navigation a.nv-nav-finance::before,.nivera-topbar .nivera-navigation a.nv-nav-sale::before{--nv-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M3 10h18M7 15h5'/%3E%3C/svg%3E")}
.nivera-topbar .nivera-navigation a:hover,.nivera-topbar .nivera-navigation a:focus-visible,.nivera-topbar .nivera-navigation a[aria-current=page]{background:#075985;color:#fff}
.nivera-shell .nivera-main{max-width:1500px;min-width:0;margin:0 auto;padding:clamp(18px,3vw,36px)}
.nivera-shell:has(.nivera-navigation) .nivera-main{margin-left:var(--nv-side);margin-right:0;width:calc(100% - var(--nv-side));max-width:none}
.nivera-shell .panel{background:#fff;border:1px solid var(--nv-border);border-radius:var(--nv-radius);padding:clamp(15px,2.2vw,24px);margin:16px 0;box-shadow:var(--nv-shadow);min-width:0;max-width:100%}
.nivera-shell .panel[role=status]{border-left:4px solid var(--nv-success);background:#f0fdf4;color:#166534}.nivera-shell .panel[role=alert]{border-left:4px solid var(--nv-danger);background:#fef2f2}.nivera-shell .error{color:var(--nv-danger)}.nivera-shell .muted{color:var(--nv-muted)}
.nivera-shell .fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:18px;align-items:start}.nivera-shell .fields>*{min-width:0}.nivera-shell .inline{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.nivera-shell label{font-weight:600;display:block;color:#233e53;line-height:1.4;overflow-wrap:anywhere}
.nivera-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.nivera-shell select,.nivera-shell textarea{font:inherit;font-weight:400;min-height:44px;border:1px solid #bfcfdd!important;border-radius:10px!important;padding:10px 12px!important;width:100%;background:#fff;color:var(--nv-text);box-shadow:none;transition:border-color .16s,box-shadow .16s;max-width:100%}
.nivera-shell label>input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.nivera-shell label>select,.nivera-shell label>textarea{margin-top:7px}.nivera-shell textarea{min-height:96px;resize:vertical}.nivera-shell input[type=checkbox],.nivera-shell input[type=radio]{width:18px;height:18px;padding:0!important;vertical-align:middle;accent-color:var(--nv-primary)}
.nivera-shell input[readonly],.nivera-shell input:disabled,.nivera-shell select:disabled,.nivera-shell textarea:disabled{background:#f1f5f9;color:#64748b}.nivera-shell [aria-invalid=true]{border-color:var(--nv-danger)!important}
.nivera-shell button,.nivera-shell .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--nv-primary);color:#fff;border:1px solid transparent;min-height:44px;border-radius:10px;padding:10px 16px;margin:5px 0;font:inherit;font-weight:650;line-height:1.3;text-align:center;white-space:normal;cursor:pointer;text-decoration:none;transition:background .16s,box-shadow .16s;max-width:100%;overflow-wrap:anywhere}
.nivera-shell button:hover:not(:disabled),.nivera-shell .btn:hover{background:var(--nv-ocean);color:#fff;box-shadow:0 3px 12px #082f491a;text-decoration:none}.nivera-shell button:disabled,.nivera-shell [aria-disabled=true]{opacity:.58;cursor:not-allowed}.nivera-shell button:focus-visible,.nivera-shell a:focus-visible,.nivera-shell input:focus-visible,.nivera-shell select:focus-visible,.nivera-shell textarea:focus-visible{outline:3px solid #38bdf8;outline-offset:2px}
.nivera-shell table{width:100%;border-collapse:separate;border-spacing:0;font-size:14px;line-height:1.45;min-width:0}.nivera-shell th,.nivera-shell td{padding:12px 13px;border-bottom:1px solid #e6edf3;vertical-align:top;text-align:left;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.nivera-shell th{background:#edf4f8;color:var(--nv-ocean);font-weight:700;position:sticky;top:0;z-index:1}.nivera-shell tr:hover td{background:#f8fbfd}.nivera-shell table a{font-weight:600}.nivera-shell table form{margin:0}.nivera-shell table button{min-height:40px;font-size:13px;padding:7px 10px}.nivera-shell .scroll,.nivera-shell .panel:has(>table){overflow-x:auto;max-width:100%;overscroll-behavior-inline:contain}.nivera-shell img{max-width:100%;height:auto}
.nivera-shell .report-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,205px),1fr));gap:16px;margin:18px 0}.nivera-shell .metric{margin:0;min-height:124px;position:relative;border-top:3px solid var(--nv-aqua);font-weight:600;color:var(--nv-muted);overflow:hidden}.nivera-shell .metric strong{display:block;font-size:clamp(20px,2.4vw,29px);font-weight:750;color:var(--nv-ocean);margin-top:12px;letter-spacing:-.035em;line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.nivera-shell .danger-panel{border-left:4px solid var(--nv-danger);background:#fffafa}.nivera-shell .bar{height:10px;background:#e0f2fe;border-radius:99px;overflow:hidden}.nivera-shell .bar span{display:block;height:100%;background:linear-gradient(90deg,#0369a1,#0891b2);border-radius:99px}.nivera-shell .nv-periods .btn{background:#e0f2fe;color:#075985}.nivera-shell .nv-periods .btn:hover{background:#075985;color:#fff}.nivera-shell .nv-trend-row{grid-template-columns:minmax(74px,100px) minmax(24px,1fr) minmax(72px,125px)!important;font-variant-numeric:tabular-nums}
.nivera-shell .nv-pos-split{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:18px;margin-top:22px;align-items:start}.nivera-shell .nv-pos-row{margin:0 0 12px;background:#f8fbfd;box-shadow:none;grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr));gap:12px;padding:16px}.nivera-shell .nv-pos-summary{position:sticky;top:calc(var(--nv-top) + 18px);border:1px solid #bae6fd;border-radius:16px;padding:20px;background:#f0f9ff}.nivera-shell .nv-pos-summary h2{font-size:24px;overflow-wrap:anywhere}.nivera-shell .nv-pos-summary .fields{grid-template-columns:minmax(0,1fr);gap:12px}.nivera-shell .nv-pos-submit{width:100%;margin-top:18px;min-width:0!important;min-height:50px}.nivera-shell .nv-pos-items{min-width:0}
@media(min-width:901px){.nivera-shell .nivera-topbar{height:var(--nv-top);flex-wrap:nowrap}.nivera-shell .nivera-brand-title{font-size:17px}.nivera-shell:has(.nivera-navigation) .nivera-brand-title{padding-right:10px}}
@media(max-width:900px){:root{--nv-top:68px}.nivera-shell .nivera-topbar{padding:10px 14px;min-height:var(--nv-top);gap:8px}.nivera-shell .nivera-brand-title{font-size:15px;min-width:110px}.nivera-topbar .water-menu{display:inline-flex}.nivera-topbar .nivera-navigation{position:static;display:none;flex-basis:100%;width:100%;max-height:52vh;border-radius:12px;padding:10px;order:10;box-shadow:none}.nivera-topbar .nivera-navigation.open{display:flex}.nivera-shell:has(.nivera-navigation) .nivera-main{margin:0;width:100%;padding:18px 14px}.nivera-shell .nivera-main{padding:18px 14px}.nivera-shell .nv-pos-split{grid-template-columns:minmax(0,1fr)}.nivera-shell .nv-pos-summary{position:static}.nivera-shell .scroll table,.nivera-shell .panel:has(>table)>table{min-width:480px}.nivera-shell input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.nivera-shell select,.nivera-shell textarea{font-size:16px!important}}
@media(max-width:480px){.nivera-shell .fields,.nivera-shell .report-grid{grid-template-columns:minmax(0,1fr)}.nivera-shell .nivera-topbar{position:relative}.nivera-shell .nivera-brand-title{flex-basis:100%;min-width:0}.nivera-shell .nivera-topbar button{font-size:13px}.nivera-shell .nv-trend-row{grid-template-columns:74px minmax(20px,1fr) 74px!important;font-size:12px}.nivera-shell .panel{padding:15px}.nivera-shell .nivera-main{padding-bottom:calc(20px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.nivera-shell *, .nivera-shell *::before,.nivera-shell *::after{transition:none!important;scroll-behavior:auto!important}}
@media print{.nivera-shell .nivera-topbar{display:none!important}.nivera-shell .nivera-main{margin:0!important;width:100%!important;max-width:none;padding:0!important}.nivera-shell{background:#fff!important;color:#000!important}.nivera-shell .panel{box-shadow:none;border:1px solid #ccc}.nivera-shell .scroll{overflow:visible}.nivera-shell table{min-width:0!important}.nivera-shell th{position:static}.nivera-shell tr{break-inside:avoid}}
