:root{
	--bg: #f7fbfd;
	--card: #ffffff;
	--muted: #6b7280;
	--accent: #2563eb; /* blue accent */
	--accent-2: #06b6d4; /* teal */
	--danger: #ef4444;
	--glass: rgba(255,255,255,0.6);
}
html,body{height:100%}
html{-webkit-text-size-adjust:100%}
html{background:linear-gradient(155deg, rgb(250 248 255), rgb(245 250 255), rgb(255 248 252), rgb(248 255 252));}
body{margin:0;font-family: 'Vazirmatn', 'Vazir', system-ui, -apple-system, 'Segoe UI', Roboto;direction:rtl;background:linear-gradient(180deg,#f6fbff,var(--bg));color:#0f172a;-webkit-font-smoothing:antialiased}
.container{max-width:1200px;margin:28px auto;padding:18px;animation:pageEnter .45s ease both;min-height:calc(100vh - 120px);min-height:calc(100dvh - 120px)}
.card{background:var(--card);border-radius:14px;box-shadow:0 10px 30px rgba(2,6,23,0.06);padding:20px;transition:box-shadow .22s ease,transform .22s ease,border-color .22s ease}
.card:hover{box-shadow:0 14px 44px rgba(2,6,23,0.08);transform:translateY(-2px)}

/* Auth */
/* ensure padding doesn't push elements out of alignment */
.auth-card, .auth-card * { box-sizing: border-box; }
.auth-wrap{display:flex;align-items:center;justify-content:center;min-height:90vh;position:relative;overflow:hidden}
/* subtle stationery pattern using inline SVG data URI */
.stationery-bg{position:absolute;inset:0;z-index:0;pointer-events:none;background-repeat:repeat;opacity:0.08;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cg fill='none' stroke='%23000' stroke-width='1'%3E%3Cpath d='M10 110 L110 10'/%3E%3Ccircle cx='60' cy='60' r='20'/%3E%3Crect x='20' y='20' width='40' height='60'/%3E%3C/g%3E%3C/svg%3E");}
/* keep colored blobs for visual depth */
.auth-wrap::before,.auth-wrap::after{content:"";position:absolute;filter:blur(90px);opacity:0.5;z-index:0}
.auth-wrap::before{width:320px;height:320px;top:0;left:10%;background:linear-gradient(135deg,#2563eb 0%,#06b6d4 100%)}
.auth-wrap::after{width:300px;height:300px;bottom:-40px;right:8%;background:linear-gradient(135deg,#0ea5e9 0%,#a855f7 100%)}
.auth-card{position:relative;z-index:1;width:420px;max-width:94vw;padding:32px;border-radius:18px;border:1px solid rgba(255,255,255,0.35);background:rgba(255,255,255,0.85);backdrop-filter:blur(16px);box-shadow:0 18px 50px rgba(15,23,42,0.12);transition:transform .2s ease,opacity .4s ease;opacity:0;transform:translateY(20px);}
.auth-card.visible{opacity:1;transform:translateY(0);} 
.auth-card:hover{transform:translateY(-4px);}

/* Animated stationery background colors - Enhanced vibrant palette */
:root{
  --stationery-pink: 255 100 150;
  --stationery-pink-light: 255 180 210;
  --stationery-blue: 80 160 255;
  --stationery-blue-deep: 40 100 220;
  --stationery-sky: 140 200 255;
  --stationery-mint: 100 230 190;
  --stationery-mint-light: 160 255 220;
  --stationery-lav: 180 140 255;
  --stationery-lav-deep: 140 80 230;
  --stationery-coral: 255 120 100;
  --stationery-peach: 255 160 130;
  --stationery-yellow: 255 210 60;
  --stationery-orange: 255 140 60;
  --stationery-paper: 255 255 255;
  --stationery-paper2: 250 252 255;
  --stationery-shadow: 40 30 80;
  --stationery-metal: 210 215 230;
  --stationery-metal2: 160 170 195;
  --stationery-metal-shine: 245 248 255;
  --stationery-gold: 255 200 80;
  --stationery-gold-shine: 255 230 140;
  --stationery-rubber: 255 100 140;
  --stationery-wood: 255 180 100;
  --stationery-wood-dark: 190 130 70;
  --stationery-lead: 55 55 75;
  --stationery-fabric1: 80 160 255;
  --stationery-fabric2: 255 100 150;
  --stationery-zip: 230 235 250;
  --stationery-teal: 60 190 190;
  --stationery-purple: 160 100 240;
  --stationery-rose: 255 80 120;
}

body.login-page{
  height:100svh;
  min-height:100svh;
  min-height:-webkit-fill-available;
  min-height:100vh;
  min-height:100dvh;
  background:linear-gradient(155deg, rgb(250 248 255), rgb(245 250 255), rgb(255 248 252), rgb(248 255 252));
  overflow:hidden;
  position:relative;
}
body.login-page::before{
  content:"";
  position:fixed;
  inset:-8vh 0;
  background:linear-gradient(155deg, rgb(250 248 255), rgb(245 250 255), rgb(255 248 252), rgb(248 255 252));
  z-index:0;
  pointer-events:none;
}
body.login-page .container.auth-wrap{
  max-width:none;
  margin:0;
  height:100svh;
  min-height:100svh;
  min-height:-webkit-fill-available;
  min-height:100vh;
  min-height:100dvh;
  padding:env(safe-area-inset-top) 12px env(safe-area-inset-bottom);
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  z-index:2;
}
body.login-page .stationery-bg,
body.login-page .auth-wrap::before,
body.login-page .auth-wrap::after{display:none}
body.login-page .auth-card{
  width:min(400px,90vw);
  border-radius:28px;
  border:1.5px solid rgba(255,255,255,0.55);
  background:
    linear-gradient(160deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.20) 100%);
  backdrop-filter:blur(30px) saturate(1.6);
  -webkit-backdrop-filter:blur(30px) saturate(1.6);
  box-shadow:
    0 25px 60px rgba(100,80,180,0.18),
    0 10px 25px rgba(180,100,160,0.10),
    0 4px 12px rgba(60,140,200,0.08),
    inset 0 1.5px 0 rgba(255,255,255,0.75);
  padding:clamp(24px,4.5vw,40px);
}
@media (max-width: 768px){
  body.login-page .container.auth-wrap{
    height:100svh;
    min-height:100svh;
    min-height:-webkit-fill-available;
    min-height:100dvh;
    padding:env(safe-area-inset-top) 10px env(safe-area-inset-bottom);
  }
}

/* Animated stationery background - Complete Redesign */
.stationery-bg-animated{
  position:fixed;
  inset:0;
  overflow:hidden;
  z-index:1;
  background:
    radial-gradient(ellipse 180% 100% at 0% 0%, rgb(var(--stationery-lav) / .50), transparent 50%),
    radial-gradient(ellipse 150% 120% at 100% 0%, rgb(var(--stationery-sky) / .45), transparent 45%),
    radial-gradient(ellipse 140% 100% at 100% 100%, rgb(var(--stationery-pink) / .40), transparent 50%),
    radial-gradient(ellipse 160% 120% at 0% 100%, rgb(var(--stationery-mint) / .35), transparent 50%),
    radial-gradient(ellipse 80% 60% at 50% 50%, rgb(var(--stationery-purple) / .12), transparent 50%),
    linear-gradient(160deg, rgb(252 250 255), rgb(248 252 255), rgb(255 250 252));
}

/* Animated flowing gradient overlay */
.stationery-bg-animated::before{
  content:"";
  position:absolute;
  inset:-50%;
  background:
    radial-gradient(circle at 20% 30%, rgb(var(--stationery-rose) / .15) 0 180px, transparent 180px),
    radial-gradient(circle at 75% 20%, rgb(var(--stationery-blue) / .18) 0 220px, transparent 220px),
    radial-gradient(circle at 85% 70%, rgb(var(--stationery-lav) / .15) 0 200px, transparent 200px),
    radial-gradient(circle at 15% 80%, rgb(var(--stationery-teal) / .12) 0 180px, transparent 180px);
  animation: bgFlow 30s ease-in-out infinite;
  pointer-events:none;
}

/* Sparkle particles */
.sparkles{
  position:absolute;
  inset:0;
  background-image:
    radial-gradient(circle, rgb(255 255 255) 0 1.5px, transparent 1.5px),
    radial-gradient(circle, rgb(255 255 255 / .8) 0 1px, transparent 1px),
    radial-gradient(circle, rgb(var(--stationery-gold-shine)) 0 2px, transparent 2px);
  background-size: 100px 100px, 160px 160px, 240px 200px;
  background-position: 0 0, 50px 80px, 30px 120px;
  animation: sparkleFloat 12s ease-in-out infinite;
  mix-blend-mode: overlay;
  opacity:.90;
  pointer-events:none;
}

/* Stationery items base */
.stationery-item{
  position:absolute;
  transform-origin: center center;
  filter: 
    drop-shadow(0 12px 25px rgb(var(--stationery-shadow)/.22))
    drop-shadow(0 35px 70px rgb(var(--stationery-shadow)/.14));
  pointer-events:none;
  user-select:none;
  will-change: transform;
}
.soft-float{animation: gentleFloat 16s ease-in-out infinite}

/* ===== BOOK - Top Left Corner ===== */
.stationery-item.book{
  left: 3%;
  top: 5%;
  width: clamp(110px, 13vw, 180px);
  height: clamp(140px, 16vw, 220px);
  transform: rotate(-12deg);
  border-radius: 6px 20px 20px 6px;
  background: 
    linear-gradient(120deg, rgb(var(--stationery-rose)) 0%, rgb(var(--stationery-pink)) 60%, rgb(var(--stationery-peach)) 100%);
  box-shadow: 
    inset 2px 0 0 rgb(0 0 0 / .15),
    inset 0 2px 0 rgb(255 255 255 / .50);
}
.stationery-item.book::before{
  content:"";
  position:absolute;
  top: 8px; bottom: 8px; left: 14px; right: 8px;
  border-radius: 4px 14px 14px 4px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .40), transparent 40%),
    rgb(var(--stationery-paper));
  border: 1px solid rgb(255 255 255 / .60);
}
.stationery-item.book .pages{
  position:absolute;
  left: 2px;
  top: 12px;
  bottom: 12px;
  width: 10px;
  border-radius: 2px;
  background: 
    repeating-linear-gradient(180deg, rgb(250 250 252) 0 3px, rgb(240 242 248) 3px 6px);
  box-shadow: inset -3px 0 8px rgb(0 0 0 / .12);
}
.stationery-item.book .spine{
  position:absolute;
  right: 6px;
  top: 6px;
  bottom: 6px;
  width: 5px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, transparent, rgb(0 0 0 / .08));
}

/* ===== PEN - Top Right Area ===== */
.stationery-item.pen{
  right: 5%;
  top: 8%;
  width: clamp(160px, 20vw, 280px);
  height: clamp(14px, 1.8vw, 22px);
  transform: rotate(22deg);
  border-radius: 999px;
  background: 
    linear-gradient(90deg, 
      rgb(var(--stationery-blue-deep)) 0 8%, 
      rgb(var(--stationery-blue)) 8% 70%, 
      rgb(var(--stationery-sky)) 70% 80%,
      rgb(var(--stationery-metal)) 80% 92%,
      rgb(var(--stationery-metal2)) 92% 100%);
  box-shadow: 
    inset 0 3px 0 rgb(255 255 255 / .55),
    inset 0 -2px 4px rgb(0 0 0 / .12);
}
.stationery-item.pen::before{
  content:"";
  position:absolute;
  left: 10%; top: 15%;
  width: 58%; height: 40%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgb(255 255 255 / .60), transparent);
}
.stationery-item.pen .tip{
  position:absolute;
  right: -6px;
  top: 50%;
  width: 28px;
  height: 28px;
  transform: translateY(-50%) rotate(45deg);
  border-radius: 8px;
  background: 
    linear-gradient(135deg, rgb(var(--stationery-metal-shine)), rgb(var(--stationery-metal)), rgb(var(--stationery-metal2)));
  box-shadow: inset 0 -8px 14px rgb(0 0 0 / .12);
}

/* ===== NOTEBOOK - Bottom Right Corner ===== */
.stationery-item.notebook{
  right: 4%;
  bottom: 4%;
  width: clamp(140px, 17vw, 260px);
  height: clamp(180px, 22vw, 340px);
  transform: rotate(8deg);
  border-radius: 8px 18px 18px 8px;
  background:
    linear-gradient(180deg, rgb(var(--stationery-paper)), rgb(252 252 255));
  border: 1px solid rgb(220 225 235 / .80);
  box-shadow: 
    inset 0 2px 0 rgb(255 255 255),
    inset 0 -5px 15px rgb(200 210 230 / .25);
}
.stationery-item.notebook .lines{
  position:absolute;
  inset: 20px 12px 12px 28px;
  background: 
    repeating-linear-gradient(180deg, transparent 0 22px, rgb(180 200 230 / .35) 22px 23px);
}
.stationery-item.notebook .spiral{
  position:absolute;
  left: 6px;
  top: 15px;
  bottom: 15px;
  width: 14px;
  background: 
    repeating-linear-gradient(180deg, 
      rgb(var(--stationery-gold)) 0 5px, 
      rgb(var(--stationery-gold-shine)) 5px 7px,
      transparent 7px 18px);
  filter: drop-shadow(1px 0 2px rgb(0 0 0 / .10));
}
.stationery-item.notebook .edge{
  position:absolute;
  left: 18px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: rgb(255 100 120 / .35);
}

/* ===== CALCULATOR - Bottom Left Corner ===== */
.stationery-item.calc{
  left: 4%;
  bottom: 4%;
  width: clamp(90px, 11vw, 150px);
  height: clamp(120px, 14vw, 195px);
  transform: rotate(-8deg);
  border-radius: 16px;
  background: 
    linear-gradient(160deg, rgb(var(--stationery-purple)) 0%, rgb(var(--stationery-lav)) 50%, rgb(var(--stationery-lav-deep)) 100%);
  border: 1px solid rgb(255 255 255 / .40);
  box-shadow: 
    inset 0 2px 0 rgb(255 255 255 / .55), 
    inset 0 -12px 30px rgb(0 0 0 / .10);
}
.stationery-item.calc .screen{
  position:absolute;
  left: 10px; right: 10px; top: 10px;
  height: 25%;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgb(40 50 80 / .85), rgb(30 40 65 / .90));
  border: 1px solid rgb(255 255 255 / .20);
  box-shadow: inset 0 4px 10px rgb(0 0 0 / .25);
}
.stationery-item.calc .screen::after{
  content:"";
  position:absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  width: 50%; height: 40%;
  background: rgb(120 255 180 / .70);
  border-radius: 4px;
  box-shadow: 0 0 12px rgb(120 255 180 / .50);
}
.stationery-item.calc .keys{
  position:absolute;
  left: 10px; right: 10px; top: 40%; bottom: 10px;
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  padding: 6px;
}
.stationery-item.calc .key{
  border-radius: 6px;
  background: 
    linear-gradient(180deg, rgb(255 255 255 / .85), rgb(255 255 255 / .50));
  box-shadow: 
    inset 0 1px 0 rgb(255 255 255 / .90), 
    0 2px 6px rgb(0 0 0 / .12);
}
.stationery-item.calc .key:nth-child(4n){
  background: 
    linear-gradient(180deg, rgb(var(--stationery-orange)), rgb(var(--stationery-coral)));
}

/* ===== PENCIL - Bottom Center ===== */
.stationery-item.pencil{
  left: 50%;
  bottom: 3%;
  transform: translateX(-50%) rotate(-5deg);
  width: clamp(180px, 22vw, 320px);
  height: clamp(12px, 1.5vw, 18px);
  border-radius: 999px;
  background: 
    linear-gradient(90deg, 
      rgb(var(--stationery-yellow)) 0 80%, 
      rgb(var(--stationery-metal)) 80% 88%, 
      rgb(var(--stationery-pink)) 88% 100%);
  box-shadow: 
    inset 0 2px 0 rgb(255 255 255 / .50),
    inset 0 -2px 3px rgb(0 0 0 / .10);
}
.stationery-item.pencil::before{
  content:"";
  position:absolute;
  left: -16px;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translateY(-50%);
  background: linear-gradient(90deg, rgb(var(--stationery-lead)), rgb(var(--stationery-wood)) 60%);
  clip-path: polygon(100% 50%, 65% 15%, 0 50%, 65% 85%);
}
.stationery-item.pencil::after{
  content:"";
  position:absolute;
  left: 80%; top: 20%;
  width: 8%; height: 60%;
  background: repeating-linear-gradient(90deg, rgb(var(--stationery-metal2)) 0 2px, rgb(255 255 255 / .40) 2px 4px);
  border-radius: 4px;
}

/* ===== BACKPACK - Right Side Middle ===== */
.stationery-item.backpack{
  right: 3%;
  top: 32%;
  width: clamp(100px, 12vw, 170px);
  height: clamp(120px, 15vw, 200px);
  transform: rotate(6deg);
  border-radius: 30px 30px 36px 36px;
  background:
    radial-gradient(80px 60px at 30% 20%, rgb(255 255 255 / .35), transparent 55%),
    linear-gradient(170deg, rgb(var(--stationery-teal)) 0%, rgb(var(--stationery-mint)) 60%, rgb(var(--stationery-teal)) 100%);
  box-shadow: 
    inset 0 2px 0 rgb(255 255 255 / .55), 
    inset 0 -15px 30px rgb(0 0 0 / .12);
  border: 1px solid rgb(255 255 255 / .35);
}
.stationery-item.backpack::before{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(60deg, rgb(255 255 255 / .06) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
}
.stationery-item.backpack .handle{
  position:absolute;
  left: 35%; top: -6%;
  width: 32%; height: 14%;
  border-radius: 999px;
  background: 
    linear-gradient(180deg, rgb(var(--stationery-mint)), rgb(var(--stationery-teal)));
  box-shadow: 
    inset 0 2px 0 rgb(255 255 255 / .45),
    0 6px 10px rgb(0 0 0 / .10);
}
.stationery-item.backpack .pocket{
  position:absolute;
  left: 15%; right: 15%;
  bottom: 10%; height: 30%;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .20), rgb(0 0 0 / .08));
  border: 1px solid rgb(255 255 255 / .25);
  box-shadow: inset 0 10px 18px rgb(0 0 0 / .10);
}
.stationery-item.backpack .zip{
  position:absolute;
  left: 14%; right: 14%;
  top: 42%; height: 6px;
  border-radius: 999px;
  background: 
    linear-gradient(90deg, rgb(var(--stationery-metal)), rgb(var(--stationery-metal-shine)), rgb(var(--stationery-metal)));
}
.stationery-item.backpack .zipper-pull{
  position:absolute;
  right: 18%; top: 40%;
  width: 10px; height: 16px;
  border-radius: 5px;
  background: linear-gradient(180deg, rgb(var(--stationery-metal-shine)), rgb(var(--stationery-metal2)));
}

