@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root{
  --green-dark:#1B4332;
  --green:#2D6A4F;
  --lime:#95D5B2;
  --lime-light:#D8F3DC;
  --cream:#FFF8F0;
  --paper:#FFFFFF;
  --charcoal:#2B2B2B;
  --muted:#7A7A72;
  --tomato:#E85D4E;
  --tomato-light:#FCE4E1;
  --gold:#E9A23B;
  --radius:16px;
  --radius-sm:10px;
  --shadow:0 2px 10px rgba(27,67,50,0.08);
}

*{box-sizing:border-box; margin:0; padding:0;}
html,body{height:100%;}
body{
  font-family:'Cairo', sans-serif;
  background:var(--cream);
  color:var(--charcoal);
  -webkit-tap-highlight-color:transparent;
  overscroll-behavior-y:none;
  line-height:1.5;
}

#app{
  max-width:480px;
  margin:0 auto;
  min-height:100vh;
  display:flex;
  flex-direction:column;
  background:var(--cream);
  position:relative;
}

/* ===== شريط علوي ===== */
.topbar{
  background:var(--green-dark);
  padding:14px 16px 12px;
  position:sticky;
  top:0;
  z-index:20;
  border-radius:0 0 22px 22px;
  box-shadow:0 4px 16px rgba(0,0,0,0.12);
}
.topbar-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.icon-btn{
  background:rgba(255,255,255,0.16);
  border:none;
  color:#fff;
  width:46px;
  height:46px;
  border-radius:13px;
  font-size:21px;
  display:flex;
  align-items:center;
  justify-content:center;
  position:relative;
  cursor:pointer;
}
.brand-mark{
  font-size:22px;
  font-weight:800;
  color:var(--lime-light);
  letter-spacing:0.5px;
}
.badge{
  position:absolute;
  top:-4px;
  left:-4px;
  background:var(--tomato);
  color:#fff;
  font-size:10px;
  font-weight:700;
  min-width:17px;
  height:17px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 3px;
}
.cart-btn{
  width:54px;
  height:54px;
  font-size:26px;
  background:var(--lime);
}
.cart-btn .badge{
  top:-6px;
  left:-6px;
  min-width:22px;
  height:22px;
  font-size:12px;
  border:2px solid var(--green-dark);
}
.search-row input{
  width:100%;
  border:none;
  outline:none;
  padding:14px 16px;
  border-radius:13px;
  background:rgba(255,255,255,0.95);
  font-family:'Cairo', sans-serif;
  font-size:16px;
}
.search-row input::placeholder{color:#7d7d73;}

/* ===== المحتوى ===== */
.content{
  flex:1;
  padding:16px 14px 90px;
  overflow-y:auto;
}
.page{display:none;}
.page.active{display:block; animation:fadeIn .2s ease;}
@keyframes fadeIn{from{opacity:0; transform:translateY(6px);} to{opacity:1; transform:translateY(0);}}

.section-block{margin-bottom:22px;}
.section-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  margin-bottom:10px;
}
.section-head h2{font-size:19px; font-weight:800; color:var(--green-dark);}
.section-sub{font-size:13px; color:var(--muted);}

/* شرائط أفقية للعروض */
.hscroll{
  display:flex;
  gap:10px;
  overflow-x:auto;
  padding-bottom:4px;
  scrollbar-width:none;
}
.hscroll::-webkit-scrollbar{display:none;}

.offer-card{
  min-width:150px;
  background:var(--paper);
  border-radius:var(--radius);
  padding:12px;
  box-shadow:var(--shadow);
  border:1px solid var(--tomato-light);
  cursor:pointer;
  flex-shrink:0;
}
.offer-card .emoji{font-size:38px; text-align:center; margin-bottom:6px;}
.offer-card .name{font-size:14px; font-weight:700; margin-bottom:4px; min-height:36px;}
.discount-tag{
  display:inline-block;
  background:var(--tomato);
  color:#fff;
  font-size:11.5px;
  font-weight:700;
  padding:3px 8px;
  border-radius:6px;
  margin-bottom:6px;
}
.price-row{display:flex; align-items:center; gap:6px; font-size:14px;}
.price-old{text-decoration:line-through; color:var(--muted); font-size:12px;}
.price-new{color:var(--tomato); font-weight:800;}

