/* ============================================================
   قشرة الجوال — الإدخال السريع للاستلام
   تُحمّل بعد styles.css و theme.css وتتغلب عليهما داخل هذه الصفحة فقط
   ============================================================ */

:root {
  --m-top: 7.4rem;
  --m-nav: 3.65rem;
}

* { -webkit-tap-highlight-color: transparent; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(680px 320px at 100% -8%, rgba(122, 163, 60, .13), transparent 62%),
    radial-gradient(560px 300px at 0% 108%, rgba(217, 154, 43, .10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-size: 14px;
  overscroll-behavior-y: none;
}

.hidden { display: none !important; }

/* ---------------- القشرة ---------------- */
.m-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

.m-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: calc(var(--m-top) * .18 + env(safe-area-inset-top)) 12px 11px;
  background: linear-gradient(135deg, #34713f, #1f4a28);
  color: #fff;
  border-radius: 0 0 22px 22px;
  box-shadow: 0 16px 30px -22px rgba(20, 42, 24, .9);
}

.m-row1 { display: flex; align-items: center; gap: 8px; }

.m-row1 .logo {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .3);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.m-row1 .logo svg { width: 16px; height: 16px; }

.m-row1 b {
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.m-row1 .m-sync { margin-inline-start: auto; flex: 0 0 auto; border: 0; color: #fff; cursor: pointer; }

.m-row2 { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; }
.m-row2::-webkit-scrollbar { display: none; }
.m-row2 .m-chip { flex: 0 0 auto; max-width: none; }

.m-topbar .m-brand { display: none; }

.m-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .15);
  color: #fff;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  max-width: 46vw;
}

.m-chip span.txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-chip .ico { width: 13px; height: 13px; }
.m-chip.flat { background: transparent; border-style: dashed; }

.m-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, .12);
  border-radius: 999px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, .2);
}

.m-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7ee29a;
  box-shadow: 0 0 0 3px rgba(126, 226, 154, .28);
  flex: 0 0 auto;
}

.m-dot.off { background: #ff9a7a; box-shadow: 0 0 0 3px rgba(255, 154, 122, .25); }
.m-dot.busy { background: #ffd479; box-shadow: 0 0 0 3px rgba(255, 212, 121, .25); }

/* ---------------- زر التاريخ ---------------- */
.m-datebtn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, .32);
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-radius: 14px;
  padding: 5px 11px;
  cursor: pointer;
  text-align: start;
}

.m-datebtn .ico { width: 17px; height: 17px; flex: 0 0 auto; }
.m-datebtn .m-dtxt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.m-datebtn b { font-size: 14.5px; letter-spacing: .1px; }
.m-datebtn small { font-size: 10.5px; font-weight: 800; color: #d8e9db; }

/* ---------------- لوحة التقويم ---------------- */
.m-cal { display: flex; flex-direction: column; gap: 12px; }

.m-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.m-cal-nav b { font-size: 14px; font-weight: 900; color: var(--text); }

.m-cal-arrow {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--primary);
  cursor: pointer;
  flex: 0 0 auto;
}

.m-cal-arrow .ico { width: 16px; height: 16px; }
.m-cal-arrow.next .ico { transform: rotate(180deg); }

.m-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }

.m-cal-h {
  text-align: center;
  font-size: 10px;
  font-weight: 900;
  color: var(--muted);
  padding-bottom: 2px;
}

.mc {
  position: relative;
  min-height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
}

.mc-blank { border: 0; background: transparent; cursor: default; }

.mc small {
  position: absolute;
  bottom: 3px;
  inset-inline: 0;
  text-align: center;
  font-size: 8.5px;
  font-weight: 800;
  color: var(--muted);
}

