/* =========================================================
   شاشة الدخول، القفل، الاستلام، السجل، الصور، والموبايل
   ========================================================= */

/* ---------- شعار البرنامج ---------- */
.logo .mark.app { width: 42px; height: 42px; background: none; border-radius: 0; transform: none; }
.logo .mark.app { border-radius: 23%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .34); } /* الأيقونة قاعدتها سودة والهيدر أسود */
.scene .logo .mark.app { box-shadow: none; }
.logo:hover .mark.app { transform: scale(1.08) rotate(-4deg); }
.scene .logo .mark.app { width: 54px; height: 54px; }
.scene .logo { font-size: 24px; }
.scene .logo small { font-size: 12.5px; }

/* ---------- شاشة الدخول ---------- */
.welcome-bg {
  --sky-1: #C9D8FF; --sky-2: #E9E4FF; --sky-3: #FFF1DA;
  height: 100vh; overflow: auto; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr);
  background: linear-gradient(180deg, var(--sky-1), var(--sky-2) 46%, var(--sky-3));
}
[data-mode="dark"] .welcome-bg { --sky-1: #191536; --sky-2: #2A2158; --sky-3: #46306B; }
.scene { position: relative; display: flex; flex-direction: column; padding: 34px 40px 0; min-height: 0; overflow: hidden; }
.scene .logo { color: var(--ink); }
.scene .logo small { color: var(--ink-2); }
.scene-text { margin-top: clamp(18px, 4vh, 44px); max-width: 560px; position: relative; z-index: 1; }
.scene-text h1 { font-size: clamp(30px, 3.5vw, 50px); line-height: 1.25; margin: 0 0 10px; }
.scene-text h1 em { font-style: normal; color: var(--primary-dark); }
[data-mode="dark"] .scene-text h1 em { color: var(--lime); }
.scene-text p { margin: 0; color: var(--ink-2); font-size: 16px; line-height: 1.8; }
.scene > img { flex: 1; min-height: 0; width: 100%; object-fit: contain; object-position: center bottom; margin-top: 6px; padding-bottom: 18px; filter: drop-shadow(0 26px 30px rgba(50, 30, 110, .22)); user-select: none; }
.door { display: grid; place-items: center; padding: 28px; }
.door .auth-box {
  width: min(430px, 100%); background: var(--card); border: var(--bw) solid var(--edge); border-radius: 30px; padding: 38px 36px 30px;
  box-shadow: 0 30px 70px rgba(45, 25, 110, .22); animation: rise .45s ease both;
}
.door h2 { font-size: 34px; font-weight: 800; margin: 0 0 4px; }
.door h2 + p { margin: 0 0 24px; font-size: 15px; }
.in { display: block; margin-bottom: 16px; }
.in > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.in > div { display: flex; align-items: center; gap: 10px; direction: ltr; border: var(--bw) solid var(--line); border-radius: 16px; background: var(--panel); padding: 0 14px; transition: border-color .15s, box-shadow .15s; }
.in > div:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.in .ico { color: var(--muted); }
.in > div:focus-within > .ico { color: var(--primary); }
.door .in input { flex: 1; min-width: 0; border: 0; background: none; padding: 14px 0; font-size: 16px; box-shadow: none; }
.door .in input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 9999s; }
.in .eye { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 8px; display: grid; place-items: center; }
.in .eye:hover .ico, .in .eye.on .ico { color: var(--primary); }
.door .btn.primary { width: 100%; justify-content: center; padding: 15px; font-size: 16px; border-radius: 16px; margin-top: 4px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; margin: 20px 0 14px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn.try { width: 100%; justify-content: center; padding: 13px; border-radius: 16px; border-color: var(--line); }
.linkish { display: block; margin: 18px auto 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; }
.door .alert { margin: 0 0 16px; }
:focus-visible { outline: 3px solid var(--primary-2); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ---------- حساب جديد ---------- */
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--soft); border-radius: 16px; padding: 4px; margin-bottom: 24px; }
.auth-tabs button { font: inherit; font-size: 15px; font-weight: 600; border: 0; background: none; color: var(--ink-2); padding: 11px 8px; border-radius: 13px; cursor: pointer; transition: background .2s, color .2s; }
.auth-tabs button.on { background: var(--ink); color: var(--card); }
.auth-tabs.slim { margin-bottom: 18px; }
.auth-tabs.slim button { padding: 8px; font-size: 14px; }
.role-list { display: flex; flex-direction: column; gap: 8px; }
.role-list button { display: flex; align-items: center; gap: 14px; width: 100%; font: inherit; color: var(--ink); text-align: start; padding: 9px 14px; background: var(--panel); border: var(--bw) solid var(--line); border-radius: 18px; cursor: pointer; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.role-list button:hover { border-color: var(--edge); transform: translateY(-2px); box-shadow: 4px 4px 0 var(--edge); }
.role-list button > span:not(.gi) { flex: 1; min-width: 0; }
.role-list b { display: block; font-size: 16px; }
.role-list small { color: var(--ink-2); font-size: 13px; }
.form-top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.door .form-top h2 { font-size: 24px; margin: 0; }
.door .in { margin-bottom: 14px; }
.door .in > span small { font-weight: 400; color: var(--muted); }
.door .in > div.ar { direction: rtl; }
.door .two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.door .two .in input { width: 100%; }
#signf .in input { padding: 12px 0; }
.wait { text-align: center; }
.wait h2 { font-size: 28px; margin-top: 12px; }
.wait p { color: var(--ink-2); line-height: 1.9; margin: 0 0 20px; }
.wait .btn.try { margin-top: 10px; }
.door .otp { width: 100%; text-align: center; font-size: 30px; font-weight: 700; letter-spacing: 8px; padding: 14px 6px 14px 14px; margin-bottom: 14px; border: var(--bw) solid var(--line); border-radius: 16px; background: var(--panel); color: var(--ink); font-variant-numeric: tabular-nums; }
.door .otp:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.door .otp::placeholder { color: var(--line); }
.by-note { display: flex; align-items: center; gap: 8px; margin: -2px 0 14px; font-size: 13px; color: var(--muted); }
.by-note .ico { color: #1FA855; flex: none; }
.sure { display: inline-flex; align-items: center; gap: 3px; color: #16804A; font-weight: 600; }
[data-mode="dark"] .sure { color: #4ADE80; }
.sure .ico { color: inherit; }
.wait p.hint { font-size: 13px; color: var(--muted); margin: 16px 0 0; }
.wait p.hint + .wait-links .linkish { margin-top: 8px; }
.wait-links .linkish:disabled { opacity: .55; cursor: default; text-decoration: none; }
.wait-links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }
.wait-links .linkish { margin: 18px 0 0; }

/* ---------- المستخدمين ---------- */
.banner.view { background: var(--primary-soft); color: var(--ink); }
.who { flex: 1; min-width: 0; }
.who small { display: block; color: var(--muted); margin-top: 3px; }
.who h1, .who h2, .who h3, .who p { margin: 0; }
.code-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.code-card .who { flex: 1 1 260px; }
.code-card p { color: var(--ink-2); margin-top: 4px; line-height: 1.7; }
.code-card .code { font-size: 32px; font-weight: 800; letter-spacing: .08em; background: var(--lime-soft); border: 2px dashed var(--edge); border-radius: 16px; padding: 10px 20px; white-space: nowrap; user-select: all; }
.code-card .actions { flex: 1 0 100%; margin: 0; }
.user-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 12px; margin-bottom: 24px; }
.user-row { display: flex; align-items: center; gap: 14px; margin: 0; padding: 14px 16px; }
.user-row .tag { margin-inline-start: 4px; }
.user-row small { overflow-wrap: anywhere; }
.user-row small.red { color: var(--red); }
.user-row .ops { display: flex; gap: 6px; flex-shrink: 0; }
.user-row.ask { border-color: var(--primary); }
.user-row .who .btn { margin-top: 6px; }
.who-line { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.who-line small { display: block; }
.role-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.role-pick button { font: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 16px; border: var(--bw) solid var(--line); background: var(--card); cursor: pointer; font-size: 14px; }
.role-pick button.on { border-color: var(--edge); background: var(--lime-soft); box-shadow: 3px 3px 0 var(--edge); }
.link-q { width: 100%; margin-bottom: 8px; }
.link-list { display: flex; flex-direction: column; gap: 4px; max-height: 34vh; overflow-y: auto; border: 1px solid var(--line); border-radius: 14px; padding: 6px; }
.link-list label { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.link-list label[hidden] { display: none; }
.link-list label:hover { background: var(--soft); }
.link-list label:has(:checked) { background: var(--lime-soft); }
.link-list input { width: 18px; height: 18px; accent-color: var(--primary); }
.link-list small { display: block; color: var(--muted); }
.role-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.role-card { font: inherit; color: var(--ink); background: var(--panel); border: var(--bw) solid var(--edge); border-radius: var(--r-card); padding: 18px 16px; text-align: start; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: transform .25s var(--ease), box-shadow .25s; }
.role-card:hover { transform: translateY(-3px); box-shadow: 4px 4px 0 var(--edge); }
.role-card b { font-size: 18px; }
.role-card small { color: var(--ink-2); line-height: 1.7; }

/* ---------- واجهة ولي الأمر والسائق ---------- */
.frame.portal .search { display: none; }
.frame.portal .nav .lbl { display: inline; }
.frame.portal #main { max-width: 1120px; margin: 0 auto; }
.frame.portal .band small { display: block; margin-top: 4px; }
#page.still > * { animation: none; }
.fam { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.fam-kid { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; font: inherit; color: var(--ink); text-align: start; background: var(--card); border: 2px solid var(--line); border-radius: 16px; cursor: pointer; }
.fam-kid.on { border-color: var(--primary); background: var(--lime-soft); }
.fam-kid .nm { flex: 1; min-width: 0; }
.fam-kid b, .fam-kid small { display: block; overflow-wrap: anywhere; }
.fam-kid small { color: var(--ink-2); }
.fam-kid small.red { color: var(--red); }
.fam-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; }
.fam-sum b { font-size: 20px; }
.more-kids { margin: 12px 0 0; }
.chk-sum { padding: 12px 16px; border-radius: 14px; background: var(--soft); font-weight: 700; margin-bottom: 12px; }
.chk-sum.ok { background: var(--leaf-soft); }
.chk-sum.warn { background: var(--yellow-soft); }
.chk-sum.bad { background: var(--red-soft); }
.chk { display: flex; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.chk:last-child { border-bottom: 0; }
.chk > i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); }
.chk.ok > i { background: var(--leaf-soft); }
.chk.warn > i { background: var(--yellow-soft); }
.chk.bad > i { background: var(--red-soft); color: var(--red); }
.chk > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.chk b, .chk span, .chk small { display: block; }
.chk span { color: var(--ink-2); }
.chk.bad span { color: var(--red); }
.chk small { margin-top: 3px; }
.chk.skip { opacity: .65; }
.del-list { margin: 10px 0 14px; padding-inline-start: 20px; line-height: 1.9; }
.del-list .red { color: var(--red); }
.del-list ~ .form-grid { margin-top: 16px; }
.kid-hero { display: flex; align-items: center; gap: 18px; padding: 22px 24px; flex-wrap: wrap; }
.kid-hero h1 { font-size: 28px; }
.kid-hero .who { flex: 1 1 200px; }
.kid-hero p { color: var(--ink-2); margin-top: 4px; }
.kid-hero .now { background: var(--soft); border-radius: 16px; padding: 12px 18px; min-width: 220px; }
.kid-hero .now small { display: block; color: var(--ink-2); margin-bottom: 2px; }
.kid-hero .now b { font-size: 18px; }
.kid-hero .now.ok { background: var(--leaf-soft); }
.kid-hero .now.warn { background: var(--yellow-soft); }
.kid-hero .now.bad { background: var(--red-soft); }
.p-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(290px, 1fr); gap: 16px; align-items: start; }
.day-line { list-style: none; margin: 0; padding: 0; }
.day-line li { display: flex; align-items: center; gap: 12px; padding: 9px 0; position: relative; }
.day-line li + li::before { content: ""; position: absolute; inset-inline-start: 17px; top: -9px; height: 18px; width: 2px; background: var(--line); }
.day-line i { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--ink); flex-shrink: 0; }
.day-line b { flex: 1; font-weight: 600; }
.day-line time { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.day-line .ok i { background: var(--lime); color: #111; }
.day-line .warn i { background: var(--yellow); color: #111; }
.day-line .bad i { background: var(--red); color: #fff; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.facts > div { background: var(--soft); border-radius: 16px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.facts small { color: var(--ink-2); }
.p-note { margin: 14px 0 0; line-height: 1.9; }
.day.off { background: var(--red-soft); color: var(--red); }
.news-peek { width: 100%; display: flex; align-items: center; gap: 12px; font: inherit; color: var(--ink); text-align: start; cursor: pointer; }
.news-peek > span:not(.gi) { flex: 1; }
.news-peek small { display: block; color: var(--muted); }
.contact { display: flex; flex-wrap: wrap; gap: 8px; }
.pay-row { padding: 12px 0; align-items: center; }
.pay-row:last-child { border: 0; }
.pay-row > span { color: var(--ink); }
.pay-row small { display: block; color: var(--muted); margin-top: 2px; }
.news { display: grid; gap: 12px; max-width: 720px; }
.news .card { margin: 0; }
.news h3 { margin: 4px 0; }
.news p { margin: 0; }
.trip-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.trip-head .who { flex: 1 1 180px; }
.trip-head h2 { font-size: 26px; }
.trip-head p { color: var(--ink-2); margin-top: 4px; }
.trip-count { flex: 1 0 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.trip-count div { background: var(--soft); border-radius: 16px; padding: 10px; text-align: center; }
.trip-count .blue { background: var(--sky-soft); }
.trip-count .ok { background: var(--leaf-soft); }
.trip-count b { display: block; font-size: 28px; font-weight: 800; line-height: 1.2; }
.trip-count span { font-size: 13px; color: var(--ink-2); }
.bulk { margin-bottom: 16px; padding: 16px; font-size: 16px; border-radius: 18px; }
.stops-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.stop { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.stop .top { display: flex; align-items: center; gap: 12px; }
.stop .top b { font-size: 17px; }
.stop .top small { color: var(--ink-2); font-size: 13.5px; }
.stop .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.stop .tags:empty { display: none; }
.stop > p { margin: 0; }
.stop .acts { display: flex; gap: 8px; margin-top: auto; }
.stop .acts .btn { justify-content: center; padding: 13px 16px; font-size: 15px; }
.stop .acts .btn:first-child { flex: 1; }
.stop.on { border-color: var(--sky); }
.stop.done, .stop.no { background: var(--soft); border-color: var(--line); }
.bus-today { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 14px 20px 0; padding: 9px 12px; font-size: 13px; background: var(--sky-soft); border-radius: 12px; }

/* ---------- شاشة القفل ---------- */
.lock { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: linear-gradient(160deg, #2A2158, #17142B); padding: 20px; }
.lock-box { width: min(340px, 100%); text-align: center; background: var(--card); border-radius: 28px; padding: 30px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lock-box h2, .lock-box p { margin: 0; }
.lock-box .pin { width: 100%; text-align: center; font-size: 30px; letter-spacing: .4em; padding: 12px; margin-top: 8px; direction: ltr; }
.lock-box .btn { width: 100%; justify-content: center; padding: 13px; }
.lock-err { min-height: 20px; color: var(--red); font-size: 13px; }
.lock-box .linkish { margin-top: 4px; }
.recovery { text-align: center; font-size: 36px; font-weight: 800; letter-spacing: .12em; background: var(--lime-soft); border: 2px dashed var(--edge); border-radius: 16px; padding: 16px; margin: 14px 0; }

/* ---------- سجل التغييرات ---------- */
.log { display: flex; flex-direction: column; }
.log-row { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: start; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.log-row small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.log-row .tag { justify-content: center; }
.log-by { text-align: left; font-size: 13px; }

/* ---------- الصور ---------- */
.av.pic { overflow: hidden; background: var(--soft); }
.av.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-edit { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.photo-edit p { margin: 6px 0 0; }
.photo-box { width: 88px; height: 88px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--soft); border: var(--bw) solid var(--edge); flex-shrink: 0; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.form-sec { margin: 22px 0 12px; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 17px; }

/* ---------- الأقساط ---------- */
.plan-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.plan-chips .x { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; display: inline-grid; }
.pay-item.is-void { opacity: .65; }
.pay-item.is-void .amt { text-decoration: line-through; }
.rcpt-void { background: #FEE7EA; color: #B23246; text-align: center; font-weight: 700; padding: 8px; border-bottom: 1.5px solid #111; }
.stranger { margin-top: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.stranger summary { cursor: pointer; font-weight: 600; }
.sync-box.state-login { background: var(--yellow-soft); }
.sync-badge.s-login .dot { background: var(--yellow); }

/* أسماء الصفحات تبقى ظاهرة بقائمة المزيد بكل الأحجام */
.nav .more-menu a .lbl { display: inline !important; font-size: 14px; }

/* ---------- الموبايل (للمعلمات) ---------- */
@media (max-width: 860px) {
  .welcome-bg { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .scene { padding: 18px 20px 0; }
  .scene-text { margin-top: 12px; }
  .scene-text h1 { font-size: 24px; margin: 0; }
  .scene-text p { display: none; }
  .scene > img { height: 33vh; flex: none; margin-top: 6px; padding-bottom: 0; }
  .door { padding: 0; place-items: end stretch; }
  .door .auth-box { width: 100%; border-radius: 28px 28px 0 0; border-width: 1px 0 0; padding: 26px 22px 24px; min-height: 100%; }
  .p-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  /* إنشاء الحساب: النموذج طويل، فالرسمة تصغر */
  .welcome-bg.compact .scene > img, .welcome-bg.compact .scene-text { display: none; }
  .welcome-bg.compact .scene { padding-bottom: 16px; }
}
@media (max-width: 700px) {
  .app-wrap { padding: 0; }
  .frame { border-radius: 0; }
  .topbar { padding: 10px 14px; gap: 8px; }
  .topbar .logo { font-size: 17px; margin-inline-end: auto; }
  .topbar .logo small { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; }
  .panel { margin: 0; border-radius: 20px 20px 0 0; padding-bottom: 78px; }
  #main { padding: 18px 14px 24px; }
  .banner { margin: 12px 14px 0; flex-wrap: wrap; }
  /* القائمة تنزل جوّا الشاشة حتى يوصلها الإبهام */
  .nav { position: fixed; bottom: 0; inset-inline: 0; z-index: 30; margin: 0; justify-content: space-around; background: var(--frame); padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; }
  .nav > a, .nav .more > button { flex: 1 1 0; width: 100%; min-width: 0; min-height: 48px; padding: 7px 4px; flex-direction: column; gap: 3px; justify-content: center; }
  .nav .more { flex: 1 1 0; min-width: 0; }
  .nav .more > button .ico:last-child { display: none; }
  .nav > a .lbl, .nav .more > button .lbl { display: block !important; max-width: 100%; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #modebtn, #syncbadge .lb, .user-chip > div { display: none; }
  .top-tools { gap: 6px; }
  .nav a.active::after { display: none; }
  .more-menu { top: auto; bottom: calc(100% + 14px); }
  .page-head h1 { font-size: 24px; }
  .greet-row { margin-bottom: 18px; }
  .clock { font-size: 54px; }
  .chips-stats, .chips-stats .chip-stat { flex: 1; }
  .chips-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .focus-card { flex-direction: column; min-height: 0; }
  .focus-card .art { width: auto; height: 130px; margin: 12px 12px 0; }
  .focus-card .art .gi { --s: 112px !important; }
  .focus-card h2 { font-size: 22px; }
  .focus-card .corner { top: 22px; inset-inline-end: 22px; }
  .streak { transform: none; }
  .grid2, .grid3, .fee-top { grid-template-columns: minmax(0, 1fr) !important; }
  .toolbar > *, .toolbar input[type=search] { min-width: 0; flex: 1 1 auto; }
  .toolbar .spacer { display: none; }
  .toolbar .btn { justify-content: center; }
  .pill-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .pill-tabs button { flex-shrink: 0; }
  .band { flex-wrap: wrap; }
  .band .b-item { flex: 1 1 40%; padding: 12px 16px; }
  .band .b-item b { font-size: 19px; }
  .band .b-art { display: none; }
  .tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
  .tile { padding: 24px 6px 12px; }
  .tile .av { --s: 48px; }
  .tile b { font-size: 13px; }
  .att-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 16px; }
  .att-hero > .ring { display: none; }
  .att-hero .legend-keys { display: none; }
  .att-hero .counts { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .att-hero .cnt { padding: 8px 2px; text-align: center; }
  .att-hero .cnt b { font-size: 19px; }
  .att-hero .cnt span { font-size: 11px; }
  .att-hero > div:last-child { flex-direction: row !important; }
  .att-hero > div:last-child .btn { flex: 1; justify-content: center; }
  .report-grid, .tickets, .class-grid { grid-template-columns: minmax(0, 1fr); }
  .notebook { grid-template-columns: 1fr; }
  .notebook .side { display: none; }
  .debt { grid-template-columns: auto 1fr auto; }
  .debt .actions { grid-column: 1 / -1; }
  .modal-back { padding: 0; place-items: end stretch; }
  .modal, .modal.wide { width: 100% !important; max-height: 94vh; border-radius: 24px 24px 0 0; box-shadow: none; }
  .modal-body { padding: 16px; }
  .profile-head { flex-wrap: wrap; }
  .user-list, .stops-list { grid-template-columns: minmax(0, 1fr); }
  .user-row { flex-wrap: wrap; }
  .user-row .ops { flex: 1 0 100%; }
  .user-row .ops .btn:first-child { flex: 1; justify-content: center; }
  .code-card .code { width: 100%; text-align: center; font-size: 28px; }
  .role-cards { grid-template-columns: 1fr 1fr; }
  .kid-hero { padding: 16px; gap: 14px; }
  .kid-hero h1 { font-size: 22px; }
  .kid-hero .now { flex: 1 0 100%; }
  .trip-head .seg { flex: 1 0 100%; }
  .trip-head .seg button { flex: 1; justify-content: center; padding: 11px; }
  .trip-head .gi { --s: 72px !important; }
  .log-row { grid-template-columns: 52px 1fr; }
  .log-by { grid-column: 2; text-align: start; }
  .hbar { grid-template-columns: 92px 1fr 92px; }
  #toasts { left: 14px; right: 14px; bottom: 92px; }
}

/* ===== إضافة وإزالة أطفال الخط أو الصف ===== */
.assign-btn { flex: 1 1 100%; justify-content: center; }
.assign-bar { display: flex; gap: 8px; margin-bottom: 10px; }
.assign-bar .link-q { flex: 1; min-width: 0; margin: 0; }
.assign-bar select { flex-shrink: 0; max-width: 45%; }
.assign-cls { margin-bottom: 10px; }
.assign-all { margin-bottom: 6px; align-items: center; }
.assign-list { max-height: 40vh; margin-bottom: 14px; }
.assign-list .nm { flex: 1; min-width: 0; }
.assign-list .tag { flex-shrink: 0; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.assign-list .none { text-align: center; padding: 14px; margin: 0; }
.assign-sum { margin: 14px 0 0; }
.stops li { align-items: center; }
.stops li > small, .stops li > .tag { margin-inline-start: auto; }
.stops .rm { flex-shrink: 0; width: 32px; height: 32px; margin-block: -4px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.stops .rm:hover, .stops .rm:focus-visible { background: var(--soft); color: var(--red); }
.exp.is-void { opacity: .65; }
.exp.is-void .amt { text-decoration: line-through; }
button.tag { font: inherit; font-size: 12px; cursor: pointer; }
.forgot { margin-top: 12px; }
.forgot-how { margin: 0 0 16px; padding: 12px 34px 12px 14px; border-radius: 14px; background: var(--soft); font-size: 13px; line-height: 1.8; }
.forgot-how .linkish { display: inline; margin: 0; font-size: inherit; }
.modal .recovery { font-size: clamp(22px, 6vw, 34px); }

.user-row { flex-wrap: wrap; }
.user-row .who { flex: 1 1 170px; }
.user-row .ltr { white-space: nowrap; }

.legal-frame { width: 100%; height: min(70vh, 640px); border: 0; display: block; border-radius: 12px; background: #fff; }
.legal-note { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }
.legal-note .linkish { font-size: 13px; padding: 0; }
