:root{
  --bg:#e9f4ff;
  --card:#ffffff;
  --primary:#2f80ed;
  --primary2:#27ae60;
  --warning:#f2c94c;
  --orange:#f2994a;
  --text:#1f2a37;
  --muted:#6b7280;
  --shadow: 0 10px 30px rgba(14,58,110,.12);
  --radius:18px;
}
*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: linear-gradient(180deg,#bfe3ff 0%, #e9f4ff 35%, #e9f4ff 100%);
}
a{color:inherit;text-decoration:none;}
.container{max-width:980px;margin:0 auto;padding:18px 14px 96px;}
.topbar{
  display:flex;align-items:center;gap:12px;
  padding:14px;border-radius:22px;background:rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}
.avatar{
  width:54px;height:54px;border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #cfeaff 40%, #8dc6ff 100%);
  display:grid;place-items:center;
  border:3px solid rgba(255,255,255,.85);
  overflow:hidden;
}
.avatar span{font-weight:800;color:#1b4a86;}
.brand{flex:1;min-width:0;}
.brand h1{margin:0;font-size:20px;line-height:1.12;letter-spacing:.2px;}
.brand h1 b{color:#1f64c7;}
.brand p{margin:6px 0 0;color:var(--muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.badge{
  display:flex;align-items:center;gap:10px;
  background: linear-gradient(90deg,#24c16c,#2f80ed);
  color:#fff;border-radius:999px;padding:10px 12px;
  box-shadow:0 8px 18px rgba(39,174,96,.25);
  font-weight:700;
}
.badge small{font-weight:600;opacity:.9}
.grid{
  margin-top:14px;
  display:grid;gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.card{
  background:rgba(255,255,255,.82);
  border:1px solid rgba(255,255,255,.8);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.card.pad{padding:14px;}
.hero-actions{
  display:grid;gap:12px;
  grid-template-columns:repeat(2,minmax(0,1fr));
  margin-top:14px;
}
.action{
  position:relative;
  padding:16px;border-radius:22px;color:#fff;
  min-height:86px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  box-shadow:0 12px 26px rgba(0,0,0,.10);
}
.action .txt{font-weight:900;font-size:20px;line-height:1.05;}
.action .txt span{display:block;font-size:12px;font-weight:700;opacity:.9;margin-top:6px;}
.action .icon{
  width:56px;height:56px;border-radius:18px;background:rgba(255,255,255,.22);
  display:grid;place-items:center;
}
.action.blue{background: linear-gradient(135deg,#2f80ed,#56ccf2);}
.action.orange{background: linear-gradient(135deg,#f2994a,#f2c94c);}
.action.yellow{background: linear-gradient(135deg,#f2c94c,#f2994a);}
.action.green{background: linear-gradient(135deg,#27ae60,#6fcf97);}
.action:active{transform:translateY(1px);}
.row{
  display:flex;gap:12px;align-items:center;flex-wrap:wrap;
}
.input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(31,42,55,.12);
  background:rgba(255,255,255,.92);
  outline:none;
  font-size:15px;
}
label{font-size:13px;color:var(--muted);font-weight:700;display:block;margin:6px 2px;}
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  border:none;cursor:pointer;
  padding:12px 14px;border-radius:16px;
  font-weight:800;font-size:15px;
  box-shadow:0 10px 22px rgba(47,128,237,.16);
}
.btn.primary{background: linear-gradient(135deg,#2f80ed,#56ccf2); color:#fff;}
.btn.success{background: linear-gradient(135deg,#27ae60,#6fcf97); color:#fff;}
.btn.warn{background: linear-gradient(135deg,#f2994a,#f2c94c); color:#1f2a37;}
.btn.gray{background: rgba(31,42,55,.08); color:#1f2a37; box-shadow:none;}
.btn.danger{background: linear-gradient(135deg,#eb5757,#ff8a8a); color:#fff;}
.btn:disabled{opacity:.6;cursor:not-allowed;}
.table{width:100%;border-collapse:separate;border-spacing:0 10px;}
.table th{font-size:12px;color:var(--muted);text-align:left;padding:0 10px;}
.table td{
  background:rgba(255,255,255,.9);
  padding:12px 10px;
}
.table tr td:first-child{border-radius:14px 0 0 14px;}
.table tr td:last-child{border-radius:0 14px 14px 0;}
.pills{display:flex;gap:8px;flex-wrap:wrap;}
.pill{
  padding:10px 12px;border-radius:999px;font-weight:800;font-size:13px;
  background:rgba(47,128,237,.10); color:#1f64c7;
  border:1px solid rgba(47,128,237,.14);
}
.pill.active{background:rgba(39,174,96,.14); color:#187a44; border-color:rgba(39,174,96,.22);}
.products{
  display:grid;gap:10px;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.pitem{
  background:rgba(255,255,255,.88);
  border:1px solid rgba(31,42,55,.10);
  border-radius:18px;
  padding:10px;
  display:flex;flex-direction:column;gap:8px;
  min-height:106px;
}
.pitem b{font-size:14px;line-height:1.1;}
.pitem small{color:var(--muted);font-weight:700;}
.pitem button{margin-top:auto;}
.split{
  display:grid;gap:12px;
  grid-template-columns: 1.2fr .8fr;
}
.cart{
  background:rgba(255,255,255,.86);
  border:1px solid rgba(31,42,55,.10);
  border-radius:18px;
  padding:12px;
}
.cart h3{margin:0 0 10px;font-size:16px;}
.cart .line{display:flex;justify-content:space-between;gap:8px;margin:8px 0;font-weight:800;}
.cart .line small{color:var(--muted);font-weight:700;}
.cart .items{display:flex;flex-direction:column;gap:8px;}
.ci{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(31,42,55,.08);
  border-radius:14px;
  padding:10px;
}
.ci .t{display:flex;justify-content:space-between;gap:8px;align-items:flex-start;}
.ci .t b{font-size:14px;line-height:1.15;}
.ci .t span{font-weight:900;}
.ci .q{display:flex;gap:8px;align-items:center;margin-top:8px;}
.ci .q button{width:34px;height:34px;border-radius:12px;padding:0;}
.ci .q input{width:70px;text-align:center;padding:10px;border-radius:12px;}
.footerbar{
  position:fixed;left:0;right:0;bottom:0;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(10px);
  border-top:0;
  padding:10px 12px calc(10px + env(safe-area-inset-bottom));
}

.nav{
  max-width:980px;margin:0 auto;
  display:grid;grid-template-columns:repeat(4,1fr);gap:10px;
}
.nav a{
  text-align:center;
  padding:10px 8px;border-radius:18px;
  font-weight:900;font-size:12px;
  color:#1f2a37;
  background: rgba(31,42,55,.04);
}
.nav a.active{
  background: rgba(47,128,237,.12);
  color:#1f64c7;
}
.muted{color:var(--muted);}
.hr{height:1px;background:rgba(31,42,55,.08);margin:12px 0;}
.notice{
  padding:10px 12px;border-radius:16px;
  background:rgba(47,128,237,.10);
  border:1px solid rgba(47,128,237,.14);
  color:#1f64c7;font-weight:800;
}
@media (max-width:820px){
  .split{grid-template-columns:1fr;}
  .products{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:420px){
  .grid{grid-template-columns:1fr;}
  .hero-actions{grid-template-columns:1fr 1fr;}
  .products{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media print{
  body{background:#fff;}
  .footerbar,.topbar,.no-print{display:none !important;}
  .container{padding:0;}
  .card{box-shadow:none;border:0;}
}


/* --- PWA / Android-like UI tweaks --- */
body{ -webkit-tap-highlight-color: transparent; }
.container{padding-bottom:110px;}
.hr{height:0;background:transparent;margin:10px 0;} /* remove visible lines */
label{font-size:12.5px; letter-spacing:.2px; color:var(--muted); margin-top:10px;}
.input, select.input, textarea.input{font-size:14px; padding:11px 12px;}
.btn{font-size:14px; padding:10px 12px;}
.table th{font-size:12.5px;}
.table td{font-size:13.5px;}
.notice{border:0; background:rgba(255,255,255,.65);}

/* bottom sheet modal (custom alerts/confirm) */
.ui-overlay{position:fixed; inset:0; display:none; align-items:flex-end; justify-content:center;
  background:rgba(0,0,0,.35); z-index:999; padding:14px; }
.ui-sheet{width:min(520px, 100%); background:rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-radius:22px; box-shadow: var(--shadow); overflow:hidden; }
.ui-sheet .hd{padding:14px 16px 0;}
.ui-sheet .hd h3{margin:0; font-size:15px; letter-spacing:.2px;}
.ui-sheet .bd{padding:10px 16px 14px; font-size:13.5px; color:var(--text); line-height:1.45;}
.ui-sheet .ft{display:flex; gap:10px; padding:12px 16px 16px;}
.ui-sheet .ft .btn{flex:1;}
.ui-sheet .ft .btn.gray{flex:1;}
.ui-sheet .ft .btn.primary{flex:1;}
.ui-sheet .ft .btn.danger{flex:1;}

/* toast */
.ui-toast{position:fixed; left:50%; transform:translateX(-50%);
  bottom:88px; z-index:1000; display:none;
  background:rgba(17,24,39,.92); color:#fff; padding:10px 12px; border-radius:14px;
  font-size:13px; max-width:min(520px, 92vw); box-shadow: var(--shadow);}

/* smaller modal form title */
.modal-title{font-size:15px; font-weight:700;}
