/* Aurora Glass — تصميم تطبيق الأهل. بيتحمّل بعد style.css وبيعيد تعريف نفس المتغيرات والكلاسات. */
:root {
  --bg: #070a13;
  --panel: rgba(255, 255, 255, .06);
  --panel2: rgba(255, 255, 255, .075);
  --text: #f4f6fc;
  --muted: #a9b2c8;
  --accent: #5eead4;
  --danger: #fb7185;
  --ok: #34d399;
  --warn: #fbbf24;
  --border: rgba(255, 255, 255, .11);

  --teal: #2dd4bf;
  --violet: #8b7cf6;
  --pink: #f472b6;
  --grad: linear-gradient(135deg, #2dd4bf 0%, #8b7cf6 55%, #f472b6 100%);
  --glass: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-head: "Baloo Bhaijaan 2", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(96px + var(--safe-b));
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 38% at 12% 0%, rgba(45, 212, 191, .22), transparent 70%),
    radial-gradient(50% 40% at 92% 8%, rgba(139, 124, 246, .26), transparent 70%),
    radial-gradient(70% 45% at 50% 105%, rgba(244, 114, 182, .17), transparent 70%);
}
h1, h2, h3 { font-family: var(--font-head); letter-spacing: 0; }
h2 { font-size: 26px; font-weight: 700; margin: 6px 0 18px; }
h3 { font-size: 19px; font-weight: 700; }
a { color: var(--accent); }
.muted { color: var(--muted); }

.ic { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- الشريط العلوي ---------- */
.pbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 18px;
  background: rgba(7, 10, 19, .62);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}
.pbrand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.pbrand img { width: 38px; height: 38px; border-radius: 50%; padding: 2px; background: var(--grad); }
.pbrand span {
  font-family: var(--font-head); font-size: 20px; font-weight: 700; direction: ltr;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ptopnav { display: none; align-items: center; gap: 4px; }
.pnav-link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted) !important; text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 9px 14px; border-radius: 999px; min-height: 40px;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.pnav-link:hover { background: rgba(255, 255, 255, .07); color: var(--text) !important; }
.pnav-link.active { background: rgba(255, 255, 255, .1); color: var(--text) !important; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.pbar-actions { display: flex; align-items: center; gap: 8px; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none;
  color: var(--text) !important; background: rgba(255, 255, 255, .07); border: 1px solid var(--border);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.chip-btn:hover { background: rgba(255, 255, 255, .12); }
.chip-btn:active { transform: scale(.96); }

/* ---------- الشريط السفلي (جوال) ---------- */
.tabbar {
  position: fixed; z-index: 60; inset-inline: 12px; bottom: calc(12px + var(--safe-b));
  display: flex; justify-content: space-around; gap: 4px; padding: 6px;
  background: rgba(14, 18, 32, .78);
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .13); border-radius: 26px;
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .08);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 56px; padding: 6px 4px; border-radius: 20px; text-decoration: none;
  color: var(--muted) !important; font-size: 11px; font-weight: 500;
  transition: background .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}
.tab .ic { width: 23px; height: 23px; }
.tab:active { transform: scale(.94); }
.tab.active { color: var(--text) !important; background: rgba(255, 255, 255, .1); }
.tab.active .ic { stroke: var(--teal); filter: drop-shadow(0 0 8px rgba(45, 212, 191, .55)); }

@media (max-width: 560px) { .chip-btn .lbl { display: none; } .chip-btn { padding: 0 12px; } }

@media (min-width: 760px) {
  .tabbar { display: none; }
  .ptopnav { display: flex; }
  body { padding-bottom: 40px; }
}

/* ---------- الحاوية والبطاقات ---------- */
.container { max-width: 760px; margin: 0 auto; padding: 22px 16px 8px; }
.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 24px 44px -28px rgba(0, 0, 0, .75);
}
a.card { transition: transform .25s var(--ease), border-color .25s var(--ease); }
a.card:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .22); }

