*{box-sizing:border-box}html{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f3f4f6;color:#111827}body{margin:0;min-height:100vh}.shell{min-height:100vh;display:grid;place-items:center;padding:24px}.card{width:min(100%,560px);background:#fff;border:1px solid #e5e7eb;border-radius:24px;padding:32px;box-shadow:0 24px 60px rgba(15,23,42,.08)}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:12px;font-weight:800;color:#6b7280;margin-bottom:12px}h1{font-size:34px;line-height:1.05;margin:0 0 12px}.intro{color:#6b7280;line-height:1.6;margin:0 0 24px}.meta{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:24px}.meta span{background:#f3f4f6;border-radius:999px;padding:8px 12px;font-size:13px;color:#6b7280}.meta strong{color:#111827}form{display:grid;gap:18px}label{font-size:14px;font-weight:700;display:grid;gap:8px}input{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:14px 15px;font:inherit;font-size:17px;outline:none;background:#fff}input:focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}.money-field{display:flex;align-items:center;border:1px solid #d1d5db;border-radius:12px;overflow:hidden}.money-field:focus-within{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}.money-field span{padding-left:15px;font-size:22px;font-weight:800}.money-field input{border:0;box-shadow:none!important;font-size:26px;font-weight:800;padding-left:6px}button{appearance:none;border:0;border-radius:12px;background:#111827;color:#fff!important;padding:15px 18px;font:inherit;font-weight:800;cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}.secondary{width:100%;margin-top:10px;background:#e5e7eb;color:#111827}.danger{background:#b91c1c;margin-top:14px}.notice{padding:12px 14px;border-radius:12px;margin-bottom:18px;font-size:14px}.notice.error{background:#fee2e2;color:#991b1b}.status-panel{margin-top:24px;padding:22px;border:1px solid #e5e7eb;border-radius:16px;text-align:center;background:#f9fafb}.status-panel h2{margin:12px 0 6px;font-size:22px}.status-panel p{margin:0;color:#6b7280;line-height:1.5}.spinner{width:34px;height:34px;border-radius:50%;border:4px solid #e5e7eb;border-top-color:#111827;margin:0 auto;animation:spin .8s linear infinite}.status-success .spinner{animation:none;border:0;background:#16a34a;position:relative}.status-success .spinner:after{content:"✓";color:#fff;font-size:24px;line-height:34px;font-weight:900}.status-failed .spinner{animation:none;border:0;background:#dc2626;position:relative}.status-failed .spinner:after{content:"×";color:#fff;font-size:26px;line-height:32px;font-weight:900}details{margin-top:20px}summary{cursor:pointer;color:#6b7280;font-size:13px}pre{white-space:pre-wrap;word-break:break-word;background:#111827;color:#d1fae5;padding:14px;border-radius:12px;font-size:12px;max-height:320px;overflow:auto}.hidden{display:none!important}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:600px){.shell{padding:12px}.card{padding:22px;border-radius:18px}h1{font-size:29px}}
.notice.success{background:#dcfce7;color:#166534}.small,.muted{color:#6b7280;font-size:13px}.button-link{display:inline-block;text-decoration:none;border-radius:12px;background:#111827;color:#fff;padding:15px 18px;font-weight:700}.secondary-link{background:#e5e7eb;color:#111827;text-align:center}.topbar{height:64px;background:#fff;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:20}.topbar a{color:#111827;text-decoration:none}.topbar nav{display:flex;align-items:center;gap:18px;font-size:14px}.topbar nav a{color:#6b7280}.topbar nav a.active,.topbar nav a:hover{color:#111827}.with-topbar{min-height:calc(100vh - 64px)}.signed-in{font-size:13px;color:#6b7280;margin:-8px 0 20px}.admin-shell{width:min(1400px,calc(100% - 40px));margin:0px auto 80px}.admin-heading{display:flex;justify-content:space-between;align-items:end;margin-bottom:24px}.admin-heading h1{margin:0}.admin-grid{display:grid;grid-template-columns:minmax(300px,420px) minmax(0,1fr);gap:24px;align-items:start}.panel{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:24px;box-shadow:0 14px 40px rgba(15,23,42,.05)}.panel h2{margin:0 0 20px;font-size:18px}.stack-form{display:grid;gap:16px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:12px}.check{display:flex;align-items:center;gap:9px}.check input{width:auto}.stack-form select{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:14px 15px;font:inherit;background:#fff}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{text-align:left;padding:13px 10px;border-bottom:1px solid #e5e7eb;vertical-align:middle}th{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#6b7280}td small{display:block;margin-top:4px;color:#6b7280}.badge{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:11px;font-weight:800}.badge.on{background:#dcfce7;color:#166534}.badge.off{background:#f3f4f6;color:#6b7280}.actions{white-space:nowrap}.actions>a,.link-button{font:inherit;font-size:13px;color:#111827;text-decoration:underline;background:none;padding:0;border:0;font-weight:600}.actions form{display:inline;margin-left:10px}.link-button{color:#b91c1c}.product-list{min-width:0}@media(max-width:850px){.admin-grid{grid-template-columns:1fr}.topbar{height:auto;min-height:64px;padding:14px 18px;gap:16px}.topbar nav{gap:12px;flex-wrap:wrap;justify-content:flex-end}.admin-shell{width:min(100% - 24px,1400px);margin-top:24px}.two-col{grid-template-columns:1fr}}@media(max-width:520px){.topbar{align-items:flex-start}.topbar nav{font-size:13px}.admin-shell{width:calc(100% - 20px)}.panel{padding:18px}}
.field-label{font-size:14px;font-weight:700;margin-bottom:8px}.image-dropzone{min-height:220px;border:2px dashed #cbd5e1;border-radius:16px;background:#f8fafc;display:grid;place-items:center;text-align:center;cursor:pointer;overflow:hidden;transition:.2s ease}.image-dropzone:hover,.image-dropzone.dragging{border-color:#111827;background:#eef2f7}.image-dropzone img{display:block;width:100%;height:220px;object-fit:cover}.dropzone-placeholder{display:grid;gap:6px;color:#475569}.dropzone-placeholder strong{color:#111827;font-size:16px}.dropzone-placeholder span,.dropzone-placeholder small{font-size:13px}.crop-wrap{margin-top:14px;border:1px solid #e5e7eb;border-radius:16px;padding:14px;background:#fff}.crop-actions{display:flex;gap:10px}.crop-actions button{margin:0}.image-ready{display:flex;align-items:center;gap:12px;margin-top:12px;padding:10px;border:1px solid #dcfce7;background:#f0fdf4;border-radius:12px;font-size:13px;color:#166534}.image-ready img{width:64px;height:64px;object-fit:cover;border-radius:10px}.small-check{margin-top:10px}.product-thumb-cell{width:58px}.product-thumb,.placeholder-thumb{display:block;width:44px;height:44px;border-radius:8px;object-fit:cover;background:#f1f5f9}.catalogue-shell{width:min(1500px,calc(100% - 40px));margin:32px auto 80px}.catalogue-toolbar{display:grid;grid-template-columns:minmax(220px,1fr) minmax(180px,260px) auto;gap:12px;margin:20px 75px 20px 0}.catalogue-toolbar input,.catalogue-toolbar select{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:14px 15px;font:inherit;background:#fff;outline:none}.catalogue-toolbar select:focus,.catalogue-toolbar input:focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}.catalogue-toolbar button{white-space:nowrap}.catalogue-meta{font-size:13px;color:#64748b;margin-bottom:14px}.product-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:22px}.product-card{min-width:0}.product-card-image{aspect-ratio:1/1;border-radius:18px;overflow:hidden;background:#eef2f7;border:1px solid #e5e7eb}.product-card-image img{width:100%;height:100%;object-fit:cover;display:block}.product-card-placeholder{width:100%;height:100%;display:grid;place-items:center;color:#94a3b8;font-size:13px}.product-card-title{font-weight:800;font-size:15px;line-height:1.3;margin-top:10px}.catalogue-empty{padding:50px 20px;text-align:center;background:#fff;border:1px solid #e5e7eb;border-radius:18px;color:#64748b}.catalogue-loading{opacity:.45;pointer-events:none}@media(max-width:1150px){.product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}@media(max-width:850px){.product-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.catalogue-toolbar{grid-template-columns:1fr 1fr}.catalogue-toolbar button{grid-column:1/-1}}@media(max-width:600px){.catalogue-shell{width:calc(100% - 20px);margin-top:20px}.product-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.catalogue-toolbar{grid-template-columns:1fr}.catalogue-toolbar button{grid-column:auto}.product-card-image{border-radius:14px}.product-card-title{font-size:14px}}
.product-card-button{appearance:none;background:none;color:inherit;padding:0;border:0;border-radius:0;text-align:left;width:100%;font:inherit;cursor:pointer}.product-card-button:hover .product-card-image{transform:translateY(-2px);box-shadow:0 10px 28px rgba(15,23,42,.1)}.product-card-image{transition:.18s ease}.product-card-price{font-size:13px;color:#64748b;margin-top:4px}.modal-open{overflow:hidden}.modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px}.modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.65);backdrop-filter:blur(4px)}.modal-card{position:relative;z-index:1;width:min(900px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:24px;box-shadow:0 30px 100px rgba(0,0,0,.25);display:grid;grid-template-columns:minmax(280px,1fr) minmax(300px,.85fr)}.modal-close{position:absolute;right:14px;top:14px;width:42px;height:42px;border-radius:50%;padding:0;font-size:28px;line-height:1;background:#fff;color:#111827;box-shadow:0 5px 20px rgba(0,0,0,.12);z-index:2}.modal-product-image{aspect-ratio:1/1;background:#eef2f7;min-height:100%}.modal-product-image img{width:100%;height:100%;object-fit:cover;display:block}.modal-product-content{padding:42px 36px;display:flex;flex-direction:column;justify-content:center}.modal-product-content h2{font-size:34px;line-height:1.05;margin:0 0 12px}.modal-price{font-size:26px;font-weight:900;margin-bottom:6px}.modal-stock{font-size:13px;color:#64748b;margin-bottom:24px}.modal-product-content label{margin-bottom:16px}.modal-notice{margin:12px 0 0}.checkout-shell{width:min(1400px,calc(100% - 40px));margin:32px auto 80px}.checkout-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:24px}.checkout-heading h1{margin:0}.compact-button{width:auto;margin:0}.checkout-layout{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:24px;align-items:start}.checkout-summary{position:sticky;top:88px;display:grid;gap:16px}.checkout-summary h2{margin-bottom:4px}.checkout-summary .button-link{width:100%}.summary-row{display:flex;align-items:center;justify-content:space-between;padding:4px 0;color:#64748b}.summary-row.total{font-size:22px;color:#111827;border-top:1px solid #e5e7eb;padding-top:18px;margin-top:2px}.checkout-items{display:grid}.checkout-item{display:grid;grid-template-columns:88px minmax(0,1fr) 120px 120px;gap:18px;align-items:center;padding:16px 0;border-bottom:1px solid #e5e7eb}.checkout-item:first-child{padding-top:0}.checkout-item:last-child{border-bottom:0;padding-bottom:0}.checkout-item-image{width:88px;height:88px;border-radius:14px;overflow:hidden;background:#eef2f7}.checkout-item-image img{width:100%;height:100%;object-fit:cover}.checkout-item-info{display:grid;gap:5px}.checkout-item-info strong{font-size:17px}.checkout-item-info span,.checkout-qty-wrap small{font-size:13px;color:#64748b}.checkout-item-info .remove-item{justify-self:start;margin-top:3px}.checkout-qty-wrap label{gap:5px}.checkout-qty{padding:10px 12px;font-size:16px}.checkout-line-total{text-align:right;font-size:18px;font-weight:900}@media(max-width:900px){.modal-card{grid-template-columns:1fr;max-width:620px}.modal-product-image{min-height:auto}.modal-product-content{padding:28px}.checkout-layout{grid-template-columns:1fr}.checkout-summary{position:static}.checkout-item{grid-template-columns:72px minmax(0,1fr) 110px}.checkout-item-image{width:72px;height:72px}.checkout-line-total{grid-column:2/-1;text-align:left}}@media(max-width:600px){.modal{padding:75px 50px}.modal-card{max-height:calc(100vh - 20px);border-radius:18px}.modal-product-content h2{font-size:28px}.checkout-shell{width:calc(100% - 20px);margin-top:20px}.checkout-heading{align-items:flex-start}.checkout-item{grid-template-columns:64px minmax(0,1fr);gap:12px}.checkout-item-image{width:64px;height:64px}.checkout-qty-wrap{grid-column:2}.checkout-line-total{grid-column:2}.compact-button{padding:11px 13px}}

.cart-fab{position:fixed;right:24px;bottom:24px;z-index:90;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;background:#111827;color:#fff;text-decoration:none;box-shadow:0 12px 34px rgba(15,23,42,.28);transition:transform .18s ease,box-shadow .18s ease,background .18s ease}.cart-fab:hover{transform:translateY(-2px);box-shadow:0 16px 40px rgba(15,23,42,.34);background:#000}.cart-fab:focus-visible{outline:3px solid #fff;outline-offset:3px;box-shadow:0 0 0 6px #111827}.cart-fab-icon{width:28px;height:28px;display:block}.cart-fab-count{position:absolute;right:-2px;top:-2px;min-width:24px;height:24px;padding:0 6px;border-radius:999px;display:grid;place-items:center;background:#fff;color:#111827;border:2px solid #111827;font-size:11px;line-height:1;font-weight:900;box-sizing:border-box}.cart-fab-count:empty{display:none}@media(max-width:600px){.cart-fab{right:16px;bottom:16px;width:58px;height:58px}.cart-fab-icon{width:25px;height:25px}.cart-fab-count{min-width:23px;height:23px}}

/* Catalogue flyout navigation */
.catalogue-page .catalogue-shell{width:auto;max-width:none;margin:30px 15px;padding:0}
.catalogue-page .catalogue-toolbar{margin-top:0}
.menu-toggle{position:fixed;right:15px;top:15px;z-index:85;width:48px;height:48px;padding:0;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;background:#111827;box-shadow:0 10px 28px rgba(15,23,42,.2)}
.menu-toggle span{display:block;width:20px;height:2px;background:#fff;border-radius:999px;transition:transform .18s ease,opacity .18s ease}
.menu-toggle:hover{background:#000}
.flyout-menu{position:fixed;inset:0;z-index:100;visibility:hidden;pointer-events:none}
.flyout-menu.open{visibility:visible;pointer-events:auto}
.flyout-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.38);opacity:0;transition:opacity .22s ease}
.flyout-menu.open .flyout-backdrop{opacity:1}
.flyout-panel{position:absolute;left:0;top:0;bottom:0;width:min(340px,86vw);background:#fff;padding:24px;box-shadow:20px 0 50px rgba(15,23,42,.16);transform:translateX(-102%);transition:transform .24s ease;display:flex;flex-direction:column}
.flyout-menu.open .flyout-panel{transform:translateX(0)}
.flyout-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px}
.flyout-brand{font-size:20px;font-weight:900;color:#111827;text-decoration:none}
.flyout-close{width:40px;height:40px;border-radius:50%;padding:0;background:#f3f4f6;color:#111827;font-size:26px;font-weight:400;line-height:1}
.flyout-nav{display:grid;gap:4px}
.flyout-nav a{display:block;padding:13px 14px;border-radius:10px;color:#4b5563;text-decoration:none;font-size:16px;font-weight:700}
.flyout-nav a:hover,.flyout-nav a.active{background:#f3f4f6;color:#111827}
body.menu-open{overflow:hidden}
@media(max-width:700px){.catalogue-page .catalogue-toolbar{grid-template-columns:1fr}.catalogue-page .catalogue-toolbar button{width:100%;margin-top:0}}

/* Stock states */
.product-stock-label{margin-top:7px;font-size:12px;font-weight:800}.product-stock-label.low{color:#92400e}.product-stock-label.out{color:#b91c1c}.stock-error{border-color:#fecaca;background:#fff7f7}.stock-error-text{color:#b91c1c!important;font-weight:800}.stock-pill{display:inline-flex;align-items:center;justify-content:center;min-width:58px;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:900}.stock-pill.low{background:#fef3c7;color:#92400e}.stock-pill.out{background:#fee2e2;color:#991b1b}

/* Dashboard */
.dashboard-shell{width:min(1400px,calc(100% - 40px));margin:0px auto 80px}.dashboard-heading{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}.dashboard-heading h1{margin:0}.dashboard-kpis{display:grid;grid-template-columns:2fr repeat(4,1fr);gap:16px;margin-bottom:24px}.dashboard-kpi{background:#fff;border:1px solid #e5e7eb;border-radius:20px;padding:22px;box-shadow:0 14px 40px rgba(15,23,42,.05);display:grid;gap:7px}.dashboard-kpi span{font-size:13px;color:#64748b;font-weight:700}.dashboard-kpi strong{font-size:28px;line-height:1;font-weight:900}.dashboard-kpi small{font-size:12px;color:#64748b}.dashboard-kpi-main strong{font-size:30px}.dashboard-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:start}.dashboard-panel{padding:0;overflow:hidden}.dashboard-panel-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:22px 24px;border-bottom:1px solid #e5e7eb}.dashboard-panel-heading h2{margin:0 0 3px}.dashboard-panel-heading p{margin:0;color:#64748b;font-size:13px}.dashboard-panel-heading>a{font-size:13px;color:#111827;font-weight:800;text-decoration:none}.dashboard-list{display:grid}.dashboard-sale-row,.dashboard-stock-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:15px 24px;border-bottom:1px solid #e5e7eb;text-decoration:none;color:#111827}.dashboard-sale-row:last-child,.dashboard-stock-row:last-child{border-bottom:0}.dashboard-sale-row:hover,.dashboard-stock-row:hover{background:#f8fafc}.dashboard-sale-row>span,.dashboard-stock-row>span:first-child{display:grid;gap:3px}.dashboard-sale-row small,.dashboard-stock-row small{font-size:12px;color:#64748b}.dashboard-empty{padding:28px 24px;color:#64748b;font-size:14px}
@media(max-width:950px){.dashboard-kpis{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}}
@media(max-width:600px){.dashboard-shell{width:calc(100% - 30px);margin:0}.dashboard-heading{align-items:center}.dashboard-heading .button-link{padding:11px 13px}.dashboard-kpis{grid-template-columns:1fr 1fr;gap:5px}.dashboard-kpi{padding:17px;border-radius:16px}.dashboard-kpi strong{font-size:23px}.dashboard-kpi-main strong{font-size:28px}.dashboard-panel-heading,.dashboard-sale-row,.dashboard-stock-row{padding-left:17px;padding-right:17px}}

/* Sales, stock and receipt pages */
.sales-shell,.sale-detail-shell{width:min(1400px,calc(100% - 40px));margin:0px auto 80px}
.sales-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:20px}
.sales-heading h1{margin:0}
.period-tabs{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 20px}
.period-tabs a{display:inline-flex;align-items:center;justify-content:center;min-height:38px;padding:8px 13px;border-radius:999px;background:#fff;border:1px solid #e5e7eb;color:#64748b;text-decoration:none;font-size:13px;font-weight:800;transition:.15s ease}
.period-tabs a:hover{border-color:#cbd5e1;color:#111827}
.period-tabs a.active{background:#111827;border-color:#111827;color:#fff}
.sales-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}
.sales-kpis .panel{padding:20px;display:grid;gap:8px}
.sales-kpis span{font-size:13px;color:#64748b;font-weight:700}
.sales-kpis strong{font-size:26px;line-height:1;font-weight:900}
.sales-list-panel{padding:0;overflow:hidden}
.sales-list{display:grid}
.sale-row{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(130px,.8fr) minmax(150px,.8fr) minmax(100px,.45fr);gap:20px;align-items:center;padding:17px 22px;border-bottom:1px solid #e5e7eb;color:#111827;text-decoration:none;transition:background .15s ease}
.sale-row:last-child{border-bottom:0}
.sale-row:hover{background:#f8fafc}
.sale-row>div{display:grid;gap:4px;min-width:0}
.sale-row span{font-size:12px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sale-row-total{text-align:right;font-size:18px;font-weight:900}
.payment-pill{justify-self:start;display:inline-flex!important;align-items:center;width:auto;padding:5px 8px;border-radius:999px;font-size:10px!important;line-height:1;font-weight:900;letter-spacing:.04em}
.payment-pill.cash{background:#dcfce7;color:#166534}
.payment-pill.card{background:#dbeafe;color:#1d4ed8}
.stock-shell .period-tabs{margin-bottom:18px}
.stock-change{font-weight:900}
.stock-change.positive{color:#166534}
.stock-change.negative{color:#b91c1c}

/* Sale detail / printable receipt */
.sale-detail-shell{max-width:900px}
.sale-detail-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.sale-detail-actions .button-link{width:auto}
.receipt{padding:28px}
.receipt-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:22px;border-bottom:1px solid #e5e7eb}
.receipt-head h1{margin:0 0 5px}
.receipt-head p{margin:0;color:#64748b;font-size:13px}
.receipt-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:20px 0;border-bottom:1px solid #e5e7eb}
.receipt-meta>div{display:grid;gap:4px}
.receipt-meta span,.receipt-reference span{font-size:12px;color:#64748b}
.receipt-meta strong{font-size:14px}
.receipt-items{display:grid;padding:8px 0}
.receipt-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:13px 0;border-bottom:1px solid #f1f5f9}
.receipt-item>div{display:grid;gap:4px}
.receipt-item span{font-size:12px;color:#64748b}
.receipt-total{display:flex;align-items:center;justify-content:space-between;padding:20px 0 10px;font-size:22px}
.receipt-total strong{font-size:28px}
.receipt-cash{display:grid;gap:8px;padding:14px 0;border-top:1px solid #e5e7eb}
.receipt-cash>div{display:flex;justify-content:space-between;gap:20px}
.receipt-reference{display:grid;gap:5px;margin-top:14px;padding-top:14px;border-top:1px solid #e5e7eb}
.receipt-reference code{font-size:12px;overflow-wrap:anywhere}

/* Checkout polish */
.checkout-payment-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.checkout-payment-buttons button{width:100%;margin:0;min-height:50px}
.checkout-payment-buttons .secondary{margin:0}
.checkout-summary>label{margin-top:0}
.checkout-summary .secondary-link{display:block;width:100%;margin-top:0}
.checkout-products-panel{min-width:0}
.cash-modal-card{position:relative;z-index:1;width:min(480px,100%);background:#fff;border-radius:22px;padding:28px;box-shadow:0 30px 100px rgba(0,0,0,.25)}
.cash-modal-card h2{margin:0 0 20px;font-size:28px}
.cash-total-row,.cash-change-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 0}
.cash-total-row{border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;margin-bottom:18px}
.cash-change-row{font-size:18px;margin-top:5px}
.cash-total-row strong,.cash-change-row strong{font-size:22px}
#complete-cash{width:100%;margin-top:8px}

@media(max-width:850px){
.sales-kpis{grid-template-columns:1fr 1fr}
.sale-row{grid-template-columns:minmax(0,1fr) 110px 110px}
.sale-row>div:nth-child(3){display:none}
.receipt-meta{grid-template-columns:1fr}
}
@media(max-width:600px){
.sales-shell,.sale-detail-shell{width:calc(100% - 30px);margin:78px 15px 50px}
.sales-kpis{grid-template-columns:1fr 1fr;gap:10px}
.sales-kpis .panel{padding:16px}
.sales-kpis strong{font-size:21px}
.period-tabs{gap:6px}
.period-tabs a{padding:7px 11px;font-size:12px}
.sale-row{grid-template-columns:minmax(0,1fr) auto;padding:15px 16px;gap:12px}
.sale-row>div:nth-child(2),.sale-row>div:nth-child(3){display:none}
.sale-row-total{font-size:17px}
.receipt{padding:20px}
.receipt-head{align-items:center}
.receipt-total strong{font-size:24px}
.checkout-payment-buttons{grid-template-columns:1fr}
.cash-modal-card{padding:22px;border-radius:18px}
}
@media print{
body{background:#fff}.no-print,.menu-toggle,.flyout-menu,.cart-fab{display:none!important}.sale-detail-shell{width:100%;max-width:none;margin:0}.receipt{border:0;box-shadow:none;padding:0}
}

/* Refunds / returns */
.refund-history,.refund-panel{margin-top:24px}.refund-history h2,.refund-panel h2{margin:0}.refund-history-row{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:14px 0;border-bottom:1px solid #e5e7eb}.refund-history-row>div{display:grid;gap:4px}.refund-history-row>div:last-child{text-align:right}.refund-history-row span,.refund-reason{font-size:13px;color:#64748b}.refund-reason{margin:8px 0 16px}.refund-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.refund-panel-head>span{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.06em;color:#64748b;background:#f3f4f6;border-radius:999px;padding:7px 10px}.refund-form{gap:16px}.refund-items{display:grid;border-top:1px solid #e5e7eb}.refund-item{display:grid;grid-template-columns:minmax(0,1fr) 110px;gap:18px;align-items:center;padding:14px 0;border-bottom:1px solid #e5e7eb}.refund-item>div{display:grid;gap:4px}.refund-item span{font-size:13px;color:#64748b}.refund-item label{gap:5px}.refund-item input{padding:10px 12px;font-size:16px}.refund-item.is-fully-refunded{opacity:.45}.refund-stock-check{display:flex}.refund-form-total{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e5e7eb;padding-top:16px;font-size:20px}.refund-form-total strong{font-size:24px}.refund-submit{width:100%}.receipt-refunded{color:#b91c1c;font-size:17px}.receipt-net{font-size:22px}.refund-pill{display:inline-flex;margin-bottom:5px;border-radius:999px;background:#fee2e2;color:#991b1b;padding:4px 7px;font-size:10px;font-weight:900;white-space:nowrap}.sale-row-total{display:grid;justify-items:end;gap:2px}.sale-row-total strong{font-size:inherit}.notice:not(.error):not(.success){background:#fef3c7;color:#92400e}
@media(max-width:600px){.refund-history-row{display:grid}.refund-history-row>div:last-child{text-align:left}.refund-item{grid-template-columns:1fr 90px}.refund-panel-head{display:grid}.sale-row-total{justify-items:start}}
@media print{.refund-history,.refund-panel{display:none!important}}

/* Barcode scanner + product CSV tools */
.catalogue-meta-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:14px}.catalogue-meta-row .catalogue-meta{margin-bottom:0}.scanner-ready{display:inline-flex;align-items:center;gap:7px;color:#64748b;font-size:12px;font-weight:700}.scanner-ready span{width:7px;height:7px;border-radius:50%;background:#16a34a;box-shadow:0 0 0 4px rgba(22,163,74,.1)}.scanner-toast{position:fixed;left:50%;bottom:28px;z-index:120;transform:translateX(-50%);max-width:min(520px,calc(100% - 30px));padding:12px 16px;border-radius:999px;background:#111827;color:#fff;box-shadow:0 12px 38px rgba(15,23,42,.25);font-size:13px;font-weight:800;text-align:center}.scanner-toast.success{background:#166534}.scanner-toast.error{background:#991b1b}.product-tools-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:start;margin-bottom:24px}.product-tools-grid .panel{height:100%}.csv-columns{display:grid;gap:8px;margin-top:20px;padding-top:18px;border-top:1px solid #e5e7eb}.csv-columns code{display:block;padding:12px;border-radius:10px;background:#f8fafc;color:#475569;white-space:normal;line-height:1.55}.import-preview{padding:0;overflow:hidden}.import-preview-head{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px;border-bottom:1px solid #e5e7eb}.import-preview-head h2{margin:0 0 4px}.import-preview-head p{margin:0;color:#64748b;font-size:13px}.import-preview .table-wrap{padding:0 24px}.import-row-error{background:#fff7f7}.import-preview-note{padding:0 24px}.import-actions{display:flex;align-items:end;justify-content:space-between;gap:14px;padding:20px 24px;border-top:1px solid #e5e7eb}.import-actions form:first-child{display:flex;align-items:end;gap:12px}.import-actions form:first-child label{min-width:260px}.import-actions .secondary{margin:0;width:auto}.import-actions select{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:12px 14px;font:inherit;background:#fff}
@media(max-width:850px){.product-tools-grid{grid-template-columns:1fr}.import-actions,.import-actions form:first-child{align-items:stretch;display:grid}.import-actions form:first-child label{min-width:0}.import-actions button{width:100%}}
@media(max-width:600px){.catalogue-meta-row{align-items:flex-start}.scanner-ready{font-size:11px}.scanner-toast{bottom:88px}.product-tools-shell{margin-top:78px}.import-preview .table-wrap{padding:0 14px}.import-preview-head,.import-actions{padding-left:16px;padding-right:16px}}

/* Settings, terminal pairing & receipt printing */
.settings-shell{max-width:1200px}.device-settings-panel{margin-bottom:24px}.settings-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:24px;align-items:start}.settings-terminal-list{margin-top:24px}.stack-form textarea,.stack-form select,.device-settings-panel select{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:14px 15px;font:inherit;background:#fff;outline:none}.stack-form textarea:focus,.stack-form select:focus,.device-settings-panel select:focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}.paired-terminal{display:grid;grid-template-columns:1fr auto;gap:3px 12px;padding:12px 0;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}.paired-terminal span{font-size:12px;color:#64748b}.paired-terminal strong{grid-row:2;min-width:0;overflow-wrap:anywhere}.paired-terminal a{grid-column:2;grid-row:1/3;align-self:center;color:#111827;font-size:12px;font-weight:800}.receipt-print-frame{position:fixed;width:1px;height:1px;left:-10000px;top:-10000px;border:0;visibility:hidden}.receipt-business{display:grid;gap:5px;text-align:center;padding-bottom:20px;border-bottom:1px solid #e5e7eb}.receipt-business>strong{font-size:22px}.receipt-business span{font-size:12px;color:#475569;line-height:1.45}.receipt-vat{display:grid;gap:8px;padding:14px 0;border-top:1px solid #e5e7eb}.receipt-vat>strong{font-size:13px}.receipt-vat>div{display:grid;grid-template-columns:1fr auto auto;gap:12px;font-size:12px;color:#64748b}.receipt-vat>div strong{color:#111827}.receipt-footer{text-align:center;padding:18px 0 4px;font-size:12px;font-weight:700}.receipt-embedded{background:#fff}.receipt-embedded .sale-detail-shell{margin:0;width:100%;max-width:none}.receipt-embedded .receipt{border:0;box-shadow:none;border-radius:0}
@media(max-width:850px){.settings-grid{grid-template-columns:1fr}}
@media(max-width:600px){.settings-shell{width:calc(100% - 30px);margin:78px 15px 50px}.receipt-vat>div{grid-template-columns:1fr auto}.receipt-vat>div strong{grid-column:2}}
@media print{
@page{size:80mm auto;margin:3mm}
html,body{width:74mm!important;min-width:0!important;background:#fff!important;color:#000!important;font-family:Arial,sans-serif!important;font-size:10pt!important}
body{margin:0!important;padding:0!important}.sale-detail-shell{width:74mm!important;max-width:74mm!important;margin:0!important;padding:0!important}.receipt{width:74mm!important;max-width:74mm!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;box-shadow:none!important}.receipt-business{padding-bottom:4mm}.receipt-business>strong{font-size:15pt}.receipt-head{padding:4mm 0}.receipt-head .eyebrow{display:none}.receipt-head h1{font-size:14pt}.receipt-meta{grid-template-columns:1fr!important;gap:2mm;padding:3mm 0}.receipt-item{padding:2.5mm 0}.receipt-item strong{font-size:9.5pt}.receipt-total{font-size:11pt;padding:4mm 0 2mm}.receipt-total strong{font-size:15pt}.receipt-cash,.receipt-vat,.receipt-reference{font-size:8.5pt}.receipt-footer{padding-top:5mm}.receipt .badge{display:none!important}
}

/* Scale barcode items */
.scale-item-icon{display:grid;place-items:center;font-size:32px;color:#475569;background:#f8fafc}.checkout-scale-item .scale-fixed-qty{display:grid;gap:5px}.checkout-scale-item .scale-fixed-qty>span{font-weight:800}.checkout-scale-item .scale-fixed-qty small{color:#64748b}.checkout-scale-item{background:#fafafa;border-radius:14px;padding-left:10px;padding-right:10px}.checkout-scale-item .checkout-item-info span{color:#64748b}

/* Checkout terminal switcher, discounts and gift cards */
.discount-field{display:grid;gap:7px;padding:10px 0;font-size:13px;font-weight:800;color:#475569}
.discount-field select{width:100%;border:1px solid #d1d5db;border-radius:12px;padding:12px 14px;font:inherit;background:#fff;color:#111827;outline:none}
.discount-field select:focus{border-color:#111827;box-shadow:0 0 0 3px rgba(17,24,39,.08)}
.discount-summary-row strong{color:#b45309}
.checkout-payment-buttons-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.terminal-picker-wrap{display:grid;gap:10px;padding:14px 0;border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.terminal-picker-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.terminal-picker-head>span{font-size:12px;color:#64748b;font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.terminal-picker-head>a{font-size:12px;font-weight:800;color:#111827;text-decoration:none}
.terminal-switcher{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.terminal-option{min-width:0;background:#f3f4f6;color:#475569;border:1px solid transparent;border-radius:12px;padding:11px 12px;display:grid;gap:3px;text-align:left;box-shadow:none}
.terminal-option span{font-size:13px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.terminal-option small{font-size:11px;font-weight:700;color:#64748b}
.terminal-option:hover{background:#e5e7eb;color:#111827}
.terminal-option.active{background:#111827;color:#fff;border-color:#111827}
.terminal-option.active small{color:#cbd5e1}
.terminal-empty{font-size:13px;color:#64748b;padding:10px 0}
.terminal-empty a{color:#111827;font-weight:800}
.payment-pill.gift_card{background:#fef3c7;color:#92400e}
.sales-kpis-five{grid-template-columns:repeat(5,minmax(0,1fr))}
.receipt-discount strong{color:#b45309}
@media(max-width:1100px){.checkout-payment-buttons-three{grid-template-columns:1fr}.sales-kpis-five{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.terminal-switcher{grid-template-columns:1fr}.sales-kpis-five{grid-template-columns:1fr 1fr}}

/* Split gift card payments */
.gift-card-split-card{width:min(520px,100%)}
.gift-card-breakdown{display:grid;gap:8px;margin:16px 0;padding:14px;border-radius:14px;background:#f8fafc;border:1px solid #e5e7eb}
.gift-card-breakdown>div{display:flex;align-items:center;justify-content:space-between;gap:18px}
.gift-card-remaining{padding-top:10px;border-top:1px solid #e5e7eb;font-size:17px}
.gift-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
.gift-card-actions #complete-gift-card{grid-column:1/-1}
.receipt-payment-split{display:grid;gap:5px;padding:12px 0;border-top:1px dashed #d1d5db;border-bottom:1px dashed #d1d5db;margin:8px 0}
.receipt-payment-split>div{display:flex;justify-content:space-between;gap:12px}
@media(max-width:600px){.gift-card-actions{grid-template-columns:1fr}.gift-card-actions #complete-gift-card{grid-column:auto}}

.cash-gift-row{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:-4px 0 14px;padding:10px 12px;border-radius:10px;background:#f8fafc;color:#475569;font-size:13px}.cash-gift-row strong{color:#111827}

* {border-radius: 0!important;}


.admin-shell .eyebrow,
.page-shell .eyebrow,
.dashboard-shell .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 800;
  color: var(--grey);
  margin-bottom: 5px;
}


.admin-heading h1,
.page-shell .dashboard-heading h1 {
  font-size: 28px;
  line-height: 1.05;
  margin: 0;
  font-weight: 600;
}

.dashboard-kpi {
  align-content: baseline;
}

.link-button {
  color: #b91c1c!important;
}

.product-tools-shell {
  width: 100%;
  padding: 34px 45px 70px;
  margin: 0px auto 80px;
}

.dashboard-kpi,
.panel {
box-shadow: none!important;
}


@media (max-width: 760px) {
  .pos-header {
flex-direction: unset!important;
    align-items: center!important;
  }

  .main-nav a {
    padding: 5px 0 5px 10px!important;
    font-size: 16px!important;
  }


.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 5px!important;
  right: -5px!important;
  bottom: -3px!important;
  height: 3px;
  background: var(--black);
}


}
/* Authentication */
.remember-check{display:flex!important;grid-template-columns:auto 1fr;align-items:center;justify-content:flex-start;gap:9px;font-weight:600;color:#4b5563}.remember-check input{width:auto;margin:0}.auth-text-link{display:inline-block;text-align:center;color:#4b5563;font-size:14px;font-weight:700;text-decoration:none}.auth-text-link:hover{color:#111827;text-decoration:underline}.auth-full-link{display:block;width:100%;text-align:center;margin-top:14px}