.mc.has { border-color: #bfd59b; background: #f4f9ec; }
.mc.has::after {
  content: '';
  position: absolute;
  top: 5px;
  inset-inline-end: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3f8249;
}
.mc.today:not(.sel) { box-shadow: inset 0 0 0 2px var(--accent); }
.mc.sel { background: linear-gradient(135deg, #478a51, #2a5f34); color: #fff; border-color: #2a5f34; }
.mc.sel small { color: #e2f0e4; }
.mc.sel.has::after { background: #d9a92b; }

.m-cal-today {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px;
  border-radius: 13px;
  border: 1px dashed #3f8249;
  background: #f4f9ec;
  color: #24582f;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.m-cal-today .ico { width: 15px; height: 15px; }

/* ---------------- جسم الشاشة ---------------- */
.m-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 12px calc(var(--m-nav) + 78px + env(safe-area-inset-bottom));
}

.m-view { display: none; flex-direction: column; gap: 10px; }
.m-view.on { display: flex; }

.m-note {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  background: #fffdf8;
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 11px 12px;
}

.m-note.err { border-style: solid; border-color: #f0c3bc; background: #fdf1ef; color: #a02a1e; }
.m-note.ok { border-style: solid; border-color: #bfd59b; background: #f4f9ec; color: #33632f; }
.m-note b { font-weight: 800; }

.m-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 13px 13px;
  box-shadow: var(--shadow);
}

.m-card > h3 {
  font-size: 12.5px;
  font-weight: 900;
  color: #4a5a3f;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.m-card > h3 .ico { width: 15px; height: 15px; color: var(--primary); }
.m-card > h3 .badge { margin-inline-start: auto; }

/* ---------------- البحث والأدوات ---------------- */
.m-tools { display: flex; gap: 8px; align-items: center; }

.m-search {
  flex: 1;
  position: relative;
}

.m-search input {
  width: 100%;
  padding: 11px 34px 11px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.m-search .ico {
  position: absolute;
  inset-inline-end: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}

.m-filter {
  flex: 0 0 auto;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 0 12px;
  height: 44px;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
}

.m-filter.on { border-color: #3f8249; background: #f4f9ec; color: #2c6333; }

.m-count {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--muted);
  padding: 0 2px;
}

/* ---------------- بطاقات الأصناف ---------------- */
.mi-list { display: flex; flex-direction: column; gap: 9px; }

.mi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 11px 12px 12px;
  box-shadow: var(--shadow);
  transition: border-color .18s, background .18s;
}

.mi.filled { border-color: #bfd59b; background: #f8fcf2; }
.mi.locked { opacity: .72; }

.mi-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
}

.mi-name { font-size: 14.5px; font-weight: 900; }
.mi-unit { font-size: 10.5px; font-weight: 800; color: var(--muted); }

.mi-amt {
  margin-inline-start: auto;
  font-size: 13.5px;
  font-weight: 900;
  color: #8a5a12;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.mi-amt.empty { color: #b3bcab; }

.mi-row { display: flex; align-items: center; gap: 8px; }

.stp {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid #cfdcc2;
  background: #fff;
  color: var(--primary);
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 16px -14px rgba(28, 40, 20, .9);
}

.stp:active { transform: scale(.93); }
.stp:disabled { opacity: .4; }

.stp.mini { width: 34px; height: 34px; font-size: 16px; border-radius: 11px; }

.minput {
  width: 100%;
  min-width: 0;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  padding: 10px 6px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.minput::-webkit-outer-spin-button,
.minput::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.minput[type=number] { appearance: textfield; }
.minput:focus { border-color: #9dbb74; box-shadow: 0 0 0 3px rgba(122, 163, 60, .18); outline: none; }
.minput.filled { background: #fffef9; border-color: #cddca8; }
.minput.price-alert { border-color: #e6b455; background: #fdf4e0; color: #8a5a12; }
.minput:disabled { background: #f3f4ed; color: #96a08b; }

.mi-qty { flex: 1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.mi-price { flex: 0 0 35%; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mi-price em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mi-warn {
  font-size: 10px;
  font-weight: 800;
  color: #b0741a;
  line-height: 1.5;
}

.mi-warn:empty { display: none; }

/* ---------------- الحقل السفلي الثابت ---------------- */
.m-foot {
  position: fixed;
  inset-inline: 0;
  bottom: calc(var(--m-nav) + env(safe-area-inset-bottom));
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(245, 246, 240, 0), rgba(245, 246, 240, .97) 42%);
}

.m-foot-total {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.m-foot-total span { font-size: 10.5px; font-weight: 800; color: var(--muted); }
.m-foot-total b { font-size: 20px; color: #24582f; font-variant-numeric: tabular-nums; }
.m-foot-total small { font-size: 10px; color: var(--muted); font-weight: 700; }

.m-save {
  margin-inline-start: auto;
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  font-size: 14px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, #478a51, #2a5f34);
  box-shadow: 0 16px 26px -16px rgba(47, 107, 58, .95);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.m-save:disabled { opacity: .5; }
.m-save .ico { width: 16px; height: 16px; }

/* ---------------- زر الكاميرا ---------------- */
.m-fab {
  position: fixed;
  inset-inline-start: 13px;
  bottom: calc(var(--m-nav) + 74px + env(safe-area-inset-bottom));
  z-index: 27;
  width: 52px;
  height: 52px;
  border-radius: 19px;
  border: 0;
  background: linear-gradient(135deg, #d99a2b, #b87d16);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 30px -16px rgba(184, 125, 22, .95);
  cursor: pointer;
}

.m-fab .ico { width: 23px; height: 23px; }
.m-fab.done { background: linear-gradient(135deg, #478a51, #2a5f34); }
.m-fab span.n {
  position: absolute;
  inset-inline-end: -4px;
  top: -4px;
  background: #fff;
  color: #8a5a12;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  padding: 2px 5px;
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .5);
}

/* ---------------- شريط التنقل ---------------- */
.m-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 26;
  display: flex;
  height: calc(var(--m-nav) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}

.m-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: none;
  font-size: 10.5px;
  font-weight: 800;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}

.m-nav button .ico { width: 20px; height: 20px; }
.m-nav button.on { color: var(--primary); }
.m-nav button.on::before {
  content: '';
  position: absolute;
  top: 0;
  width: 34px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: var(--primary);
}

.m-nav .n {
  position: absolute;
  inset-inline-end: 22%;
  top: 8px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9.5px;
  font-weight: 900;
  display: grid;
  place-items: center;
  padding: 0 4px;
}

/* ---------------- قائمة مراجعة اليوم ---------------- */
.m-sum { display: flex; flex-direction: column; gap: 7px; }

.m-sum-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  padding-bottom: 7px;
  border-bottom: 1px dashed var(--line);
}

.m-sum-row:last-child { border-bottom: 0; padding-bottom: 0; }
.m-sum-row span.u { font-size: 10px; color: var(--muted); font-weight: 800; }
.m-sum-row b.q { margin-inline-start: auto; font-variant-numeric: tabular-nums; }
.m-sum-row b.p { color: var(--muted); font-weight: 800; font-variant-numeric: tabular-nums; min-width: 58px; text-align: center; }
.m-sum-row b.a { color: #8a5a12; font-weight: 900; font-variant-numeric: tabular-nums; min-width: 62px; text-align: end; }
.m-sum-row.tot { border-top: 1px solid var(--line); padding-top: 9px; font-weight: 900; color: var(--primary); }

/* ---------------- الأسطر المفتاح/القيمة ---------------- */
.m-kv { display: flex; flex-direction: column; gap: 9px; }
.m-kv > div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.m-kv > div span { color: var(--muted); font-weight: 800; min-width: 74px; }
.m-kv > div b { font-weight: 900; }
.m-kv > div .badge { margin-inline-start: auto; }

/* ---------------- التعارضات ---------------- */
.m-conf {
  border: 1px solid #f0c3bc;
  background: #fdf1ef;
  border-radius: 16px;
  padding: 11px 12px;
}

.m-conf h4 { font-size: 12.5px; font-weight: 900; color: #a02a1e; margin-bottom: 4px; }
.m-conf .vals { font-size: 11.5px; line-height: 1.85; color: #6b3b34; font-weight: 700; }
.m-conf .vals i { font-style: normal; color: #2c6333; }
.m-conf .acts { display: flex; gap: 7px; margin-top: 9px; }
.m-conf .acts .btn { flex: 1; }

/* ---------------- الأزرار الصغيرة ---------------- */
.m-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.m-actions .btn { flex: 1; min-width: 132px; justify-content: center; }
.btn.tall { padding: 12px 14px; font-size: 13px; border-radius: 14px; font-weight: 800; }

/* ---------------- اللوحة السفلية (sheet) ---------------- */
.m-sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(24, 32, 20, .44);
  display: flex;
  align-items: flex-end;
  animation: mfade .16s ease-out;
}

@keyframes mfade { from { opacity: 0; } to { opacity: 1; } }

.m-sheet {
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  background: #fffdf8;
  border-radius: 24px 24px 0 0;
  padding: 16px 16px calc(20px + env(safe-area-inset-bottom));
  animation: mup .2s ease-out;
}

@keyframes mup { from { transform: translateY(24px); } to { transform: translateY(0); } }

.m-sheet::before {
  content: '';
  display: block;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #dfe4d5;
  margin: 0 auto 12px;
}

.m-sheet h3 { font-size: 14px; font-weight: 900; margin-bottom: 12px; }

.m-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 13px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 8px;
  text-align: start;
}

.m-opt small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.m-opt .ico { width: 16px; height: 16px; color: var(--primary); }
.m-opt.on { border-color: #3f8249; background: #f4f9ec; color: #24582f; }
.m-opt.danger { color: #a02a1e; border-color: #f0c3bc; }
.m-opt.danger .ico { color: #a02a1e; }

/* ---------------- الدخول ---------------- */
.m-auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.m-auth .aurora { position: absolute; inset: -20%; filter: blur(60px); opacity: .5; }
.m-auth .aurora i { position: absolute; border-radius: 50%; display: block; }
.m-auth .aurora i:nth-child(1) { width: 60%; padding-bottom: 60%; background: rgba(122, 163, 60, .55); inset-inline-start: -10%; top: -8%; }
.m-auth .aurora i:nth-child(2) { width: 52%; padding-bottom: 52%; background: rgba(217, 154, 43, .42); inset-inline-end: -12%; bottom: -6%; }
.m-auth .aurora i:nth-child(3) { width: 38%; padding-bottom: 38%; background: rgba(63, 130, 73, .35); inset-inline-start: 28%; top: 44%; }

.m-authcard {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: rgba(255, 253, 248, .78);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 26px;
  padding: 22px 20px 20px;
  box-shadow: 0 40px 80px -50px rgba(20, 42, 24, .75);
}

.m-authcard .logo {
  width: 54px;
  height: 54px;
  border-radius: 19px;
  background: linear-gradient(135deg, #478a51, #245030);
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  box-shadow: 0 18px 30px -18px rgba(47, 107, 58, .9);
}

.m-authcard .logo svg { width: 30px; height: 30px; }
.m-authcard h1 { font-size: 19px; font-weight: 900; }
.m-authcard p.sub { font-size: 12px; color: var(--muted); font-weight: 700; margin: 3px 0 16px; }
.m-authcard .row { margin-bottom: 12px; }
.m-authcard label { font-size: 11.5px; font-weight: 800; color: #55644a; margin-bottom: 5px; }
.m-authcard input, .m-authcard select { padding: 12px; font-size: 15px; border-radius: 13px; }
.m-authcard .btn { width: 100%; justify-content: center; padding: 13px; font-size: 15px; border-radius: 14px; font-weight: 900; }

.m-authfoot {
  margin-top: 14px;
  font-size: 11px;
  line-height: 1.8;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.m-switch {
  background: none;
  border: 0;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 900;
  text-decoration: underline;
  cursor: pointer;
  padding: 6px 0;
  width: 100%;
}

.m-msg {
  font-size: 12px;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: none;
}

.m-msg.show { display: block; }
.m-msg.error { background: #fdf1ef; color: #a02a1e; border: 1px solid #f0c3bc; }
.m-msg.info { background: #f4f9ec; color: #2c6333; border: 1px solid #bfd59b; }

/* ---------------- التنبيه ---------------- */
.toast {
  bottom: calc(var(--m-nav) + 12px + env(safe-area-inset-bottom));
  width: max-content;
  max-width: 92vw;
  z-index: 60;
  border-radius: 14px;
  font-size: 12.5px;
  padding: 12px 16px;
}

@media (min-width: 720px) {
  .m-shell, .m-auth { max-width: 520px; margin: 0 auto; }
  .m-shell { box-shadow: 0 0 90px -40px rgba(20, 42, 24, .35); border-radius: 0 0 26px 26px; overflow: hidden; }
  .m-topbar, .m-foot, .m-nav, .m-fab { max-width: 520px; inset-inline: 0; margin-inline: auto; }
}

/* الحقل السفلي وزر الكاميرا خاصان بشاشة الإدخال */
#appView:not([data-view="entry"]) .m-foot,
#appView:not([data-view="entry"]) .m-fab { display: none; }

#appView:not([data-view="entry"]) .m-body { padding-bottom: calc(var(--m-nav) + 18px + env(safe-area-inset-bottom)); }

.m-search input[type=search] { padding-inline-end: 34px; }
.m-search input::-webkit-search-cancel-button { -webkit-appearance: none; }

.m-filter .ico { width: 13px; height: 13px; vertical-align: -2px; }

/* ---------------- قائمة السجلات (خضار / غاز / مياه) ---------------- */
#appView[data-view="choose"] .m-topbar,
#appView[data-view="choose"] .m-nav { display: none; }

#appView[data-view="choose"] .m-body {
  padding-top: 16px;
  padding-bottom: calc(22px + env(safe-area-inset-bottom));
}

.m-choose-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  text-align: center;
  padding: 4px 4px 2px;
}

.m-choose-ico {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, #4d8a3f, #2f6b3a);
  box-shadow: 0 12px 26px -14px rgba(31, 74, 38, .7);
}

.m-choose-ico .ico { width: 26px; height: 26px; }
.m-choose-head h2 { margin: 0; font-size: 19px; font-weight: 900; color: #264a2b; }
.m-choose-head p { margin: 0; font-size: 12.5px; line-height: 1.8; color: var(--muted); max-width: 32ch; }
.m-choose-head .m-chip { background: #fff; color: var(--text); border: 1px solid var(--line); }

.m-streams { display: grid; gap: 10px; margin-top: 14px; }

.m-stream {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "ico name" "ico hint";
  gap: 3px 12px;
  align-items: center;
  text-align: start;
  padding: 15px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}

.m-stream:active { transform: scale(.985); }
.m-stream .ico { grid-area: ico; width: 26px; height: 26px; color: var(--primary); }
.m-stream b { grid-area: name; font-size: 15.5px; font-weight: 900; color: #2c4b30; }
.m-stream small { grid-area: hint; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.m-stream.on { border-color: #bfd59b; background: #f6faef; }