@media (prefers-reduced-motion: no-preference) {
  .container > * { animation: rise .6s var(--ease) both; }
  .container > *:nth-child(2) { animation-delay: .06s; }
  .container > *:nth-child(3) { animation-delay: .12s; }
  .container > *:nth-child(4) { animation-delay: .18s; }
  .container > *:nth-child(5) { animation-delay: .24s; }
  .container > *:nth-child(n+6) { animation-delay: .3s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ---------- أزرار ---------- */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 14px; cursor: pointer;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; text-decoration: none;
  color: var(--text) !important; background: rgba(255, 255, 255, .09); border: 1px solid var(--border);
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
button:hover, .btn:hover { background: rgba(255, 255, 255, .15); opacity: 1; }
button:active, .btn:active { transform: scale(.97); }
.btn-primary {
  color: #071018 !important; background: var(--grad); border: 0; font-weight: 700;
  box-shadow: 0 10px 28px -8px rgba(139, 124, 246, .65), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-primary:hover { background: var(--grad); filter: brightness(1.08); }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 16px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ---------- حقول ---------- */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px;
  font-family: var(--font-body); font-size: 16px; color: var(--text);
  background: rgba(255, 255, 255, .06); border: 1px solid var(--border);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
input::placeholder { color: rgba(169, 178, 200, .55); }
input:focus { outline: none; border-color: var(--teal); background: rgba(255, 255, 255, .09); box-shadow: 0 0 0 4px rgba(45, 212, 191, .16); }
.pw-wrap { position: relative; }
.pw-wrap input { padding-inline-end: 52px; }
.pw-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  min-height: 40px; width: 40px; padding: 0; border-radius: 12px; background: transparent; border: 0;
}

/* ---------- شارات وتنبيهات ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .09); color: var(--muted);
  border: 1px solid rgba(255, 255, 255, .08);
}
.badge.ok { background: rgba(52, 211, 153, .13); color: #6ee7b7; border-color: rgba(52, 211, 153, .3); }
.badge.warn { background: rgba(251, 191, 36, .12); color: #fcd34d; border-color: rgba(251, 191, 36, .3); }
.badge.danger { background: rgba(251, 113, 133, .13); color: #fda4af; border-color: rgba(251, 113, 133, .3); }
.flash {
  background: rgba(251, 113, 133, .1); border: 1px solid rgba(251, 113, 133, .32); color: #fecdd3;
  border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 16px; font-size: 14px;
}

/* ---------- الرئيسية (Landing) ---------- */
.hero { text-align: center; padding: 26px 4px 10px; }
.hero-logo {
  width: 132px; height: 132px; margin: 0 auto 18px; border-radius: 50%; padding: 4px; background: var(--grad);
  box-shadow: 0 0 0 10px rgba(255, 255, 255, .04), 0 24px 70px -10px rgba(139, 124, 246, .6);
}
.hero-logo img { width: 100%; height: 100%; border-radius: 50%; display: block; background: #fff; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 600; color: #a5f3fc; background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .28);
}
.hero-title {
  font-size: clamp(32px, 8vw, 52px); line-height: 1.15; font-weight: 800; margin: 14px 0 10px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 520px; margin: 0 auto 22px; font-size: 16px; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-link { text-decoration: none; display: inline-block; margin-top: 14px; font-size: 14px; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 26px 0 16px; }
.feature { padding: 16px 18px; margin: 0; display: flex; align-items: center; gap: 14px; }
.feature .fic {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0;
  color: #071018; background: var(--grad);
}
.feature h3 { margin: 0 0 4px; font-size: 17px; }
.feature p { margin: 0; font-size: 13px; color: var(--muted); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 28px 0 12px; }
.section-head h2 { margin: 0; font-size: 22px; }

.phone {
  max-width: 340px; margin: 0 auto 16px; padding: 12px; border-radius: 40px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: 0 40px 80px -30px rgba(139, 124, 246, .55), 0 0 0 6px rgba(255, 255, 255, .03);
}
.phone-screen { position: relative; border-radius: 30px; padding: 26px 14px 16px; background: #0b1020; overflow: hidden; }
.phone-screen::before {
  content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 84px; height: 18px; border-radius: 12px; background: #000;
}
.phone .card { padding: 14px; margin-bottom: 10px; border-radius: 18px; box-shadow: none; backdrop-filter: none; }
.phone h3 { font-size: 15px; }
.phone .today-tile { padding: 8px 2px; }
.locked-cta { text-align: center; margin-top: 8px; }

/* ---------- الدخول ---------- */
.auth-card { max-width: 440px; margin: 10px auto 0; padding: 30px 26px; }
.auth-card .brand-block { margin-bottom: 20px; }
.brand-logo { box-shadow: 0 0 0 4px rgba(255, 255, 255, .06), 0 16px 40px -8px rgba(139, 124, 246, .55); }
.brand-name { font-family: var(--font-head); }
.auth-title { font-size: 24px; margin: 0 0 6px; }
.auth-card .btn-primary { width: 100%; margin-top: 4px; }
.forgot { text-align: center; margin: 16px 0 0; font-size: 14px; }

/* ---------- عناصر التقرير (تُحدَّث بالمرحلة 2) ---------- */
.today-grid { gap: 10px; }
.today-tile { background: rgba(255, 255, 255, .06); border: 1px solid var(--border); border-bottom: 3px solid var(--border); border-radius: var(--r-md); }
.today-tile.status-ok { border-bottom-color: var(--ok); }
.today-tile.status-warn { border-bottom-color: var(--warn); }
.today-tile.status-danger { border-bottom-color: var(--danger); }
.detail-card, .meal-row { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .06); border-radius: var(--r-sm); }
.detail-card.tone-danger { background: rgba(251, 113, 133, .1); border-color: rgba(251, 113, 133, .25); }
.detail-card.tone-ok { background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .25); }
.detail-card.tone-warn { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .25); }


/* ---------- تقرير الطفل ---------- */
.back-link { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; color: var(--muted); text-decoration: none; font-size: 14px; min-height: 40px; }
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 20px; }
.card-title .ic { color: var(--teal); }
.sub-title { margin: 22px 0 12px; font-size: 14px; font-weight: 600; color: var(--muted); font-family: var(--font-body); }

