*{box-sizing:border-box}
:root{
  --navy:#082B63;
  --navy2:#0A417A;
  --blue:#0D5BFF;
  --cyan:#10CBEF;
  --lime:#B7FF00;
  --green:#08A56A;
  --bg:#F4F8FC;
  --line:#DDE6F0;
  --text:#10284E;
  --muted:#71819A;
  --white:#FFFFFF;
}
html,body{
  margin:0;
  min-height:100%;
  font-family:Arial,Helvetica,sans-serif;
  background:var(--bg);
  color:var(--text)
}
body{min-width:0}
a{color:inherit}
button,input,select{font:inherit}

/* =========================
   TOP BAR
========================= */
.pos-topbar{
  min-height:66px;
  background:linear-gradient(90deg,var(--navy),var(--navy2));
  color:#fff;
  display:grid;
  grid-template-columns:260px minmax(260px,1fr) auto;
  gap:18px;
  align-items:center;
  padding:0 18px;
  position:sticky;
  top:0;
  z-index:50;
  box-shadow:0 2px 12px rgba(0,0,0,.16)
}
.pos-brand{display:flex;align-items:center;gap:10px;min-width:0}
.menu-btn{
  border:0;background:transparent;color:#fff;font-size:26px;
  cursor:pointer;padding:0 8px 0 0
}
.brand-name{font-weight:800;font-size:30px;letter-spacing:-1px}
.brand-symbol{width:34px;height:34px;object-fit:contain;flex:none}
.pos-top-search-wrap{min-width:0}
.pos-top-search{
  width:100%;height:42px;border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08);color:#fff;border-radius:8px;
  padding:0 16px;outline:none
}
.pos-top-search::placeholder{color:#D5E4F5}
.page-title{font-size:16px;font-weight:700}
.pos-top-status{display:flex;align-items:center;gap:9px;font-size:12px}
.online-dot{width:9px;height:9px;border-radius:50%;background:#0CE676}
.cashier-badge{
  display:flex;align-items:center;gap:8px;margin-left:12px;
  padding-left:12px;border-left:1px solid rgba(255,255,255,.2)
}
.cashier-badge strong,.cashier-badge small{display:block}
.cashier-badge small{opacity:.75;margin-top:2px}
.avatar-circle{
  width:34px;height:34px;border-radius:50%;
  background:#fff;color:var(--navy);
  display:grid;place-items:center;font-weight:800
}

/* =========================
   SHELL
========================= */
.app-shell{
  display:block;
  min-height:calc(100vh - 66px)
}
.sidebar{display:none}
.main{
  width:100%;
  max-width:none;
  padding:18px;
  min-width:0
}
.mobile-nav{display:none}

/* =========================
   GENERIC UI
========================= */
.panel{
  width:100%;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:18px;
  margin-bottom:16px;
  box-shadow:0 1px 5px rgba(8,43,99,.04)
}
.panel h2{margin:0 0 14px;font-size:18px}
.panel-head{
  display:flex;justify-content:space-between;align-items:center;
  gap:12px;margin-bottom:14px
}
.form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px
}
.form-grid .full{grid-column:1/-1}
label{
  display:block;
  font-size:11px;
  font-weight:700;
  margin-bottom:5px;
  color:#324A68
}
input,select{
  width:100%;
  min-height:40px;
  border:1px solid #B9C7D8;
  border-radius:6px;
  background:#fff;
  padding:8px 10px;
  color:var(--text)
}
input:focus,select:focus{
  outline:2px solid rgba(13,91,255,.13);
  border-color:#75A8E8
}
.btn{
  min-height:40px;
  border:1px solid var(--line);
  border-radius:6px;
  background:#fff;
  padding:0 14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:700;
  cursor:pointer
}
.btn.primary{
  background:var(--blue);
  border-color:var(--blue);
  color:#fff
}
.btn.compact{min-height:32px;padding:0 10px;font-size:12px}
.notice,.error{
  padding:11px 14px;
  margin-bottom:12px;
  border-radius:7px;
  border:1px solid #BCD8F4;
  background:#EFF7FF
}
.error{background:#FFF0F0;border-color:#E6B7B7}
.muted{color:var(--muted)}
.badge{
  display:inline-block;padding:4px 8px;border-radius:12px;
  font-size:10px;font-weight:800
}
.badge.ok{background:#E7F8EF;color:#11824E}
.badge.danger{background:#FDEAEA;color:#B82828}
.inline-inline{display:inline-block;margin-left:5px}
.table-wrap{width:100%;overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{
  padding:10px;
  border-bottom:1px solid var(--line);
  font-size:12px;
  text-align:left;
  vertical-align:middle
}
th{background:#F2F6FB;color:#48617D;font-weight:800}

/* =========================
   DASHBOARD
========================= */
.dashboard-hero{
  width:100%;
  min-height:185px;
  background:
    radial-gradient(circle at 82% 15%,rgba(16,203,239,.18),transparent 27%),
    linear-gradient(120deg,#fff 0%,#F5FAFF 100%);
  border:1px solid var(--line);
  border-radius:12px;
  padding:28px 30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  box-shadow:0 2px 10px rgba(8,43,99,.05);
  margin-bottom:16px
}
.dashboard-kicker{
  display:block;
  color:var(--blue);
  font-size:11px;
  font-weight:800;
  letter-spacing:1.4px;
  margin-bottom:8px
}
.dashboard-hero h1{
  margin:0;
  font-size:34px;
  line-height:1.1;
  color:var(--navy)
}
.dashboard-hero p{
  margin:10px 0 0;
  font-size:14px;
  color:#64758C
}
.dashboard-primary{
  flex:none;
  background:var(--blue);
  color:#fff;
  min-height:48px;
  padding:0 20px;
  border-radius:8px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:800;
  box-shadow:0 8px 18px rgba(13,91,255,.18)
}
.dashboard-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:16px
}
.dashboard-stat{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:20px;
  min-height:120px;
  box-shadow:0 1px 5px rgba(8,43,99,.04)
}
.dashboard-stat span{
  display:block;
  font-size:12px;
  color:#6B7C91;
  font-weight:700
}
.dashboard-stat strong{
  display:block;
  font-size:28px;
  margin-top:10px;
  color:var(--navy)
}
.dashboard-stat small{
  display:block;
  margin-top:7px;
  color:#8A98AA
}
.dashboard-panel{
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  padding:20px;
  box-shadow:0 1px 5px rgba(8,43,99,.04)
}
.dashboard-panel-head span{
  color:var(--blue);
  font-size:10px;
  font-weight:800;
  letter-spacing:1.2px
}
.dashboard-panel-head h2{
  margin:5px 0 14px;
  font-size:19px
}
.dashboard-actions{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px
}
.dashboard-actions a{
  min-height:98px;
  border:1px solid var(--line);
  border-radius:9px;
  background:#FAFCFF;
  text-decoration:none;
  display:flex;
  align-items:center;
  gap:13px;
  padding:14px;
  transition:.15s ease
}
.dashboard-actions a:hover{
  transform:translateY(-1px);
  border-color:#A9C8EA;
  box-shadow:0 5px 15px rgba(8,43,99,.06)
}
.action-icon{
  flex:none;
  width:42px;height:42px;
  border-radius:8px;
  background:#EAF3FF;
  color:var(--blue);
  display:grid;place-items:center;
  font-size:21px;
  font-weight:800
}
.dashboard-actions strong,.dashboard-actions small{display:block}
.dashboard-actions small{
  color:#7A899C;
  margin-top:4px;
  font-size:11px
}

/* =========================
   POS CASHIER
========================= */
.sale-notice{max-width:760px;margin-left:auto;margin-right:auto}
.pos-context-bar{
  background:#fff;border:1px solid var(--line);border-radius:9px;
  padding:10px 14px;margin-bottom:10px;
  display:flex;align-items:end;gap:20px
}
.store-switcher{display:flex;align-items:end;gap:8px}
.store-switcher label{margin:0 0 11px}
.store-switcher select{min-width:280px}
.context-current span,.context-current strong{display:block}
.context-current span{font-size:10px;color:#71819A}
.context-current strong{margin-top:4px;color:var(--navy)}

.pos-workspace{
  display:grid;
  grid-template-columns:230px minmax(0,1fr) 390px;
  gap:12px;
  align-items:stretch;
  min-height:calc(100vh - 104px)
}
.order-side,.catalog-center,.checkout-side{
  background:#fff;border:1px solid var(--line);border-radius:10px;
  box-shadow:0 1px 5px rgba(8,43,99,.05)
}
.order-side{display:flex;flex-direction:column;min-height:0}
.order-header{
  display:flex;justify-content:space-between;
  padding:15px;border-bottom:1px solid var(--line)
}
.order-header strong,.order-header small{display:block}
.order-header small{color:#789;margin-top:3px}
.order-cashier{padding:10px 12px 0}
.order-cashier select{
  width:100%;height:39px;border:1px solid var(--line);
  border-radius:6px;background:#fff;color:var(--navy);padding:0 8px
}
.fixed-cashier{
  border:1px solid var(--line);padding:9px;border-radius:6px;background:#F7FAFE
}
.fixed-cashier strong,.fixed-cashier span{display:block}
.fixed-cashier span{font-size:10px;color:#78879A;margin-top:3px}
.customer-btn{
  margin:12px;border:1px solid var(--line);background:#F7FAFE;
  border-radius:8px;padding:13px;color:var(--navy);font-weight:700
}
.order-empty{
  flex:1;display:flex;flex-direction:column;align-items:center;
  justify-content:center;text-align:center;color:#71819A;padding:20px
}
.order-empty strong{color:#5C6D87;margin:8px 0}
.order-empty span{font-size:13px;line-height:1.4}
.cart-icon{font-size:46px;opacity:.35}
.numpad-wrap{padding:10px;border-top:1px solid var(--line)}
.numpad-labels{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:6px}
.numpad-labels button,.numpad button{
  border:1px solid var(--line);background:#F7FAFE;
  border-radius:6px;height:42px;color:var(--navy);font-weight:700
}
.numpad{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.numpad .enter{background:var(--navy);color:#fff}

.catalog-center{padding:12px;min-width:0}
.category-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:8px;margin-bottom:12px
}
.category-card{
  min-height:88px;background:#fff;border:1px solid var(--line);
  border-radius:8px;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:8px;
  color:#50617A;cursor:pointer
}
.category-card.active{
  border:2px solid #0FB278;background:#F2FFFA;color:#058B5B
}
.cat-icon{font-size:25px}
.category-card strong{font-size:12px}
.catalog-heading{
  display:flex;justify-content:space-between;align-items:center;
  border-top:1px solid var(--line);padding-top:10px;margin-bottom:10px
}
.catalog-heading h2{display:inline;font-size:19px;margin:0}
.catalog-heading span{font-size:12px;color:#75859A;margin-left:6px}
.pos-product-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:9px
}
.pos-product-card{
  background:#fff;border:1px solid var(--line);border-radius:8px;
  padding:9px;text-align:left;cursor:pointer;min-height:170px;position:relative
}
.pos-product-card:hover{
  border-color:#88B8E8;box-shadow:0 3px 12px rgba(8,43,99,.08)
}
.product-photo-fallback{
  height:76px;border-radius:7px;
  background:linear-gradient(145deg,#EEF4FB,#DCEAF8);
  display:grid;place-items:center;font-size:34px;font-weight:800;
  color:#6A8BB1;margin-bottom:7px
}
.product-name{font-size:12px;line-height:1.25;min-height:31px}
.product-bottom{
  display:flex;align-items:center;justify-content:space-between;margin-top:7px
}
.product-bottom strong{color:#0D49B5}
.add-circle{
  width:28px;height:28px;border-radius:6px;background:#E8FBF4;
  color:#08A56A;display:grid;place-items:center;font-size:20px;font-weight:800
}
.pos-product-card small{
  display:block;color:#8794A7;font-size:10px;margin-top:4px
}

.checkout-side{display:flex;flex-direction:column;min-height:0}
.checkout-title{
  display:flex;justify-content:space-between;align-items:center;
  padding:15px;border-bottom:1px solid var(--line)
}
.checkout-title button{border:0;background:transparent;color:#71819A;cursor:pointer}
.checkout-items{flex:1;overflow:auto;max-height:50vh}
.checkout-item{
  display:grid;grid-template-columns:minmax(0,1fr) auto auto auto;
  gap:8px;align-items:center;padding:12px;border-bottom:1px solid var(--line)
}
.checkout-item-main{display:flex;gap:9px;align-items:center;min-width:0}
.mini-product{
  width:42px;height:42px;border-radius:7px;background:#EFF4FA;
  display:grid;place-items:center;font-weight:800;color:#6987A8;flex:none
}
.checkout-name{min-width:0}
.checkout-name strong{
  display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.checkout-name span{display:block;font-size:12px;color:#0C4A9C;margin-top:3px}
.qty-control{
  display:flex;align-items:center;border:1px solid var(--line);
  border-radius:6px;overflow:hidden
}
.qty-control button{
  width:29px;height:31px;border:0;background:#F7FAFE;
  color:#0E548F;font-weight:800
}
.qty-control span{width:28px;text-align:center;font-size:12px}
.line-total{font-size:12px;color:#0D4C9B}
.trash-btn{border:0;background:transparent;cursor:pointer}
.checkout-summary{padding:12px;border-top:1px solid var(--line)}
.checkout-summary>div{
  display:flex;justify-content:space-between;padding:8px 2px
}
.checkout-summary .total{
  font-size:22px;font-weight:800;border-top:1px solid var(--line);
  margin-top:5px;padding-top:14px
}
.payment-form{padding:0 12px 12px}
.payment-form input{
  width:100%;height:40px;border:1px solid var(--line);
  border-radius:6px;padding:0 10px
}
.change-row{display:flex;justify-content:space-between;padding:9px 0}
.checkout-actions{
  display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:7px 0
}
.checkout-actions button{
  height:54px;border-radius:7px;border:1px solid var(--line);
  background:#fff;font-weight:700
}
.discount-btn{color:#079B66}
.hold-btn{color:#0D5BFF}
.cancel-btn{color:#D92727}
.pay-btn{
  width:100%;height:64px;border:0;border-radius:8px;
  background:#08A56A;color:#fff;font-size:21px;font-weight:800;
  cursor:pointer;display:flex;align-items:center;justify-content:center;gap:12px
}

/* =========================
   REPORTS
========================= */
.report-app{
  width:100%;
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  overflow:hidden
}
.report-controls{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:12px;align-items:center;
  padding:12px;background:#F8FBFF;border-bottom:1px solid var(--line)
}
.mode-tabs{display:flex;gap:7px}
.mode-tabs a{
  padding:12px 28px;border:1px solid var(--line);background:#fff;
  border-radius:6px;text-decoration:none;font-weight:700
}
.mode-tabs a.active{background:#168BFF;color:#fff;border-color:#168BFF}
.report-filter{display:flex;gap:8px;justify-content:center;align-items:center}
.export-actions{display:flex;gap:8px}
.export-actions button{
  height:36px;padding:0 14px;border-radius:5px;background:#fff;font-weight:700
}
.export-excel{border:1px solid #4DC98C;color:#168B50}
.export-pdf{border:1px solid #F28B8B;color:#D92727}
.report-card{
  margin:12px;border:1px solid var(--line);border-radius:8px;
  background:#fff;padding:14px
}
.report-card-header{
  display:grid;grid-template-columns:auto 1fr auto;
  align-items:center;gap:16px
}
.report-logo-wrap{
  display:flex;align-items:center;gap:7px;min-width:190px
}
.report-logo-full{
  height:33px!important;width:auto!important;max-width:155px!important;object-fit:contain
}
.report-logo-symbol{
  width:29px!important;height:29px!important;object-fit:contain
}
.report-card-header h1{margin:0;font-size:20px;color:var(--navy)}
.report-date{font-size:12px;color:#5F6E80}
.report-info{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:5px 18px;font-size:12px;margin:12px 0
}
.report-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;margin:14px 0
}
.report-kpis>div{
  border:1px solid var(--line);border-radius:7px;padding:12px;background:#F8FBFF
}
.report-kpis span{display:block;font-size:11px;color:#6A7A8E}
.report-kpis strong{
  display:block;font-size:18px;color:#0D4C9B;margin-top:4px
}
.report-two-col{
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px
}
.report-two-col section{
  border:1px solid var(--line);border-radius:7px;padding:10px
}
.report-two-col h3{font-size:13px;margin:0 0 8px}

/* =========================
   LOGIN
========================= */
.login-body{
  min-height:100vh;display:grid;place-items:center;
  background:linear-gradient(135deg,#082B63 0,#0D5BFF 55%,#10CBEF 100%);
  padding:18px
}
.login-card{
  width:min(430px,100%);
  background:#fff;border-top:7px solid var(--lime);
  padding:28px;border-radius:8px;
  box-shadow:0 20px 60px rgba(0,0,0,.25)
}
.login-brand{font-size:25px;font-weight:800;color:var(--navy)}
.login-card h1{margin:20px 0 6px}
.login-card p{color:#617086}
.login-card form{display:grid;gap:10px;margin-top:18px}

/* =========================
   RESPONSIVE
========================= */
@media(max-width:1200px){
  .pos-workspace{grid-template-columns:190px minmax(0,1fr) 330px}
  .pos-product-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .dashboard-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:900px){
  .pos-topbar{
    grid-template-columns:auto 1fr;
    gap:8px;height:auto;min-height:60px;padding:9px 12px
  }
  .pos-top-search-wrap{grid-column:1/-1;grid-row:2}
  .pos-top-status{justify-self:end}
  .brand-name{font-size:23px}
  .brand-symbol{width:29px;height:29px}
  .main{padding:10px 10px 76px}
  .dashboard-hero{align-items:flex-start;flex-direction:column}
  .dashboard-stats{grid-template-columns:1fr}
  .dashboard-actions{grid-template-columns:1fr 1fr}
  .form-grid{grid-template-columns:1fr}
  .pos-context-bar{align-items:stretch;flex-direction:column;gap:8px}
  .store-switcher{align-items:stretch;flex-direction:column}
  .store-switcher label{margin:0}
  .store-switcher select{width:100%;min-width:0}
  .pos-workspace{grid-template-columns:1fr}
  .order-side{display:none}
  .checkout-side{order:3}
  .checkout-items{max-height:none}
  .pos-product-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .category-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .mobile-nav{
    position:fixed;bottom:0;left:0;right:0;
    display:grid;grid-template-columns:repeat(5,1fr);
    background:var(--navy);color:#fff;z-index:60;height:64px
  }
  .mobile-nav a{
    display:flex;align-items:center;justify-content:center;
    text-decoration:none;font-size:11px;border-top:3px solid transparent
  }
  .mobile-nav a.active{border-top-color:var(--lime);background:#0D407E}
  .report-controls{grid-template-columns:1fr}
  .report-filter{justify-content:flex-start;flex-wrap:wrap}
  .report-card-header{grid-template-columns:1fr}
  .report-info{grid-template-columns:1fr}
  .report-kpis{grid-template-columns:1fr 1fr}
  .report-two-col{grid-template-columns:1fr}
}
@media(max-width:520px){
  .pos-top-status>span:not(.online-dot){display:none}
  .cashier-badge div:last-child{display:none}
  .dashboard-hero{padding:20px}
  .dashboard-hero h1{font-size:27px}
  .dashboard-actions{grid-template-columns:1fr}
  .pos-product-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-kpis{grid-template-columns:1fr 1fr}
}