/* ===== RULER - Top Center ===== */
.stationery-item.ruler{
  left: 50%;
  top: 4%;
  transform: translateX(-50%) rotate(-3deg);
  width: clamp(140px, 18vw, 280px);
  height: clamp(22px, 2.8vw, 36px);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgb(255 255 255 / .70), rgb(255 255 255 / .40)),
    linear-gradient(90deg, rgb(var(--stationery-sky) / .50), rgb(var(--stationery-mint) / .40));
  border: 1px solid rgb(255 255 255 / .65);
  box-shadow: 
    inset 0 2px 0 rgb(255 255 255 / .70),
    0 6px 16px rgb(0 0 0 / .06);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.stationery-item.ruler::before{
  content:"";
  position:absolute;
  inset: 6px 8px;
  background: 
    repeating-linear-gradient(90deg, rgb(60 100 130 / .35) 0 1px, transparent 1px 12px);
}
.stationery-item.ruler::after{
  content:"";
  position:absolute;
  left: 8px; right: 8px;
  top: 50%; height: 1px;
  transform: translateY(-50%);
  background: rgb(60 100 130 / .20);
}

/* ===== ERASER ===== */
.stationery-item.eraser{
  display: block;
  left: 15%;
  top: 22%;
  width: 90px;
  height: 55px;
  transform: rotate(15deg);
  border-radius: 14px;
  background: linear-gradient(135deg, rgb(var(--stationery-coral)), rgb(var(--stationery-orange)));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / .50);
}