.child-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 22px; overflow: hidden; }
.child-hero::after {
  content: ""; position: absolute; inset-inline-end: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 124, 246, .35), transparent 70%); pointer-events: none;
}
.avatar-ring { width: 84px; height: 84px; border-radius: 50%; padding: 3px; background: var(--grad); flex-shrink: 0; box-shadow: 0 12px 34px -10px rgba(139, 124, 246, .7); }
.avatar-ring img, .avatar-ring > span {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: grid; place-items: center;
  background: #0d1324; font-family: var(--font-head); font-size: 34px; font-weight: 700; color: var(--text);
}
.hero-info { min-width: 0; flex: 1; }
.child-name { font-size: 28px; line-height: 1.2; margin: 0; font-weight: 800; overflow-wrap: anywhere; }
.hero-alert { width: 100%; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(255, 255, 255, .08); border: 1px solid var(--border); color: var(--muted);
}
.pill .ic { width: 16px; height: 16px; }
.pill.ok { background: rgba(52, 211, 153, .13); border-color: rgba(52, 211, 153, .32); color: #6ee7b7; }
.pill.warn { background: rgba(251, 191, 36, .12); border-color: rgba(251, 191, 36, .3); color: #fcd34d; }
.pill.danger { background: rgba(251, 113, 133, .13); border-color: rgba(251, 113, 133, .32); color: #fda4af; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
@media (prefers-reduced-motion: no-preference) {
  .live-dot { animation: pulse 2s infinite; }
  @keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
}

.alert-card {
  display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; margin-bottom: 16px; border-radius: var(--r-lg);
  text-decoration: none; color: var(--text) !important; border: 1px solid var(--border); background: rgba(255, 255, 255, .05);
}
.alert-card .ic { width: 24px; height: 24px; margin-top: 2px; }
.alert-card strong { font-family: var(--font-head); font-size: 17px; }
.alert-card p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.alert-card.warn { background: rgba(251, 191, 36, .09); border-color: rgba(251, 191, 36, .3); }
.alert-card.warn .ic { color: var(--warn); }
.alert-card.danger { background: rgba(251, 113, 133, .09); border-color: rgba(251, 113, 133, .32); }
.alert-card.danger .ic { color: var(--danger); }
.alert-card.info .ic { color: var(--teal); }

.practice { padding: 14px 0; border-top: 1px solid var(--border); }
.practice:first-of-type { border-top: 0; padding-top: 0; }
.practice-text { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.practice-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 12px; }

.vitals { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.vital {
  display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 8px; text-align: center; border-radius: var(--r-md);
  background: rgba(255, 255, 255, .055); border: 1px solid var(--border); position: relative; overflow: hidden;
}
.vital::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 3px; background: var(--border); }
.vital.status-ok::after { background: var(--ok); }
.vital.status-warn::after { background: var(--warn); }
.vital.status-danger::after { background: var(--danger); }
.vital .ic { width: 24px; height: 24px; color: var(--teal); }
.vital-emoji { font-size: 28px; line-height: 1.1; }
.vital strong { font-family: var(--font-head); font-size: 18px; line-height: 1.2; min-height: 22px; display: flex; align-items: center; gap: 4px; }
.vital .unit { font-size: 12px; font-weight: 500; color: var(--muted); font-family: var(--font-body); }
.vital small { font-size: 12px; color: var(--muted); }
.vital.status-danger .ic { color: var(--danger); }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 19px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(180deg, var(--teal), var(--violet), var(--pink)); opacity: .45; border-radius: 2px; }
.tl-item { display: flex; gap: 14px; position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; z-index: 1;
  background: #0f1528; border: 2px solid rgba(45, 212, 191, .55); color: var(--teal);
}
.tl-node .ic { width: 18px; height: 18px; }
.tl-meal .tl-node { border-color: rgba(251, 191, 36, .6); color: var(--warn); }
.tl-nap .tl-node { border-color: rgba(139, 124, 246, .7); color: #b4a9ff; }
.tl-diaper .tl-node { border-color: rgba(96, 165, 250, .6); color: #93c5fd; }
.tl-leave .tl-node { border-color: rgba(244, 114, 182, .6); color: var(--pink); }
.tl-incident .tl-node { border-color: var(--danger); color: var(--danger); background: rgba(251, 113, 133, .12); }
.tl-body { flex: 1; min-width: 0; padding-top: 2px; }
.tl-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.tl-head strong { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.tl-head time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; direction: ltr; }
.tl-detail { font-size: 13px; color: var(--muted); margin-top: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.calm-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 14px; border-radius: var(--r-md); background: rgba(52, 211, 153, .09); border: 1px solid rgba(52, 211, 153, .25); color: #86efac; font-size: 14px; }
.calm-note .ic { color: var(--ok); }
.note { display: flex; gap: 12px; margin-top: 12px; padding: 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .05); border: 1px solid var(--border); }
.note-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(139, 124, 246, .16); color: #b4a9ff; }
.note.ok .note-ic { background: rgba(52, 211, 153, .15); color: var(--ok); }
.note small { color: var(--muted); font-size: 12px; }
.note p { margin: 2px 0 0; overflow-wrap: anywhere; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 10px; color: var(--muted); text-align: center; }
.empty .ic { width: 30px; height: 30px; opacity: .6; }
.empty p { margin: 0; }

.wk { display: grid; gap: 6px; }
.wk-row { display: grid; grid-template-columns: 62px repeat(5, minmax(0, 1fr)); gap: 6px; align-items: stretch; }
.wk-days span { text-align: center; font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.wk-label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.2; }
.wk-label .ic { width: 18px; height: 18px; color: var(--teal); }
.wk-cell {
  min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 14px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .06); font-size: 15px;
}
.wk-cell small { font-size: 10px; color: inherit; opacity: .85; font-variant-numeric: tabular-nums; }
.wk-cell strong { font-family: var(--font-head); font-size: 16px; font-weight: 700; }
.wk-emoji { font-size: 22px; }
.c-ok { color: #6ee7b7; }
.wk-cell.c-ok { background: rgba(52, 211, 153, .12); border-color: rgba(52, 211, 153, .28); }
.wk-cell.c-warn { background: rgba(251, 191, 36, .11); border-color: rgba(251, 191, 36, .28); color: #fcd34d; }
.wk-cell.c-danger { background: rgba(251, 113, 133, .12); border-color: rgba(251, 113, 133, .3); color: #fda4af; }
.wk-cell.c-muted { color: var(--muted); }
.c-warn { color: #fcd34d; }
.c-danger { color: #fda4af; }
.wk-sleep { padding: 6px 2px 4px; }
.bar-track { width: 60%; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, .06); display: flex; align-items: flex-end; overflow: hidden; }
.bar { width: 100%; border-radius: 8px; background: linear-gradient(180deg, var(--violet), var(--teal)); }
.wk-sleep small { color: var(--muted); }
.legend { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 0; padding: 0; font-size: 12px; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend .ic { width: 15px; height: 15px; }

.session { padding: 16px; margin-bottom: 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .05); border: 1px solid var(--border); border-inline-start: 3px solid var(--violet); }
.session:last-child { margin-bottom: 0; }
.session-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; margin-bottom: 10px; flex-wrap: wrap; }
.s-line { display: flex; gap: 10px; margin: 8px 0; }
.s-line .ic { margin-top: 3px; color: var(--teal); }
.s-line small { display: block; font-size: 12px; color: var(--muted); }
.guidance { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .22); }
.guidance small { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #99f6e4; }
.guidance p { margin: 4px 0 12px; }
.note-row { padding: 12px 0; border-top: 1px solid var(--border); }
.note-row:first-of-type { border-top: 0; padding-top: 0; }
.note-row p { margin: 6px 0 2px; }

@media (max-width: 420px) {
  .wk-row { grid-template-columns: 50px repeat(5, minmax(0, 1fr)); gap: 4px; }
  .child-name { font-size: 24px; }
}


/* ---------- التقويم / الإشعارات / طلابي ---------- */
html[dir="ltr"] .flip-ltr { transform: scaleX(-1); }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.cal-title { text-align: center; }
.cal-title h2 { margin: 0; font-size: 30px; line-height: 1.1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cal-title span { font-size: 13px; color: var(--muted); letter-spacing: 2px; }
.cal-nav {
  width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: var(--text) !important;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--border); transition: background .2s var(--ease), transform .2s var(--ease);
}
.cal-nav:hover { background: rgba(255, 255, 255, .13); }
.cal-nav:active { transform: scale(.94); }

.cal-card { padding: 8px 14px; }
.cal-day { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); align-items: flex-start; }
.cal-day:last-child { border-bottom: 0; }
.cal-date { width: 46px; flex-shrink: 0; text-align: center; padding-top: 2px; }
.cal-date strong { display: block; font-family: var(--font-head); font-size: 20px; line-height: 1.1; }
.cal-date small { font-size: 11px; color: var(--muted); }
.cal-day:not(.has-events) { padding: 6px 0; align-items: center; }
.cal-day:not(.has-events) .cal-date { display: flex; align-items: baseline; justify-content: center; gap: 6px; width: 74px; padding: 0; text-align: start; }
.cal-day:not(.has-events) .cal-date strong { font-size: 15px; color: var(--muted); font-weight: 500; }
.cal-day:not(.has-events) .cal-date small { opacity: .7; }
.cal-day.is-weekend:not(.has-events) { opacity: .55; }
.cal-day.is-today .cal-date strong { color: #071018; background: var(--grad); border-radius: 12px; padding: 4px 0; box-shadow: 0 8px 20px -6px rgba(139, 124, 246, .7); font-size: 18px; }
.cal-day.is-today:not(.has-events) .cal-date strong { padding: 2px 10px; }
.cal-events { flex: 1; min-width: 0; display: grid; gap: 8px; }
.today-tag { justify-self: start; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #071018; background: var(--grad); }

.ev { padding: 14px; border-radius: var(--r-md); background: rgba(255, 255, 255, .06); border: 1px solid var(--border); border-inline-start: 3px solid var(--violet); }
.ev-trip { border-inline-start-color: var(--teal); }
.ev-closed_day { border-inline-start-color: var(--danger); background: rgba(251, 113, 133, .07); }
.ev-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ev-head strong { flex: 1; min-width: 0; font-size: 16px; overflow-wrap: anywhere; }
.ev-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: rgba(139, 124, 246, .18); color: #b4a9ff; }
.ev-trip .ev-ic { background: rgba(45, 212, 191, .16); color: var(--teal); }
.ev-closed_day .ev-ic { background: rgba(251, 113, 133, .16); color: var(--danger); }
.ev-ic .ic { width: 18px; height: 18px; }
.ev-desc { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.ev-lock { display: flex; align-items: center; gap: 6px; margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.rsvp { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.rsvp-child { font-size: 13px; font-weight: 600; color: var(--muted); }
.rsvp-state, .rsvp-choices { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rsvp-choices form { display: inline; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 12px; }
.btn-sm .ic { width: 16px; height: 16px; }
.btn-sm.yes { background: rgba(52, 211, 153, .14); border-color: rgba(52, 211, 153, .35); color: #86efac !important; }
.btn-sm.no { background: rgba(251, 113, 133, .12); border-color: rgba(251, 113, 133, .32); color: #fda4af !important; }

.ann-card { display: flex; gap: 14px; text-decoration: none; color: var(--text) !important; }
.ann-body { flex: 1; min-width: 0; }
.ann-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ann-head strong { font-family: var(--font-head); font-size: 18px; overflow-wrap: anywhere; }
.ann-head time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ann-body p { margin: 4px 0 8px; color: var(--muted); font-size: 14px; }
.note-ic.poll { background: rgba(45, 212, 191, .16); color: var(--teal); }
.ann-detail { padding: 24px 20px; }
.ann-title { font-size: 28px; line-height: 1.25; margin: 16px 0 10px; font-weight: 800; overflow-wrap: anywhere; }
.ann-text { font-size: 17px; line-height: 1.8; margin: 0 0 20px; white-space: pre-line; overflow-wrap: anywhere; }
.poll { display: grid; gap: 10px; margin-bottom: 18px; }
.poll-opt { display: block; cursor: pointer; }
.poll-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.poll-face {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 54px; padding: 0 16px; overflow: hidden;
  border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); transition: border-color .2s var(--ease), background .2s var(--ease);
}
.poll-fill { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, rgba(45, 212, 191, .22), rgba(139, 124, 246, .22)); transition: width .5s var(--ease); }
.poll-text, .poll-count { position: relative; }
.poll-text { font-weight: 600; }
.poll-count { font-size: 13px; color: var(--muted); }
.poll-opt input:checked + .poll-face { border-color: var(--teal); background: rgba(45, 212, 191, .1); box-shadow: 0 0 0 3px rgba(45, 212, 191, .16); }
.poll-opt input:focus-visible + .poll-face { outline: 2px solid var(--teal); outline-offset: 3px; }

.avatar-ring.sm { width: 60px; height: 60px; padding: 2px; box-shadow: 0 8px 22px -8px rgba(139, 124, 246, .7); }
.avatar-ring.sm img, .avatar-ring.sm > span { font-size: 24px; }
a.child-link, .child-link { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text) !important; }
.child-link-info { flex: 1; min-width: 0; }
.child-link-info strong { font-family: var(--font-head); font-size: 20px; }
.child-link-info p { margin: 2px 0 0; font-size: 14px; }
.chev { color: var(--muted); width: 22px; height: 22px; }
.push-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.push-text { flex: 1; min-width: 180px; }
.push-text p { margin: 2px 0 0; font-size: 13px; }


/* ---------- الزائر: صفحة الحضانة العامة + التحميلات ---------- */
.fic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; color: #071018; background: var(--grad); }
.info-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; padding: 16px 18px; margin: 22px 0 8px; }
.info-strip > div { display: flex; align-items: center; gap: 12px; }
.info-strip .ic { width: 24px; height: 24px; color: var(--teal); }
.info-strip small { display: block; font-size: 12px; color: var(--muted); }
.info-strip strong { font-family: var(--font-head); font-size: 17px; font-weight: 600; }
.info-strip a { text-decoration: none; }

.programs { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 8px; }
.program { margin: 0; }
.program .fic { margin-bottom: 12px; }
.program h3 { margin: 0 0 6px; font-size: 19px; }
.program p { margin: 0; font-size: 14px; color: var(--muted); }
.section-head + .programs, .section-head + .features, .section-head + .dl-mini, .section-head + .explore { margin-top: 0; }

.dl-mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.dl-mini-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 0; padding: 16px; text-decoration: none; color: var(--text) !important; }
.dl-mini-card strong { font-family: var(--font-head); font-size: 16px; line-height: 1.3; }

.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 16px; }
.dl-card { margin: 0; display: flex; flex-direction: column; }
.dl-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dl-card h3 { margin: 0 0 6px; font-size: 20px; }
.dl-card p { margin: 0 0 16px; font-size: 14px; flex: 1; }
.dl-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

.explore { display: grid; gap: 12px; margin-bottom: 8px; }
.explore-card { display: flex; align-items: center; gap: 14px; margin: 0; text-decoration: none; color: var(--text) !important; }
.explore-card > div { flex: 1; min-width: 0; }
.explore-card strong { font-family: var(--font-head); font-size: 19px; }
.explore-card p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

.final-cta { text-align: center; padding: 30px 20px; margin-top: 28px; background: linear-gradient(160deg, rgba(45, 212, 191, .12), rgba(139, 124, 246, .16) 55%, rgba(244, 114, 182, .12)); }
.final-cta h2 { margin: 0 0 6px; font-size: 26px; }
.final-cta p { margin: 0 0 18px; }


/* ---------- معاينة الملفات ---------- */
.dl-foot { flex-wrap: wrap; }
dialog.pv {
  width: min(560px, 100vw); max-width: 100vw; height: min(92dvh, 900px); max-height: 100dvh; margin: auto; padding: 0; color: var(--text);
  border: 1px solid rgba(255, 255, 255, .16); border-radius: 26px; background: #0b1020;
  box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .9);
}
dialog.pv[open] { display: flex; flex-direction: column; }
dialog.pv::backdrop { background: rgba(4, 6, 12, .78); backdrop-filter: blur(6px); }
.pv-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.pv-head strong { font-family: var(--font-head); font-size: 18px; }
.pv-close { width: 44px; height: 44px; padding: 0; border-radius: 14px; }
.pv-body { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 16px; align-content: start; overscroll-behavior: contain; }
.pv-page { margin: 0; }
.pv-page img { display: block; width: 100%; height: auto; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .8); }
.pv-page figcaption { text-align: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.pv-foot { padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--border); }
.pv-foot .btn { width: 100%; }
@media (max-width: 600px) { dialog.pv { height: 100dvh; border-radius: 0; border-inline: 0; } }


/* ---------- الموقع العام: صفحات ونماذج ---------- */
.page-head { text-align: center; margin: 6px 0 24px; }
.page-head h1 { font-size: clamp(28px, 7vw, 40px); line-height: 1.2; margin: 10px 0 8px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.page-head p { margin: 0 auto; max-width: 480px; color: var(--muted); font-size: 15px; }
.page-head .fic { margin: 0 auto 6px; width: 56px; height: 56px; border-radius: 18px; }
.sec-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 14px; }
.sec-title h2 { margin: 0; font-size: 21px; }
.sec-title .ic { color: var(--teal); }

.bio-links { display: grid; gap: 12px; max-width: 520px; margin: 0 auto; }
.bio-link {
  display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 18px; text-decoration: none; color: var(--text) !important;
  border-radius: 20px; background: var(--glass); border: 1px solid var(--border); margin: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 18px 34px -24px rgba(0, 0, 0, .8);
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.bio-link:hover { transform: translateY(-2px); border-color: rgba(45, 212, 191, .55); background: rgba(255, 255, 255, .09); }
.bio-link-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; flex-shrink: 0; background: rgba(255, 255, 255, .08); border: 1px solid var(--border); }
.bio-link-text { flex: 1; min-width: 0; font-family: var(--font-head); font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
.bio-link .chev { color: var(--muted); width: 22px; height: 22px; }

.act-card { display: flex; gap: 14px; align-items: flex-start; text-decoration: none; color: var(--text) !important; }
.act-card .fic { font-size: 26px; }
.act-body { flex: 1; min-width: 0; }
.act-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 4px; font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.act-desc { margin: 0; font-size: 14px; color: var(--muted); }
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.meta-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: #a5f3fc; background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .25); }
.meta-chip .ic { width: 14px; height: 14px; }
.soon { padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #071018; background: var(--grad); }
.ended { display: inline-block; margin-inline-start: 8px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: #ff8f8f; background: rgba(239,68,68,.16); border: 1px solid rgba(239,68,68,.5); }
.act-card.is-ended { opacity: .72; }
.detail-hero { text-align: center; padding: 28px 20px; }
.detail-hero .fic { margin: 0 auto 14px; width: 70px; height: 70px; border-radius: 22px; font-size: 34px; }
.detail-hero h1 { margin: 6px 0 10px; font-size: 30px; line-height: 1.25; font-weight: 800; overflow-wrap: anywhere; }
.detail-hero .desc { max-width: 480px; margin: 0 auto 20px; color: var(--muted); font-size: 16px; }
.detail-hero .meta-row { justify-content: center; margin: 16px 0 22px; }
.detail-text { white-space: pre-line; overflow-wrap: anywhere; color: var(--muted); line-height: 1.9; margin: 0; }

.form-wrap { max-width: 560px; margin: 0 auto; }
.form-card h3 { margin: 0 0 14px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.form-card h3 .ic { color: var(--teal); }
.form-card .field { margin-bottom: 14px; }
.form-card .field > label, .form-card .lbl { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-col { display: grid; gap: 8px; }
label.opt { position: relative; display: inline-flex; margin: 0; cursor: pointer; }
label.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
label.opt span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; font-size: 14px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--border); transition: background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.opt-col label.opt { display: flex; }
.opt-col label.opt span { border-radius: 16px; width: 100%; }
label.opt:hover span { background: rgba(255, 255, 255, .1); }
label.opt input:checked + span { border-color: var(--teal); background: rgba(45, 212, 191, .14); box-shadow: 0 0 0 3px rgba(45, 212, 191, .14); color: #ccfbf1; }
label.opt input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 3px; }
.conditional { display: none; margin-top: 12px; }
.conditional.show { display: block; }
textarea { min-height: 96px; padding: 12px 16px; width: 100%; }
.consent-box { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: rgba(255, 255, 255, .05); border: 1px solid var(--border); }
.consent-box input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; accent-color: var(--teal); flex-shrink: 0; }
.actions .btn { width: 100%; }
.error-box { padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: rgba(251, 113, 133, .1); border: 1px solid rgba(251, 113, 133, .32); color: #fecdd3; }
.activity-banner { display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: rgba(139, 124, 246, .12); border: 1px solid rgba(139, 124, 246, .3); }
.done-box { text-align: center; padding: 36px 20px; max-width: 480px; margin: 20px auto; }
.done-box .fic { margin: 0 auto 16px; width: 72px; height: 72px; border-radius: 50%; }
.done-box h2 { margin: 0 0 8px; font-size: 26px; }
.done-box p { margin: 0 0 18px; color: var(--muted); }
.spec-name { font-family: var(--font-head); font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.info-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; color: var(--muted); line-height: 1.9; }
.book-cta { text-align: center; }
.book-cta p { margin: 0 0 16px; }
.empty-note { color: var(--muted); text-align: center; padding: 8px 0; margin: 0; }


/* ---------- تذييل الموقع + السوشال ---------- */
.site-foot { max-width: 760px; margin: 8px auto 0; padding: 20px 16px 8px; text-align: center; color: var(--muted); font-size: 13px; }
.site-foot p { margin: 12px 0 0; }
.social { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; text-decoration: none;
  color: var(--text) !important; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .07); border: 1px solid var(--border);
  transition: background .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.social-btn:hover { background: rgba(255, 255, 255, .13); border-color: rgba(244, 114, 182, .5); }
.social-btn:active { transform: scale(.96); }
.social-btn .ic { color: var(--pink); }


/* ---------- نصوص طويلة (خصوصية / من نحن) ---------- */
.prose { padding: 26px 22px; }
.prose h2 { font-size: 20px; margin: 26px 0 8px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { font-size: 15px; line-height: 1.95; color: #d3d9e8; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-inline-start: 22px; }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }
.foot-links a { color: var(--muted); }
.foot-links { margin-top: 14px; }

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

/* فيديو مضمّن بصفحة النشاط */
.video-wrap { border-radius: 16px; overflow: hidden; background: rgba(0,0,0,.25); }
.video-wrap iframe { display: block; width: 100%; border: 0; }
.video-wrap.youtube iframe { aspect-ratio: 16 / 9; }
.video-wrap.instagram { max-width: 400px; margin: 0 auto; }
.video-wrap.instagram iframe { height: 560px; background: #fff; }

/* صور الأنشطة (WebP محسّنة) */
.act-thumb { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; flex: none; background: rgba(255,255,255,.06); }
.detail-hero .cover { display: block; width: 100%; height: auto; max-height: 420px; object-fit: cover; border-radius: 16px; margin: 0 0 18px; }
