/* =========================
   Sanad Theme (Light/Dark) — theme.css
   Modern + Clean + Responsive
   ========================= */

/* ---------- Tokens ---------- */
:root{
  --ink:#071a2b;
  --ink2:#0b2a44;
  --muted: rgba(7,26,43,.70);

  --bg:#ffffff;
  --bg2:#f6fbff;

  --card:#ffffff;
  --border: rgba(7,26,43,.10);

    /* Palette tuned to match /assets/images/logo.png (magenta + royal blue) */
  --primary:#e050c0;
  --accent:#1040c0;

  --radius:22px;
  --shadow-soft: 0 14px 30px rgba(7,26,43,.10);
  --shadow: 0 24px 70px rgba(7,26,43,.14);

  --ring: 0 0 0 4px rgba(224,80,192,.16);
}

html{ scroll-behavior: smooth; }

/* Dark mode tokens */
:root[data-theme="dark"]{
  --ink:#eaf2ff;
  --ink2:#cfe3ff;
  --muted: rgba(234,242,255,.72);

  --bg:#0b1220;
  --bg2:#0f1b2e;

  --card: rgba(255,255,255,.06);
  --border: rgba(255,255,255,.12);

  --primary:#f06090;
  --accent:#2a6cff;

  --shadow-soft: 0 14px 30px rgba(0,0,0,.35);
  --shadow: 0 24px 70px rgba(0,0,0,.45);

  --ring: 0 0 0 4px rgba(240,96,144,.18);
}

/* ---------- Base ---------- */
*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(224,80,192,.12), transparent 56%),
    radial-gradient(1100px 650px at 95% 0%, rgba(16,64,192,.14), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  color: var(--ink);
}

:root[data-theme="dark"] body{
  background:
    radial-gradient(1100px 700px at 12% -10%, rgba(224,80,192,.12), transparent 56%),
    radial-gradient(1100px 650px at 95% 0%, rgba(42,108,255,.12), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
}

a{ color: inherit; text-decoration: none; }
img{ max-width:100%; display:block; }

/* ---------- Layout ---------- */
.container{
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}
main.container{
  min-height: 70vh;
  padding: 18px 0 30px;
  position: relative;
  z-index: 1;
}

/* ---------- Navbar ---------- */
header.nav{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
:root[data-theme="dark"] header.nav{
  background: rgba(15,27,46,.72);
}

.nav-inner{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
}

.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand-logo{
  width:46px; height:46px;
  border-radius: 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(224,80,192,.18), rgba(16,64,192,.14));
  border: 1px solid rgba(224,80,192,.22);
  box-shadow: 0 16px 34px rgba(7,26,43,.12);
}
:root[data-theme="dark"] .brand-logo{
  box-shadow: 0 16px 34px rgba(0,0,0,.35);
  border-color: rgba(240,96,144,.22);
}
.brand-logo svg{ width:28px; height:28px; }

.brand-name strong{ display:block; font-weight: 1000; }
.brand-name small{ display:block; font-weight: 800; color: var(--muted); font-size: 12px; }

.nav-links{
  display:flex;
  align-items:center;
  gap: 10px;
}

.nav-toggle{ display:none; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(7,26,43,.06);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
:root[data-theme="dark"] .btn{
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.30);
}

.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(16,64,192,.28);
  box-shadow: 0 16px 36px rgba(7,26,43,.10);
}
:root[data-theme="dark"] .btn:hover{
  box-shadow: 0 16px 36px rgba(0,0,0,.45);
}

.btn:focus{ outline:none; box-shadow: var(--ring), 0 16px 36px rgba(7,26,43,.10); }

.btn-primary{
  border: 0;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 18px 50px rgba(16,64,192,.18);
}

.btn-danger{
  border:0;
  color:#fff;
  background:#ef4444;
}

.btn-ghost{
  background: transparent;
  box-shadow:none;
}

