:root{
  --bg:#f5f7fb;
  --panel:#ffffff;
  --panel-2:#f8fafc;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e6e9f2;
  --primary:#4f46e5;
  --primary-2:#7c3aed;
  --accent:#06b6d4;
  --success:#10b981;
  --warn:#f59e0b;
  --danger:#ef4444;
  --shadow:0 10px 30px -15px rgba(15,23,42,.18);
  --radius:16px;
}
[data-theme="dark"]{
  --bg:#0b1020;
  --panel:#141a30;
  --panel-2:#1a2140;
  --text:#e2e8f0;
  --muted:#94a3b8;
  --border:#262e4a;
  --shadow:0 10px 30px -10px rgba(0,0,0,.5);
}
[data-theme="dark"] .topbar{background:rgba(20,26,48,.7)}
[data-theme="dark"] .btn-icon{background:var(--panel); color:var(--text)}
[data-theme="dark"] .btn-outline-soft{background:rgba(255,255,255,.04); color:var(--text)}
[data-theme="dark"] .sidebar{background:var(--panel)}
[data-theme="dark"] .mini-stat,[data-theme="dark"] .cart-summary,[data-theme="dark"] .cart-list{background:var(--panel-2)}
[data-theme="dark"] .pos-card{background:var(--panel-2)}
[data-theme="dark"] .side-nav .nav-link{color:#cbd5e1}
[data-theme="dark"] .side-nav .nav-link:hover{background:rgba(79,70,229,.15)}
[data-theme="dark"] .qty-ctrl button{background:var(--panel-2); color:var(--text)}
[data-theme="dark"] .form-control,[data-theme="dark"] .form-select{background:var(--panel-2); color:var(--text); border-color:var(--border)}
[data-theme="dark"] .badge-soft{background:rgba(79,70,229,.18)}
[data-theme="dark"] .table-clean tbody td{border-color:var(--border)}
[data-theme="dark"] .modal-content{background:var(--panel); color:var(--text)}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Manrope',system-ui,-apple-system,sans-serif;
  font-size:15px;
  font-weight:400;
  line-height:1.55;
  letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  background:
    radial-gradient(1200px 600px at -10% -20%, rgba(124,58,237,.08), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(6,182,212,.08), transparent 60%),
    var(--bg);
  color:var(--text);
}
h1,h2,h3,h4,h5{font-family:'Fraunces',Georgia,serif; font-weight:600; letter-spacing:-.02em; font-variation-settings:"opsz" 96}
.stat-value,.mini-val,.landing-title,.logo-name,.topbar-title,.panel-head h5{font-family:'Fraunces',Georgia,serif; letter-spacing:-.02em}
.stat-value,.mini-val{font-variant-numeric:tabular-nums; font-feature-settings:"ss01"}