/* باكدجات */
.pkg-grid{display:flex; flex-direction:column; gap:10px;}
.pkg-card{
  background:var(--paper);
  border-radius:var(--radius);
  padding:14px;
  box-shadow:var(--shadow);
  display:flex;
  gap:12px;
  align-items:center;
  cursor:pointer;
  border:1px solid var(--lime-light);
}
.pkg-emoji{font-size:40px; flex-shrink:0;}
.pkg-info{flex:1; min-width:0;}
.pkg-info .name{font-weight:800; font-size:15.5px; margin-bottom:3px;}
.pkg-info .desc{font-size:13px; color:var(--muted); margin-bottom:6px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.pkg-badge{
  display:inline-block;
  background:var(--lime-light);
  color:var(--green-dark);
  font-size:11.5px;
  font-weight:700;
  padding:3px 9px;
  border-radius:6px;
}

/* فئات المنتجات */
.cat-chips{
  display:flex;
  gap:8px;
  overflow-x:auto;
  margin-bottom:14px;
  padding-top:2px;
  scrollbar-width:none;
}
.cat-chips::-webkit-scrollbar{display:none;}
.chip{
  flex-shrink:0;
  background:var(--paper);
  border:1.5px solid var(--green-dark);
  padding:10px 18px;
  border-radius:20px;
  font-size:14px;
  font-weight:700;
  color:var(--green-dark);
  cursor:pointer;
  box-shadow:0 1px 5px rgba(27,67,50,0.12);
}
.chip.active{background:var(--green-dark); color:#fff; border-color:var(--green-dark); box-shadow:0 2px 8px rgba(27,67,50,0.3);}

/* شبكة المنتجات */
.cat-group{margin-bottom:18px;}
.cat-group-head{
  display:inline-block;
  font-size:13.5px;
  font-weight:800;
  color:var(--green-dark);
  margin-bottom:12px;
  padding:7px 16px;
  background:var(--lime-light);
  border-radius:20px;
}
.prod-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.prod-card{
  background:var(--paper);
  border-radius:var(--radius);
  padding:13px;
  box-shadow:var(--shadow);
  position:relative;
  cursor:pointer;
}
.prod-card .emoji{font-size:42px; text-align:center; margin:6px 0 8px;}
.prod-card .name{font-size:14.5px; font-weight:700; min-height:38px; margin-bottom:5px; line-height:1.4;}
.prod-card .cat{font-size:11.5px; color:var(--muted); margin-bottom:7px;}
.prod-card .foot{display:flex; align-items:center; justify-content:space-between;}
.add-btn{
  background:var(--green-dark);
  color:#fff;
  border:none;
  width:38px;
  height:38px;
  border-radius:11px;
  font-size:20px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.discount-corner{
  position:absolute;
  top:8px;
  left:8px;
  background:var(--tomato);
  color:#fff;
  font-size:11px;
  font-weight:700;
  padding:3px 7px;
  border-radius:6px;
}

/* ===== سلة ===== */
.page-title-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:16px;
}
.page-title-row h2{font-size:21px; font-weight:800; color:var(--green-dark);}
.back-btn{
  background:var(--paper);
  border:1.5px solid #E5E2D8;
  width:42px; height:42px;
  border-radius:11px;
  font-size:18px;
  cursor:pointer;
}

.empty-state{text-align:center; padding:60px 20px;}
.empty-icon{font-size:56px; margin-bottom:14px;}
.empty-state p{color:var(--muted); margin-bottom:16px; font-size:15px;}

.cart-item{
  background:var(--paper);
  border-radius:var(--radius);
  padding:12px;
  box-shadow:var(--shadow);
  display:flex;
  flex-wrap:wrap;
  gap:10px 12px;
  align-items:center;
  margin-bottom:10px;
}
.cart-item .emoji{font-size:34px; flex-shrink:0;}
.cart-item .info{flex:1 1 140px; min-width:0;}
.cart-item .name{font-size:15px; font-weight:700; margin-bottom:3px; word-break:break-word;}
.cart-item .unit-price{font-size:13px; color:var(--muted);}
.qty-control{display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-top:8px;}
.qty-btn{
  background:var(--lime-light);
  color:var(--green-dark);
  border:none;
  width:34px; height:34px;
  min-width:34px;
  border-radius:9px;
  font-size:18px;
  font-weight:700;
  cursor:pointer;
  flex-shrink:0;
}
.qty-num{font-size:15px; font-weight:700; min-width:22px; text-align:center; flex-shrink:0;}
.remove-btn{
  background:none;
  border:none;
  color:var(--tomato);
  font-size:14px;
  cursor:pointer;
  margin-right:4px;
  padding:6px;
  flex-shrink:0;
}
.cart-item-total{font-weight:700; color:var(--green-dark); font-size:13px; flex-shrink:0;}
@media (max-width:380px){
  .cart-item{padding:10px;}
  .cart-item .emoji{font-size:30px;}
  .cart-item .info{flex-basis:100%;}
  .qty-control{width:100%; justify-content:flex-start; margin-top:10px;}
  .qty-btn{width:38px; height:38px; min-width:38px; font-size:19px;}
  .remove-btn{margin-right:0; margin-left:auto;}
  .cart-item-total{margin-right:auto;}
}

.cart-summary{
  background:var(--paper);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  margin-top:14px;
}
.sum-row{display:flex; justify-content:space-between; font-size:16px; font-weight:700; margin-bottom:12px; color:var(--green-dark);}

.btn-primary{
  background:var(--green-dark);
  color:#fff;
  border:none;
  padding:15px 18px;
  border-radius:var(--radius-sm);
  font-family:'Cairo', sans-serif;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
  min-height:50px;
}
.btn-secondary{
  background:var(--paper);
  color:var(--green-dark);
  border:2px solid var(--green-dark);
  padding:15px 18px;
  border-radius:var(--radius-sm);
  font-family:'Cairo', sans-serif;
  font-weight:800;
  font-size:16px;
  cursor:pointer;
  margin-top:8px;
  min-height:50px;
}
.btn-block{width:100%; display:block;}

/* ===== فورم ===== */
.form{display:flex; flex-direction:column; gap:16px;}
.form label{font-size:14.5px; font-weight:700; color:var(--charcoal); display:flex; flex-direction:column; gap:7px;}
.form input, .form textarea, .form select{
  border:1.5px solid #E5E2D8;
  border-radius:var(--radius-sm);
  padding:13px 14px;
  font-family:'Cairo', sans-serif;
  font-size:16px;
  outline:none;
  background:var(--paper);
  min-height:48px;
}
.form input:focus, .form textarea:focus, .form select:focus{border-color:var(--green); border-width:2px;}
.form textarea{min-height:80px; resize:vertical;}
.checkbox-row{flex-direction:row !important; align-items:center; gap:8px !important;}

.image-upload-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.image-preview{
  width:64px; height:64px;
  border-radius:var(--radius-sm);
  background:var(--lime-light);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:32px;
  flex-shrink:0;
  overflow:hidden;
  border:1.5px solid #E5E2D8;
}
.image-preview img{width:100%; height:100%; object-fit:cover;}
.image-upload-actions{display:flex; flex-direction:column; gap:6px; flex:1;}
.image-upload-actions .btn-secondary{padding:9px 12px; font-size:12.5px;}
.image-upload-actions .mini-btn{width:fit-content;}

/* صورة حقيقية داخل بطاقات المنتجات/الباكدجات بدل الإيموجي */
.img-real{
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:12px;
}
.emoji-box{display:flex; align-items:center; justify-content:center; overflow:hidden;}

.checkout-total{
  background:var(--lime-light);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:13.5px;
  color:var(--green-dark);
  font-weight:700;
}
.section-divider{
  font-size:14px;
  font-weight:800;
  color:var(--green-dark);
  margin:20px 0 12px;
  padding-top:14px;
  border-top:2px dashed var(--lime-light);
}

.payment-methods{display:flex; flex-direction:column; gap:10px; margin-bottom:16px;}
.payment-option{
  display:flex;
  align-items:flex-start;
  gap:10px;
  background:#fff;
  border:1.5px solid #E5E2D8;
  border-radius:var(--radius-sm);
  padding:12px 14px;
  cursor:pointer;
  transition:border-color .15s, background .15s;
}
.payment-option.active{
  border-color:var(--green-dark);
  background:var(--lime-light);
}
.payment-option input[type="radio"]{margin-top:3px; accent-color:var(--green-dark); flex-shrink:0;}
.payment-option-icon{font-size:22px; flex-shrink:0;}
.payment-option-info{flex:1;}
.payment-option-title{font-size:13.5px; font-weight:700; color:var(--charcoal);}
.payment-option-sub{font-size:11.5px; color:var(--muted); margin-top:2px;}
.payment-option-note{font-size:11px; color:var(--green-dark); margin-top:6px; line-height:1.5; background:rgba(27,67,50,0.06); padding:6px 8px; border-radius:6px;}

/* ===== نجاح الطلب ===== */
.success-box{text-align:center; padding:30px 10px;}
.success-icon{font-size:64px; margin-bottom:10px;}
.success-box h2{font-size:18px; color:var(--green-dark); margin-bottom:14px;}
.tracking-code{
  background:var(--green-dark);
  color:var(--lime-light);
  font-size:20px;
  font-weight:800;
  letter-spacing:2px;
  padding:14px;
  border-radius:var(--radius);
  margin:10px 0 14px;
}
.muted{color:var(--muted); font-size:12.5px; margin-bottom:20px;}

/* ===== تتبع الطلب ===== */
.track-search{display:flex; gap:8px; margin-bottom:18px;}
.track-search input{
  flex:1;
  border:1.5px solid #E5E2D8;
  border-radius:var(--radius-sm);
  padding:11px 13px;
  font-family:'Cairo', sans-serif;
  font-size:14px;
  outline:none;
}
.track-order-card{
  background:var(--paper);
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  margin-bottom:14px;
}
.track-order-card .top-row{display:flex; justify-content:space-between; margin-bottom:10px;}
.status-pill{
  display:inline-block;
  padding:4px 12px;
  border-radius:20px;
  font-size:12px;
  font-weight:700;
}
.status-pending{background:#FFF3CD; color:#8A6D1E;}
.status-processing{background:#D6E9FF; color:#1D5C99;}
.status-shipped{background:var(--lime-light); color:var(--green-dark);}
.status-delivered{background:#D4EDDA; color:#1F5C33;}
.status-cancelled{background:var(--tomato-light); color:#A32D2D;}

.timeline{margin-top:14px;}
.timeline-item{
  display:flex;
  gap:12px;
  position:relative;
  padding-bottom:18px;
}
.timeline-item:last-child{padding-bottom:0;}
.timeline-dot{
  width:12px; height:12px;
  border-radius:50%;
  background:var(--green);
  flex-shrink:0;
  margin-top:3px;
  position:relative;
}
.timeline-item:not(:last-child) .timeline-dot::after{
  content:'';
  position:absolute;
  top:12px; left:5px;
  width:2px;
  height:26px;
  background:var(--lime-light);
}
.timeline-text .status{font-size:13px; font-weight:700; color:var(--green-dark);}
.timeline-text .note{font-size:12px; color:var(--muted);}
.timeline-text .time{font-size:10.5px; color:#B0AFA4; margin-top:2px;}

/* ===== حسابي ===== */
.account-list{display:flex; flex-direction:column; gap:10px;}
.account-item{
  background:var(--paper);
  border:none;
  border-radius:var(--radius-sm);
  padding:15px 16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  box-shadow:var(--shadow);
  font-family:'Cairo', sans-serif;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  width:100%;
}

/* ===== أدمن ===== */
.admin-tabs{display:flex; gap:6px; margin-bottom:16px; overflow-x:auto;}
.admin-tab{
  flex-shrink:0;
  background:var(--paper);
  border:1px solid #E5E2D8;
  padding:8px 14px;
  border-radius:10px;
  font-family:'Cairo', sans-serif;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
}
.admin-tab.active{background:var(--green-dark); color:#fff; border-color:var(--green-dark);}
.admin-view{display:none;}
.admin-view.active{display:block;}

.order-stage-tabs{
  display:flex;
  gap:6px;
  overflow-x:auto;
  margin-bottom:14px;
  scrollbar-width:none;
}
.order-stage-tabs::-webkit-scrollbar{display:none;}
.stage-tab{
  flex-shrink:0;
  position:relative;
  background:var(--paper);
  border:1.5px solid #E5E2D8;
  padding:8px 13px;
  border-radius:10px;
  font-family:'Cairo', sans-serif;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  cursor:pointer;
}
.stage-tab.active{background:var(--green-dark); color:#fff; border-color:var(--green-dark);}
.stage-tab .stage-count{
  display:inline-block;
  background:var(--tomato);
  color:#fff;
  font-size:10px;
  min-width:16px;
  height:16px;
  border-radius:8px;
  padding:0 4px;
  margin-right:5px;
}
.stage-tab.active .stage-count{background:rgba(255,255,255,0.25);}

.order-time{font-size:11px; color:var(--muted); display:inline-block; white-space:nowrap;}
.day-group-head{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:var(--lime-light);
  border:1.5px solid var(--green-dark);
  border-radius:var(--radius-sm);
  padding:13px 15px;
  font-family:'Cairo', sans-serif;
  font-size:13.5px;
  font-weight:800;
  color:var(--green-dark);
  cursor:pointer;
  margin:14px 0 0;
}
.day-group-head:first-child{margin-top:0;}
.day-group-body{
  border:1px solid #E5E2D8;
  border-top:none;
  border-radius:0 0 var(--radius-sm) var(--radius-sm);
  padding:10px;
  margin-bottom:4px;
}
.day-search-box{margin-bottom:10px;}
.day-search-box input{
  width:100%;
  box-sizing:border-box;
  padding:9px 12px;
  border:1px solid #E5E2D8;
  border-radius:var(--radius-sm);
  font-family:'Cairo', sans-serif;
  font-size:13px;
  background:#fff;
}
.day-order-row{margin-bottom:6px;}
.confirm-stage-btn{
  background:var(--green-dark);
  color:#fff;
  border:none;
  padding:8px 16px;
  border-radius:9px;
  font-family:'Cairo', sans-serif;
  font-weight:700;
  font-size:12px;
  cursor:pointer;
}
.confirm-stage-btn.done{background:var(--lime-light); color:var(--green-dark);}

.order-collapse-btn{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:var(--paper);
  border:1px solid #E5E2D8;
  border-radius:var(--radius-sm);
  padding:13px 15px;
  font-family:'Cairo', sans-serif;
  font-size:13px;
  font-weight:700;
  color:var(--charcoal);
  cursor:pointer;
  margin-bottom:6px;
}
.order-collapse-arrow{font-size:18px; color:var(--muted); transition:transform .15s;}
.order-details-box{
  background:var(--lime-light);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  margin-bottom:10px;
  margin-top:-4px;
}
.delivered-time-tag{
  margin-top:10px;
  background:var(--green-dark);
  color:var(--lime-light);
  font-size:12px;
  font-weight:700;
  padding:8px 12px;
  border-radius:8px;
  text-align:center;
}

.admin-row-card{
  background:var(--paper);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  box-shadow:var(--shadow);
  margin-bottom:10px;
}
.admin-row-top{display:flex; justify-content:space-between; align-items:center; margin-bottom:6px;}
.admin-row-title{font-weight:700; font-size:13.5px;}
.admin-row-sub{font-size:11.5px; color:var(--muted);}
.admin-actions{display:flex; gap:8px; margin-top:8px;}
.mini-btn{
  border:none;
  padding:6px 12px;
  border-radius:8px;
  font-size:11.5px;
  font-weight:700;
  cursor:pointer;
  font-family:'Cairo', sans-serif;
}
.mini-btn.danger{background:var(--tomato-light); color:#A32D2D;}
.mini-btn.primary{background:var(--lime-light); color:var(--green-dark);}
select.status-select{
  border:1.5px solid #E5E2D8;
  border-radius:8px;
  padding:6px 8px;
  font-family:'Cairo', sans-serif;
  font-size:12px;
}
.items-picker{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height:220px;
  overflow-y:auto;
  border:1.5px solid #E5E2D8;
  border-radius:var(--radius-sm);
  padding:10px;
}
.picker-row{display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:12.5px;}
.picker-row input[type=number]{width:55px; padding:6px; border-radius:6px; border:1px solid #E5E2D8;}

/* ===== شريط التنقل السفلي ===== */
.bottom-nav{
  position:sticky;
  bottom:0;
  background:var(--paper);
  border-top:1px solid #EFEDE4;
  display:flex;
  padding:8px 4px calc(8px + env(safe-area-inset-bottom));
  box-shadow:0 -4px 14px rgba(0,0,0,0.05);
  z-index:20;
}
.nav-item{
  flex:1;
  background:none;
  border:none;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  padding:8px 0;
  font-size:11.5px;
  color:var(--muted);
  font-family:'Cairo', sans-serif;
  font-weight:700;
  cursor:pointer;
  min-height:52px;
}
.nav-item.active{color:var(--green-dark);}
.nav-icon{font-size:23px;}

/* ===== نافذة سفلية (Sheet) ===== */
.sheet-overlay{
  position:fixed;
  inset:0;
  background:rgba(27,67,50,0.35);
  display:none;
  align-items:flex-end;
  justify-content:center;
  z-index:50;
}
.sheet-overlay.active{display:flex;}
.sheet{
  background:var(--paper);
  width:100%;
  max-width:480px;
  border-radius:22px 22px 0 0;
  padding:20px;
  max-height:82vh;
  overflow-y:auto;
  animation:slideUp .25s ease;
}
@keyframes slideUp{from{transform:translateY(100%);} to{transform:translateY(0);}}
.sheet-emoji{font-size:58px; text-align:center; margin-bottom:10px;}
.sheet-title{font-size:19px; font-weight:800; margin-bottom:5px; color:var(--green-dark);}
.sheet-desc{font-size:14px; color:var(--muted); margin-bottom:14px;}
.sheet-items{background:var(--lime-light); border-radius:var(--radius-sm); padding:10px 12px; margin-bottom:14px;}
.sheet-item-row{display:flex; justify-content:space-between; font-size:13.5px; padding:5px 0; color:var(--green-dark);}
.sheet-price-row{display:flex; align-items:center; gap:10px; margin-bottom:16px;}
.sheet-close{
  position:absolute; left:16px; top:16px;
  background:#F1EFE8; border:none;
  width:38px; height:38px; border-radius:50%;
  font-size:16px; cursor:pointer;
}

/* ===== توست ===== */
.toast{
  position:fixed;
  bottom:90px;
  left:50%;
  transform:translateX(-50%) translateY(20px);
  background:var(--green-dark);
  color:#fff;
  padding:11px 20px;
  border-radius:30px;
  font-size:13px;
  font-weight:600;
  opacity:0;
  pointer-events:none;
  transition:all .25s ease;
  z-index:100;
  white-space:nowrap;
}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0);}

@media (min-width:480px){
  body{background:#EDEAE0;}
  #app{box-shadow:0 0 30px rgba(0,0,0,0.08);}
}

/* ===== بوابة الدخول (تسجيل الدخول / حساب جديد) ===== */
.auth-gate{
  position:fixed; inset:0;
  background:var(--green-dark);
  z-index:200;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  overflow-y:auto;
  padding:40px 18px;
}
.auth-gate.hidden{display:none;}
.auth-box{
  width:100%;
  max-width:420px;
  background:var(--paper);
  border-radius:20px;
  padding:26px 22px 30px;
  box-shadow:0 10px 30px rgba(0,0,0,0.25);
}
.auth-logo{
  text-align:center;
  font-size:34px;
  margin-bottom:18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
}
.auth-logo span{font-size:15px; font-weight:800; color:var(--green-dark);}
.auth-tabs{
  display:flex;
  background:var(--cream);
  border-radius:12px;
  padding:4px;
  margin-bottom:20px;
  gap:4px;
}
.auth-tab{
  flex:1;
  border:none;
  background:transparent;
  padding:10px 6px;
  border-radius:9px;
  font-family:inherit;
  font-size:13.5px;
  font-weight:700;
  color:var(--muted);
  cursor:pointer;
}
.auth-tab.active{background:var(--green-dark); color:#fff;}
.auth-form{display:none;}
.auth-form.active{display:flex;}
.auth-error{
  color:#A32D2D;
  background:var(--tomato-light);
  border-radius:9px;
  padding:9px 12px;
  font-size:13px;
  font-weight:600;
  display:none;
}
.auth-error.show{display:block;}
.auth-switch{
  text-align:center;
  margin-top:16px;
  font-size:13px;
  color:var(--muted);
}
.auth-switch a{color:var(--green-dark); font-weight:700; cursor:pointer;}

.password-field{position:relative; display:flex;}
.password-field input{width:100%; padding-left:44px;}
.pw-toggle{
  position:absolute;
  left:6px;
  top:50%;
  transform:translateY(-50%);
  background:transparent;
  border:none;
  font-size:16px;
  padding:6px 8px;
  cursor:pointer;
  color:var(--muted);
  line-height:1;
}
