/* ========= AIN STORE THEME (Purple + White) ========= */

/* Theme vars */
:root{
  --purple: #6D28D9;
  --purple-dark: #4C1D95;
  --purple-soft: #EDE9FE;
  --ink: #111827;
  --muted: #6B7280;
  --border: #E5E7EB;
  --white: #FFFFFF;
}

/* Reset */
*{ box-sizing: border-box; }

body{
  margin: 0;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: radial-gradient(circle at top, #f5f3ff 0%, #eef2ff 35%, #e9eef5 100%);
  display: grid;
  place-items: center;
}

/* Phone frame */
.phone{
  width: 360px;
  height: 720px;
  border-radius: 30px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, var(--purple-dark), #0b1220 65%);
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}

/* Topbar */
.topbar{
  height: 54px;
  border-radius: 18px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  position: relative;
}

.title{
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.4px;
}

/* Links */
.link{
  color: rgba(255,255,255,0.92);
  text-decoration: none;
  font-size: 14px;
}

.cart-link{ text-decoration: none; }

/* Card */
.card{
  flex: 1;
  width: 100%;
  background: var(--white);
  border-radius: 22px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow-y: auto;
  box-shadow: 0 12px 28px rgba(17,24,39,0.08);
  scroll-behavior: smooth;
}

/* Footer */
.footer{
  height: 44px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.08);
  font-size: 12px;
}

/* Hide scrollbar (clean) */
.card::-webkit-scrollbar { width: 0; height: 0; }
.card { scrollbar-width: none; }

/* Headings & text */
.name{
  margin: 0;
  font-size: 20px;
  color: var(--ink);
}
.bio{
  margin: 0;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  font-size: 14px;
}

/* Subhead (checkout) */
.subhead{
  width: 100%;
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: bold;
  align-self: flex-start;
}

/* Buttons */
.primary-btn{
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  color: var(--white);
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  box-shadow: 0 10px 22px rgba(109,40,217,0.25);
  transition: transform 0.06s ease, box-shadow 0.08s ease;
}
.primary-btn:active{ transform: scale(0.99); }
.primary-btn:disabled{ opacity: 0.6; cursor: not-allowed; box-shadow: none; }