/* Landing — solid white */
.landing-screen{
  position:relative; min-height:100vh; overflow:hidden;
  padding:0 24px 60px;
  background:#ffffff;
  color:#0f172a;
}
.landing-bg{position:absolute; inset:0; overflow:hidden; pointer-events:none; z-index:0}
.blob{position:absolute; border-radius:50%; filter:blur(80px); opacity:.55}
.blob-1{width:520px;height:520px; top:-140px; left:-120px; background:radial-gradient(circle,#fbcfe8,transparent 70%)}
.blob-2{width:600px;height:600px; top:180px; right:-200px; background:radial-gradient(circle,#bae6fd,transparent 70%)}
.blob-3{width:480px;height:480px; bottom:-180px; left:28%; background:radial-gradient(circle,#bbf7d0,transparent 70%); opacity:.6}
.landing-bg{display:none}
.grid-overlay{display:none}

.landing-nav{position:relative; z-index:2; display:flex; align-items:center; justify-content:space-between; padding:22px 4px; max-width:1200px; margin:0 auto;}
.landing-screen .brand-pill{display:inline-flex; align-items:center; gap:8px; padding:8px 14px; background:rgba(255,255,255,.85); border:1px solid #e6e9f2; border-radius:999px; color:#0f172a; font-weight:700; font-size:13px; box-shadow:0 8px 20px -12px rgba(15,23,42,.2)}
.landing-screen .brand-dot{width:9px;height:9px;border-radius:50%; background:linear-gradient(135deg,#ec4899,#8b5cf6); box-shadow:0 0 0 3px rgba(139,92,246,.18)}
.landing-nav-links{display:flex; gap:28px}
.landing-nav-links a{color:#475569; text-decoration:none; font-size:14px; font-weight:600; transition:color .15s}
.landing-nav-links a:hover{color:#4f46e5}

.landing-hero{position:relative; z-index:2; padding:40px 24px 80px;
  display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center;
  background:rgb(34,34,34); color:#f8fafc; border-radius:24px;
  margin:12px auto; max-width:1200px; padding-left:48px; padding-right:48px;
}
.landing-hero .landing-title,
.landing-hero .landing-subtitle,
.landing-hero .landing-copy{color:#f8fafc}
.landing-hero .landing-title span{background:none; -webkit-background-clip:initial; background-clip:initial; color:#25d366}
.landing-hero .landing-subtitle{color:#cbd5e1}
.landing-hero .landing-text{color:#cbd5e1}
.landing-hero .landing-badge{background:rgba(37,211,102,.15); border-color:rgba(37,211,102,.4); color:#a7f3d0}
.landing-hero .landing-badge i{color:#25d366}
.landing-hero .btn-premium{background:linear-gradient(135deg,#7c3aed,#a855f7); box-shadow:0 10px 24px -10px rgba(124,58,237,.6); border-radius:999px; padding:14px 32px}
.landing-hero .btn-premium:hover{filter:brightness(1.08)}
.landing-hero .landing-title span{background:linear-gradient(135deg,#a855f7,#7c3aed); -webkit-background-clip:text; background-clip:text; color:transparent}
.landing-hero .landing-trust{border-top-color:rgba(255,255,255,.12)}
.landing-hero .trust-item{color:#cbd5e1}

.landing-copy{text-align:left}
.landing-badge{display:inline-flex; align-items:center; gap:8px; padding:6px 14px; border:1px solid #fde68a; background:linear-gradient(135deg,#fef3c7,#fce7f3); color:#9a3412; border-radius:999px; font-size:12px; font-weight:700; margin-bottom:20px; box-shadow:0 6px 18px -10px rgba(244,114,182,.5)}
.landing-badge i{color:#f59e0b}
.landing-title{font-size:clamp(44px,6vw,76px); font-weight:600; margin:0 0 14px; line-height:1.02; color:#0f172a}
.landing-title span{background:linear-gradient(135deg,#ec4899 0%,#8b5cf6 35%,#06b6d4 70%,#10b981 100%); -webkit-background-clip:text; background-clip:text; color:transparent}
.landing-subtitle{font-size:20px; color:#334155; margin:0 0 12px; font-weight:600}
.landing-text{color:#64748b; max-width:520px; margin:0 0 28px; font-size:15px; line-height:1.6}
.landing-actions{display:flex; gap:12px; flex-wrap:wrap}
.install-actions{display:none}
.install-actions-floating{position:fixed; left:50%; bottom:16px; transform:translate(-50%, 20px); z-index:1080; display:none; flex-direction:row; gap:10px; padding:10px 12px; background:rgba(255,255,255,.92); backdrop-filter:saturate(140%) blur(10px); -webkit-backdrop-filter:saturate(140%) blur(10px); border:1px solid rgba(15,23,42,.08); border-radius:18px; box-shadow:0 18px 40px -16px rgba(15,23,42,.35); opacity:0; pointer-events:none; transition:opacity .25s ease, transform .25s ease; max-width:calc(100vw - 24px); width:max-content}
.install-actions-floating.is-visible{opacity:1; pointer-events:auto; transform:translate(-50%, 0)}
body.is-pwa .install-actions-floating{display:none !important}
.btn-store{position:relative; display:inline-flex; align-items:center; gap:10px; background:#000; color:#fff; border:1px solid #000; border-radius:12px; padding:8px 16px; cursor:pointer; transition:transform .15s, filter .15s; text-align:left; line-height:1; isolation:isolate}
.btn-store:hover{filter:brightness(1.15)}
.btn-store:active{transform:scale(.97)}

/* Glowing border that travels around each button, alternating between the two */
.btn-store::before{
  content:""; position:absolute; inset:-2px; border-radius:14px; padding:2px;
  background:conic-gradient(from var(--angle,0deg), transparent 0%, transparent 60%, #25d366 75%, #a855f7 85%, transparent 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite:xor; mask-composite:exclude;
  pointer-events:none; z-index:-1;
  animation:btn-glow-rotate 3s linear infinite;
  filter:drop-shadow(0 0 6px rgba(168,85,247,.6));
  opacity:0;
}
.btn-store:nth-of-type(1)::before{animation:btn-glow-rotate 3s linear infinite, btn-glow-show 6s linear infinite}
.btn-store:nth-of-type(2)::before{animation:btn-glow-rotate 3s linear infinite, btn-glow-show 6s linear infinite 3s}

@property --angle{syntax:"<angle>"; initial-value:0deg; inherits:false}
@keyframes btn-glow-rotate{to{--angle:360deg}}
@keyframes btn-glow-show{
  0%,49%{opacity:1}
  50%,100%{opacity:0}
}
.store-ico-apple{font-size:28px; line-height:1}
.store-ico-play{width:26px; height:26px; object-fit:contain; display:block}
.store-text{display:flex; flex-direction:column; gap:2px}
.store-sm{font-size:10px; font-weight:500; letter-spacing:.04em; opacity:.95}
.store-lg{font-size:17px; font-weight:600; font-family:'Manrope',sans-serif; letter-spacing:-.01em}
.iphone-steps{padding-left:20px; margin:0 0 12px}
.iphone-steps li{margin-bottom:10px; line-height:1.5}
.landing-trust{display:flex; gap:24px; flex-wrap:wrap; margin-top:28px; padding-top:20px; border-top:1px solid #e6e9f2}
.trust-item{display:flex; align-items:center; gap:8px; color:#475569; font-size:13px; font-weight:600}
.trust-item i{color:#10b981; font-size:16px}

.landing-visual{position:relative; height:560px}
.hero-photo{position:absolute; border-radius:24px; overflow:hidden; box-shadow:0 30px 60px -20px rgba(15,23,42,.35); border:6px solid #fff; background:#fff}
.hero-photo img{width:100%; height:100%; object-fit:cover; display:block}
.hero-photo-1{top:0; right:0; width:62%; height:64%; animation:floatY 7s ease-in-out infinite; z-index:2}
.hero-photo-2{bottom:0; left:0; width:62%; height:60%; animation:floatY 7s ease-in-out infinite 1s; z-index:1}
.hero-photo-tag{position:absolute; bottom:10px; left:10px; background:rgba(255,255,255,.95); backdrop-filter:blur(8px); padding:6px 12px; border-radius:999px; font-size:11px; font-weight:700; color:#0f172a; display:flex; align-items:center; gap:6px; box-shadow:0 6px 16px -8px rgba(15,23,42,.3)}
.hero-photo-tag i{color:#4f46e5}

/* Showcase — solid white section, two grey cards (laptop + phone) */
.landing-showcase{position:relative; z-index:2; max-width:1200px; margin:40px auto; padding:60px 32px; background:#fff; border-radius:32px}
.showcase-grid{display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:stretch}
.showcase-card{background:#f1f3f7; border-radius:24px; padding:32px 28px; display:flex; flex-direction:column; gap:16px; text-align:center; align-items:center; box-shadow:0 12px 30px -22px rgba(15,23,42,.25)}
.showcase-title{font-family:'Fraunces',serif; font-size:38px; font-weight:600; margin:0; color:#0f172a; letter-spacing:-.01em; line-height:1.15}
.showcase-text{margin:0; color:#475569; font-size:20px; line-height:1.55; max-width:46ch}
.showcase-device{margin-top:auto; display:flex; align-items:center; justify-content:center; padding:14px 8px 4px; width:100%}
.showcase-device img{max-width:100%; max-height:300px; height:auto; width:auto; object-fit:contain; filter:drop-shadow(0 24px 40px rgba(15,23,42,.25)); animation:floatY 6s ease-in-out infinite}
.showcase-device-phone img{max-height:280px; animation-delay:.6s}

/* Desktop monitor frame */
.showcase-device-desktop{flex-direction:column; gap:0; padding:8px 8px 0; animation:floatY 6s ease-in-out infinite}
.showcase-device-desktop img{animation:none; filter:none; max-height:none; width:100%; display:block; border-radius:0 0 4px 4px}
.desktop-frame{width:100%; max-width:460px; background:#1f2937; border-radius:12px 12px 6px 6px; padding:0; box-shadow:0 24px 40px -18px rgba(15,23,42,.35); overflow:hidden; border:1px solid #111827}
.desktop-bar{display:flex; align-items:center; gap:6px; padding:8px 12px; background:#111827}
.desktop-bar .dot{width:10px; height:10px; border-radius:50%; display:inline-block}
.dot-r{background:#ff5f57}.dot-y{background:#febc2e}.dot-g{background:#28c840}
.desktop-screen{background:#fff; line-height:0}
.desktop-stand{width:80px; height:14px; background:linear-gradient(180deg,#374151,#1f2937); margin-top:-1px}
.desktop-base{width:160px; height:8px; border-radius:4px; background:#1f2937; box-shadow:0 6px 14px -8px rgba(15,23,42,.4)}
@keyframes floatY{0%,100%{transform:translateY(0)}50%{transform:translateY(-10px)}}

.float-card{position:absolute; display:flex; align-items:center; gap:12px; padding:12px 16px; background:rgba(255,255,255,.9); backdrop-filter:blur(14px); border:1px solid rgba(15,23,42,.06); border-radius:14px; box-shadow:0 20px 40px -15px rgba(99,102,241,.3); z-index:3}
.float-card-1{top:60px; right:-10px; animation:floatY 5s ease-in-out infinite .3s}
.float-card-2{bottom:80px; left:-20px; animation:floatY 5s ease-in-out infinite 1.2s}
.fc-icon{width:38px;height:38px;border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:18px}
.fc-label{font-size:11px; color:#64748b; text-transform:uppercase; letter-spacing:.05em; font-weight:700}
.fc-val{font-size:16px; font-weight:700; color:#0f172a; font-family:'Fraunces',serif}

/* Features */
.landing-features{position:relative; z-index:2; max-width:1200px; margin:40px auto; padding:60px 32px; background:#4f46e5; border-radius:32px; box-shadow:0 30px 60px -30px rgba(79,70,229,.5); overflow:hidden}
.landing-features::before{content:""; position:absolute; inset:0; background:none; pointer-events:none; z-index:0}
.landing-features > *{position:relative; z-index:1}
.section-eyebrow{font-family:'Fraunces',serif; font-size:clamp(28px,3.5vw,40px); font-weight:600; text-align:center; margin:0 0 40px; color:#fff; letter-spacing:-.02em}
.feature-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:20px}
.feature-card{padding:24px; background:#fff; border:1px solid #e6e9f2; border-radius:18px; transition:all .25s; box-shadow:0 12px 30px -18px rgba(15,23,42,.18); color:#0f172a}
.feature-card:hover{transform:translateY(-6px); box-shadow:0 22px 40px -18px rgba(15,23,42,.28); border-color:#c7d2fe}
.feature-ico{width:46px;height:46px;border-radius:14px;display:flex;align-items:center;justify-content:center;font-size:20px; margin-bottom:14px; color:#fff}
.feature-card:nth-child(1) .feature-ico{background:linear-gradient(135deg,#4f46e5,#7c3aed)}
.feature-card:nth-child(2) .feature-ico{background:linear-gradient(135deg,#10b981,#059669)}
.feature-card:nth-child(3) .feature-ico{background:linear-gradient(135deg,#06b6d4,#0891b2)}
.feature-card:nth-child(4) .feature-ico{background:linear-gradient(135deg,#f59e0b,#ef4444)}
.feature-card h4{font-family:'Fraunces',serif; font-size:18px; font-weight:600; margin:0 0 8px; color:#0f172a}
.feature-card p{color:#64748b; font-size:13.5px; margin:0; line-height:1.55}

/* Why */
.landing-why{position:relative; z-index:2; max-width:1200px; margin:0 auto; padding:40px 0 60px}
.why-card{display:grid; grid-template-columns:1.2fr 1fr; gap:40px; align-items:center; padding:48px; border-radius:24px;
  background:#d8f4cc; border:1px solid #fff; box-shadow:0 30px 60px -30px rgba(15,23,42,.18)}
.why-text h2{font-family:'Fraunces',serif; font-size:clamp(28px,3.5vw,40px); font-weight:600; margin:0 0 12px; letter-spacing:-.02em; color:#0f172a}
.why-text p{color:#475569; margin:0 0 20px; font-size:15px}
.why-photo{position:relative; border-radius:20px; overflow:hidden; aspect-ratio:4/3; box-shadow:0 30px 60px -25px rgba(15,23,42,.4); border:6px solid #fff}
.why-photo img{width:100%; height:100%; object-fit:cover; display:block}

.landing-footer{position:relative; z-index:2; text-align:center; padding:24px; color:#94a3b8; font-size:13px; border-top:1px solid #e6e9f2; max-width:1200px; margin:0 auto}
.why-install{display:none}

@media (max-width: 900px){
  .landing-hero{grid-template-columns:1fr; gap:18px; padding:10px 0 30px}
  .landing-copy{text-align:center; order:1}
  .landing-visual{order:2; margin-top:0}
  .landing-text{margin-left:auto; margin-right:auto}
  .landing-actions{justify-content:center}
  .landing-trust{justify-content:center}
  .landing-nav-links{display:none}
  .feature-grid{grid-template-columns:repeat(2,1fr)}
  .why-card{grid-template-columns:1fr; padding:28px; text-align:center}
  .why-photo{margin:0 auto; max-width:420px}
  .showcase-grid{grid-template-columns:1fr; gap:18px}
  .landing-showcase{padding:40px 12px; margin-left:8px; margin-right:8px}
  .showcase-card{padding:36px 22px}
  .why-cta-desktop{display:none}
  body.is-pwa .why-cta-desktop{display:inline-flex}
  .why-install{display:flex; flex-direction:row; justify-content:center; gap:10px; margin-top:6px; flex-wrap:nowrap}
  body.is-pwa .why-install{display:none}
  .why-install .btn-store{flex:1 1 0; min-width:0; padding:8px 12px}
  .why-install .store-lg{font-size:15px}
  .why-install .store-sm{font-size:9px}
}
@media (max-width: 540px){
  .landing-screen{padding:0 14px 40px}
  .landing-nav{padding:10px 0}
  .landing-hero{padding:18px 16px 28px; gap:14px;
    margin-left:0; margin-right:0; max-width:none; width:auto;
    border-radius:24px;
  }

  /* Stack: copy text first, images, then button via flex order */
  .landing-hero{display:flex; flex-direction:column}
  .landing-copy{display:contents}
  .landing-copy .landing-badge{order:1}
  .landing-copy .landing-title{order:2}
  .landing-copy .landing-subtitle{order:3}
  .landing-copy .landing-text{order:4}
  .landing-visual{order:5}
  .landing-copy .landing-actions{order:6; display:none}
  body.is-pwa .landing-copy .landing-actions{display:flex}
  body.is-pwa .install-actions{display:none !important}
  .install-actions{order:7; display:flex; flex-direction:row; justify-content:center; gap:10px; width:100%; margin-top:12px; flex-wrap:nowrap}
  .install-actions .btn-store{flex:1 1 0; min-width:0; padding:8px 12px}
  .install-actions .store-lg{font-size:15px}
  .install-actions .store-sm{font-size:9px}
  .landing-copy .landing-trust{order:8}

  /* Two images side-by-side above the button, slightly smaller */
  .landing-visual{position:relative; height:auto; display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:6px auto 14px; width:88%}
  .hero-photo{position:relative; width:100% !important; height:auto !important; aspect-ratio:3/4; top:auto; right:auto; bottom:auto; left:auto; border-width:4px; border-radius:18px; animation:none}
  .hero-photo-2{display:block}
  .hero-photo-tag{font-size:10px; padding:4px 8px; bottom:6px; left:6px}
  .float-card{display:none}

  /* Tighter copy */
  .landing-badge{margin-bottom:10px; font-size:11px; padding:5px 10px}
  .landing-title{font-size:34px; margin-bottom:8px}
  .landing-subtitle{font-size:15px; margin-bottom:6px}
  .landing-text{font-size:13.5px; margin-bottom:14px; line-height:1.5}
  .landing-actions{width:100%}
  .landing-actions .btn{padding:14px 28px; font-size:15px; min-width:80%; font-weight:700}
  .landing-trust{gap:14px; margin-top:14px; padding-top:12px}
  .trust-item{font-size:12px}

  .feature-grid{grid-template-columns:1fr}
  .showcase-device img{max-height:200px}
}

/* Buttons */
.btn-premium{background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; border:none; box-shadow:0 8px 22px -10px rgba(79,70,229,.6); font-weight:600}
.btn-premium:hover{filter:brightness(1.08); color:#fff}
.btn-outline-soft{background:rgba(255,255,255,.05); border:1px solid var(--border); color:var(--text); font-weight:500}
.landing-screen .btn-outline-soft{background:#fff; border:1px solid #e6e9f2; color:#0f172a; box-shadow:0 8px 20px -12px rgba(15,23,42,.2)}
.landing-screen .btn-outline-soft:hover{background:#f8fafc; border-color:#c7d2fe; color:#4f46e5}
.btn-outline-soft:hover{background:rgba(79,70,229,.08); border-color:rgba(79,70,229,.4)}
.btn-icon{width:40px;height:40px;padding:0;border:1px solid var(--border); background:#fff; border-radius:12px}

/* App shell */
.app-shell{display:flex; min-height:100vh}
.sidebar:not(.more-drawer){width:260px; background:#fff; border-right:1px solid var(--border); display:flex; flex-direction:column; padding:20px 14px; position:sticky; top:0; height:100vh}
.sidebar-brand{display:flex; align-items:center; gap:12px; padding:6px 8px 18px; border-bottom:1px solid var(--border); margin-bottom:14px}
.logo-mark{width:42px;height:42px;border-radius:12px;background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; font-weight:800; display:flex; align-items:center; justify-content:center; font-size:20px; box-shadow:var(--shadow)}
.logo-name{font-weight:600; font-size:18px; line-height:1}
.logo-sub{font-size:12px; color:var(--muted)}
.side-nav{display:flex; flex-direction:column; gap:4px; flex:1}
.side-nav .nav-link{display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:12px; color:#475569; font-weight:500; text-decoration:none; transition:all .15s}
.side-nav .nav-link i{font-size:18px}
.side-nav .nav-link:hover{background:#f1f5ff; color:var(--primary)}
.side-nav .nav-link.active{background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; box-shadow:0 8px 22px -12px rgba(79,70,229,.6)}
.sidebar-foot{padding-top:14px; border-top:1px solid var(--border)}

.main-area{flex:1; min-width:0; display:flex; flex-direction:column}
.topbar{display:flex; align-items:center; gap:12px; padding:16px 24px; background:rgba(255,255,255,.7); backdrop-filter:blur(10px); border-bottom:1px solid var(--border); position:sticky; top:0; z-index:20}
.topbar-title{font-weight:600; font-size:22px}
.badge-soft{display:inline-flex; align-items:center; gap:6px; padding:6px 12px; background:#eef2ff; color:var(--primary); border-radius:999px; font-size:12px; font-weight:600}
.content-area{padding:22px; flex:1}
.app-footer{padding:10px; text-align:center; color:var(--muted); border-top:1px solid var(--border); background:var(--panel); font-size:11px; letter-spacing:.02em}
.app-footer strong{font-weight:600}

/* Panels */
.panel{background:var(--panel); border:1px solid var(--border); border-radius:var(--radius); padding:18px; box-shadow:var(--shadow); height:100%}
.panel-head{display:flex; align-items:center; margin-bottom:14px}
.panel-head h5{margin:0; font-size:18px; font-weight:600; display:flex; align-items:center; gap:8px}
.panel-head h5 i{color:var(--primary)}

/* Stats */
.stat-card{position:relative; padding:18px; border-radius:var(--radius); color:#fff; overflow:hidden; min-height:120px; box-shadow:var(--shadow)}
.stat-card::after{content:""; position:absolute; inset:0; background:linear-gradient(135deg, rgba(255,255,255,.18), transparent 60%); pointer-events:none}
.stat-1{background:linear-gradient(135deg,#4f46e5,#7c3aed)}
.stat-2{background:linear-gradient(135deg,#10b981,#059669)}
.stat-3{background:linear-gradient(135deg,#06b6d4,#0891b2)}
.stat-4{background:linear-gradient(135deg,#f59e0b,#ef4444)}
.stat-label{font-size:13px; opacity:.9}
.stat-value{font-size:32px; font-weight:600; margin-top:8px; line-height:1.1}
.stat-foot{margin-top:8px; font-size:12px; opacity:.85}

.mini-stat{padding:14px; background:#f8fafc; border:1px solid var(--border); border-radius:12px}
.mini-label{font-size:12px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:.04em}
.mini-val{font-size:26px; font-weight:600; margin-top:4px; line-height:1.1}

/* Tables */
.table-clean{margin:0}
.table-clean thead th{font-size:12px; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); border-bottom:1px solid var(--border); font-weight:600}
.table-clean tbody td{border-bottom:1px solid #f1f5f9; vertical-align:middle}
.badge-status{padding:4px 10px; border-radius:999px; font-size:11px; font-weight:600}
.bs-in{background:#dcfce7; color:#166534}
.bs-low{background:#fef3c7; color:#92400e}
.bs-out{background:#fee2e2; color:#991b1b}

/* POS */
.pos-grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; max-height:560px; overflow:auto; padding-right:4px}
.pos-card{border:1px solid var(--border); border-radius:12px; padding:12px; cursor:pointer; transition:all .15s; background:#fff}
.pos-card:hover{border-color:var(--primary); transform:translateY(-2px); box-shadow:var(--shadow)}
.pos-card .name{font-weight:600; font-size:14px}
.pos-card .price{color:var(--primary); font-weight:700; margin-top:4px}
.pos-card .stock{font-size:11px; color:var(--muted)}
.pos-card.oos{opacity:.5; pointer-events:none}

.cart-list{max-height:340px; overflow:auto; border:1px solid var(--border); border-radius:12px; padding:8px; background:#fafbff}
.cart-item{display:flex; align-items:center; gap:8px; padding:8px; border-bottom:1px solid var(--border)}
.cart-item:last-child{border-bottom:none}
.cart-item .name{flex:1; font-weight:500; font-size:14px}
.qty-ctrl{display:flex; align-items:center; gap:4px}
.qty-ctrl button{width:26px;height:26px;border:1px solid var(--border); background:#fff; border-radius:6px; line-height:1}
.cart-summary{margin-top:14px; padding:12px; background:#f8fafc; border-radius:12px}

/* Quick actions */
.quick-actions{display:flex; gap:10px; flex-wrap:wrap}

/* Toasts */
.toast-stack{position:fixed; bottom:20px; right:20px; z-index:9999; display:flex; flex-direction:column; gap:8px}
.toast-msg{background:#0f172a; color:#fff; padding:12px 18px; border-radius:12px; box-shadow:var(--shadow); font-weight:500; font-size:14px; animation:slideIn .3s ease}
.toast-msg.success{background:linear-gradient(135deg,#10b981,#059669)}
.toast-msg.error{background:linear-gradient(135deg,#ef4444,#dc2626)}
@keyframes slideIn{from{transform:translateX(20px); opacity:0}to{transform:none; opacity:1}}

/* Forms */
.form-control,.form-select{border-radius:10px; border:1px solid var(--border); padding:.5rem .75rem}
.form-control:focus,.form-select:focus{border-color:var(--primary); box-shadow:0 0 0 3px rgba(79,70,229,.12)}
.form-label{font-size:13px; font-weight:600; color:#334155; margin-bottom:4px}

/* Onboarding */
/* Onboarding (full page) */
.onboard-screen{
  min-height:100vh; padding:32px 20px; display:flex; align-items:flex-start; justify-content:center;
  background:
    radial-gradient(800px 500px at 15% 10%, rgba(79,70,229,.10), transparent 60%),
    radial-gradient(700px 400px at 85% 90%, rgba(6,182,212,.10), transparent 60%),
    var(--bg);
}
.onboard-shell{width:100%; max-width:760px; display:flex; flex-direction:column; gap:24px}
.onboard-header{display:flex; align-items:center; justify-content:space-between}
.onboard-header .brand-pill{margin:0; color:var(--text); border-color:var(--border); background:var(--panel)}
.onboard-progress{display:flex; align-items:center; gap:12px; padding:4px 8px}
.onboard-step{display:flex; align-items:center; gap:10px; opacity:.45; transition:opacity .25s}
.onboard-step span{width:36px;height:36px;border-radius:50%; background:var(--panel); border:1px solid var(--border); display:flex; align-items:center; justify-content:center; font-weight:700; font-size:14px; color:var(--muted)}
.onboard-step label{font-size:13px; font-weight:600; color:var(--text); margin:0}
.onboard-step.active{opacity:1}
.onboard-step.active span{background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:#fff; border-color:transparent; box-shadow:0 8px 22px -10px rgba(79,70,229,.6)}
.onboard-step.done{opacity:1}
.onboard-step.done span{background:var(--success); color:#fff; border-color:transparent}
.onboard-line{flex:1; height:2px; background:var(--border); border-radius:2px}
.onboard-card{background:var(--panel); border:1px solid var(--border); border-radius:24px; padding:40px; box-shadow:var(--shadow); min-height:380px}
.onboard-eyebrow{font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.1em; color:var(--primary); margin-bottom:8px}
.onboard-title{font-size:clamp(28px, 4vw, 38px); font-family:'Fraunces',Georgia,serif; font-weight:500; letter-spacing:-.02em; margin:0 0 8px; line-height:1.15}
.onboard-sub{color:var(--muted); margin:0 0 8px; font-size:15px}
.onboard-pane{animation:obFade .3s ease}
@keyframes obFade{from{opacity:0; transform:translateY(8px)}to{opacity:1; transform:none}}
.onboard-footer{display:flex; align-items:center; justify-content:space-between; padding:0 8px}
.form-control-lg,.form-select-lg{border-radius:12px; padding:.75rem 1rem; font-size:15px}

.logo-upload{display:flex; align-items:center; gap:20px}
.logo-preview{width:120px;height:120px;border-radius:20px; border:2px dashed var(--border); display:flex; align-items:center; justify-content:center; background:var(--panel-2); overflow:hidden; flex-shrink:0}
.logo-preview i{font-size:38px; color:var(--muted)}
.logo-preview img{width:100%; height:100%; object-fit:cover}
.logo-preview.sm{width:56px; height:56px; border-radius:12px}
.logo-preview.sm i{font-size:20px}
.logo-mark.has-logo{padding:0; overflow:hidden; background:var(--panel-2)}
.logo-mark.has-logo img{width:100%; height:100%; object-fit:cover}

/* Mobile */
@media (max-width: 991px){
  .sidebar:not(.more-drawer){position:fixed; left:-280px; z-index:1040; transition:left .25s ease; width:260px}
  .sidebar:not(.more-drawer).open{left:0; box-shadow:0 30px 60px -20px rgba(0,0,0,.3)}
  .content-area{padding:16px}
  .onboard-step label{display:none}
}

/* ===== Upgrade page ===== */
.nav-upgrade{
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(236,72,153,.12));
  color: #6366f1 !important;
  margin-top: 8px;
  border: 1px solid rgba(99,102,241,.25);
}
.nav-upgrade:hover{ background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(236,72,153,.2)); }
[data-theme="dark"] .nav-upgrade{ color:#a5b4fc !important; }

.upgrade-hero{
  text-align:center;
  padding: 28px 16px 8px;
}
.upgrade-title{
  font-family:'Fraunces', serif;
  font-weight: 600;
  font-size: clamp(28px, 4.5vw, 44px);
  margin: 14px 0 8px;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.upgrade-sub{ color: var(--bs-secondary-color, #6b7280); max-width: 560px; margin: 0 auto; font-size: 16px; }

.plans-row{ max-width: 980px; margin: 0 auto; }

.plan-card{
  position: relative;
  background: var(--panel-bg, #fff);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 20px;
  padding: 28px 24px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.plan-card:hover{ transform: translateY(-4px); box-shadow: 0 20px 50px -20px rgba(99,102,241,.3); }
[data-theme="dark"] .plan-card{ background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1); }

.plan-featured{
  border: 2px solid transparent;
  background:
    linear-gradient(var(--panel-bg, #fff), var(--panel-bg, #fff)) padding-box,
    linear-gradient(135deg, #6366f1, #ec4899) border-box;
}
[data-theme="dark"] .plan-featured{
  background:
    linear-gradient(#1a1d2e, #1a1d2e) padding-box,
    linear-gradient(135deg, #6366f1, #ec4899) border-box;
}
.plan-ribbon{
  position:absolute; top:-12px; right: 24px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color:#fff; font-size: 11px; font-weight: 700;
  padding: 6px 12px; border-radius: 999px; letter-spacing:.05em;
  text-transform: uppercase;
}

.plan-head{ margin-bottom: 14px; }
.plan-name{ font-family:'Fraunces', serif; font-size: 28px; font-weight: 600; }
.plan-tag{ color: var(--bs-secondary-color, #6b7280); font-size: 13px; }

.plan-price{ display:flex; align-items:baseline; gap:6px; margin-top: 6px; }
.plan-price .amt{ font-family:'Fraunces', serif; font-size: 44px; font-weight: 700; letter-spacing:-.02em; }
.plan-price .per{ color: var(--bs-secondary-color, #6b7280); font-size: 15px; }
.plan-price-alt{ font-size: 12px; color: var(--bs-secondary-color, #6b7280); margin-bottom: 18px; }

.plan-feats{ list-style:none; padding:0; margin: 12px 0 0; flex: 1; }
.plan-feats li{
  display:flex; align-items:flex-start; gap: 10px;
  padding: 8px 0;
  font-size: 14.5px;
  border-bottom: 1px dashed rgba(0,0,0,.06);
}
[data-theme="dark"] .plan-feats li{ border-bottom-color: rgba(255,255,255,.06); }
.plan-feats li:last-child{ border-bottom: none; }
.plan-feats li i{ color:#10b981; font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.plan-feats li.muted{ color: var(--bs-secondary-color, #9ca3af); }
.plan-feats li.muted i{ color:#9ca3af; }

.upgrade-foot{
  text-align:center;
  color: var(--bs-secondary-color, #6b7280);
  font-size: 13px;
  padding: 12px;
}
.upgrade-foot i{ color:#10b981; }

/* ===== Bottom nav (PWA only) ===== */
.bottom-nav{ display:none; }
body.is-pwa .bottom-nav{
  display:flex;
  position:fixed; left:0; right:0; bottom:0;
  z-index:1050;
  align-items:center; justify-content:space-around;
  padding:8px 10px calc(8px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  border-top:1px solid var(--border);
  box-shadow:0 -8px 24px -16px rgba(15,23,42,.25);
}
[data-theme="dark"] body.is-pwa .bottom-nav{ background:rgba(20,26,48,.9); }
.bottom-nav .bn-link{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  padding:6px 4px; color:var(--muted); text-decoration:none;
  font-size:11px; font-weight:600; border-radius:12px;
  transition:color .15s, background .15s;
}
.bottom-nav .bn-link i{ font-size:20px; }
.bottom-nav .bn-link.active{ color:var(--primary); }
.bottom-nav .bn-link.active:not(.bn-fab){ background:rgba(79,70,229,.08); }
.bottom-nav .bn-fab{
  flex:0 0 auto;
  width:54px; height:54px; margin-top:-22px;
  border-radius:50%;
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  color:#fff !important;
  box-shadow:0 12px 24px -8px rgba(79,70,229,.55);
  justify-content:center;
}
.bottom-nav .bn-fab i{ font-size:24px; }
.bottom-nav .bn-fab span{ display:none; }

/* Hide left sidebar by default; right drawer is used on small screens & PWA */
.sidebar:not(.more-drawer){ display:none !important; }
/* Show menu button by default (small screens) */
#menuBtn{ display:inline-flex !important; }
body.is-pwa #menuBtn{ display:none !important; }

/* Big screens (browser only, not PWA): show permanent left sidebar */
@media (min-width: 1024px){
  body:not(.is-pwa) .sidebar:not(.more-drawer){
    display:flex !important;
    position:sticky; left:0; top:0;
    width:260px; height:100vh;
  }
  body:not(.is-pwa) #menuBtn{ display:none !important; }
  body:not(.is-pwa) .more-drawer,
  body:not(.is-pwa) .more-drawer-backdrop{ display:none !important; }
}
/* Right drawer backdrop works in browser too */
.more-drawer-backdrop{ display:block !important; }
body.is-pwa .app-footer{ display:none; }
body.is-pwa .content-area{ padding-bottom:96px; }

/* More drawer (PWA bottom nav overflow) — mirrors left sidebar look */
.more-drawer-backdrop{
  position:fixed; inset:0; background:rgba(15,18,40,.45);
  opacity:0; pointer-events:none; transition:opacity .25s ease;
  z-index:1090; display:none;
}
.more-drawer{
  position:fixed; top:0; right:0; bottom:0;
  width:min(82vw, 280px);
  height:100vh;
  background:#fff;
  border-left:1px solid var(--border);
  box-shadow:-30px 60px 60px -20px rgba(0,0,0,.3);
  transform:translateX(100%);
  transition:transform .28s cubic-bezier(.22,.61,.36,1);
  z-index:1100;
  display:flex; flex-direction:column;
  padding:20px 14px;
  padding-top:calc(20px + env(safe-area-inset-top));
  padding-bottom:calc(20px + env(safe-area-inset-bottom));
}
[data-theme="dark"] .more-drawer{ background:var(--panel); }
/* Override the body.is-pwa .sidebar { display:none } rule for the drawer */
body.is-pwa .more-drawer.sidebar{ display:flex !important; }
body.is-pwa .more-drawer-backdrop{ display:block; }
.more-drawer.open{ transform:translateX(0); }
.more-drawer-backdrop.open{ opacity:1; pointer-events:auto; }
.more-drawer-brand{ position:relative; }
.more-drawer-close{
  border:0; background:transparent; font-size:18px; color:inherit;
  width:34px; height:34px; border-radius:10px; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  margin-left:auto;
}
.more-drawer-close:hover{ background:rgba(15,18,40,.06); }
[data-theme="dark"] .more-drawer-close:hover{ background:rgba(255,255,255,.08); }

/* PWA landing: only show top nav + hero (dark) section */
body.is-pwa #landing > .landing-features,
body.is-pwa #landing > .landing-showcase,
body.is-pwa #landing > .landing-why,
body.is-pwa #landing > .landing-footer,
body.is-pwa #landing > section:not(.landing-hero),
body.is-pwa #landing > footer{ display:none !important; }
body.is-pwa #landing .install-actions-floating{ display:none !important; }
body.is-pwa #landing .landing-visual,
body.is-pwa #landing .hero-photo,
body.is-pwa #landing .hero-photo img{ visibility:visible !important; opacity:1 !important; }
body.is-pwa #landing .landing-visual{ display:grid !important; }
body.is-pwa #landing .hero-photo{ display:block !important; }

/* Pull-to-refresh indicator */
.ptr-indicator{
  position:fixed; top:-50px; left:50%;
  transform:translate(-50%, 0);
  width:42px; height:42px; border-radius:50%;
  background:#fff;
  box-shadow:0 8px 24px -8px rgba(15,23,42,.35);
  display:flex; align-items:center; justify-content:center;
  z-index:1200;
  opacity:0; pointer-events:none;
  transition:opacity .2s ease;
}
.ptr-indicator.visible{ opacity:1; }
.ptr-indicator .bi{ font-size:20px; color:var(--primary, #4f46e5); transition:color .2s; }
.ptr-indicator.ready .bi{ color:#10b981; }
.ptr-indicator.refreshing .bi{ animation:ptrSpin .8s linear infinite; color:var(--primary, #4f46e5); }
@keyframes ptrSpin { to { transform:rotate(360deg); } }
[data-theme="dark"] .ptr-indicator{ background:#141a30; }
