@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&display=swap');
:root{--green:#173e34;--muted:#687870;--paper:#f5f4ee;--gold:#e7c77d;--line:#dfe5df;--red:#a53338}*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink,#21382f);font-family:'DM Sans',system-ui,sans-serif;font-size:15px}h1,h2,h3,.brand{font-family:Manrope,system-ui,sans-serif}h1{font-size:30px;margin:0 0 10px;line-height:1.25}h2{font-size:21px;margin:0 0 20px}h3{font-size:16px;margin:0 0 12px}p{line-height:1.65}button,input,select{font:inherit}button,.button{border:0;border-radius:11px;padding:13px 19px;background:var(--green);color:white;cursor:pointer;font-weight:700;min-height:46px;text-decoration:none;text-align:center;display:inline-flex;align-items:center;justify-content:center;gap:8px}button:hover{filter:brightness(1.12)}button:disabled{opacity:.45;cursor:wait}button.secondary,.button.secondary{background:var(--button-soft,#eef2ed);color:var(--green);border:1px solid var(--line)}button.ghost{background:transparent;color:var(--green);padding:10px}button.danger{background:#fff0f0;color:var(--red)}a{color:var(--green)}input,select{width:100%;border:1px solid var(--input-border,#cbd6ce);border-radius:10px;padding:12px;background:white;min-height:46px;color:var(--ink,#21382f)}input:focus,select:focus,button:focus-visible{outline:3px solid var(--focus,#d6b85f);outline-offset:2px}label{display:block;font-size:13px;font-weight:700;margin-bottom:7px}.field{margin:0 0 17px}.muted{color:var(--muted)}small{line-height:1.6}.badge{display:inline-flex;align-items:center;gap:7px;border-radius:99px;padding:6px 11px;font-size:12px;background:var(--soft,#edf3ee);font-weight:700}.badge.gold{background:#fff3d5;color:#79581b}.badge.red{background:#fff0f0;color:var(--red)}.eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:2px;font-weight:800;color:var(--muted);margin-bottom:12px}.brand{font-size:17px;font-weight:800;display:flex;align-items:center;gap:12px}.brand img{width:39px;height:39px}.login{min-height:100vh;display:grid;grid-template-columns:1fr 1fr}.intro{background:var(--green);color:#f9faf6;padding:48px 9%;display:flex;flex-direction:column;justify-content:space-between;min-height:720px}.intro .brand{color:white}.intro h1{font-size:clamp(36px,4.5vw,62px);letter-spacing:-2.5px;margin:40px 0 25px}.intro h1 em{font-style:normal;color:var(--gold)}.intro p{color:var(--on-dark-muted,#bed1c5);max-width:390px}.intro .eyebrow{color:var(--gold)}.preview-cards{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:34px}.preview-card{background:#ffffff10;padding:22px;border:1px solid #ffffff25;border-radius:18px}.preview-card strong{display:block;font-size:24px;color:var(--gold);margin:10px 0}.auth-area{padding:44px 10%;display:flex;flex-direction:column;justify-content:center}.auth-box{max-width:425px;width:100%;margin:auto}.auth-box .wide{width:100%}.divider{display:flex;align-items:center;gap:12px;margin:23px 0;font-size:12px;color:var(--muted)}.divider:before,.divider:after{content:'';flex:1;border-top:1px solid var(--line)}.notice{border-radius:12px;background:#fff5dc;border:1px solid #ecddb8;padding:14px;font-size:13px;line-height:1.6;margin:18px 0}.error{color:var(--red);background:#fff0f0;padding:13px;border-radius:10px;line-height:1.5;margin-bottom:15px}.shell{display:grid;grid-template-columns:235px 1fr;min-height:100vh}.sidebar{padding:30px 20px;background:#fff;border-right:1px solid var(--line);position:fixed;width:235px;top:0;bottom:0;display:flex;flex-direction:column}.sidebar .brand{font-size:14px;padding:0 4px 30px}.sidebar nav{display:flex;flex-direction:column;gap:6px}.nav-item{justify-content:flex-start;color:var(--icon-muted,#708075);background:transparent;font-weight:600}.nav-item.active{color:white;background:var(--green)}.nav-icon{width:23px;display:inline-flex}.nav-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.sidebar-footer{margin-top:auto;border-top:1px solid var(--line);padding-top:20px}.sidebar-footer small{display:block;overflow-wrap:anywhere}.content{grid-column:2;padding:30px 42px 70px;max-width:1560px;width:100%;margin:auto}.topbar{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:36px}.topbar .brand{display:none}.topbar small{font-size:12px}.top-actions{display:flex;gap:8px;align-items:center}.page-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:28px}.page-header p{margin:0;color:var(--muted);font-size:14px}.grid{display:grid;gap:20px}.metrics{grid-template-columns:repeat(4,1fr)}.card{background:white;border:1px solid var(--line);border-radius:17px;padding:24px}.metric strong{font-size:28px;display:block;margin:12px 0 7px;letter-spacing:-1px}.metric .muted{font-size:12px}.metric.highlight{background:var(--green);color:white;border-color:var(--green)}.metric.highlight .muted{color:var(--chart-muted,#c1d6c7)}.two{grid-template-columns:1.4fr 1fr;margin-top:22px}.row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--surface-muted,#eef1ec)}.row:last-child{border-bottom:0}.row small{display:block;color:var(--muted);margin-top:5px}.row strong{font-size:14px}.rank{display:flex;align-items:center;gap:14px}.rank-number{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:var(--surface-alt,#f2f4ee);font-size:12px;color:var(--muted)}.empty{padding:25px;text-align:center;color:var(--muted);line-height:1.65}.sale-layout{grid-template-columns:1.3fr 1fr}.product-grid{grid-template-columns:repeat(2,1fr);margin-top:19px}.product-tile{border:1px solid var(--line);border-radius:13px;padding:18px;background:white}.product-tile h3{margin:12px 0 4px;font-size:14px}.product-tile .product-price{font-size:21px;font-weight:800;margin:12px 0}.product-tile button{width:100%;padding:9px;min-height:42px}.cart{position:sticky;top:20px;align-self:start}.cart-line{padding:15px 0;border-bottom:1px solid var(--line)}.cart-line .row{padding:0;border:0}.quantity{display:flex;gap:8px;align-items:center;margin-top:12px}.quantity button{padding:5px 13px;min-height:36px}.quantity input{max-width:65px;min-height:36px;padding:5px;text-align:center}.total{display:flex;justify-content:space-between;align-items:center;margin:23px 0;font-size:16px}.total strong{font-size:29px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}th{text-align:left;color:var(--muted);font-weight:600;padding:12px;border-bottom:1px solid var(--line);background:var(--surface-raised,#fafbf7)}td{padding:15px 12px;border-bottom:1px solid var(--surface-muted,#eef1ec)}td small{display:block}.table-wrap button{min-height:35px;padding:7px 12px;font-size:12px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 18px}.full{grid-column:1/-1}.actions{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.toolbar{display:flex;gap:12px;align-items:center;margin-bottom:20px}.toolbar input{max-width:330px}.report-selector{max-width:160px}.chart{display:flex;gap:12px;align-items:flex-end;height:160px;padding-top:15px;margin-top:16px}.bar-column{flex:1;min-width:0;text-align:center;font-size:10px;color:var(--muted)}.bar{background:var(--chart-line,#b8cdbc);border-radius:6px 6px 0 0;min-height:3px;margin-bottom:8px}.bar-column:last-child .bar{background:var(--green)}dialog{border:1px solid var(--line);border-radius:18px;padding:28px;width:min(590px,calc(100vw - 28px));max-height:90vh;color:var(--ink,#21382f);box-shadow:0 25px 80px var(--shadow,#122f3425)}dialog::backdrop{background:var(--backdrop,#122b2fcc)}.dialog-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.dialog-head h2{margin:0}.dialog-head button{padding:0 12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:var(--green);color:white;padding:14px 23px;border-radius:12px;box-shadow:0 8px 35px var(--shadow-strong,#12332230);max-width:90%;z-index:100;display:none}#toast.show{display:block}.help-item{padding:15px 0;border-bottom:1px solid var(--line)}.help-item p{font-size:14px;color:var(--muted);margin:8px 0}.demo-strip{display:flex;justify-content:space-between;gap:8px;background:#fff3d5;color:#79581b;padding:11px 16px;border-radius:10px;font-size:12px;margin-bottom:22px;line-height:1.5}.demo-strip button{font-size:12px;min-height:30px;padding:4px 8px;color:#79581b;background:transparent}.capacity{font-size:11px;margin-top:15px;color:var(--muted)}
@media(max-width:760px){table.product-table,table.inventory-table,table.expense-table,table.report-table{white-space:normal;display:block}table.product-table thead,table.inventory-table thead,table.expense-table thead,table.report-table thead{display:none}table.product-table tbody,table.inventory-table tbody,table.expense-table tbody,table.report-table tbody{display:block}table.product-table tr,table.inventory-table tr,table.expense-table tr,table.report-table tr{display:block;border:1px solid var(--line);border-radius:12px;margin:12px 0;padding:12px}table.product-table td,table.inventory-table td,table.expense-table td,table.report-table td{display:flex;justify-content:space-between;gap:15px;padding:8px 3px;border:0;font-size:13px;text-align:right}table.product-table td:before,table.inventory-table td:before,table.expense-table td:before,table.report-table td:before{color:var(--muted);text-align:left;font-weight:400}table.product-table td:first-child,table.inventory-table td:first-child,table.report-table td:first-child{display:block;text-align:left;font-weight:700;font-size:14px;border-bottom:1px solid var(--line);margin-bottom:8px;padding-bottom:12px}table.product-table td:first-child small,table.inventory-table td:first-child small{font-weight:400;margin-top:5px}table.product-table td:nth-child(2):before{content:'Costo de referencia'}table.product-table td:nth-child(3):before{content:'Precio'}table.product-table td:nth-child(4):before{content:'Margen de referencia'}table.product-table td:nth-child(5):before{content:'Existencias'}table.product-table td:last-child button{width:100%;margin-top:5px}table.inventory-table td:nth-child(2):before{content:'Disponibles'}table.inventory-table td:nth-child(3):before{content:'Mínimo'}table.inventory-table td:nth-child(4):before{content:'Valor al costo'}table.inventory-table td:nth-child(5):before{content:'Estado'}table.expense-table td:nth-child(1):before{content:'Fecha'}table.expense-table td:nth-child(2):before{content:'Concepto'}table.expense-table td:nth-child(3):before{content:'Categoría'}table.expense-table td:nth-child(4):before{content:'Pago'}table.expense-table td:nth-child(5):before{content:'Importe'}table.report-table td:nth-child(2):before{content:'Ventas'}table.report-table td:nth-child(3):before{content:'Costo vendido'}table.report-table td:nth-child(4):before{content:'Utilidad bruta'}table.report-table td:nth-child(5):before{content:'Gastos'}table.report-table td:nth-child(6):before{content:'Merma'}table.report-table td:nth-child(7){font-weight:800;background:var(--soft,#edf3ee);padding:12px 5px;border-radius:7px}table.report-table td:nth-child(7):before{content:'Utilidad estimada';color:var(--green)}table.report-table td:nth-child(8):before{content:'Compras'}table.report-table td:nth-child(9):before{content:'Flujo neto'}}
@media(max-width:1150px){.metrics{grid-template-columns:repeat(2,1fr)}.content{padding:25px}.two,.sale-layout{grid-template-columns:1fr 1fr}.metric strong{font-size:25px}.product-grid{grid-template-columns:1fr}.intro{padding:40px 7%}}
@media(max-width:760px){.login{grid-template-columns:1fr}.intro{min-height:auto;padding:24px}.intro h1{font-size:36px;letter-spacing:-1px;margin:24px 0 15px}.intro p{margin:0}.intro footer,.preview-cards{display:none}.auth-area{padding:32px 24px}.auth-box h2{font-size:23px}.shell{display:block}.sidebar{position:fixed;top:auto;bottom:0;width:100%;height:auto;padding:5px 3px 8px;border:0;border-top:1px solid var(--line);z-index:20}.sidebar .brand,.sidebar-footer{display:none}.sidebar nav{flex-direction:row;gap:0;justify-content:space-around}.nav-item{flex-direction:column;gap:4px;padding:8px 3px;font-size:9px;border-radius:8px;min-width:15%;min-height:53px}.nav-icon{justify-content:center}.nav-icon svg{width:19px;height:19px}.content{padding:20px 16px 100px}.topbar{margin-bottom:22px}.topbar .brand{display:flex;font-size:12px}.topbar .brand img{width:30px;height:30px}.topbar>.muted{display:none}.top-actions .sync-label{display:none}.top-actions button{min-height:38px;padding:8px 10px;font-size:11px}.page-header{gap:9px;margin-bottom:20px}.page-header h1{font-size:25px}.page-header button{font-size:12px;padding:11px 13px}.page-header p{font-size:12px}.metrics{gap:10px}.card{padding:17px;border-radius:13px}.metric strong{font-size:22px}.metric .muted{font-size:11px}.metric .badge{font-size:10px;padding:4px 7px}.two,.sale-layout{grid-template-columns:1fr}.product-grid{grid-template-columns:repeat(2,1fr);gap:10px}.product-tile{padding:12px}.product-tile .product-price{font-size:19px}.product-tile h3{font-size:13px}.cart{position:static}.sale-layout>.card:first-child{padding:15px}.toolbar{flex-wrap:wrap}.toolbar input{max-width:none}.toolbar button{font-size:12px}.form-grid{gap:0 12px}.demo-strip{font-size:11px;align-items:flex-start}.demo-strip button{white-space:nowrap}.topbar small{font-size:10px}.table-wrap{margin:0 -5px}.metric{min-width:0}dialog{padding:20px}.chart{height:140px}}

.sale-summary,.cart-back{display:none}#sale-cart{scroll-margin-top:20px}
@media(max-width:760px){.sale-layout{padding-bottom:90px}.sale-layout>.cart{display:none}.sale-layout>.cart.cart-open{display:block;position:fixed;inset:0;z-index:40;overflow:auto;border-radius:0;padding:20px 18px calc(30px + env(safe-area-inset-bottom));background:var(--paper)}.cart-open .cart-back{display:inline-flex;margin-bottom:22px}.sale-summary{position:fixed;display:flex;align-items:center;justify-content:space-between;gap:12px;left:0;right:0;bottom:76px;z-index:21;padding:12px 16px;background:white;border-top:1px solid var(--line);box-shadow:0 -4px 16px var(--summary-shadow,#173e3412)}.sale-summary strong{display:block;font-size:22px}.sale-summary small{display:block;font-size:12px;color:var(--muted)}.sale-summary button{font-size:14px;padding:12px}.cart-open h2{margin-bottom:10px}#toast{bottom:165px;z-index:60}}

@media(max-width:760px){.sale-layout>.cart.cart-open{height:100vh;height:100dvh;align-self:stretch}.content:has(.cart-open) .sale-summary{display:none}}

.operia-signature{display:flex;justify-content:center;align-items:center;gap:12px;margin:30px 0 12px;color:var(--muted);font-size:11px}.operia-signature img{width:85px;height:auto}.credit-metrics{margin:20px 0}.credit-metrics strong{font-size:26px}.credit-checkout{margin:16px 0;padding:14px;border:1px solid var(--line);border-radius:12px}.credit-checkout button{margin-bottom:16px}.customer-list{display:grid;gap:12px;margin-top:18px}.customer-card{width:100%;display:flex;justify-content:space-between;gap:12px;color:var(--green);background:white;text-align:left}.customer-card small{display:block;font-weight:400}.customer-card>span:last-child{text-align:right}dialog{z-index:80}.cart-open+dialog{z-index:80}@media(max-width:760px){.nav-item{min-width:0;flex:1;font-size:8px}.credit-metrics{grid-template-columns:1fr}.operia-signature{flex-wrap:wrap}}

@media(max-width:760px){table.report-table td:nth-child(3):before{content:'Cobrado'}table.report-table td:nth-child(4):before{content:'Costo vendido'}table.report-table td:nth-child(5):before{content:'Utilidad bruta'}table.report-table td:nth-child(6):before{content:'Gastos'}table.report-table td:nth-child(7){font-weight:400;background:transparent;padding:8px 3px}table.report-table td:nth-child(7):before{content:'Merma'}table.report-table td:nth-child(8):before{content:'Utilidad estimada'}table.report-table td:nth-child(9):before{content:'Compras'}table.report-table td:nth-child(10):before{content:'Flujo neto'}}

/* Ariché: identity scoped to the authenticated boutique or its own entry page. */
.theme-ariche{--green:#7b4538;--muted:#79675e;--paper:#fffaf5;--gold:#c39948;--line:#eaded3;color:#352720;background:#fffaf5}
.theme-ariche h1,.theme-ariche h2{letter-spacing:-.5px}.theme-ariche .card{border-color:#eaded3;box-shadow:0 5px 24px #6b403506}.theme-ariche .metric.highlight{background:linear-gradient(135deg,#7b4538,#4a3029);color:#fff9f0}.theme-ariche .badge{background:#f5ece2;color:#654b3e}.theme-ariche .badge.gold{background:#f9e6c5;color:#714d25}.theme-ariche .badge.red{background:#fff0f0;color:#a53338}.theme-ariche button.secondary{background:#f6eee5;color:#633d31}.theme-ariche .sidebar{background:#fffdf9;border-color:#eaded3}.theme-ariche .sidebar .brand{margin-bottom:28px}.theme-ariche .brand.ariche-brand{gap:12px;letter-spacing:0}.ariche-brand img{width:82px;height:82px;object-fit:contain;border-radius:50%;border:1px solid #eaded3;background:#fff}.ariche-brand>span{font:italic 700 28px Georgia,serif;color:#3d2b23}.ariche-brand small{display:block;font:600 8px system-ui,sans-serif;letter-spacing:1.3px;margin-top:6px;color:#79675e}.theme-ariche .topbar .brand img{width:64px;height:64px}.theme-ariche .topbar .brand>span{font-size:26px}.theme-ariche .topbar{border-bottom:1px solid #eaded3;padding-bottom:20px}.theme-ariche .chart .bar{background:linear-gradient(#deb56d,#a8704e)}.theme-ariche input,.theme-ariche select{color:#352720;border-color:#ddcabc}.theme-ariche button:focus-visible,.theme-ariche input:focus,.theme-ariche select:focus{outline-color:#946229}.theme-ariche .product-tile{border-color:#eaded3;background:#fffdf9}.theme-ariche .product-price{color:#633d31}.theme-ariche .intro{background:radial-gradient(ellipse at top left,#f5d8bc,transparent 70%),linear-gradient(140deg,#fff5e5,#f7dfd1);color:#3d2b23}.theme-ariche .intro p,.theme-ariche .intro .eyebrow{color:#705546}.theme-ariche .intro .brand>span{color:#3d2b23}.theme-ariche .intro h1 em{color:#7b4538}.theme-ariche .preview-card{background:#ffffff80;border-color:#d7bc9b}.theme-ariche .preview-card strong{color:#7b4538}.theme-ariche .notice{background:#fff2df;border-color:#e4cba4}.theme-ariche .sale-summary{background:#fffdf9}.theme-ariche .customer-card{background:#fffdf9;color:#633d31}.theme-ariche .credit-checkout{background:#fffaf5}.boutique-welcome{display:flex;align-items:center;gap:25px;padding:26px 32px;margin:0 0 28px;border:1px solid #e8cfaa;border-radius:22px;background:radial-gradient(ellipse at top right,#f6d8be,transparent 70%),#fff7e9}.boutique-welcome img{width:116px;height:116px;border-radius:50%;border:1px solid #e2c594}.boutique-kicker{font-size:10px;letter-spacing:2px;color:#78552d;font-weight:700}.boutique-welcome h2{font:normal 30px Georgia,serif;margin:10px 0;color:#51372c}.boutique-welcome p{margin:0;color:#705546;font-size:14px}.theme-ariche .operia-signature{border-top:1px solid #eaded3;padding-top:22px}
@media(max-width:760px){.theme-ariche .topbar{align-items:center;gap:10px}.theme-ariche .topbar .brand img{width:50px;height:50px}.theme-ariche .topbar .brand>span{font-size:22px}.theme-ariche .topbar .brand small{font-size:6px;letter-spacing:.5px}.theme-ariche .topbar .brand{gap:7px}.theme-ariche .top-actions{gap:2px}.theme-ariche .top-actions button{padding:7px;font-size:10px}.boutique-welcome{padding:18px 14px;gap:13px;border-radius:16px}.boutique-welcome img{width:82px;height:82px}.boutique-welcome h2{font-size:23px;margin:8px 0}.boutique-welcome p{font-size:12px}.boutique-kicker{font-size:8px;letter-spacing:1px}.theme-ariche .intro .brand img{width:82px;height:82px}}

.theme-ariche{--ink:#352720;--icon-muted:#79675e;--input-border:#ddcabc;--soft:#f5ece2;--surface-muted:#f8f0e8;--button-soft:#f6eee5;--surface-alt:#fcf5ed;--surface-raised:#fffdf9;--on-dark-muted:#ecd8c8;--chart-muted:#b78d6e;--chart-line:#e2cbb5;--focus:#946229;--backdrop:#352720cc;--shadow:#633d3125;--shadow-strong:#633d3130;--summary-shadow:#633d3112}.theme-ariche #toast{background:#633d31;color:#fffaf5}.theme-ariche dialog{background:#fffaf5;color:#352720;border:1px solid #ddcabc}.theme-ariche .quantity button{color:#633d31}.theme-ariche .nav-icon{color:inherit}.theme-ariche .cart-open{background:#fffaf5}.theme-ariche .chart .bar{background:#b07855}.theme-ariche .bar-column{color:#79675e}
