:root{--green:#087c60;--green-dark:#05614b;--mint:#e6f5ee;--ink:#19364a;--muted:#617581;--line:#dde6e9;--bg:#f3f6f8;--white:#fff;--amber:#94600c;--red:#bd453b;--shadow:0 5px 20px rgba(26,58,77,.045);--blue:#236786;--navy:#163d55}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--ink);font-family:'Segoe UI',system-ui,-apple-system,sans-serif;font-size:15px}
button,input,select{font:inherit}
button{cursor:pointer}
a{color:inherit;text-decoration:none}
h1,h2,p{margin-top:0}
h1,h2{font-family:'Segoe UI',system-ui,sans-serif;letter-spacing:-.035em}
h1{font-size:clamp(1.85rem,3.4vw,2.55rem);margin:6px 0}
h2{font-size:1.18rem;margin:0 0 20px}
small{font-size:.77rem}
.app-shell{display:flex;min-height:100vh}
.sidebar{width:246px;flex:none;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:26px 14px 18px;position:sticky;top:0;height:100vh}
.brand{display:flex;align-items:center;gap:11px;padding:2px 14px 26px;font-family:'Segoe UI',system-ui,sans-serif;font-size:21px;font-weight:800;letter-spacing:-.06em}
.brand-mark{width:35px;height:35px;display:grid;place-items:center;border-radius:11px;background:linear-gradient(145deg,#0c79a4,#0e6847);color:white;font-size:12px;letter-spacing:-.07em}
.brand-green{color:#1d9e55}
.brand small{display:block;font-family:'Segoe UI',system-ui,sans-serif;font-size:10px;font-weight:600;letter-spacing:.025em;color:var(--muted)}
.sidebar nav{display:grid;gap:4px}
.sidebar nav a{min-height:45px;display:flex;align-items:center;gap:13px;padding:0 14px;border-radius:10px;color:#53635c;font-weight:650;font-size:13px}
.sidebar nav a span{font-size:20px;width:21px;text-align:center;font-weight:400}
.sidebar nav a:hover,.sidebar nav a.selected{background:var(--mint);color:var(--green-dark)}
.sidebar-bottom{margin-top:auto;padding:16px 14px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:8px;font-size:12px;color:var(--muted)}
.text-button{background:none;border:0;padding:0;color:var(--green);font-weight:700}
.main-wrap{flex:1;min-width:0}
.topbar{height:72px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:flex-end;gap:18px;padding:0 40px;color:var(--muted);font-size:12px;text-transform:capitalize}
.user-chip{background:#eff3ef;padding:8px 12px;border-radius:40px;color:var(--ink);font-weight:700}
.mobile-brand{display:none}
.main-content{max-width:1320px;padding:40px;margin:auto}
.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}
.page-heading p{color:var(--muted);margin:6px 0 0}
.eyebrow{color:var(--green);font-size:11px;font-weight:800;letter-spacing:.14em}
.button{border:1px solid transparent;border-radius:11px;min-height:46px;padding:10px 18px;display:inline-flex;align-items:center;justify-content:center;gap:10px;font-weight:750;font-size:13px;white-space:nowrap}
.button.primary{background:var(--green);color:white;box-shadow:0 5px 15px rgba(14,104,71,.15)}
.button.primary:hover{background:var(--green-dark)}
.button.soft{background:var(--mint);color:var(--green)}
.button.danger{background:#fcebe9;color:#a5382f}
.button:disabled{opacity:.5;cursor:not-allowed}
.wide{width:100%}
.text-link,.panel-title a,.hint a{color:var(--green);font-weight:750;font-size:13px}
.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;margin-bottom:23px}
.metric-card{background:#fff;border:1px solid var(--line);border-radius:17px;padding:24px;box-shadow:var(--shadow);display:grid;gap:6px}
.metric-card span{color:var(--muted);font-size:13px;font-weight:650}
.metric-card strong{font-family:'Segoe UI',system-ui,sans-serif;font-size:clamp(1.45rem,2vw,2rem);letter-spacing:-.055em}
.metric-card small{color:var(--muted)}
.metric-card.highlight{background:#0f6848;color:#fff}
.metric-card.highlight span,.metric-card.highlight small{color:#d3eadd}
.two-col{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin-bottom:20px}
.align-start{align-items:start}
.panel{background:#fff;border:1px solid var(--line);border-radius:17px;padding:24px;margin-bottom:20px;box-shadow:var(--shadow)}
.panel-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.panel-title h2{margin:0}
.list-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-top:1px solid #edf1ed}
.list-row:first-of-type{border-top:0}
.list-row>div{flex:1;min-width:0}
.list-row strong,.list-row small{display:block;overflow-wrap:anywhere}
.list-row strong{font-size:13px}
.list-row small{color:var(--muted);margin-top:4px}
.list-row b{font-size:13px;white-space:nowrap}
.link-row:hover{color:var(--green)}
.round-icon{width:36px;height:36px;border-radius:11px;background:var(--mint);display:grid;place-items:center;color:var(--green);font-weight:800;flex:none}
.status-dot{width:9px;height:9px;border-radius:50%;flex:none}
.status-dot.amber{background:#e4a23b}
.status-dot.red{background:#e07065}
.status-dot.blue{background:#7b9ec9}
.empty-small{padding:18px 0;color:var(--muted);font-size:13px}
.quick-links{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.quick-links a{background:white;border:1px solid var(--line);padding:18px;border-radius:12px;display:flex;align-items:center;gap:10px;color:var(--green);font-weight:750}
.quick-links span{color:var(--ink)}
.notice{border-radius:12px;padding:12px 16px;margin-bottom:20px;font-size:13px}
.notice.success{background:#e7f6ec;color:#176a3a}
.notice.error{background:#fff0ed;color:#ad362c}
.notice ul{margin:6px 0 0;padding-left:18px}
.stack{display:grid;gap:15px}
.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;gap:17px}
.form-grid button{justify-self:start}
.form-details summary{font-weight:800;cursor:pointer;list-style:none}
.form-details summary::before{content:'＋';margin-right:8px;color:var(--green)}
.form-details[open] summary{margin-bottom:22px}
.form-details summary::-webkit-details-marker{display:none}
label{display:grid;gap:7px;font-size:12px;font-weight:750;color:#38515f}
label small{color:var(--muted);font-weight:400}
input,select{width:100%;min-height:46px;padding:10px 12px;border:1px solid #d9e3db;border-radius:9px;background:#fff;color:var(--ink);outline:none}
input:focus,select:focus{border-color:var(--green);box-shadow:0 0 0 3px #d9eee0}
.checkbox{display:flex;align-items:center;gap:8px}
.checkbox input{width:18px;min-height:auto;height:18px}
.hint,.muted{color:var(--muted);font-size:13px;line-height:1.55}
.hint{margin-top:18px}
.pill{border-radius:30px;background:#f0f4f0;padding:5px 10px;color:var(--muted);font-size:11px;font-weight:700}
.filter-input{margin:0 0 10px}
.product-row{border-top:1px solid var(--line)}
.product-row summary{display:flex;align-items:center;gap:12px;cursor:pointer;padding:15px 0;list-style:none}
.product-row summary::-webkit-details-marker{display:none}
.product-row summary::after{content:'⌄';margin-left:6px;color:var(--muted)}
.row-main{flex:1;min-width:0}
.row-main strong,.row-main small{display:block}
.row-main small{margin-top:4px;color:var(--muted)}
.row-stock{font-size:12px;font-weight:800;white-space:nowrap}
.row-stock.low{color:var(--amber)}
.inner-form{background:#f8faf8;padding:18px;border-radius:11px;margin-bottom:14px}
.narrow{max-width:720px}
.sell-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(310px,.9fr);gap:20px;align-items:start}
.sell-catalog,.cart-panel{min-height:400px}
.search-line{display:flex;gap:10px;margin-bottom:28px}
.search-line input{flex:1}
.product-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.product-tile{position:relative;display:grid;gap:5px;justify-items:start;text-align:left;background:#fff;border:1px solid var(--line);border-radius:12px;padding:15px;min-height:128px}
.product-tile:hover{border-color:var(--green);background:#fafefa}
.tile-icon{height:30px;width:30px;background:var(--mint);color:var(--green);border-radius:9px;display:grid;place-items:center;font-weight:800}
.product-tile strong{font-size:12px}
.product-tile small{color:var(--muted)}
.product-tile em{position:absolute;right:8px;top:8px;font-style:normal;color:var(--green);font-size:9px}
.cart-panel{position:sticky;top:15px}
.cart-items{min-height:70px;max-height:400px;overflow:auto}
.cart-item{display:grid;grid-template-columns:minmax(0,1fr) 85px 64px 24px;gap:7px;align-items:center;border-top:1px solid var(--line);padding:10px 0;font-size:12px}
.cart-item strong{display:block}
.cart-item small{display:block;color:var(--muted)}
.cart-item input{padding:6px;min-height:36px}
.cart-item .remove{border:0;background:none;color:var(--red);font-size:22px}
.cart-total{display:flex;justify-content:space-between;align-items:center;padding:20px 0;border-top:1px solid var(--line);font-weight:750}
.cart-total strong{font-size:23px;font-family:'Segoe UI',system-ui,sans-serif}
.receipt-heading,.big-due{display:grid;gap:4px;background:var(--mint);border-radius:12px;padding:19px;margin-bottom:12px}
.receipt-heading strong,.big-due strong{font-size:27px;letter-spacing:-.06em;color:var(--green)}
.receipt-foot{padding:18px 0;border-top:1px solid var(--line)}
.receipt-foot p{display:flex;justify-content:space-between;margin:8px 0}
.actions{display:flex;gap:12px;align-items:start;flex-wrap:wrap}
.actions details summary{color:var(--red);cursor:pointer;margin:10px}
.actions details form{padding:12px;border:1px solid var(--line);border-radius:10px}
.period-form{display:flex;align-items:end;justify-content:space-between;gap:14px;margin-bottom:5px}
.period-form label{max-width:200px}
.tabs{display:flex;gap:4px;padding:4px;background:#edf2ed;border-radius:10px}
.tabs a{padding:9px 16px;border-radius:8px;font-weight:750;font-size:13px;color:var(--muted)}
.tabs a.active{background:#fff;color:var(--green);box-shadow:0 2px 6px #cad8ca}
.period-caption{color:var(--muted);font-size:12px;margin:14px 0 20px}
.report-grid{grid-template-columns:repeat(3,1fr)}
.bar-row{display:flex;align-items:center;gap:10px;margin:12px 0;font-size:12px}
.bar-row span{width:42px}
.bar-row b{width:85px;text-align:right}
.bar-track{height:12px;background:#edf4ed;border-radius:20px;flex:1;overflow:hidden}
.bar-track div{height:100%;background:#30a66e;border-radius:20px}
.more-menu,.mobile-nav{display:none}
.login-shell{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}
.login-hero{background:#061b30;display:flex;flex-direction:column;justify-content:center;padding:60px}
.login-hero img{width:100%;max-width:620px;display:block}
.login-hero p{margin:0 auto;color:#e6efeb;font-size:22px;line-height:1.5}
.login-hero strong{color:#75d898}
.login-panel{display:grid;place-items:center;padding:30px}
.login-card{width:min(420px,100%)}
.login-card h1{margin:12px 0}
.login-card .muted{margin-bottom:30px}
.login-card .stack{gap:20px}
.login-foot{font-size:12px;color:var(--muted);text-align:center;margin-top:34px}
@media(max-width:1080px){.sidebar{width:210px}
.main-content{padding:30px}
.product-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:760px){.sidebar{display:none}
.main-content{padding:23px 16px 95px}
.topbar{height:57px;padding:0 17px;justify-content:space-between}
.mobile-brand{display:block;color:#114469;font-weight:800;font-size:17px}
.mobile-brand b{color:#209d54}
.topbar .user-chip{display:none}
.page-heading{align-items:start}
.page-heading .button{padding:9px 12px}
.metric-grid{gap:9px}
.metric-card{padding:17px}
.metric-card strong{font-size:1.35rem}
.two-col,.sell-layout{grid-template-columns:1fr}
.quick-links{grid-template-columns:1fr}
.cart-panel{position:static}
.mobile-nav{display:flex;position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--line);z-index:10;justify-content:space-around;padding:8px 3px max(8px,env(safe-area-inset-bottom));box-shadow:0 -4px 16px #163d1912}
.mobile-nav a,.mobile-nav button{display:grid;justify-items:center;gap:1px;min-width:55px;border:0;background:none;font-size:10px;color:#78877e;font-weight:700}
.mobile-nav span{font-size:23px;line-height:1.15}
.mobile-nav .selected{color:var(--green)}
.mobile-nav .mobile-sell{color:var(--green)}
.mobile-nav .mobile-sell span{background:var(--green);color:#fff;border-radius:14px;width:38px;height:38px;display:grid;place-items:center;margin-top:-20px;box-shadow:0 4px 14px #0e684744}
.more-menu:not([hidden]){display:grid;position:fixed;bottom:65px;right:10px;background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:0 14px 35px #0002;z-index:11;padding:8px;min-width:200px}
.more-menu a,.more-menu button{display:block;width:100%;padding:10px;background:none;border:0;text-align:left;font-size:13px;color:var(--ink)}
.report-grid{grid-template-columns:repeat(2,1fr)}
.login-shell{grid-template-columns:1fr}
.login-hero{display:none}
}
@media(max-width:480px){.metric-grid{grid-template-columns:repeat(2,1fr)}
.metric-grid .metric-card:last-child{grid-column:span 2}
.report-grid .metric-card:last-child{grid-column:auto}
.panel{padding:18px}
.product-grid{grid-template-columns:repeat(2,1fr)}
.form-grid{grid-template-columns:1fr}
.period-form{align-items:start;flex-direction:column}
.period-form label{max-width:none;width:100%}
.page-heading{flex-wrap:wrap}
.page-heading h1{font-size:1.9rem}
.login-panel{padding:20px}
.cart-item{grid-template-columns:minmax(0,1fr) 72px 54px 22px}
}
@media print{.sidebar,.topbar,.mobile-nav,.more-menu,.button,.actions,.page-heading>a{display:none!important}
.main-content{padding:0}
.panel{box-shadow:none;border:0}
}
.sale-jump{display:none}
.comparison{display:inline-block;background:#e9f6ee;color:#0e6847;border-radius:9px;padding:9px 12px;font-size:12px;font-weight:700;margin:0 0 18px}
.new-customer{border-top:1px solid #e2e9e4;margin-top:18px;padding-top:18px}
.new-customer summary{color:#0e6847;font-size:13px;font-weight:750;cursor:pointer}
.new-customer form{margin-top:15px}
.price-history{display:grid;gap:5px;margin:0 0 16px 6px}
.price-history strong{font-size:12px}
.price-history small{color:#6e7d77}
.inventory-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:480px){.inventory-metrics{grid-template-columns:1fr}
.inventory-metrics .metric-card:last-child{grid-column:auto}
}
@media(max-width:760px){.sell-catalog,.cart-panel{min-height:0}
.sale-jump:not([hidden]){display:flex;align-items:center;justify-content:space-between;gap:12px;position:fixed;left:16px;right:16px;bottom:77px;z-index:9;border:0;background:#0e6847;color:white;border-radius:12px;padding:12px 16px;box-shadow:0 8px 24px #0e68474d;font-weight:800}
.sale-jump strong{margin-left:auto}
.main-content:has(#sale-app){padding-bottom:155px}
}

/* Brand and shared interaction */
.icon { width: 21px; height: 21px; flex: none; vertical-align: middle; }
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; }
.brand-symbol { display: block; width: 44px; height: 44px; flex: none; }
.brand-type { color: var(--navy); font-size: 23px; line-height: 1.1; font-weight: 800; letter-spacing: -.9px; }
.brand-type > span { color: var(--green); }
.brand-type small { display: block; font-size: 10px; font-weight: 500; letter-spacing: .45px; margin-top: 6px; color: var(--muted); }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
a, button { transition: background .18s, border-color .18s, box-shadow .18s, transform .18s; }
:focus-visible { outline: 3px solid #2d8bad; outline-offset: 4px; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px #087c6018; }
[hidden] { display: none !important; }
h1, h2 { font-weight: 750; }
h1 { line-height: 1.18; }
.button { font-size: 13px; border-radius: 12px; }
.button.primary { background: var(--green); box-shadow: 0 4px 10px #087c601b; }
.button.primary:hover { background: var(--green-dark); box-shadow: 0 6px 18px #087c602a; }
.button.soft { border-color: #cce7dc; }
.button.soft:hover { background: #d4eddf; }
.button .icon { width: 19px; height: 19px; }
input, select { border-color: #cddbe1; border-radius: 10px; }
input::placeholder { color: #7d8d98; font-weight: 400; }
label { font-size: 13px; }
.eyebrow { font-size: 10px; letter-spacing: .15em; }

/* Navigation */
.sidebar { width: 252px; padding: 28px 16px 14px; border-right-color: #e0e8eb; }
.brand { padding: 0 5px 32px; }
.nav-caption { font-size: 9px; font-weight: 800; letter-spacing: 1.7px; color: #71818c; margin: 0 14px 14px; }
.sidebar nav { gap: 5px; }
.sidebar nav a { min-height: 46px; padding: 0 13px; font-size: 13px; color: #5a6f7d; position: relative; }
.sidebar nav a .icon { width: 20px; height: 20px; opacity: .85; }
.sidebar nav a:hover { background: #f0f6f5; color: var(--green); }
.sidebar nav a.selected { color: #fff; background: var(--navy); box-shadow: 0 4px 10px #163d5518; }
.sidebar nav a.selected::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #8fe1bd; position: absolute; right: 14px; }
.sidebar-note { margin: auto 4px 21px; padding: 17px; border: 1px solid #d6eade; background: linear-gradient(135deg,#eef8f0,#e6f4f0); border-radius: 15px; display: grid; gap: 9px; color: var(--green); }
.sidebar-note > .icon { margin-bottom: 3px; }
.sidebar-note strong { font-size: 12px; }
.sidebar-note span { font-size: 11px; line-height: 1.6; color: #56776b; }
.sidebar-note b { float: right; }
.sidebar-bottom { margin-top: 0; align-items: center; padding: 14px 10px 0; min-height: 44px; }
.topbar { height: 76px; padding: 0 36px; gap: 22px; background: #ffffffdd; }
.topbar-label { margin-right: auto; display: flex; align-items: center; gap: 8px; color: #536f7d; text-transform: none; font-size: 12px; }
.live-dot { display: inline-block; height: 7px; width: 7px; border-radius: 50%; background: #61c19a; box-shadow: 0 0 0 4px #61c19a15; flex: none; }
.user-chip { display: inline-flex; align-items: center; gap: 9px; padding: 0; background: none; }
.avatar { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; color: #976519; background: #fff0cd; font-size: 13px; }
.main-content { padding: 32px 36px 40px; }
.page-heading { margin-bottom: 28px; }
.page-heading:not(.home-heading) { padding-bottom: 23px; border-bottom: 1px solid var(--line); }
.page-heading:not(.home-heading) .eyebrow { display: flex; align-items: center; gap: 8px; }
.page-heading:not(.home-heading) .eyebrow::before { content: ''; width: 17px; height: 3px; background: #28a17d; border-radius: 3px; }
.page-heading p { font-size: 14px; line-height: 1.5; }

/* Today */
.home-heading { position: relative; isolation: isolate; overflow: hidden; padding: 30px 32px; min-height: 164px; border-radius: 21px; background: var(--navy); color: #fff; box-shadow: 0 8px 24px #163d5510; }
.home-heading::before { content: ''; position: absolute; z-index: -1; width: 320px; height: 320px; right: -75px; top: -165px; border: 45px solid #87cdb212; border-radius: 50%; }
.home-heading::after { content: ''; position: absolute; z-index: -1; width: 260px; height: 260px; right: 95px; bottom: -225px; border: 38px solid #87cdb21a; border-radius: 50%; }
.home-heading .eyebrow { color: #92dfbe; font-size: 9px; }
.home-heading h1 { font-size: clamp(1.85rem,2.8vw,2.5rem); margin-top: 10px; }
.home-heading p { color: #c1d6df; font-size: 13px; }
.home-heading .button { background: #a3e4c3; color: #123f36; box-shadow: none; padding: 13px 20px; }
.home-heading .button:hover { background: #c3f1d9; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 14px; }
.section-heading h2 { font-size: 15px; margin: 0; letter-spacing: -.3px; }
.section-heading > span { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.section-heading .icon { width: 14px; height: 14px; }
.metric-card { position: relative; overflow: hidden; border-radius: 16px; gap: 8px; padding: 21px 23px; border-top: 3px solid #b9d9e7; }
.metric-card:nth-child(3n+2) { border-top-color: #a2d8bf; }
.metric-card:nth-child(3n+3) { border-top-color: #edd097; }
.metric-card strong { font-variant-numeric: tabular-nums; font-size: clamp(1.6rem,2.3vw,2rem); font-weight: 750; letter-spacing: -.8px; }
.metric-card span { color: #476575; }
.metric-card small { color: #617681; font-size: 11px; }
.metric-card.highlight { background: var(--navy); border-color: var(--navy); }
.metric-card.highlight small, .metric-card.highlight span { color: #c1dfd5; }
.metric-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label .metric-icon { width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; background: #deedf5; color: #236786; }
.metric-collected .metric-label .metric-icon { background: #dbf0e4; color: #087c60; }
.metric-due .metric-label .metric-icon { background: #ffedc8; color: #936116; }
.home-metrics .metric-sales { background: linear-gradient(115deg,#fff,#f1f8fc); border: 1px solid #d7e5ef; }
.home-metrics .metric-collected { background: linear-gradient(115deg,#fff,#eff8f3); border: 1px solid #d3e8dc; }
.home-metrics .metric-due { background: linear-gradient(115deg,#fff,#fff8ea); border: 1px solid #eee0c8; }
.home-metrics .metric-card strong { margin-top: 0; }
.panel { border-radius: 17px; border-color: #e0e8ec; padding: 23px; }
.panel-title { margin-bottom: 17px; }
.panel-title h2 { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.panel-title a { font-size: 11px; white-space: nowrap; }
.title-icon { width: 31px; height: 31px; display: grid; place-items: center; background: #eaf2f7; color: #2d6a8b; border-radius: 10px; }
.title-icon .icon { width: 17px; height: 17px; }
.title-icon.amber { color: #95671f; background: #fff1d8; }
.two-col { gap: 20px; margin-bottom: 0; }
.list-row { padding: 16px 0; border-color: #edf1f3; }
.status-dot { box-shadow: 0 0 0 5px #e4a23b13; margin: 0 5px; }
.status-dot.red { box-shadow: 0 0 0 5px #e0706513; }
.empty-state { display: flex; align-items: center; flex-direction: column; text-align: center; padding: 20px 12px 24px; font-size: 12px; line-height: 1.7; }
.empty-state strong { margin-bottom: 3px; color: #3d5c6d; font-weight: 650; font-size: 13px; }
.empty-illustration { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 16px; color: #2c9771; background: #e8f4ed; margin-bottom: 13px; transform: rotate(-6deg); }
.empty-illustration .icon { transform: rotate(6deg); }
.empty-illustration.blue { background: #eaf2f7; color: #387693; }
.quick-links a { padding: 19px 16px; border-radius: 15px; gap: 12px; font-size: 12px; }
.quick-links a:hover { border-color: #a5cbbd; box-shadow: 0 4px 16px #19364a09; transform: translateY(-2px); }
.quick-links a > .icon:last-child { width: 16px; margin-left: auto; color: #738a97; }
.quick-links .quick-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #e6f4ed; color: #197d61; flex: none; }
.quick-links a:nth-child(2) .quick-icon { background: #fff0d9; color: #a3752d; }
.quick-links a:nth-child(3) .quick-icon { background: #eaf0fc; color: #5976ac; }
.quick-links small { display: block; color: var(--muted); font-size: 10px; font-weight: 400; margin-top: 4px; }

/* Sales, forms and business screens */
.form-details { border-left: 3px solid #67b99b; }
.form-details summary { color: var(--green-dark); font-size: 14px; }
.form-details:not([open]) { background: linear-gradient(100deg,#f4fbf7,#fff 70%); }
.form-grid { gap: 20px; }
.inner-form { background: #f3f7f9; }
.pill { background: #eaf1f6; color: #44697f; }
.round-icon { background: #e8f3ef; color: #21755e; }
.product-row summary { min-height: 73px; }
.product-row[open] summary { color: var(--green); }
.product-row:hover { background: #fbfdfd; }
.sell-catalog { min-height: 425px; }
.search-line input { background: #f5f8fa; }
.product-tile { min-height: 157px; padding: 17px 14px; gap: 9px; border-color: #dbe6e9; background: linear-gradient(150deg,#f8fcfa,#fff 65%); }
.product-tile:hover { border-color: #55a68d; box-shadow: 0 5px 14px #163d550c; transform: translateY(-2px); }
.product-tile:active { transform: scale(.98); }
.tile-icon { width: 40px; height: 40px; border-radius: 12px; background: #e4f1e9; color: #268163; font-size: 18px; margin: 4px 0; }
.product-tile:nth-child(3n+2) { background: linear-gradient(150deg,#fffaf0,#fff 65%); }
.product-tile:nth-child(3n+2) .tile-icon { background: #fcf0d7; color: #9b722e; }
.product-tile:nth-child(3n) { background: linear-gradient(150deg,#f2f7fd,#fff 65%); }
.product-tile:nth-child(3n) .tile-icon { background: #e7effa; color: #4b75a1; }
.product-tile strong { font-size: 13px; line-height: 1.4; }
.product-tile small { font-size: 11px; color: #4d6778; }
.product-tile em { top: 10px; right: 9px; color: #79602c; font-size: 8px; }
.cart-panel { border-top: 3px solid #36a17d; }
.cart-panel .panel-title h2 > .icon { color: var(--green); }
.cart-items > .empty-small { padding: 22px 16px; border: 1px dashed #cddfe2; border-radius: 12px; background: #f7fafb; text-align: center; margin-bottom: 14px; font-size: 12px; }
.cart-total { padding: 18px 14px; background: #eaf5ef; border: 0; border-radius: 12px; margin: 15px 0 20px; color: var(--green-dark); }
.cart-total strong { letter-spacing: -.8px; }
.cart-panel .hint { margin: 0; background: #f6f8fa; padding: 12px; border-radius: 9px; font-size: 11px; }
.receipt-heading, .big-due { background: linear-gradient(110deg,#e3f3ec,#f3faf6); padding: 23px; }
.tabs { background: #e4ecf0; }
.tabs a.active { background: var(--navy); color: #fff; box-shadow: 0 3px 7px #163d551a; }
.bar-track { background: #edf3f6; height: 14px; }
.bar-track div { background: linear-gradient(90deg,#26848a,#54ba95); }
.new-customer summary { color: var(--green); }
.sale-jump:not([hidden]) { background: var(--navy); }

/* Welcome screen */
.login-shell { grid-template-columns: 1.08fr 1fr; background: #fbfcfa; }
.login-hero { position: relative; overflow: hidden; padding: 38px 48px 25px; background: radial-gradient(ellipse at 90% 55%,#235b66 0,transparent 60%),#14384f; display: flex; justify-content: space-between; min-height: 100svh; }
.login-brand { position: relative; z-index: 1; align-self: flex-start; }
.login-brand .brand-type { color: #fff; font-size: 26px; }
.login-brand .brand-type > span { color: #91dcba; }
.login-brand .brand-type small { color: #b3ced6; }
.login-brand .brand-symbol { width: 49px; height: 49px; }
.login-story { width: 100%; max-width: 570px; margin: 46px auto 30px; }
.hero-kicker { display: flex; align-items: center; gap: 10px; color: #b5dccd; font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.login-story h2 { margin: 20px 0; color: #fff; font-size: clamp(32px,3.2vw,49px); line-height: 1.15; letter-spacing: -1.8px; }
.login-story h2 span { color: #95dfbc; }
.login-story > p { font-size: 14px; color: #bbd3dc; line-height: 1.8; margin: 0; }
.login-hero .shop-illustration { max-width: 490px; width: 100%; height: auto; margin: 0 auto 8px; }
.login-benefits { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; border-top: 1px solid #ffffff1a; padding-top: 23px; }
.login-benefits span { display: flex; gap: 6px; align-items: center; color: #d3e6e7; font-size: 10px; }
.login-benefits .icon { width: 14px; height: 14px; color: #95dfbc; }
.login-hero .hero-foot { color: #91b3c0; font-size: 10px; margin: 0; }
.login-panel { padding: 55px; position: relative; }
.login-card { max-width: 370px; }
.welcome-icon { width: 52px; height: 52px; background: #e5f2e9; border: 1px solid #d6e8dd; color: #208461; border-radius: 17px; display: grid; place-items: center; margin-bottom: 27px; }
.welcome-icon .icon { width: 25px; height: 25px; }
.login-card .eyebrow { font-size: 9px; }
.login-card h1 { font-size: clamp(27px,2.5vw,36px); letter-spacing: -1.2px; margin: 10px 0 14px; }
.login-card .muted { line-height: 1.8; margin-bottom: 30px; font-size: 13px; }
.login-card input { min-height: 51px; background: #fff; font-size: 13px; padding: 12px 15px; }
.login-card .button { min-height: 52px; justify-content: space-between; margin-top: 5px; padding: 12px 19px; }
.login-foot { border-top: 1px solid var(--line); padding-top: 23px; margin-top: 27px; font-size: 11px; }
.login-bottom { position: absolute; bottom: 26px; font-size: 10px; color: #7c8d96; }
.login-mobile-brand { display: none; }

/* Tablet and phone */
@media (max-height: 820px) and (min-width: 761px) {
    .sidebar-note { margin-top: 26px; margin-bottom: 14px; padding: 13px; }
    .sidebar { overflow-y: auto; }
    .login-story { margin-top: 30px; margin-bottom: 20px; }
    .login-hero .shop-illustration { max-width: 350px; }
}
@media (max-width: 1180px) and (min-width: 761px) {
    .sidebar { width: 222px; padding-left: 12px; padding-right: 12px; }
    .brand-type { font-size: 20px; }
    .brand-symbol { width: 38px; height: 38px; }
    .sidebar nav a { font-size: 12px; gap: 10px; }
    .main-content { padding: 28px 24px; }
    .home-heading { padding: 27px 25px; }
    .home-heading p { max-width: 250px; }
    .quick-links a { flex-wrap: wrap; padding: 14px; }
    .quick-links a > .icon:last-child { display: none; }
    .sell-layout { grid-template-columns: minmax(0,1fr) minmax(290px,.9fr); gap: 15px; }
    .sell-catalog, .cart-panel { padding: 18px; }
    .search-line { flex-wrap: wrap; }
    .search-line input { min-width: 0; flex-basis: 100%; }
    .login-hero { padding: 33px; }
    .login-panel { padding: 36px; }
}
@media (max-width: 960px) and (min-width: 761px) {
    .home-heading { flex-wrap: wrap; gap: 18px; }
    .home-heading p { max-width: none; }
    .metric-card { padding: 17px 14px; }
    .metric-label .metric-icon { width: 27px; height: 27px; border-radius: 8px; }
    .metric-label .icon { width: 17px; height: 17px; }
    .metric-card span { font-size: 11px; }
    .two-col { grid-template-columns: 1fr; }
    .topbar-label { display: none; }
    .sell-layout { grid-template-columns: 1fr; }
    .product-grid { grid-template-columns: repeat(3,1fr); }
    .cart-panel { position: static; }
}
@media (max-width: 760px) {
    .topbar { height: 69px; padding: 0 18px; background: #fff; }
    .topbar-label { display: none; }
    .mobile-brand { display: inline-flex; }
    .mobile-brand .brand-symbol { width: 35px; height: 35px; }
    .mobile-brand .brand-type { font-size: 21px; }
    .mobile-brand .brand-type small { display: none; }
    .today { font-size: 10px; max-width: 105px; text-align: right; line-height: 1.4; }
    .main-content { padding: 23px 17px 105px; }
    .home-heading { padding: 25px; min-height: 185px; gap: 19px; flex-wrap: wrap; margin-bottom: 25px; border-radius: 18px; }
    .home-heading h1 { font-size: 30px; }
    .home-heading .eyebrow { font-size: 8px; letter-spacing: 1.3px; }
    .home-heading p { font-size: 12px; max-width: 270px; }
    .home-heading .button { min-height: 43px; padding: 10px 16px; font-size: 12px; }
    .home-heading::before { right: -190px; top: -90px; }
    .home-heading::after { right: -10px; }
    .metric-card { padding: 17px; }
    .metric-card strong { font-size: 24px; }
    .metric-card span { font-size: 12px; }
    .metric-card small { font-size: 10px; }
    .metric-label .metric-icon { width: 29px; height: 29px; border-radius: 9px; }
    .metric-label .icon { width: 17px; height: 17px; }
    .section-heading h2 { font-size: 14px; }
    .panel { padding: 20px; }
    .panel-title h2 { font-size: 14px; gap: 7px; }
    .panel-title a { font-size: 10px; }
    .title-icon { width: 27px; height: 27px; border-radius: 8px; }
    .quick-links { gap: 10px; }
    .quick-links a { padding: 16px; }
    .quick-links small { font-size: 11px; }
    .mobile-nav { padding-top: 10px; background: #fffffffa; backdrop-filter: blur(12px); }
    .mobile-nav a, .mobile-nav button { gap: 4px; min-height: 43px; font-size: 10px; color: #617786; }
    .mobile-nav .icon { width: 22px; height: 22px; }
    .mobile-nav .selected { color: var(--green); }
    .mobile-nav .mobile-sell .icon { background: var(--green); color: #fff; width: 45px; height: 42px; padding: 10px; border-radius: 14px; margin-top: -23px; box-shadow: 0 5px 12px #087c6033; }
    .more-menu:not([hidden]) { bottom: 78px; border-radius: 16px; }
    .more-menu a, .more-menu button { min-height: 44px; border-radius: 8px; }
    .more-menu a:hover, .more-menu button:hover { background: var(--mint); }
    .sale-jump:not([hidden]) { bottom: calc(83px + env(safe-area-inset-bottom)); }
    .login-shell { display: block; min-height: 100svh; background: radial-gradient(ellipse at 95% 0,#e1f1e8,transparent 50%),#fbfcfa; }
    .login-hero { display: none; }
    .login-panel { padding: 30px 28px 70px; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; align-items: center; }
    .login-mobile-brand { display: block; width: min(370px,100%); margin-bottom: 43px; }
    .login-mobile-brand .brand-type { font-size: 25px; }
    .login-card { width: 100%; }
    .welcome-icon { width: 45px; height: 45px; border-radius: 14px; margin-bottom: 22px; }
    .login-card h1 { font-size: 31px; }
    .login-card .muted { margin-bottom: 26px; }
    .login-bottom { bottom: 22px; }
}
@media (max-width: 480px) {
    .home-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
    .home-metrics .metric-due { grid-column: span 2; display: grid; grid-template-columns: 1fr auto; gap: 5px 12px; align-items: center; }
    .home-metrics .metric-due .metric-label { grid-column: 1; }
    .home-metrics .metric-due .metric-icon { display: none; }
    .home-metrics .metric-due > strong { grid-column: 2; grid-row: 1 / span 2; }
    .home-metrics .metric-due > small { grid-column: 1; }
    .home-metrics .metric-label { align-items: flex-start; }
    .home-metrics .metric-label > span:first-child { max-width: 64px; }
    .home-metrics .metric-due .metric-label > span:first-child { max-width: none; }
    .home-heading h1 { font-size: 29px; }
    .page-heading:not(.home-heading) h1 { font-size: 29px; }
    .panel { padding: 17px; }
    .panel-title h2 { font-size: 13px; }
    .panel-title { gap: 6px; }
    .product-tile { padding: 14px 12px; }
    .product-tile em { font-size: 7px; }
    .cart-item { grid-template-columns: minmax(0,1fr) 64px 53px 22px; font-size: 11px; gap: 5px; }
    .cart-item .remove { min-height: 44px; }
    .report-grid .metric-card { padding: 15px; }
    .report-grid .metric-card strong { font-size: 21px; }
    .search-line { gap: 7px; }
    .search-line input { min-width: 0; font-size: 12px; }
    .search-line .button { padding: 10px; font-size: 11px; gap: 5px; }
    .search-line .icon { width: 17px; }
    .row-stock { white-space: normal; text-align: right; max-width: 100px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .home-heading { background: #fff; color: #000; box-shadow: none; padding: 0; }
    .home-heading p, .home-heading .eyebrow { color: #333; }
    .home-heading::before, .home-heading::after { display: none; }
    .metric-card { break-inside: avoid; }
}

@media (max-width: 760px) {
    input, select, .login-card input, .search-line input { font-size: 16px; }
    .search-line input { text-overflow: ellipsis; }
}

/* Original logo supplied by the owner. The source image stays unmodified. */
.brand-original { width: 216px; max-width: 100%; height: 68px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; background: #00142b; border: 1px solid #15334a; border-radius: 13px; flex: none; overflow: hidden; }
.brand-original-symbol, .brand-original-word { display: block; position: relative; overflow: hidden; flex: none; }
.brand-original-symbol { width: 53px; height: 42px; }
.brand-original-word { width: 137px; height: 26px; }
.brand-original-symbol img, .brand-original-word img { position: absolute; display: block; max-width: none; margin: 0; }
.brand-original-symbol img { width: 162.816px; height: 108.544px; left: -50.88px; top: -18.02px; }
.brand-original-word img { width: 253.533px; height: 169.022px; left: -62.723px; top: -92.434px; }
.sidebar .brand { padding: 0 0 25px; }
.login-brand .brand-original { width: 250px; height: 78px; gap: 12px; }
.login-hero .brand-presentation { width: 100%; height: auto; max-width: 520px; margin: 24px auto; border-radius: 18px; border: 1px solid #37637a; box-shadow: 0 15px 35px #00132430; }
.login-mobile-brand .brand-original { width: 250px; height: 78px; }
@media (max-width: 1180px) and (min-width: 761px) {
    .sidebar .brand-original { width: 198px; padding: 7px; gap: 2px; }
    .sidebar .brand-original-word { width: 130px; }
}
@media (max-width: 760px) {
    .topbar { height: 82px; gap: 10px; }
    .mobile-brand .brand-original { width: 185px; height: 58px; padding: 7px; gap: 3px; }
    .mobile-brand .brand-original-symbol { width: 43px; height: 34px; }
    .mobile-brand .brand-original-symbol img { width: 132.096px; height: 88.064px; left: -41.28px; top: -14.62px; }
    .mobile-brand .brand-original-word { width: 122px; height: 24px; }
    .mobile-brand .brand-original-word img { width: 225.773px; height: 150.515px; left: -55.855px; top: -82.313px; }
    .login-mobile-brand { margin-bottom: 30px; }
}
@media (max-height: 820px) and (min-width: 761px) {
    .login-hero .brand-presentation { max-width: 390px; margin: 18px auto; }
}

/* Administración de bodegas */
.bodegas-layout{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(0,1.1fr);gap:24px;align-items:start;margin-bottom:24px}.bodegas-layout>.panel{min-width:0}.bodega-row{padding:22px 0;border-bottom:1px solid var(--line)}.bodega-row-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}.bodega-row h3{margin:0;font-size:18px;overflow-wrap:anywhere}.bodega-owner{display:flex;flex-direction:column;gap:3px;font-size:14px;overflow-wrap:anywhere}.bodega-owner span{color:var(--muted)}.bodega-active{background:#e2f5eb;color:#087c60}.bodega-inactive{background:#f6ece8;color:#9a5038}.bodega-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:20px;font-size:13px}.admin-mobile-nav{justify-content:space-around}.admin-mobile-nav form{margin:0}.admin-mobile-nav button{min-height:44px}.topbar-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;max-width:42%}@media(max-width:1000px){.bodegas-layout{grid-template-columns:1fr}}@media(max-width:480px){.bodega-row-heading{flex-wrap:wrap}.bodega-row .button{width:100%}.bodega-pagination{flex-wrap:wrap}}

.heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.scanner-heading { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.scanner-heading .pill { background: var(--mint); color: var(--green-dark); }
.scanner-form label { margin-bottom: 5px; }
.scanner-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: end; }
.scanner-controls .button { min-height: 44px; padding-inline: 12px; }
.scanner-hint { margin: 7px 0 0; }
.scanner-status { margin: 0; overflow-wrap: anywhere; font-size: 13px; }
.scanner-status:not(:empty) { margin-top: 9px; }
.scanner-status[data-state="error"] { color: #a5382f; }
.scanner-status[data-state="success"] { color: var(--green-dark); }
.scanner-camera:not([hidden]) { display: grid; gap: 8px; justify-items: start; margin-top: 12px; }
.scanner-camera video { width: 100%; max-height: 250px; background: #111; border-radius: 12px; }
.scanner #scan-action:not([hidden]) { display: inline-block; padding: 7px 0; }
.sell-catalog .scanner { padding: 14px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfb; }
.product-scanner .scanner { max-width: 620px; }
.scanned-product { border-left: 3px solid #67b99b; }
.scanned-product code, .product-code, .product-row .row-main { overflow-wrap: anywhere; }
.scanned-product .hint { margin: 0; }
#product-associate-form { grid-template-columns: minmax(0, 1fr) auto; max-width: 620px; margin-bottom: 12px; }
.scan-option { align-self: center; }
.scan-option small { display: block; margin-top: 4px; }
.inventory-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.inventory-filters .button { min-height: 40px; }
.inventory-filters [aria-current="page"] { background: var(--green-dark); color: #fff; }
.batch-expired { color: #a5382f; }

.stock-alert-shortcuts { display: none; }
.stock-notices {
    position: fixed; z-index: 45; right: 18px; bottom: 18px;
    display: grid; gap: 8px; width: min(330px, calc(100% - 36px));
    max-height: 52vh; overflow: auto; pointer-events: none;
}
.stock-notice:not([hidden]) {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px;
    padding: 10px 8px 10px 12px; border: 1px solid var(--alert-accent); border-left-width: 4px;
    border-radius: 12px; background: white; box-shadow: 0 3px 12px #183c5021; pointer-events: auto;
}
.stock-notice-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--alert-bg); color: var(--alert-text); }
.stock-notice strong, .stock-notice small { display: block; overflow-wrap: anywhere; }
.stock-notice strong { font-size: 14px; }
.stock-notice small { color: var(--muted); font-size: 12px; }
.stock-notice a { color: var(--green-dark); font-size: 13px; text-decoration: underline; }
.stock-notice button { width: 34px; height: 34px; background: transparent; border: 0; color: var(--muted); font-size: 22px; cursor: pointer; }
@media (max-width: 760px) {
    .stock-notices { right: 10px; bottom: calc(86px + env(safe-area-inset-bottom)); width: min(330px, calc(100% - 20px)); max-height: 44vh; }
}
.stock-alert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stock-alert { display: flex; flex-direction: column; min-width: 0; margin: 0; border-top: 3px solid var(--alert-accent); scroll-margin-top: 12px; }
.stock-alert-low { --alert-accent: #dba44a; --alert-bg: #fff4da; --alert-text: #63400a; }
.stock-alert-expiring { --alert-accent: #78a3bf; --alert-bg: #e9f3fa; --alert-text: #24536f; }
.stock-alert-expired { --alert-accent: #d7796e; --alert-bg: #fcebe9; --alert-text: #96372f; }
.stock-alert-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-height: 43px; }
.stock-alert-heading h3 { margin: 0; font-size: 16px; }
.stock-alert-heading h3 small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 500; }
.stock-alert-heading .pill { background: var(--alert-bg); color: var(--alert-text); }
.stock-alert .list-row { padding: 8px 0; }
.stock-alert .list-row small { margin-top: 2px; }
.stock-alert .empty-small { margin: 0; padding: 4px 0 12px; }
.stock-alert > .text-link { margin-top: auto; padding-top: 10px; align-self: flex-start; }

@media (max-width: 760px) {
    .stock-alert-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-bottom: 11px; }
    .stock-alert-shortcuts a { display: grid; justify-items: center; gap: 2px; min-height: 51px; padding: 7px 4px; border-radius: 10px; background: var(--alert-bg); color: var(--alert-text); font-size: 11px; font-weight: 750; }
    .stock-alert-shortcuts strong { font-size: 17px; line-height: 1; }
    .stock-alert-grid { grid-template-columns: 1fr; gap: 10px; }
    .stock-alert-heading { min-height: 32px; }
    .stock-alert-heading h3 small { display: inline-block; margin-left: 4px; }
}

@media (max-width: 480px) {
    .scanner-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .scanner-controls #scan-code { grid-column: 1 / -1; }
    #product-associate-form { grid-template-columns: 1fr; }
    #product-associate-form .button { justify-self: start; }
}