/* ---------- Theme switch (animated) ---------- */
.theme-switch{
  position: relative;
  width: 56px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(7,26,43,.06);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
:root[data-theme="dark"] .theme-switch{
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.30);
}

.theme-switch .track{
  position:absolute; inset:0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(224,80,192,.18), rgba(16,64,192,.14));
  opacity:.75;
}
:root[data-theme="dark"] .theme-switch .track{
  background: linear-gradient(135deg, rgba(42,108,255,.18), rgba(224,80,192,.10));
}

.theme-switch .thumb{
  position:absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(7,26,43,.18);
  transition: transform .18s ease;
}
:root[data-theme="dark"] .theme-switch .thumb{
  background: rgba(255,255,255,.16);
  box-shadow: 0 14px 30px rgba(0,0,0,.50);
  transform: translateX(-20px);
}

.theme-switch .icon{
  position:absolute;
  top: 8px;
  font-size: 14px;
  opacity: .85;
}
.theme-switch .sun{ left: 10px; }
.theme-switch .moon{ right: 10px; }

/* ---------- Language toggle (AR/EN) ---------- */
.lang-toggle{
  position: relative;
  width: 64px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.78);
  box-shadow: 0 10px 22px rgba(7,26,43,.06);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
:root[data-theme="dark"] .lang-toggle{
  background: rgba(255,255,255,.06);
  box-shadow: 0 10px 22px rgba(0,0,0,.30);
}
.lang-toggle .track{ position:absolute; inset:0; border-radius: inherit; background: linear-gradient(135deg, rgba(34,195,255,.14), rgba(0,194,184,.14)); opacity:.85; }
:root[data-theme="dark"] .lang-toggle .track{ background: linear-gradient(135deg, rgba(34,195,255,.12), rgba(0,194,184,.10)); }
.lang-toggle .thumb{
  position:absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(7,26,43,.18);
  transition: transform .18s ease;
}
:root[data-theme="dark"] .lang-toggle .thumb{ background: rgba(255,255,255,.16); box-shadow: 0 14px 30px rgba(0,0,0,.50); }
html[dir="ltr"] .lang-toggle .thumb{ transform: translateX(-24px); }

.lang-toggle .label{ position:absolute; top: 8px; font-size: 12px; font-weight: 1000; opacity:.85; }
.lang-toggle .label.ar{ left: 10px; }
.lang-toggle .label.en{ right: 10px; }