.secondary-btn{
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 16px;
  border: 1px solid var(--purple);
  color: var(--purple-dark);
  background: #ffffff;
  transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.secondary-btn:hover{
  background: #faf7ff;
  box-shadow: 0 10px 18px rgba(109,40,217,0.10);
}
.secondary-btn:focus{
  outline: none;
  box-shadow: 0 0 0 3px rgba(109,40,217,0.14);
}

.link-btn{
  display: block;
  text-decoration: none;
  text-align: center;
}

/* Cart badge */
.cart-badge{
  background: rgba(255,255,255,0.14);
  color: var(--white);
  padding: 8px 10px;
  border-radius: 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Price */
.price{
  width: 100%;
  padding: 10px 12px;
  background: var(--purple-soft);
  border-radius: 14px;
  color: var(--purple-dark);
  text-align: center;
  font-weight: bold;
}

/* Product image */
.product-img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(109,40,217,0.12);
  transition: opacity 0.25s ease;
}
.product-img.fade-out { opacity: 0.15; }

/* Options */
.options{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.label{
  margin: 0 0 6px 0;
  color: var(--ink);
  font-weight: bold;
  font-size: 14px;
  align-self: flex-start;
}

.chips{
  width: 100%;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip{
  border: 1px solid rgba(109,40,217,0.35);
  background: #fff;
  color: var(--purple-dark);
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

.chip.active{
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  border-color: transparent;
  color: #fff;
}

/* Summary */
.summary{
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  background: #f7f5ff;
  border-radius: 14px;
  color: var(--ink);
  text-align: center;
  font-size: 14px;
  border: 1px solid rgba(109,40,217,0.12);
}

/* Cart list */
.cart-list{ justify-content: flex-start; gap: 12px; }

.cart-item{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-item h3{
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}

.cart-meta{ font-size: 14px; color: var(--muted); }
.cart-price{ font-weight: bold; color: var(--purple-dark); }

/* Cart item head/thumb */
.cart-item-head{ display:flex; gap:10px; align-items:center; }
.cart-thumb{
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(109,40,217,0.18);
  background: #fff;
}
.cart-title-wrap{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Quantity */
.qty-row{
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: var(--purple-soft);
  border-radius: 14px;
  padding: 8px;
}

.qty-btn{
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--purple), var(--purple-dark));
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
.qty-btn:active{ transform: scale(0.97); }

.qty-num{
  min-width: 28px;
  text-align: center;
  font-weight: bold;
  color: var(--ink);
}

/* Remove button */
.remove-btn{
  margin-top: 4px;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(239,68,68,0.18);
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}
.remove-btn:active{ transform: scale(0.98); }
.remove-btn:hover{ box-shadow: 0 12px 22px rgba(239,68,68,0.22); }

/* Checkout */
.checkout{ justify-content: flex-start; gap: 14px; }

.total-box{
  width: 100%;
  background: var(--purple-soft);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--purple-dark);
  font-weight: bold;
  border: 1px solid rgba(109,40,217,0.12);
}

.confirm-msg{
  margin: 0;
  text-align: center;
  font-weight: bold;
  color: #16a34a;
}

/* Form */
.form{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field{
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field span{
  font-size: 13px;
  color: var(--ink);
  font-weight: bold;
  align-self: flex-start;
}

.field input{
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  outline: none;
  font-size: 14px;
}

.field input:focus{
  border-color: rgba(109,40,217,0.55);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
}

/* Promo + Bill */
.promo{ width: 100%; display: flex; gap: 10px; }
.promo input{
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  outline: none;
  font-size: 14px;
}

.bill{
  width: 100%;
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--ink);
  border: 1px solid rgba(109,40,217,0.12);
}

.bill-row{
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}
.bill-row.total{
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--purple-dark);
}

/* Brand logo general */
.logo{
  width: 120px;
  height: auto;
  object-fit: contain;
  margin: 6px 0 2px;
  filter: drop-shadow(0 10px 22px rgba(109,40,217,0.25));
}

/* Toast */
.toast{
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  text-align: center;
  font-size: 14px;
  display: none;
  background: #f7f5ff;
  border: 1px solid rgba(109,40,217,0.18);
  color: #4C1D95;
}

/* Loading */
.loading {
  pointer-events: none;
  opacity: 0.7;
  position: relative;
}
.loading::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Last order */
.last-order{
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(109,40,217,0.18);
  color: #111827;
  font-size: 14px;
}
.last-order strong{ color: #4C1D95; }

/* Orders cards */
.order-card{
  width: 100%;
  border: 1px solid rgba(109,40,217,0.18);
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.order-id{ font-weight: bold; color: #4C1D95; }
.order-meta{ font-size: 13px; color: #6B7280; }

.order-items{
  background: #f7f5ff;
  border: 1px solid rgba(109,40,217,0.12);
  border-radius: 12px;
  padding: 10px;
  font-size: 13px;
  color: #111827;
  line-height: 1.7;
}

/* Home actions */
.home-actions{
  width: 100%;
  display: flex;
  gap: 10px;
}
.home-actions .secondary-btn{
  flex: 1;
  font-size: 14px;
  padding: 10px 12px;
}

/* Dot (hidden admin trigger) */
.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.65);
  display: inline-block;
}

/* Admin hidden dot button */
.admin-dot{
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 0;
  background: rgba(255,255,255,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}
.admin-dot:active{ transform: scale(0.95); }

/* ========= Order Status Tracking ========= */
.status-wrap{
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.status-pill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(109,40,217,0.18);
  background: #fff;
  font-size: 13px;
  color: #111827;
}

.status-dot{
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6D28D9;
  box-shadow: 0 0 0 4px rgba(109,40,217,0.12);
}

.status-progress{
  width: 100%;
  background: #f7f5ff;
  border: 1px solid rgba(109,40,217,0.12);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.status-progress > span{
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, #6D28D9, #4C1D95);
}

.status-steps{
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.status-step{
  text-align: center;
  font-size: 12px;
  color: #6B7280;
  padding: 8px 6px;
  border-radius: 12px;
  background: #f7f5ff;
  border: 1px solid rgba(109,40,217,0.10);
}
.status-step.active{
  color: #4C1D95;
  font-weight: bold;
  background: #EDE9FE;
  border-color: rgba(109,40,217,0.22);
}
.status-step.done{
  color: #16a34a;
  font-weight: bold;
  background: rgba(22,163,74,0.08);
  border-color: rgba(22,163,74,0.18);
}

/* ========= Products page (list + search) ========= */
.products{
  justify-content: flex-start;
  gap: 12px;
}

.search{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(109,40,217,0.18);
  outline: none;
  font-size: 14px;
}
.search:focus{
  border-color: rgba(109,40,217,0.55);
  box-shadow: 0 0 0 3px rgba(109,40,217,0.12);
}

.product-row{
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(109,40,217,0.18);
  background: #fff;
  cursor: pointer;
  transition: transform 0.08s ease;
}
.product-row:active{ transform: scale(0.99); }

.product-thumb{
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(109,40,217,0.14);
}

.product-info{
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.product-name{
  font-weight: bold;
  color: #4C1D95;
  font-size: 15px;
}

.product-sub{
  color: #6B7280;
  font-size: 13px;
}

.product-go{
  font-size: 22px;
  color: rgba(76,29,149,0.8);
  line-height: 1;
}

/* ========= Bottom Sheet ========= */
.sheet{
  position: fixed;
  left: 0;
  right: 0;
  bottom: -100%;
  display: flex;
  justify-content: center;
  padding: 14px;
  transition: bottom 0.22s ease;
  z-index: 9999;
}
.sheet.show{ bottom: 0; }

.sheet-card{
  width: 360px;
  max-width: calc(100% - 28px);
  background: #fff;
  border-radius: 20px;
  border: 1px solid rgba(109,40,217,0.18);
  box-shadow: 0 16px 40px rgba(0,0,0,0.2);
  padding: 14px;
}

.sheet-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet-title{
  font-weight: bold;
  color: #4C1D95;
  font-size: 15px;
}

.sheet-sub{
  margin-top: 6px;
  color: #6B7280;
  font-size: 13px;
  line-height: 1.6;
}

.sheet-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.sheet-actions .primary-btn,
.sheet-actions .secondary-btn{
  flex: 1;
  font-size: 14px;
  padding: 10px 12px;
}

.sheet-close{
  border: none;
  background: rgba(109,40,217,0.10);
  color: #4C1D95;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  cursor: pointer;
}

/* ========= Welcome / Splash ========= */
.phone.welcome{
  background:
    linear-gradient(180deg, rgba(76,29,149,0.55), rgba(17,24,39,0.85)),
    url("assets/welcome.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: grid;
  place-items: center;
  position: relative;
}

.welcome-glow{
  position: absolute;
  inset: -120px;
  background:
    radial-gradient(circle at 30% 20%, rgba(237,233,254,0.25), transparent 45%),
    radial-gradient(circle at 70% 60%, rgba(109,40,217,0.28), transparent 45%),
    radial-gradient(circle at 40% 85%, rgba(255,255,255,0.10), transparent 45%);
  filter: blur(10px);
}

.welcome-card{
  width: 100%;
  max-width: 320px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  border-radius: 22px;
  padding: 22px 18px;
  text-align: center;
  color: #fff;
  position: relative;
  z-index: 1;
  box-shadow: 0 18px 50px rgba(0,0,0,0.35);
}

.welcome-logo{
  width: 160px;
  max-width: 70%;
  height: auto;
  margin: 6px auto 14px;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.25));
  mix-blend-mode: screen;
  opacity: 0.9;
}

.welcome-title{
  margin: 0;
  font-size: 22px;
  letter-spacing: 2px;
  color: #fff;
}

.welcome-sub{
  margin: 10px 0 18px;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
  line-height: 1.7;
}

.welcome-foot{
  display: block;
  margin-top: 14px;
  color: rgba(255,255,255,0.55);
  font-size: 12px;
}

/* ✅ Admin dropdown style (matching black/white) */
#adminScope .admin-select{
  width:100%;
  border-radius: 14px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  padding: 12px;
  outline:none;
  font-weight:900;
  cursor:pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255,255,255,.75) 50%),
    linear-gradient(135deg, rgba(255,255,255,.75) 50%, transparent 50%);
  background-position:
    calc(16px) calc(50% - 2px),
    calc(22px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-left: 40px; /* مكان السهم */
}

#adminScope .admin-select:focus{
  border-color: rgba(255,255,255,.35);
  box-shadow: 0 0 0 3px rgba(255,255,255,.10);
}

/* =====================================
   ADMIN APP (Black / White) – SAFE ADD
   Scoped بالكامل – لا يؤثر على المتجر
===================================== */

.admin-app{
  max-width:390px;
  min-height:100vh;
  margin:0 auto;
  background:#0b0b0b;
  color:#ffffff;
  display:flex;
  flex-direction:column;
}

/* Header */
.admin-header{
  padding:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.admin-header h1{
  margin:0;
  font-size:15px;
  font-weight:700;
}

/* Logout */
.admin-logout{
  background:#2b0f0f;
  border:1px solid #ff3b30;
  color:#fff;
  padding:6px 12px;
  border-radius:12px;
  cursor:pointer;
}

/* Stats */
.admin-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:14px;
}
.admin-stat{
  background:#111;
  border-radius:16px;
  padding:12px;
  text-align:center;
  border:1px solid rgba(255,255,255,.08);
}
.admin-stat span{
  font-size:12px;
  opacity:.6;
}
.admin-stat strong{
  display:block;
  margin-top:6px;
  font-size:16px;
}

/* Tabs */
.admin-tabs{
  display:flex;
  gap:8px;
  padding:0 14px 14px;
}
.admin-tab{
  flex:1;
  padding:10px;
  border-radius:999px;
  background:#111;
  border:1px solid rgba(255,255,255,.15);
  text-align:center;
  cursor:pointer;
  user-select:none;
}
.admin-tab.active{
  background:#ffffff;
  color:#000000;
  font-weight:700;
}

/* Content */
.admin-content{
  flex:1;
  padding:14px;
  overflow-y:auto;
}
.admin-panel{ display:none; }
.admin-panel.active{ display:block; }

/* Card */
.admin-card{
  background:#111;
  border-radius:18px;
  padding:14px;
  margin-bottom:14px;
  border:1px solid rgba(255,255,255,.1);
}

/* Inputs */
.admin-input{
  width:100%;
  padding:10px;
  border-radius:12px;
  background:#000;
  border:1px solid rgba(255,255,255,.25);
  color:#fff;
  margin-top:8px;
}
.admin-input::placeholder{
  color:rgba(255,255,255,.45);
}

/* Buttons */
.admin-btn{
  width:100%;
  margin-top:10px;
  padding:12px;
  border-radius:14px;
  background:#fff;
  color:#000;
  border:none;
  font-weight:700;
  cursor:pointer;
}
.admin-btn.danger{
  background:#2b0f0f;
  color:#fff;
  border:1px solid #ff3b30;
}

/* Orders */
.admin-app .order-card{
  background:#000;
  border:1px solid rgba(255,255,255,.15);
  border-radius:16px;
  padding:12px;
  margin-bottom:12px;
}
.admin-app .order-id{
  color:#ffffff;
}
.admin-app .order-meta{
  color:rgba(255,255,255,.6);
}

/* Products */
.admin-app .product-item{
  background:#000;
  border:1px solid rgba(255,255,255,.15);
}
.admin-app .product-item strong{
  color:#fff;
}
.admin-app .product-item span{
  color:rgba(255,255,255,.6);
}

/* Settings layout */
.admin-app .settings-row{
  display:flex;
  gap:8px;
}
.admin-app .settings-row .admin-input{
  flex:1;
}

/* Clean scrollbar */
.admin-content::-webkit-scrollbar{ width:0; height:0; }
.admin-content{ scrollbar-width:none; }

/* =====================================
   ADMIN – ORDERS UI IMPROVEMENTS
===================================== */

.admin-app .order-card{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.admin-app .order-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  border-bottom:1px solid rgba(255,255,255,.08);
  padding-bottom:6px;
}

.admin-app .order-id{
  font-size:14px;
  font-weight:700;
}

.admin-app .order-meta{
  font-size:12px;
  opacity:.6;
}

.admin-app .order-items{
  background:#111;
  border-radius:12px;
  padding:10px;
  font-size:13px;
  line-height:1.7;
  color:#fff;
  border:1px solid rgba(255,255,255,.08);
}

/* =====================================
   ADMIN – PRODUCT FORM IMPROVEMENTS
===================================== */

.admin-app .admin-card strong{
  display:block;
  margin-bottom:6px;
  font-size:14px;
}

.admin-app .admin-card .admin-input{
  margin-top:10px;
}

.admin-app .admin-card .admin-btn{
  margin-top:12px;
}

.admin-app .admin-card .admin-btn.danger{
  margin-top:6px;
}

/* Improve spacing when list + form together */
.admin-app #adminProductsList{
  margin-bottom:14px;
}

/* =====================================
   ADMIN – VISUAL POLISH
===================================== */

.admin-app .admin-card{
  transition: background .15s ease, border-color .15s ease;
}
.admin-app .admin-card:hover{
  border-color: rgba(255,255,255,.18);
}

.admin-app .product-item:hover{
  border-color: rgba(255,255,255,.25);
}

/* =====================================
   ADMIN – SETTINGS (Promo / Shipping)
===================================== */

.admin-app #settingsPanel .admin-card{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.admin-app #settingsPanel .admin-input{
  margin-top:0;
}

.admin-app .settings-row{
  display:flex;
  gap:10px;
}

.admin-app .settings-row .admin-input{
  flex:1;
  min-width:0; /* يمنع تقطيع كود الخصم */
}

.admin-app #saveSettingsBtn{
  margin-top:14px;
}

/* رسالة الحفظ */
.admin-app #settingsMsg{
  margin-top:8px;
  font-size:13px;
  text-align:center;
  opacity:.8;
}


/* =====================================
   ADMIN – TABS UX (App Feeling)
===================================== */

.admin-tabs{
  position:sticky;
  top:0;
  background:#0b0b0b;
  z-index:5;
  padding-top:10px;
}

.admin-tab{
  transition: background .15s ease, color .15s ease, transform .05s ease;
}

.admin-tab:active{
  transform: scale(.97);
}


/* =====================================
   ADMIN – LOGIN SCREEN
===================================== */

#adminLoginBox.admin-card{
  margin:40px 14px;
}

#adminLoginBox .admin-input{
  margin-top:0;
}