/* ===== PAPER CLIP ===== */
.stationery-item.clip{
  display: block;
  right: 18%;
  top: 18%;
  width: 35px;
  height: 50px;
  transform: rotate(-10deg);
  border-radius: 999px;
  background: linear-gradient(135deg, rgb(var(--stationery-gold-shine)), rgb(var(--stationery-gold)));
  -webkit-mask: radial-gradient(closest-side, transparent 58%, #000 59%) top/100% 100% no-repeat;
  mask: radial-gradient(closest-side, transparent 58%, #000 59%) top/100% 100% no-repeat;
}

/* ===== ANIMATIONS ===== */
@keyframes gentleFloat{
  0%, 100% { transform: translate3d(0,0,0) rotate(var(--r,0deg)); }
  33% { transform: translate3d(3px,-8px,0) rotate(var(--r,0deg)); }
  66% { transform: translate3d(-3px,-12px,0) rotate(var(--r,0deg)); }
}
@keyframes bgFlow{
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(5%, 3%, 0) rotate(2deg) scale(1.05); }
}
@keyframes sparkleFloat{
  0%, 100% { opacity: .75; transform: translate3d(0,0,0); }
  50% { opacity: .95; transform: translate3d(-3px,-8px,0); }
}

/* ===== RESPONSIVE - 4 Corners Layout ===== */
/* Login stationery items intentionally use the same rules on all screen sizes */

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce){
  .stationery-bg-animated::before, .sparkles, .soft-float { animation: none !important; }
}
.auth-header{text-align:center;margin-bottom:16px}
body.login-page .auth-header .brand{
  font-size:24px;
  font-weight:800;
  color:#0f172a;
}

