:root {
  --bg:#ffffff; --bg2:#faf8f5; --bg3:#f3efe8; --bg4:#ece8e0; --bg5:#e0dbd0;
  --burg:#6b1c2e; --burg2:#8a2438; --burg3:#4d1220; --burl:#f9eef0; --burm:#e8c4cb;
  --gold:#9a6f1a; --gold2:#b8860b; --goldl:#fdf5e0; --goldm:#f0dfa0;
  --tx:#1a1208; --tx2:#5c4a38; --tx3:#9e8870;
  --bd:#ddd6c8; --bd2:#c8bfb0;
  --sh:0 1px 3px rgba(0,0,0,.06),0 4px 12px rgba(0,0,0,.04);
  --sh2:0 4px 20px rgba(107,28,46,.1),0 12px 40px rgba(107,28,46,.07);
  --r:10px; --rs:6px;
  --gr:#166534; --grb:#dcfce7;
  --am:#92400e; --amb:#fef3c7;
  --re:#991b1b; --reb:#fee2e2;
  --bl:#1e3a5f; --blb:#dbeafe;
  --font:'Cairo',sans-serif;
}
.dark {
  --bg:#120a0e; --bg2:#1c1014; --bg3:#231419; --bg4:#2c1a20; --bg5:#3a2028;
  --burg:#a02d45; --burg2:#c23556; --burg3:#7a1e33; --burl:#2c1018; --burm:#4a1e28;
  --tx:#f5ede8; --tx2:#c4a898; --tx3:#8a7060;
  --bd:#3a2830; --bd2:#4a3040;
  --sh:0 1px 3px rgba(0,0,0,.3),0 4px 12px rgba(0,0,0,.2);
  --sh2:0 4px 20px rgba(0,0,0,.4),0 12px 40px rgba(0,0,0,.3);
}

/* ── Reset ── */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:var(--font);background:var(--bg3);color:var(--tx);direction:rtl;-webkit-font-smoothing:antialiased;min-height:100dvh}
a{color:inherit;text-decoration:none}
button,input,textarea,select{font-family:var(--font)}
::-webkit-scrollbar{width:4px;height:4px}
::-webkit-scrollbar-thumb{background:var(--bg5);border-radius:2px}

/* ── Shell ── */
.app-root{min-height:100dvh;display:flex;flex-direction:column}
.main-content{flex:1;padding-top:56px;padding-bottom:62px}
@media(min-width:768px){.main-content{padding-bottom:0;padding-right:220px}}