/* ---------- Colored icons in buttons ---------- */
.btn i.ic{ opacity: 1; }
.btn i.ic.c-sky{ color: var(--sky); }
.btn i.ic.c-teal{ color: var(--teal); }
.btn i.ic.c-rose{ color: #fb7185; }
.btn i.ic.c-amber{ color: #f59e0b; }
.btn i.ic.c-violet{ color: #a78bfa; }
.btn i.ic.c-red{ color: #ef4444; }

/* ---------- Hero ---------- */
.hero-wrap{ padding: 18px 0 10px; }
.hero-shell{
  position:relative;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: rgba(255,255,255,.78);
  box-shadow: var(--shadow);
  padding: 22px;
  overflow: hidden;
}
:root[data-theme="dark"] .hero-shell{
  background: rgba(255,255,255,.06);
}

.hero-orbs{
  position:absolute;
  inset:-80px;
  pointer-events:none;
  opacity:.9;
}
.hero-orbs::before,
.hero-orbs::after{
  content:"";
  position:absolute;
  width:520px; height:520px;
  border-radius:999px;
  filter: blur(26px);
  opacity:.65;
}
.hero-orbs::before{
  right:-160px; top:-130px;
  background: radial-gradient(circle, rgba(16,64,192,.35), transparent 62%);
}
.hero-orbs::after{
  left:-170px; bottom:-160px;
  background: radial-gradient(circle, rgba(224,80,192,.28), transparent 62%);
}
:root[data-theme="dark"] .hero-orbs::before{ background: radial-gradient(circle, rgba(42,108,255,.28), transparent 62%); }

.hero-content{ position:relative; z-index:1; }

.hero-title{
  margin:0 0 10px 0;
  font-size: clamp(24px, 3.4vw, 44px);
  line-height: 1.12;
  font-weight: 1000;
}
.hero-title span{
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub{
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.9;
  font-size: 15px;
}

.hero-actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ---------- Stats ---------- */
.stats-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 18px;
}
@media (max-width: 980px){
  .stats-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px){
  .stats-grid{ grid-template-columns: 1fr; }
}

.stat-card{
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(16,64,192,.14);
  border-radius: 24px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow:hidden;
}
:root[data-theme="dark"] .stat-card{
  background: rgba(255,255,255,.06);
  border-color: rgba(42,108,255,.18);
}

.stat-card::after{
  content:"";
  position:absolute;
  inset:auto -45% -65% auto;
  width:180%;
  height:180%;
  background: radial-gradient(circle, rgba(16,64,192,.16), transparent 62%);
  transform: rotate(10deg);
  opacity: .8;
}
:root[data-theme="dark"] .stat-card::after{
  background: radial-gradient(circle, rgba(42,108,255,.14), transparent 62%);
  opacity: .6;
}

.stat-num{
  position:relative;
  z-index:1;
  font-size: clamp(40px, 5.2vw, 72px);
  font-weight: 1000;
  line-height: 1;
  letter-spacing: .6px;
  color: var(--primary);
}
.stat-label{
  position:relative;
  z-index:1;
  margin-top: 8px;
  font-weight: 950;
}
.stat-note{
  position:relative;
  z-index:1;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
  line-height: 1.6;
}

/* ---------- Sections / Cards ---------- */
.section{ padding: 20px 0; }

/* ---------- Global page tools (Back to Home) ---------- */
.page-tools{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  margin: 14px 0 0;
}
.btn-back-home{
  border-radius: 999px;
  padding-inline: 14px;
}

/* ---------- Live search dropdown ---------- */
.search-results{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.96);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
:root[data-theme="dark"] .search-results{
  background: rgba(15,23,42,.92);
}
.search-item{
  display:block;
  width:100%;
  text-align:right;
  padding: 10px 12px;
  border:0;
  background: transparent;
  cursor:pointer;
  font-weight: 900;
  color: inherit;
}
.search-item:hover{
  background: rgba(16,64,192,.10);
}
.section-head{
  display:flex;
  align-items:flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.section-title{
  margin:0;
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 1000;
}
.section-sub{
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  line-height: 1.8;
}

.grid{ display:grid; gap: 14px; }
.grid.cols-3{ grid-template-columns: 1fr; }
@media (min-width: 980px){
  .grid.cols-3{ grid-template-columns: repeat(3, 1fr); }

.grid.cols-2{ grid-template-columns: 1fr; }
@media (min-width: 760px){
  .grid.cols-2{ grid-template-columns: repeat(2, 1fr); }
}

.grid.cols-4{ grid-template-columns: 1fr; }
@media (min-width: 760px){
  .grid.cols-4{ grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px){
  .grid.cols-4{ grid-template-columns: repeat(4, 1fr); }
}
}

.card{
  background: linear-gradient(135deg, rgba(224,80,192,.10), rgba(16,64,192,.08)), rgba(255,255,255,.78);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
:root[data-theme="dark"] .card{
  background: rgba(255,255,255,.06);
}

/* ---------- Pills / Steps ---------- */
.pills{ display:flex; gap: 10px; flex-wrap: wrap; }
.pill{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.80);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}
:root[data-theme="dark"] .pill{ background: rgba(255,255,255,.06); }

.pill:hover{ transform: translateY(-1px); border-color: rgba(16,64,192,.28); }
.pill.is-active{
  background: linear-gradient(135deg, rgba(16,64,192,.12), rgba(224,80,192,.10));
  border-color: rgba(16,64,192,.24);
}

.steps-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}
@media(min-width: 980px){
  .steps-grid{ grid-template-columns: repeat(3, 1fr); }
}

.step-card{
  background: rgba(255,255,255,.80);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}
:root[data-theme="dark"] .step-card{ background: rgba(255,255,255,.06); }

.step-top{ display:flex; align-items:center; gap: 10px; }
.step-badge{
  width: 40px; height: 40px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  font-weight: 1000;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.step-title{ margin:0; font-weight: 1000; }
.step-desc{ margin: 10px 0 0; color: var(--muted); font-weight: 800; line-height: 1.85; }

/* ---------- Gallery (with images) ---------- */
.gallery{
  display:grid;
  grid-template-columns: 1fr;
  gap: 16px;                /* ✅ مسافات أكثر */
  margin-top: 14px;
}
@media(min-width: 980px){
  .gallery{ grid-template-columns: repeat(3, 1fr); }
}

.img-tile{
  position: relative;
  background: rgba(255,255,255,.90);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow:hidden;
  box-shadow: var(--shadow-soft);
}
:root[data-theme="dark"] .img-tile{ background: rgba(255,255,255,.06); }

.img-tile .img{
  position: relative;
  z-index: 1;
  width: 100%;
  height: 220px;           /* ✅ ثابت */
  object-fit: cover;       /* ✅ لا تختفي الصورة */
  object-position: center;
}


.img-tile::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:220px;
  background: linear-gradient(135deg, rgba(0,194,184,.22), rgba(34,195,255,.18), rgba(224,80,192,.18));
  pointer-events:none;
}
:root[data-theme="dark"] .img-tile::before{
  background: linear-gradient(135deg, rgba(0,194,184,.14), rgba(34,195,255,.12), rgba(240,96,144,.12));
}

.img-tile .content{ position:relative; z-index:2; padding: 14px 16px 22px; text-align:center; }
.img-tile .content::after{
  content:"";
  position:absolute;
  inset:auto 0 0 0;
  height:10px;
  background: linear-gradient(135deg, rgba(0,194,184,.70), rgba(34,195,255,.65), rgba(224,80,192,.60));
  border-radius: 0 0 24px 24px;
  box-shadow: 0 10px 24px rgba(34,195,255,.18), 0 8px 18px rgba(224,80,192,.14);
  opacity: .95;
}

.img-tile h3{ margin:0 0 6px 0; font-weight: 1000; }
.img-tile p{ margin:0; color: var(--muted); font-weight: 800; line-height: 1.8; }


/* ---------- Icon Titles (Why Sanad / Services) ---------- */
.icon-title{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:1000;
  margin-bottom:6px;
}
.ico-badge{
  width:36px;height:36px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, rgba(0,194,184,.18), rgba(34,195,255,.16), rgba(224,80,192,.16));
  border:1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow-soft);
}
.ico-badge svg{ width:20px;height:20px; }

/* ---------- Footer ---------- */
.footer{
  margin-top: 20px;
  padding: 18px 0 30px;
  color: var(--muted);
}
.footer .footer-grid{
  display:grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 14px;
}
@media(max-width: 860px){
  .footer .footer-grid{ grid-template-columns: 1fr; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 860px){
  .nav-toggle{ display:inline-flex; }
  .nav-links{ display:none; width:100%; gap: 8px; }
  .nav-links.is-open{
    display:flex;
    flex-direction: column;
    align-items: stretch;
    max-height: 70vh;
    overflow: auto;
    padding-bottom: 10px;
  }
  .nav-links .btn{ width: 100%; }
}

/* ---------- Buttons / icon colors ---------- */
.btn i{ margin-left: 6px; }
.btn.btn-primary i,
.btn.btn-danger i{ color: #fff; }
.btn:not(.btn-primary):not(.btn-danger) i{ color: var(--teal); }

/* ---------- Home cards images (responsive) ---------- */
.home-card-img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  display:block;
}
@media(max-width: 860px){
  .home-card-img{ height: 160px; }
}

/* ---------- Chat UI (User/Admin messaging) ---------- */
.chat-shell{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  border-radius: 18px;
  overflow: hidden;
}
.chat-header{
  padding: 12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.chat-stream{
  padding: 12px;
  max-height: 64vh;
  overflow: auto;
}
.chat-row{ display:flex; gap:10px; margin: 10px 0; align-items:flex-end; }
.chat-row.is-user{ justify-content:flex-start; }
.chat-row.is-admin{ justify-content:flex-end; }
.chat-avatar{
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,.18);
}
.chat-bubble{
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 16px;
  line-height: 1.75;
  border: 1px solid rgba(255,255,255,.12);
  position: relative;
}
.chat-bubble.user{ background: linear-gradient(135deg, rgba(16,64,192,.14), rgba(224,80,192,.10)); }
.chat-bubble.admin{ background: linear-gradient(135deg, rgba(0,194,184,.16), rgba(34,195,255,.10)); }
.chat-meta{ display:flex; align-items:center; justify-content:space-between; gap: 10px; }
.chat-who{ font-size: .92rem; font-weight: 900; opacity: .95; }
.chat-time{ font-size: .82rem; opacity: .75; margin-right: 8px; }
.chat-edited{ font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18); opacity:.9; }
.chat-attachments{ margin-top: 8px; display:grid; gap: 8px; }
.chat-attach{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.08);
  text-decoration:none;
}
.chat-attach .name{ font-weight: 900; }
.chat-attach .meta{ font-size: 12px; opacity: .75; }
.chat-attach-img{
  width: min(240px, 100%);
  max-height: 190px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
}

.chat-composer{
  padding: 12px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.55);
}
.composer-bar{
  display:flex;
  gap:10px;
  align-items:flex-end;
  flex-wrap:wrap;
}
.composer-input{
  flex: 1 1 360px;
  min-width: 220px;
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.10);
  color: var(--ink);
  outline: none;
}
.composer-actions{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.file-pill{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}
.progress-wrap{ display:none; gap:10px; align-items:center; }
.progress-bar{ width: 180px; max-width: 48vw; height: 10px; border-radius: 999px; overflow:hidden; border: 1px solid rgba(255,255,255,.18); }
.progress-bar > span{ display:block; height:100%; width:0%; background: linear-gradient(135deg, var(--teal), var(--sky)); }
.kebab{
  width: 34px; height: 34px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.08);
  display:inline-flex; align-items:center; justify-content:center;
  cursor:pointer;
}
.kebab-menu{
  position:absolute;
  top: 38px;
  left: 0;
  min-width: 150px;
  background: rgba(8,16,24,.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 14px;
  padding: 6px;
  display:none;
  z-index: 20;
}
.kebab-menu button,
.kebab-menu a{
  width:100%;
  text-align:right;
  padding: 10px 10px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor:pointer;
  font-weight: 800;
}
.kebab-menu button:hover,
.kebab-menu a:hover{ background: rgba(255,255,255,.10); }
.kebab-menu .danger{ color: #ffb3b3; }

@media(max-width: 860px){
  .chat-bubble{ max-width: 88%; }
  .progress-bar{ width: 46vw; }
}
/* ===========================
   Sanad Logo – Circular Style
   =========================== */

.brand-logo img {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

.brand-logo img {
  transition: transform .25s ease, box-shadow .25s ease;
}

.brand-logo img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 22px rgba(16,64,192,.25);
}
/* FORCE Sanad logo to be circular */
header.nav .brand .brand-logo img{
  width: 46px !important;
  height: 46px !important;
  border-radius: 9999px !important;
  object-fit: cover !important;
  background: #ffffff !important;
  display: block !important;
}

/* ===========================
   UI polish (Chat / Buttons / Home images / Progress)
   =========================== */

/* Button icons: keep consistent coloring */
.btn i{ margin-inline-end: 8px; }
.btn:not(.btn-primary):not(.btn-danger) i{ color: var(--teal); }
.btn.btn-primary i, .btn.btn-danger i{ color: #fff; }

/* Home card images: responsive + mobile friendly */
.home-card-img{
  width: 100%;
  height: 170px;
  object-fit: cover;
  display:block;
  border-radius: 16px;
}
@media(max-width: 520px){
  .home-card-img{ height: 140px; border-radius: 14px; }
}

/* Chat UI */
.sanad-chat{
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.75);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
:root[data-theme="dark"] .sanad-chat{
  background: rgba(255,255,255,.06);
}
.sanad-chat .chat-scroll{
  max-height: 64vh;
  overflow: auto;
  padding: 14px 12px;
  background:
    radial-gradient(700px 380px at 10% 0%, rgba(16,64,192,.10), transparent 60%),
    radial-gradient(720px 420px at 95% 0%, rgba(224,80,192,.12), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.30), rgba(255,255,255,.20));
}
:root[data-theme="dark"] .sanad-chat .chat-scroll{
  background:
    radial-gradient(700px 380px at 10% 0%, rgba(42,108,255,.14), transparent 60%),
    radial-gradient(720px 420px at 95% 0%, rgba(240,96,144,.14), transparent 62%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
}

.chat-row{ display:flex; align-items:flex-end; gap:10px; margin:10px 0; }
.chat-row.is-user{ justify-content:flex-end; }
.chat-row.is-admin{ justify-content:flex-start; }

.chat-avatar{
  width: 34px; height: 34px; border-radius: 999px; object-fit: cover;
  border: 1px solid rgba(255,255,255,.18);
}

.chat-bubble{
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 18px;
  line-height: 1.75;
  border: 1px solid rgba(255,255,255,.14);
  position: relative;
  box-shadow: 0 10px 22px rgba(7,26,43,.10);
}

.chat-bubble.user{
  background: linear-gradient(135deg, rgba(16,64,192,.92), rgba(16,64,192,.72));
  color: #fff;
  border-color: rgba(255,255,255,.18);
}
.chat-bubble.admin{
  background: rgba(255,255,255,.92);
  color: var(--ink);
}
:root[data-theme="dark"] .chat-bubble.admin{
  background: rgba(255,255,255,.08);
  color: var(--ink);
  border-color: rgba(255,255,255,.12);
}

.chat-attach{
  margin-top: 8px;
  display: grid;
  gap: 8px;
}
.chat-attach-img{
  max-width: 260px;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  display:block;
}

.chat-composer{
  padding: 10px;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.70);
}
:root[data-theme="dark"] .chat-composer{ background: rgba(255,255,255,.05); }

.composer-inner{
  display:flex;
  gap:10px;
  align-items:flex-end;
}
.composer-text{
  flex: 1 1 auto;
  min-height: 44px;
  max-height: 120px;
  resize: none;
  border-radius: 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  outline: none;
}
:root[data-theme="dark"] .composer-text{
  background: rgba(255,255,255,.06);
  color: var(--ink);
}
.composer-actions{
  display:flex;
  gap:8px;
  align-items:center;
}
.upload-meter{ margin-top: 8px; }

/* 3-dots menu */
.msg-menu{ position: relative; }
.msg-menu button{
  width: 34px; height: 34px;
  display:inline-flex; align-items:center; justify-content:center;
  border-radius: 12px;
}
.msg-menu .menu{
  position:absolute;
  top: 38px;
  inset-inline-end: 0;
  min-width: 140px;
  background: rgba(10,18,30,.92);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  padding: 6px;
  display:none;
  z-index: 5;
}
.msg-menu .menu.is-open{ display:block; }
.msg-menu .menu button, .msg-menu .menu a{
  width: 100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap: 8px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  color: #eaf7ff;
  cursor:pointer;
  font-weight: 900;
}
.msg-menu .menu button:hover, .msg-menu .menu a:hover{
  background: rgba(255,255,255,.08);
}
.msg-menu .menu .danger{ color: #ffb3b3; }

/* Composer */
.chat-composer{
  padding: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
}
.composer-inner{
  display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap;
}
.composer-text{
  flex: 1 1 280px;
  min-height: 44px;
  border-radius: 16px;
  padding: 12px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}
.composer-actions{
  display:flex; gap:8px; align-items:center;
}
.upload-meter{ display:none; margin-top:10px; }
.upload-meter .bar{
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  overflow:hidden;
}
.upload-meter .bar > span{
  display:block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--teal), var(--sky));
}
.upload-meter .txt{ margin-top:6px; font-size:12px; color: var(--muted); font-weight: 900; }

/* Centered selects when requested */
.select-center{ text-align: center; }

/* remove old logo background behind the image */
header.nav .brand .brand-logo{
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}

/* ===========================
   Notification Badges (WhatsApp style)
   =========================== */
.btn.has-badge,
a.has-badge{
  position: relative;
}

.badge-count{
  position: absolute;
  inset-block-start: -8px;
  inset-inline-end: -8px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 9999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 10px 26px rgba(239, 68, 68, .35);
}

.badge-count[data-badge='0']{ display:none; }


/* =========================
   Global responsive tables (mobile)
   ========================= */
.table-wrap,
.table-responsive{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px){
  .table th, .table td{ padding: 10px 8px !important; }
  .table th{ white-space: nowrap; }
  .table td{ vertical-align: top; }
}

/* =========================
   Admin Messages – Mobile Fix
   ========================= */
.admin-messages,
.admin-messages *{ max-width: 100%; }

.admin-messages td,
.admin-messages th{ white-space: nowrap; }

.admin-messages .msg-snippet,
.admin-messages .msg-body,
.admin-messages .email{ white-space: normal; overflow-wrap:anywhere; }

.admin-messages .actions{ display:flex; gap:8px; flex-wrap:wrap; }


/* ---------- Board Wheel (Team Carousel) ---------- */

/* ---------- Sliders (Swipe like Telegram/Stories) ---------- */
.sanad-slider{
  position: relative;
  margin-top: 14px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(224,80,192,.10), rgba(16,64,192,.08));
  box-shadow: var(--shadow-soft);
  padding: 14px 52px;
}
:root[data-theme="dark"] .sanad-slider{
  background: linear-gradient(135deg, rgba(240,96,144,.14), rgba(42,108,255,.10));
}