/* Logo in login page background */
.login-logo{
  position:fixed;
  z-index:2;
  pointer-events:none;
  opacity: 0.92;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,0.12));
  top: 4%;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(100px, 12vw, 160px);
}
.login-logo img{
  width: 100%;
  height: auto;
}
body.login-page .auth-header .subtitle{
  color:#64748b;
  margin-top:8px;
  font-size:14px;
  font-weight:500;
}
.subtitle{color:var(--muted);margin-top:6px;font-size:13px}
.auth-tabs{display:grid;grid-template-columns:1fr 1fr;background:#eef2f6;border-radius:12px;padding:4px;margin:14px 0 12px;gap:6px}
.auth-tab{border:none;border-radius:10px;padding:10px 0;font-weight:700;background:transparent;color:#475569;cursor:pointer;transition:all .18s ease}
.auth-tab.active{background:#fff;box-shadow:0 10px 30px rgba(15,23,42,0.08);color:#0f172a;transform:translateY(-1px)}

/* forms wrapper: centers fields without changing card width/structure */
.auth-card .form-container{display:flex;flex-direction:column;align-items:center;justify-content:center}
.auth-card .form-container > form{width:100%}
.auth-card .form-container > form > div{width:100%}

label{display:block;margin-bottom:8px;color:#475569;font-size:14px;font-weight:600}
input[type=text],input[type=tel],input[type=number]{width:100%;padding:13px;border-radius:12px;border:1px solid #e4ebf3;margin-bottom:14px;background:#f8fbff;transition:all .16s ease;font-size:14px;color:#0f172a}
/* center phone inputs inside auth card without changing card width/layout */
.auth-card input[type=tel]{display:block;width:100%;max-width:340px;margin-left:auto;margin-right:auto}
html[dir="rtl"] .auth-card input[type=tel]{
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239394a1' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79a15.053 15.053 0 006.59 6.59l2.2-2.2a1 1 0 011.11-.21 11.72 11.72 0 003.68.59 1 1 0 011 1v3.5a1 1 0 01-1 1A17 17 0 013 5a1 1 0 011-1h3.5a1 1 0 011 1 11.72 11.72 0 00.59 3.68 1 1 0 01-.21 1.11l-2.2 2.2z'/%3E%3C/svg%3E") no-repeat right 12px center;
  padding-right:44px;
}
html[dir="ltr"] .auth-card input[type=tel]{
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239394a1' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79a15.053 15.053 0 006.59 6.59l2.2-2.2a1 1 0 011.11-.21 11.72 11.72 0 003.68.59 1 1 0 011 1v3.5a1 1 0 01-1 1A17 17 0 013 5a1 1 0 011-1h3.5a1 1 0 011 1 11.72 11.72 0 00.59 3.68 1 1 0 01-.21 1.11l-2.2 2.2z'/%3E%3C/svg%3E") no-repeat left 12px center;
  padding-left:44px;
}
input[type=text]:focus,input[type=tel]:focus,input[type=number]:focus{border-color:var(--accent);box-shadow:0 0 0 4px rgba(37,99,235,0.12);background:#fff}
button{background:var(--accent);color:white;padding:12px 14px;border:none;border-radius:12px;cursor:pointer;font-weight:700;transition:transform .1s ease,box-shadow .1s ease,background .12s ease;width:100%}
button:hover{transform:translateY(-1px);box-shadow:0 10px 26px rgba(37,99,235,0.2);background:linear-gradient(135deg,var(--accent),#1d4ed8)}
button:active{transform:translateY(0)}
/* Vibrant login page button */
body.login-page .auth-card button[type="submit"]{
  background:linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  box-shadow:0 8px 24px rgba(139,92,246,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  border-radius:14px;
  padding:14px 18px;
  font-size:15px;
  letter-spacing:0.3px;
}
body.login-page .auth-card button[type="submit"]:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 32px rgba(139,92,246,0.45), inset 0 1px 0 rgba(255,255,255,0.25);
  background:linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c084fc 100%);
}
body.login-page .auth-card button[type="submit"]:active{
  transform:translateY(0);
}
/* Enhanced inputs for login page */
body.login-page .auth-card input[type=text],
body.login-page .auth-card input[type=tel]{
  border:1.5px solid rgba(100,116,139,0.15);
  background:rgba(255,255,255,0.65);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border-radius:14px;
  padding:14px 16px;
}
body.login-page .auth-card input[type=text]:focus,
body.login-page .auth-card input[type=tel]:focus{
  border-color:#8b5cf6;
  box-shadow:0 0 0 4px rgba(139,92,246,0.15);
  background:rgba(255,255,255,0.85);
}
button.ghost{background:transparent;color:var(--accent);border:1px solid rgba(37,99,235,0.18);width:auto;padding:8px 12px;border-radius:10px;box-shadow:none}
.switch-row{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:10px}
.muted{color:var(--muted)}
.footnote{text-align:center;font-size:13px;margin-top:14px}
body.login-page .footnote{color:#64748b;font-weight:500}
.site-footer{text-align:center;color:#64748b;font-size:11px;padding:6px 10px 10px;line-height:1.6;opacity:.9;margin-top:8px}
.site-footer::before{content:"© ";font-weight:700}
body.login-page .site-footer{color:#475569;text-shadow:0 1px 2px rgba(255,255,255,.60)}
body.login-page .site-footer{display:none}

/* header */
.header{display:flex;align-items:center;justify-content:center;padding:14px 16px;position:relative;z-index:100}
.brand{font-weight:800;font-size:20px;color:#0f172a;flex:1;text-align:center}
.user-menu{position:absolute;right:16px;top:50%;transform:translateY(-50%);z-index:1000}
.header-cart{position:absolute;left:16px;top:50%;transform:translateY(-50%)}
.header-cart-btn{width:42px;height:42px;border-radius:12px;border:1px solid #e2e8f0;background:linear-gradient(135deg,#ffffff,#f1f7ff);color:#0f172a;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 8px 18px rgba(37,99,235,0.14);transition:transform .16s ease,box-shadow .16s ease,background .16s ease,color .16s ease;padding:0}
.header-cart-btn:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(37,99,235,0.22);background:linear-gradient(135deg,#eff6ff,#dbeafe);color:#1d4ed8}
.header-cart-btn:active{transform:translateY(0) scale(.96)}
.header-cart-btn svg{width:18px;height:18px}
.header-cart-btn{position:relative}
.cart-badge{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;box-shadow:0 6px 14px rgba(239,68,68,.35)}
.cart-badge.hidden{display:none}
.user-menu button{background:transparent;color:#0f172a;border:none;font-size:24px;cursor:pointer;padding:8px;display:flex;align-items:center;justify-content:center;transition:color .15s ease}
.user-menu button:hover{color:var(--accent)}
.dropdown{position:absolute;right:0;top:42px;background:linear-gradient(180deg,var(--card),var(--glass));border-radius:10px;box-shadow:0 10px 30px rgba(2,6,23,0.08);min-width:220px;padding:10px;display:none;z-index:1001}
.dropdown a{display:block;padding:10px;border-radius:8px;color:#0f172a;text-decoration:none}
.dropdown a{transition:background .16s ease,color .16s ease,transform .16s ease}
.dropdown a:hover{transform:translateX(-1px)}
.dropdown[style*="display: block"]{animation:dropdownIn .18s ease both}
.dropdown a.active{background:linear-gradient(90deg,rgba(37,99,235,0.12),rgba(6,182,212,0.06));font-weight:700}

/* toolbar */
.toolbar{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}
.search{flex:1;padding:10px;border-radius:10px;border:1px solid #e6eef9;background:#fff}
.toolbar #categorySelect{
  min-width:200px;
  padding:10px 40px 10px 12px;
  border-radius:12px;
  border:1px solid #d6e4f5;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232563eb' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:left 12px center;
  background-size:14px;
  color:#0f172a;
  font-size:13px;
  font-weight:600;
  box-shadow:0 6px 16px rgba(37,99,235,.08);
  appearance:none;
  -webkit-appearance:none;
  transition:border-color .16s ease,box-shadow .16s ease,transform .12s ease;
}
.toolbar #categorySelect:hover{border-color:#bfd4ef;box-shadow:0 8px 20px rgba(37,99,235,.12)}
.toolbar #categorySelect:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.14),0 8px 20px rgba(37,99,235,.12)}

/* product grid - 4 columns, 40 products (10 rows) */
.grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:20px}
.product{padding:14px;border-radius:12px;border:1px solid #eef4ff;background:linear-gradient(180deg,#fff,#fbfdff);display:flex;flex-direction:column}
.product img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:8px;flex-shrink:0;transition:transform .28s ease,filter .28s ease}
.product:hover img{transform:scale(1.03);filter:saturate(1.06)}
.product h4{margin:10px 0 6px}
.product p{margin:0;color:var(--muted);font-size:13px;margin-bottom:12px;flex-grow:1}

/* price section - minimal */
.product-price{padding:6px 8px;background:none;border:none;text-align:center;margin-bottom:8px}
.price-label{font-size:11px;color:var(--muted);margin-bottom:2px;font-weight:500;letter-spacing:0.3px}
.price-value{font-size:14px;font-weight:600;color:var(--accent);line-height:1.2}

/* quantity and add to cart section - compact */
.product-actions{padding:0;background:none;border:none;display:flex;flex-direction:column;gap:6px;max-width:160px;margin:0 auto}
.qty-label{font-size:11px;color:var(--muted);font-weight:500;letter-spacing:0.3px;margin-bottom:1px}
.product-actions .stepper{width:100%;border-radius:6px}
.product-actions .stepper button{padding:6px 8px;font-size:13px}
.product-actions .stepper input[type=number]{width:100%;padding:6px;font-size:12px;text-align:center}
.add-to-cart-btn{padding:7px 10px;background:var(--accent);color:white;border:none;border-radius:6px;font-weight:600;font-size:12px;cursor:pointer;transition:background .2s ease;width:100%}
.add-to-cart-btn:hover{background:var(--accent-hover,#0284c7)}
.add-to-cart-btn:active{transform:scale(.97)}

/* modern pagination */
.pagination-container{display:flex;align-items:center;justify-content:center;gap:16px;padding:16px 12px;background:transparent;margin-top:20px}
.pagination-btn{padding:8px 12px;background:#fff;color:var(--accent);border:1px solid #dfe8f2;border-radius:6px;font-weight:500;font-size:12px;cursor:pointer;transition:all .15s ease;min-width:fit-content}
.pagination-btn:hover:not(:disabled){background:var(--accent);color:white;border-color:var(--accent)}
.pagination-btn:active:not(:disabled){transform:scale(.95)}
.pagination-btn:disabled{opacity:0.35;cursor:not-allowed}
.page-numbers{display:flex;gap:6px;align-items:center;direction:ltr}
.page-num{padding:6px 10px;background:#fff;color:var(--text);border:1px solid #e6eef9;border-radius:4px;font-size:12px;cursor:pointer;transition:all .15s ease;user-select:none;min-width:32px;text-align:center}
.page-num:hover{border-color:var(--accent);color:var(--accent)}
.page-num.active{background:var(--accent);color:white;border-color:var(--accent);font-weight:600}
.page-num.disabled{color:#999;cursor:default}
.page-number{letter-spacing:0.5px}
input.qty-input{width:90px;padding:8px;border-radius:10px;border:1px solid #eef4ff}

/* floating order button */

.order-btn{position:fixed;right:1%;top:7.5%;background:var(--accent-2);color:white;padding:10px 16px;border-radius:999px;box-shadow:0 8px 24px rgba(6,182,212,0.3);font-weight:700;border:none;cursor:pointer;transition:all 0.2s ease;display:flex;align-items:center;justify-content:center;gap:8px;font-size:14px;z-index:120;white-space:nowrap;width:fit-content;max-width:none}
.order-btn:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(6,182,212,0.4)}
.order-btn:active{transform:translateY(0)}

@media (max-width:640px){
  .header-cart{left:12px}
  .header-cart-btn{width:38px;height:38px;border-radius:10px}
}

/* sidebar */
 .admin-layout{display:flex;gap:12px;position:relative}
 .admin-nav{width:220px}
 .admin-hamburger{display:none}
 .admin-overlay{display:none}
aside .card{padding:16px}
aside nav div{margin:8px 0}
aside nav a{display:block;padding:10px;border-radius:8px;color:#0f172a;text-decoration:none}
aside nav a.active{background:linear-gradient(90deg,rgba(37,99,235,0.12),rgba(6,182,212,0.06));font-weight:700}

/* modal */
#orderModal{display:none;position:fixed;inset:0;background:rgba(2,6,23,0.45);align-items:center;justify-content:center;padding:20px}
#orderModal .card{max-width:860px;width:100%}
#orderModal .card{animation:modalPop .2s ease both}
.cart-modal-card{width:96%;max-width:760px;display:flex;flex-direction:column;gap:10px}
.cart-modal-title{margin:0}
.cart-items-list{max-height:min(52vh,420px);overflow:auto;border:1px solid #e6eef9;border-radius:10px;padding:8px;background:#f8fbff;display:flex;flex-direction:column;gap:8px}
.cart-item-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px;border:1px solid #e6eef9;border-radius:8px;background:#fff}
.cart-item-main{display:flex;align-items:center;gap:10px;min-width:0;flex:1}
.cart-item-thumb{width:44px;height:44px;border-radius:8px;object-fit:cover;background:#eef4ff;flex-shrink:0}
.cart-item-meta{min-width:0}
.cart-item-name{font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cart-item-sub{font-size:12px;color:var(--muted);margin-top:2px}
.cart-item-sum{font-weight:700;font-size:13px;color:#0f172a;white-space:nowrap}
.cart-item-actions{display:flex;align-items:center;gap:8px;margin-top:6px;flex-wrap:nowrap}
.cart-item-actions .stepper{flex:0 0 auto;min-width:124px}
.cart-item-actions .stepper button{min-width:32px}
.cart-item-actions .stepper input[type=number]{width:60px}
.cart-item-actions .cart-remove-btn{flex:0 0 auto;position:relative;z-index:1}
.cart-qty-controls{display:inline-flex;align-items:center;border:1px solid #dbe7fb;border-radius:999px;background:#f8fbff;overflow:hidden}
.cart-qty-btn{width:28px;height:28px;border:none;background:transparent;color:var(--accent);font-size:16px;font-weight:700;cursor:pointer;transition:all .18s ease;display:flex;align-items:center;justify-content:center}
.cart-qty-btn:hover{background:#e8f1ff;transform:translateY(-1px)}
.cart-qty-btn:active{transform:scale(.94)}
.cart-qty-input{width:62px;border:none;background:#fff;text-align:center;font-size:12px;font-weight:700;color:#0f172a;padding:6px 4px;outline:none;margin:0;height:100%;box-sizing:border-box;display:block;line-height:1.2;border-radius:0;min-height:0}
.cart-remove-btn{border:none;background:#fee2e2;color:#b91c1c;width:30px;height:30px;border-radius:50%;font-size:0;cursor:pointer;transition:all .18s ease;display:inline-flex;align-items:center;justify-content:center;padding:0}
.cart-remove-btn svg{display:block}
.cart-remove-btn:hover{background:#fecaca;transform:translateY(-1px)}
.cart-remove-btn:active{transform:scale(.96)}
.cart-empty{padding:14px;text-align:center;color:#94a3b8;font-size:13px}
.cart-summary-row{text-align:left;margin-top:2px}
.cart-actions-row{margin-top:4px;display:flex;gap:8px;justify-content:flex-end}
.cart-btn-primary,.cart-btn-secondary{width:auto;min-width:110px}
.cart-btn-secondary{background:#e5e7eb;color:#111827}
.cart-btn-secondary:hover{background:#d1d5db;box-shadow:none;transform:none}

/* toast */
.toast-wrap{position:fixed;left:18px;top:18px;z-index:9999;display:flex;flex-direction:column;gap:8px}
.toast-wrap.toast-wrap-center{left:50%;top:50%;transform:translate(-50%,-50%);align-items:center}
.toast-overlay{position:fixed;inset:0;background:rgba(2,6,23,0.52);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);opacity:0;pointer-events:none;z-index:9997;transition:opacity .22s ease}
.toast-overlay.visible{opacity:1}
.toast{background:linear-gradient(90deg,var(--accent),#0ea5a1);color:white;padding:10px 14px;border-radius:10px;box-shadow:0 8px 30px rgba(2,6,23,0.12);min-width:180px;animation:toastIn .28s cubic-bezier(.2,.9,.2,1);transition:opacity .35s ease,transform .35s ease}
.toast-wrap.toast-wrap-center .toast{min-width:min(560px,88vw);text-align:center;padding:14px 18px;font-size:15px;line-height:1.6;box-shadow:0 18px 55px rgba(2,6,23,0.28)}
@keyframes toastIn{from{opacity:0;transform:translateY(-10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}

/* orders page */
.orders-list{display:grid;grid-template-columns:1fr;gap:12px}
.order-card .order-header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:6px 4px;border-bottom:1px dashed #e6eef9;cursor:pointer}
.order-card .order-title{font-weight:700}
.order-card .order-sub{color:var(--muted);font-size:12px}
.order-card .order-total{display:flex;align-items:center;gap:8px;text-align:left}
.order-card .order-total .sum{font-weight:700}
.order-card .chev{display:inline-block;color:var(--accent);transition:transform .18s ease}
.order-card.open .chev{transform:rotate(180deg)}
.order-card .order-items{margin-top:10px;display:grid;gap:8px;overflow:hidden;max-height:0;opacity:0;transition:max-height .25s ease,opacity .2s ease}
.order-item{display:flex;justify-content:space-between;align-items:center;padding:8px 10px;border:1px solid #e6eef9;border-radius:8px;background:#fff}
.order-item .item-name{font-weight:600}
.order-item .item-qty{color:var(--muted);font-size:12px}
.order-item .item-sum{font-weight:700}

/* responsive */
@media (max-width:880px){.grid{grid-template-columns:repeat(3,1fr);gap:14px}}
@media (max-width:720px){
  .grid{grid-template-columns:repeat(2,1fr);gap:12px}
}
@media (max-width:768px){
  .container{min-height:calc(100dvh - 92px)}
  .site-footer{margin-top:4px;padding:6px 10px 8px}
  input[type=text],
  input[type=tel],
  input[type=number],
  input[type=email],
  input[type=password],
  select,
  textarea{
    font-size:16px !important;
    line-height:1.35;
  }
  button,
  .btn,
  .pagination-btn,
  .header-cart-btn,
  .cart-remove-btn{
    min-height:44px;
  }
  .container{padding:14px}
  .modal-content{width:min(94vw,560px);max-height:88vh}
  #orderModal{padding:12px}
  .cart-modal-card{max-width:100%}
  button,
  .btn,
  .pagination-btn,
  .header-cart-btn,
  .cart-remove-btn,
  .dropdown a{
    -webkit-tap-highlight-color:transparent;
    touch-action:manipulation;
  }
  button:active,
  .btn:active,
  .pagination-btn:active,
  .header-cart-btn:active,
  .cart-remove-btn:active{
    transform:scale(.97);
  }
  .dropdown{transform-origin:top right}
  #orderModal,
  #orderDetailModal{align-items:flex-end;padding:0}
  #orderModal .card,
  #orderDetailModal .invoice-container{
    width:100%;
    max-width:none;
    margin:0;
    border-radius:18px 18px 0 0;
    max-height:88dvh;
    animation:sheetUp .24s cubic-bezier(.2,.9,.2,1) both;
  }
  .admin-hamburger{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:12px;background:linear-gradient(145deg,#ffffff,#f8fbff);box-shadow:0 8px 20px rgba(15,23,42,0.12);border:1px solid #dbe7f7;position:relative;top:auto;right:auto;margin:0 0 10px auto;z-index:30;font-size:18px;line-height:1;color:#0f172a;cursor:pointer;transition:transform .14s ease,box-shadow .14s ease,background .18s ease}
  .admin-hamburger:hover{transform:translateY(-1px);box-shadow:0 12px 24px rgba(15,23,42,0.16);background:linear-gradient(145deg,#ffffff,#eef5ff)}
  .admin-hamburger:active{transform:scale(.96)}
  .admin-hamburger:focus-visible{outline:3px solid rgba(37,99,235,0.22);outline-offset:2px}
  .admin-layout{flex-direction:column}
  .admin-nav{display:block;position:fixed;top:0;right:0;bottom:0;max-width:280px;width:78vw;height:100vh;overflow:auto;background:var(--card);z-index:1200;box-shadow:0 20px 50px rgba(15,23,42,0.18);padding:0;transform:translateX(105%);opacity:0;transition:transform .24s ease, opacity .24s ease}
  body.admin-menu-open .admin-nav{transform:translateX(0);opacity:1}
  .admin-overlay{display:block;position:fixed;inset:0;background:rgba(0,0,0,0.0);z-index:1190;opacity:0;pointer-events:none;transition:opacity .24s ease}
  body.admin-menu-open .admin-overlay{background:rgba(0,0,0,0.45);opacity:1;pointer-events:auto}
}

@media (max-width:520px){
  .auth-card{width:94vw;padding:24px}
  .grid{grid-template-columns:1fr;gap:10px}
  .product{padding:10px;min-width:140px}
  .product img{aspect-ratio:1/1}
  .product-price{padding:5px 6px;margin-bottom:6px}
  .price-value{font-size:13px}
  .product-actions{gap:4px;max-width:none}
  .product-actions .stepper button{padding:5px 6px;font-size:12px}
  .product-actions .stepper input[type=number]{padding:5px;font-size:11px}
  .add-to-cart-btn{padding:6px 8px;font-size:11px}
  .pagination-container{flex-wrap:wrap;gap:10px;padding:12px}
  .pagination-btn{padding:8px 12px;font-size:12px}
  .page-info{width:100%;order:-1;margin-bottom:10px;font-size:13px}
}

/* focus states for accessibility */
button:focus,input:focus,select:focus,a:focus{outline:3px solid rgba(37,99,235,0.18);outline-offset:3px}

/* image modal transitions */
.img-modal{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgba(2,6,23,0.65);opacity:0;pointer-events:none;transition:opacity .22s ease}
.img-modal.open{opacity:1;pointer-events:auto}
.img-modal .img-wrap{max-width:92%;max-height:86%;transform:translateY(8px) scale(.98);transition:transform .28s cubic-bezier(.2,.9,.2,1)}
.img-modal.open .img-wrap{transform:translateY(0) scale(1)}
.img-modal img{max-width:100%;max-height:100%;border-radius:10px;box-shadow:0 20px 60px rgba(2,6,23,0.6);transition:transform .16s ease;will-change:transform}
.img-modal .close-btn{position:absolute;left:20px;top:20px;background:rgba(0,0,0,0.5);color:white;border:none;padding:8px 10px;border-radius:8px}

/* touch interaction helpers */
.img-modal .img-wrap{touch-action:none;overflow:hidden;display:flex;align-items:center;justify-content:center}
.img-modal .img-wrap img{touch-action:none}

/* numeric stepper */
.stepper{display:inline-flex;align-items:center;border-radius:10px;overflow:hidden;border:1px solid #e6eef9;background:#fff}
.stepper button{background:transparent;border:none;padding:8px 10px;cursor:pointer;font-weight:700;color:var(--accent);display:flex;align-items:center;justify-content:center}
.stepper button svg{width:16px;height:16px}
.stepper input[type=number]{width:84px;padding:8px;border-left:1px solid #eef4ff;border-right:1px solid #eef4ff;text-align:center;margin:0;height:100%;box-sizing:border-box;display:block;border-radius:0;line-height:1.2;background:#fff;min-height:0}
.stepper button:active{transform:scale(.96)}
.stepper button.animate{transition:transform .18s cubic-bezier(.2,.9,.2,1),background .18s}
.stepper button.disabled{opacity:.36;cursor:not-allowed;transform:none}

/* small icon SVGs for +/- */
.stepper button svg path{fill:var(--accent)}

/* orders details modal */
#orderDetailModal{display:none;position:fixed;inset:0;background:rgba(2,6,23,0.45);align-items:center;justify-content:center;padding:20px;z-index:1000}
#orderDetailModal .invoice-container{animation:modalPop .2s ease both}
/* Admin invoice styles reused */
.invoice-container { max-width:860px; width:100%; margin:0 auto; background:#fff; padding:20px; border:1px solid #e0e0e0; border-radius:8px; max-height:86vh; overflow:auto }
.invoice-header { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:20px; border-bottom:2px solid #0066cc; padding-bottom:15px; }
.invoice-title { font-size:20px; font-weight:700; color:#333; }
.invoice-meta { text-align:left; font-size:12px; color:#666; }
.customer-section { margin-bottom:20px; }
.section-title { font-weight:700; font-size:14px; margin-bottom:8px; color:#333; }
.customer-info { display:grid; grid-template-columns:1fr 1fr; gap:12px; font-size:13px; }
.info-item { }
.info-label { color:#666; font-size:11px; margin-bottom:2px; }
.info-value { font-weight:600; }
.items-section { }
.items-table { width:100%; border-collapse:collapse; margin:20px 0; }
.items-table th { background:#f8f9fa; padding:10px; text-align:right; border-bottom:2px solid #0066cc; font-weight:700; font-size:12px; color:#333; }
.items-table td { padding:10px; border-bottom:1px solid #e0e0e0; font-size:13px; }
.items-table tr:last-child td { border-bottom:2px solid #0066cc; }
.col-name { text-align:right; }
.col-qty { text-align:center; width:60px; }
.col-price { text-align:left; width:100px; }
.col-total { text-align:left; width:100px; }
.summary-section { margin-top:20px; }
.summary-row { display:flex; justify-content:space-between; align-items:center; padding:8px 0; font-size:13px; }
.summary-row.total { font-size:16px; font-weight:700; color:#0066cc; border-top:2px solid #0066cc; padding-top:12px; margin-top:12px; }
.actions { display:flex; gap:8px; margin-top:20px; padding-top:20px; border-top:1px solid #e0e0e0; }
.btn { padding:10px 16px; border:none; border-radius:4px; cursor:pointer; font-weight:600; transition:all 200ms; font-size:13px; }
.btn-primary { background:#0066cc; color:#fff; }
.btn-primary:hover { background:#0052a3; }
.btn-secondary { background:#e3e3e3; color:#333; }
.btn-secondary:hover { background:#d0d0d0; }

@keyframes pageEnter{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes dropdownIn{from{opacity:0;transform:translateY(-6px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes modalPop{from{opacity:0;transform:translateY(8px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes sheetUp{from{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}

/* PWA Install Banner */
.pwa-banner-overlay{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,0.55);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  z-index:10000;
  opacity:0;
  transition:opacity .35s ease;
}
.pwa-banner-overlay.visible{opacity:1}

.pwa-install-banner{
  position:fixed;
  bottom:20px;
  left:50%;
  transform:translateX(-50%) translateY(100px);
  width:min(420px,92vw);
  background:linear-gradient(145deg,rgba(255,255,255,0.95),rgba(248,250,255,0.95));
  backdrop-filter:blur(20px);
  -webkit-backdrop-filter:blur(20px);
  border-radius:20px;
  padding:28px 24px;
  box-shadow:0 20px 60px rgba(2,6,23,0.22),0 0 0 1px rgba(255,255,255,0.2);
  z-index:10001;
  text-align:center;
  opacity:0;
  transition:transform .45s cubic-bezier(.2,.9,.2,1),opacity .35s ease;
}
.pwa-install-banner.visible{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}

.pwa-banner-close{
  position:absolute;
  top:14px;
  left:14px;
  width:36px;
  height:36px;
  border:none;
  background:linear-gradient(145deg,#f1f5f9,#e2e8f0);
  border-radius:50%;
  cursor:pointer;
  font-size:14px;
  color:#94a3b8;
  transition:all .25s cubic-bezier(.2,.9,.2,1);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 2px 8px rgba(0,0,0,0.08),inset 0 1px 0 rgba(255,255,255,0.8);
}
.pwa-banner-close:hover{
  background:linear-gradient(145deg,#e2e8f0,#cbd5e1);
  color:#64748b;
  transform:scale(1.08) rotate(90deg);
  box-shadow:0 4px 12px rgba(0,0,0,0.12);
}
.pwa-banner-close:active{transform:scale(0.95) rotate(90deg)}

.pwa-banner-icon{
  width:80px;
  height:80px;
  margin:0 auto 16px;
  border-radius:20px;
  display:flex;
  align-items:center;
  justify-content:center;
  animation:pwaBounce 2s ease-in-out infinite;
  box-shadow:0 12px 35px rgba(37,99,235,0.25);
  overflow:hidden;
}
.pwa-banner-icon img{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:20px;
}
@keyframes pwaBounce{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-6px)}
}

.pwa-banner-title{
  margin:0 0 8px;
  font-size:18px;
  font-weight:700;
  color:#0f172a;
}

.pwa-banner-desc{
  margin:0 0 20px;
  font-size:14px;
  color:#64748b;
  line-height:1.6;
}

.pwa-share-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg,var(--accent),#0ea5e9);
  color:white;
  width:26px;
  height:26px;
  border-radius:8px;
  vertical-align:middle;
  margin:0 4px;
  box-shadow:0 3px 10px rgba(37,99,235,0.25);
}

.pwa-banner-install{
  width:100%;
  padding:14px 24px;
  border:none;
  background:linear-gradient(135deg,var(--accent),#0ea5e9);
  color:white;
  font-size:15px;
  font-weight:600;
  border-radius:12px;
  cursor:pointer;
  transition:transform .2s,box-shadow .2s;
  box-shadow:0 8px 25px rgba(37,99,235,0.3);
  margin-bottom:10px;
}
.pwa-banner-install:hover{transform:translateY(-2px);box-shadow:0 12px 35px rgba(37,99,235,0.4)}
.pwa-banner-install:active{transform:translateY(0)}

.pwa-banner-later{
  width:100%;
  padding:12px 24px;
  border:1px solid #e2e8f0;
  background:linear-gradient(145deg,#ffffff,#f8fafc);
  color:#64748b;
  font-size:14px;
  font-weight:600;
  border-radius:12px;
  cursor:pointer;
  transition:all .25s cubic-bezier(.2,.9,.2,1);
  box-shadow:0 2px 6px rgba(0,0,0,0.04);
}
.pwa-banner-later:hover{
  background:linear-gradient(145deg,#f8fafc,#f1f5f9);
  border-color:#cbd5e1;
  color:#475569;
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
}
.pwa-banner-later:active{transform:translateY(0)}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation:none !important;transition:none !important;scroll-behavior:auto !important}
}