/* ── ─────────────────────────────────────────────────────────── */
/* ── MOBILE BOTTOM NAV ──────────────────────────────────────── */
/* ── ─────────────────────────────────────────────────────────── */
.mob-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 100;
  height: 62px;
  display: flex;
  align-items: stretch;
  background: var(--burg3);
  border-top: 1px solid rgba(255,255,255,.1);
  padding-bottom: env(safe-area-inset-bottom);
}
.mob-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  font-size: .6rem;
  font-weight: 700;
  color: rgba(255,255,255,.4);
  transition: color .14s;
  font-family: var(--font);
}
.mob-item:hover, .mob-on { color: var(--goldm) !important; }
.mob-home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-decoration: none;
  padding-bottom: 3px;
}
.mob-home-ring {
  width: 50px;
  height: 50px;
  background: var(--gold2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: -8px;
  box-shadow: 0 4px 18px rgba(184,134,11,.45);
  border: 3px solid var(--burg3);
  transition: transform .15s;
}
.mob-home:hover .mob-home-ring,
.mob-home.router-link-active .mob-home-ring { transform: scale(1.06); }
.mob-home-lbl {
  font-size: .6rem;
  font-weight: 800;
  color: var(--goldm);
  position: relative;
  top: -6px;
  font-family: var(--font);
}

/* ── ─────────────────────────────────────────────────────────── */
/* ── DESKTOP SIDEBAR ────────────────────────────────────────── */
/* ── ─────────────────────────────────────────────────────────── */
.desk-nav {
  position: fixed;
  top: 56px; right: 0; bottom: 0;
  z-index: 90;
  width: 220px;
  background: var(--burg3);
  border-left: 1px solid rgba(255,255,255,.08);
  padding: .6rem .45rem;
  display: none;
  flex-direction: column;
  gap: .12rem;
  overflow-y: auto;
}
.desk-nav-logo {
  padding: .3rem .6rem .8rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: .35rem;
}
.desk-item {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .72rem;
  border-radius: 5px;
  font-size: .82rem;
  font-weight: 600;
  color: rgba(255,255,255,.45);
  transition: all .14s;
  text-decoration: none;
  font-family: var(--font);
}
.desk-item:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
.desk-on { background: var(--gold2) !important; color: #fff !important; font-weight: 700 !important; }

/* ── Breakpoint: swap which nav shows ── */
@media(min-width:768px) {
  .mob-nav  { display: none !important; }
  .desk-nav { display: flex !important; }
}

/* ── Typography ── */
h1{font-size:clamp(1.4rem,4vw,2rem);font-weight:900}
h2{font-size:clamp(1.05rem,3vw,1.45rem);font-weight:800}
h3{font-size:clamp(.93rem,2.5vw,1.1rem);font-weight:700}
p{line-height:1.7;color:var(--tx2)}

/* ── Buttons ── */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.35rem;padding:.46rem 1.05rem;border-radius:var(--rs);font-family:var(--font);font-weight:700;font-size:.84rem;cursor:pointer;border:1px solid var(--bd2);background:var(--bg);color:var(--tx2);transition:all .14s;white-space:nowrap;text-decoration:none}
.btn:hover{border-color:var(--burg);color:var(--burg);background:var(--burl)}
.btn-primary{background:var(--burg);color:#fff;border-color:var(--burg)}
.btn-primary:hover{background:var(--burg2);border-color:var(--burg2);color:#fff}
.btn-gold{background:var(--gold2);color:#fff;border-color:var(--gold2)}
.btn-outline{background:transparent;border:1.5px solid var(--burg);color:var(--burg)}
.btn-outline:hover{background:var(--burl)}
.btn-ghost{background:var(--bg3);color:var(--tx2);border-color:var(--bd)}
.btn-ghost:hover{background:var(--bg4);border-color:var(--bd2)}
.btn-danger{background:var(--re);color:#fff;border-color:var(--re)}
.btn-sm{padding:.26rem .62rem;font-size:.76rem}
.btn-lg{padding:.62rem 1.55rem;font-size:.94rem}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* ── Cards ── */
.card{background:var(--bg);border:1px solid var(--bd);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden}
.card-pad{padding:1.1rem 1.3rem}

/* ── Inputs ── */
input[type="text"],input[type="email"],input[type="password"],input[type="tel"],
input[type="number"],input[type="search"],textarea,select{
  width:100%;padding:.54rem .8rem;border-radius:var(--rs);border:1px solid var(--bd);
  background:var(--bg2);color:var(--tx);font-size:.87rem;transition:border-color .14s;direction:rtl
}
input:focus,textarea:focus,select:focus{outline:none;border-color:var(--burg);background:var(--bg);box-shadow:0 0 0 3px rgba(107,28,46,.07)}
label{font-size:.76rem;font-weight:700;color:var(--tx2);display:block;margin-bottom:.27rem}
.input-group{display:flex;flex-direction:column;gap:.28rem}

/* ── Section ── */
.section{padding:1.3rem 1rem;max-width:960px;margin:0 auto}
.section-title{font-size:.88rem;font-weight:800;color:var(--burg3);margin-bottom:.88rem;display:flex;align-items:center;gap:.4rem}
.section-title::before{content:'';display:block;width:3px;height:13px;background:var(--gold2);border-radius:2px;flex-shrink:0}
.dark .section-title{color:var(--tx)}

/* ── Product card ── */
.product-card{background:var(--bg);border:1px solid var(--bd);border-radius:var(--r);overflow:hidden;box-shadow:var(--sh);transition:box-shadow .18s,border-color .18s;cursor:pointer}
.product-card:hover{box-shadow:var(--sh2);border-color:var(--bd2)}
.product-card img{width:100%;aspect-ratio:1;object-fit:cover;display:block}
.product-card-body{padding:.9rem}
.price-tag{display:flex;align-items:baseline;gap:.35rem;flex-wrap:wrap}
.price-main{font-size:1.05rem;font-weight:900;color:var(--burg)}
.price-og{font-size:.78rem;color:var(--tx3);text-decoration:line-through}
.badge-sale{background:var(--re);color:#fff;font-size:.63rem;font-weight:800;padding:.12rem .36rem;border-radius:4px}
.badge-new{background:var(--goldl);color:var(--gold);border:1px solid var(--goldm);font-size:.63rem;font-weight:700;padding:.12rem .36rem;border-radius:4px}
.stars{color:var(--gold2);font-size:.8rem}

/* ── Post card ── */
.post-card{background:var(--bg);border:1px solid var(--bd);border-radius:var(--r);box-shadow:var(--sh);overflow:hidden;margin-bottom:.88rem}
.post-header{display:flex;align-items:center;gap:.68rem;padding:.88rem}
.post-avatar{width:39px;height:39px;border-radius:50%;object-fit:cover;flex-shrink:0}
.post-author{font-weight:700;font-size:.87rem}
.post-time{font-size:.72rem;color:var(--tx3)}
.post-body{padding:0 .88rem .78rem;line-height:1.7;font-size:.87rem}
.post-actions{display:flex;gap:.9rem;padding:.58rem .88rem;border-top:1px solid var(--bg3)}
.post-action-btn{display:flex;align-items:center;gap:.28rem;font-size:.81rem;color:var(--tx3);cursor:pointer;border:none;background:none;font-family:var(--font);font-weight:600;transition:color .14s;padding:0}
.post-action-btn:hover,.post-action-btn.liked{color:var(--burg)}
.post-tag{font-size:.73rem;color:var(--gold);font-weight:700}

/* ── Badges ── */
.badge{display:inline-flex;align-items:center;padding:.15rem .5rem;border-radius:4px;font-size:.67rem;font-weight:700;white-space:nowrap}
.badge-doctor{background:var(--burl);color:var(--burg);border:1px solid var(--burm)}
.badge-gold{background:var(--goldl);color:var(--gold);border:1px solid var(--goldm)}
.badge-green{background:var(--grb);color:var(--gr)}

/* ── Doctor card ── */
.doctor-card{background:var(--bg);border:1px solid var(--bd);border-radius:var(--r);padding:1.05rem;box-shadow:var(--sh);display:flex;gap:.85rem;align-items:center}
.doctor-avatar{position:relative;flex-shrink:0}
.doctor-avatar img{width:50px;height:50px;border-radius:50%;object-fit:cover}
.status-dot{position:absolute;bottom:2px;left:2px;width:11px;height:11px;border-radius:50%;border:2px solid var(--bg)}
.status-dot.online{background:var(--gr)}
.status-dot.offline{background:var(--tx3)}

/* ── Chat ── */
.chat-bubble{max-width:75%;padding:.56rem .92rem;border-radius:14px;font-size:.87rem;line-height:1.55;word-break:break-word}
.bubble-out{background:var(--burg);color:#fff;border-bottom-right-radius:4px;align-self:flex-end}
.bubble-in{background:var(--bg2);color:var(--tx);border-bottom-left-radius:4px;align-self:flex-start;border:1px solid var(--bd)}
.bubble-time{font-size:.64rem;opacity:.62;margin-top:.16rem}

/* ── Overlay / drawer / modal ── */
.overlay{position:fixed;inset:0;z-index:200;background:rgba(26,18,8,.52);backdrop-filter:blur(3px)}
.drawer{position:fixed;bottom:0;left:0;right:0;z-index:201;background:var(--bg);border-radius:16px 16px 0 0;max-height:90dvh;overflow-y:auto;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -8px 40px rgba(107,28,46,.12)}
.drawer-handle{width:30px;height:3px;background:var(--bd2);border-radius:2px;margin:.6rem auto}
@media(min-width:768px){.drawer{right:auto;width:400px;top:0;bottom:0;border-radius:0}}
.modal-box{position:fixed;inset:1rem;z-index:201;background:var(--bg);border:1px solid var(--bd);border-radius:16px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(107,28,46,.15)}
@media(min-width:768px){.modal-box{inset:8% 15%}}

/* ── Admin KPIs ── */
.kgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(155px,1fr));gap:.75rem;margin-bottom:1.3rem}
.kpi{background:var(--bg);border:1px solid var(--bd);border-radius:var(--r);padding:1rem 1.15rem;box-shadow:var(--sh);position:relative;overflow:hidden;transition:box-shadow .18s}
.kpi:hover{box-shadow:var(--sh2)}
.kpi::after{content:'';position:absolute;bottom:0;left:0;right:0;height:3px;background:var(--bg3)}
.kpi.ka::after{background:linear-gradient(90deg,var(--gold),var(--gold2))}
.kpi.kp::after{background:linear-gradient(90deg,var(--burg),var(--burg2))}
.kpi.kg::after{background:linear-gradient(90deg,#16a34a,#166534)}
.kpi-l{font-size:.67rem;color:var(--tx3);text-transform:uppercase;letter-spacing:.07em;font-weight:700;margin-bottom:.32rem}
.kpi-v{font-size:1.45rem;font-weight:900;line-height:1}
.kpi.ka .kpi-v{color:var(--gold)}
.kpi.kp .kpi-v{color:var(--burg)}
.kpi.kg .kpi-v{color:var(--gr)}
.kpi-s{font-size:.67rem;color:var(--tx3);margin-top:.24rem}

/* ── Misc ── */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:.88rem}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:.88rem}
@media(max-width:580px){.grid-3{grid-template-columns:1fr 1fr}}
.page-loader{display:flex;align-items:center;justify-content:center;min-height:55dvh}
.spinner{width:30px;height:30px;border:2.5px solid var(--bd2);border-top-color:var(--burg);border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── Toast ── */
.toast-stack{position:fixed;bottom:calc(62px + .6rem);left:50%;transform:translateX(-50%);z-index:500;display:flex;flex-direction:column;gap:.38rem;align-items:center;pointer-events:none}
@media(min-width:768px){.toast-stack{bottom:1.2rem}}
.toast{background:var(--burg3);color:#fff;padding:.52rem 1.25rem;border-radius:var(--rs);font-size:.84rem;font-weight:700;box-shadow:var(--sh2);white-space:nowrap;animation:toast-in .2s ease}
.toast.error{background:var(--re)}
.toast.warning{background:var(--am)}
@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}

/* ── Embed ── */
.embed-thumb{position:relative;cursor:pointer;border-radius:var(--rs);overflow:hidden;background:var(--bg4);border:1px solid var(--bd)}
.embed-thumb::after{content:'▶';position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:2rem;color:white;text-shadow:0 2px 10px rgba(0,0,0,.6)}
.embed-thumb img{width:100%;aspect-ratio:16/9;object-fit:cover;opacity:.7;display:block}

/* ── Transitions ── */
.fade-enter-active,.fade-leave-active{transition:opacity .16s}
.fade-enter-from,.fade-leave-to{opacity:0}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.5}}