.sanad-slider .slider-viewport{
  touch-action: pan-y;
  overflow: hidden;
  overflow-y: hidden;
  position: relative;
}

/* ✅ Make slider deterministic under RTL browsers */
.sanad-slider .slider-viewport{ direction:ltr; }
.sanad-slider .slider-track{ direction:ltr; }
.sanad-slider .slide{ direction:rtl; }

.sanad-slider .slider-track{
  display: flex;
  gap: 0;
  transition: transform .35s ease;
  will-change: transform;
}
.sanad-slider .slide{
  flex: 0 0 100%;
  padding: 6px;
}
/* Nav buttons */
.slider-nav{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.85);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
}
:root[data-theme="dark"] .slider-nav{ background: rgba(255,255,255,.10); }
.slider-nav:disabled{ opacity: .45; cursor: not-allowed; }
.slider-nav.prev{ inset-inline-start: 10px; }
.slider-nav.next{ inset-inline-end: 10px; }

/* Member card */
.member-card{
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.82);
  padding: 14px;
  text-align: center;
}
:root[data-theme="dark"] .member-card{ background: rgba(255,255,255,.06); }

.member-card img{
  width: min(300px, 86vw);
  max-height: 320px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 14px 30px rgba(7,26,43,.12);
  display:block;
  margin: 0 auto;
}
.member-name{ margin-top: 12px; font-weight: 1000; }
.member-role{ margin-top: 4px; font-weight: 900; color: var(--accent); }

/* Flow slider */
.flow-slider{ padding: 14px 52px; }
.flow-slider .step-card{ height: 100%; }