#adminLoginBox .admin-btn{
  margin-top:14px;
}

#adminLoginMsg{
  margin-top:8px;
  font-size:13px;
  text-align:center;
  opacity:.8;
}


/* =====================================
   ADMIN – EMPTY STATES (احترافي)
===================================== */

.admin-app .empty{
  text-align:center;
  padding:30px 10px;
  opacity:.6;
  font-size:14px;
}


/* =====================================
   ADMIN – FINAL TOUCHES
===================================== */

/* منع أي تمدد غريب */
.admin-app *{
  max-width:100%;
}

/* تحسين قراءة النص */
.admin-app{
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ========= Admin Stats UX ========= */
.admin-stats{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap:12px;
  margin-bottom:14px;
}

.admin-stat{
  background:#111;
  color:#fff;
  border-radius:14px;
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:6px;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}

.admin-stat span{
  font-size:12px;
  opacity:.75;
}

.admin-stat strong{
  font-size:22px;
  font-weight:900;
}

/* ========= Admin Chart ========= */
#adminChart{
  width:100%;
  margin-top:10px;
}

/* ========= Admin Product Preview ========= */
#p_preview{
  margin-top:10px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 8px 18px rgba(0,0,0,.15);
}

/* تصميم مفتاح التبديل (Switch) */
.switch { position: relative; display: inline-block; width: 40px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 14px; width: 14px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: #16a34a; }
input:checked + .slider:before { transform: translateX(20px); }


/* AIN Currency */
.ain-money{
  display:inline-flex;
  align-items:center;
  gap:6px;
  direction:ltr;           /* يحافظ على ترتيب الرمز والرقم */
  unicode-bidi:embed;
}

.ain-cur{
  display:inline-flex;
  align-items:center;
  line-height:1;
}

.ain-aed-svg{
  width: 1em;
  height: 1em;
  display:block;
  fill:none;
  stroke: currentColor;
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: translateY(1px); /* baseline لطيف */
}

.currency-mini{
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  padding:7px 10px;
  font-size:12px;
  background:#fff;
  outline:none;
}

/* ✅ Stepper احترافي ومتناسق */
.qty-stepper{
  width:100%;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  margin-top: 10px;
  background:#f5f5f5;
  border:1px solid rgba(0,0,0,.10);
  border-radius:18px;
  padding:8px;
}
.qty-stepper .qty-mini{
  width:44px;
  height:44px;
  padding:0 !important;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  line-height:1;
}
.qty-stepper .qty-mini:disabled{ opacity:.45; }
.qty-center{
  flex:1;
  text-align:center;
}
#pvQty{
  font-weight:900;
  font-size:18px;
  line-height:1;
}
#pvQtyHint{
  font-size:11px;
  opacity:.6;
  margin-top:4px;
}
