/* پوستهٔ مرغدار (موبایل‌اول) — پیشوند .fm- ؛ فقط توکن‌ها */
.fm { display: flex; flex-direction: column; gap: var(--s4); font-size: var(--fs-lg); line-height: 1.6; }
.fm.has-bar { padding-bottom: 120px; }
.fm-title { display: flex; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; }
.fm-title h1 { font-size: 22px; font-weight: 800; letter-spacing: -.2px; }
.fm-title .sub { color: var(--ink-2); font-size: var(--fs-md); width: 100%; margin-top: -4px; }
.fm-title .act { margin-inline-start: auto; }

/* کارت پایه */
.fm-card { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--r-modal); padding: var(--s4); min-width: 0; }
.fm-card.soft { background: var(--bg-sunken); border-color: transparent; }
.fm-card.brand { background: var(--brand-soft); border-color: transparent; }
.fm-card-h { display: flex; align-items: center; gap: 10px; margin-bottom: var(--s3); }
.fm-card-h h2 { font-size: 17px; font-weight: 750; line-height: 1.35; }
.fm-card-h .sub { display: block; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 500; }
.fm-card-h .act { margin-inline-start: auto; display: flex; gap: 6px; align-items: center; }
.fm-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-soft); color: var(--brand-strong); }
.fm-ico.ok { background: var(--ok-soft); color: var(--ok-ink); }
.fm-ico.warn { background: var(--warn-soft); color: var(--warn-ink); }
.fm-ico.serious { background: var(--serious-soft); color: var(--serious-ink); }
.fm-ico.critical { background: var(--critical-soft); color: var(--critical-ink); }
.fm-ico.info { background: var(--info-soft); color: var(--bank); }
.fm-ico.bank { background: var(--bank-soft); color: var(--bank-strong); }
.fm-ico.lg { width: 52px; height: 52px; border-radius: 16px; }
.fm-ico.lg .ic { width: 26px; height: 26px; }
.fm-link { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; font-weight: 650; font-size: var(--fs-md); }
.fm-muted { color: var(--ink-2); font-size: var(--fs-md); }
.fm-faint { color: var(--ink-3); font-size: var(--fs-sm); }
.fm-sec { font-size: var(--fs-sm); font-weight: 700; color: var(--ink-3); margin: var(--s2) 2px calc(-1 * var(--s2)); }
.fm-btn { min-height: 48px; height: auto; padding: 8px 18px; border-radius: 12px; font-size: 15px; font-weight: 700; }
.fm-btn.xl { min-height: 56px; border-radius: 14px; font-size: 17px; width: 100%; }
.fm-btn.block { width: 100%; }
.fm-row { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; }
.fm-row.between { justify-content: space-between; }
.fm-divider { border-top: 1px dashed var(--line); margin: var(--s3) 0; }

/* سربرگ خانه */
.fm-hello { display: flex; align-items: center; gap: var(--s3); }
.fm-hello .h-txt { flex: 1; min-width: 0; }
.fm-hello .h-hi { font-size: var(--fs-md); color: var(--ink-2); }
.fm-hello .h-name { font-size: 22px; font-weight: 800; line-height: 1.3; }
.fm-hello .h-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.fm-score { display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: inherit; min-width: 72px; min-height: 48px; }
.fm-score .s-rank { font-size: 11px; color: var(--ink-2); font-weight: 650; white-space: nowrap; }
.fm-score:hover { text-decoration: none; }

/* کارت دوره */
.fm-cyc { position: relative; overflow: hidden; border-radius: 20px; padding: 18px var(--s4) var(--s4); color: var(--ink-inverse);
  background: radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--ink-inverse) 14%, transparent) 0, transparent 46%), linear-gradient(155deg, var(--brand) 0%, var(--brand-deep) 100%); }
.fm-cyc a { color: inherit; }
.fm-cyc .c-top { display: flex; align-items: flex-start; gap: var(--s3); }
.fm-cyc .c-lbl { font-size: var(--fs-sm); opacity: .85; }
.fm-cyc .c-day { font-size: 30px; font-weight: 800; line-height: 1.2; letter-spacing: -.4px; }
.fm-cyc .c-day small { font-size: 15px; font-weight: 600; opacity: .8; margin-inline-start: 4px; }
.fm-cyc .c-left { margin-inline-start: auto; text-align: left; }
.fm-cyc .c-left b { display: block; font-size: 22px; font-weight: 800; line-height: 1.2; }
.fm-cyc .c-left span { font-size: var(--fs-xs); opacity: .85; }
.fm-track { position: relative; height: 12px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink-inverse) 20%, transparent); margin: 18px 0 8px; }
.fm-track > i { position: absolute; top: 0; bottom: 0; right: 0; border-radius: var(--r-pill); background: var(--ink-inverse); }
.fm-track .tk { position: absolute; top: 50%; width: 9px; height: 9px; margin: -4.5px -4.5px 0 0; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--brand-deep); }
.fm-track .tk.vet { background: var(--info-soft); }
.fm-track .tk.done { opacity: .45; }
.fm-track .now { position: absolute; top: 50%; width: 24px; height: 24px; margin: -12px -12px 0 0; border-radius: 50%; background: var(--ink-inverse); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ink-inverse) 30%, transparent); display: grid; place-items: center; color: var(--brand-strong); }
.fm-track .now .ic { width: 14px; height: 14px; }
.fm-track-lg { display: flex; justify-content: space-between; font-size: 11px; opacity: .9; gap: 8px; flex-wrap: wrap; }
.fm-track-lg i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-inline-end: 4px; }
.fm-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: var(--s4); }
.fm-stat { background: var(--bg-panel); color: var(--ink); border-radius: 14px; padding: 12px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fm-stat .s-l { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; }
.fm-stat .s-l .ic { width: 16px; height: 16px; color: var(--brand); }
.fm-stat .s-v { font-size: 26px; font-weight: 800; line-height: 1.2; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.fm-stat .s-v small { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-inline-start: 4px; letter-spacing: 0; }
.fm-stat .s-f { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.fm-st { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; font-size: var(--fs-xs); font-weight: 700; border-radius: var(--r-pill); padding: 2px 8px; line-height: 1.6; max-width: 100%; }
.fm-st .ic { width: 13px; height: 13px; }
/* هم‌نام با .fm-st صفحهٔ مرغداری‌ها (pages-chain-ops)؛ در اپ مرغدار افقی بماند */
.fapp .fm-st { display: inline-flex; flex-direction: row; min-width: 0; }
.fm-st.ok { background: var(--ok-soft); color: var(--ok-ink); }
.fm-st.warn { background: var(--warn-soft); color: var(--warn-ink); }
.fm-st.serious { background: var(--serious-soft); color: var(--serious-ink); }
.fm-st.critical { background: var(--critical-soft); color: var(--critical-ink); }
.fm-st.info { background: var(--info-soft); color: var(--bank-strong); }
.fm-st.brand { background: var(--brand-soft); color: var(--brand-strong); }
.fm-st.neutral { background: var(--bg-sunken); color: var(--ink-2); }

/* کارهای امروز */
.fm-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-task { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: 10px 12px; border-radius: 14px; background: var(--bg-sunken); color: var(--ink); text-decoration: none; }
a.fm-task:hover { text-decoration: none; background: var(--bg-hover); }
.fm-task .t-ck { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; background: var(--bg-panel); color: var(--ink-3); }
.fm-task .t-ck .ic { width: 16px; height: 16px; }
.fm-task.done .t-ck { background: var(--ok); border-color: var(--ok); color: var(--ink-inverse); }
.fm-task.done .t-t { color: var(--ink-2); }
.fm-task .t-b { flex: 1; min-width: 0; }
.fm-task .t-t { font-weight: 700; font-size: 15px; line-height: 1.45; }
.fm-task .t-m { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }
.fm-task .t-go { color: var(--ink-3); flex: none; }
.fm-task.hot { background: var(--warn-soft); box-shadow: inset 0 0 0 2px var(--warn); }
.fm-task.hot .t-ck { border-color: var(--warn-ink); color: var(--warn-ink); }
.fm-task.hot .t-go { color: var(--warn-ink); }

/* سیلو و کفاف دان */
.fm-feed { display: flex; gap: var(--s4); align-items: flex-end; }
.fm-silos { display: flex; gap: 12px; flex: none; }
.fm-silo { display: flex; flex-direction: column; align-items: center; gap: 0; width: 64px; }
.fm-silo .sl-roof { width: 0; height: 0; border-inline: 29px solid transparent; border-bottom: 14px solid var(--line-strong); }
.fm-silo .sl-tank { position: relative; width: 58px; height: 108px; border-radius: 4px 4px 14px 14px; background: var(--bg-sunken); border: 2px solid var(--line-strong); overflow: hidden; }
.fm-silo .sl-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ok); }
.fm-silo .sl-fill.warn { background: var(--warn); }
.fm-silo .sl-fill.critical { background: var(--critical); }
.fm-silo .sl-fill::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: color-mix(in srgb, var(--ink-inverse) 45%, transparent); }
.fm-silo .sl-pct { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--ink); text-shadow: 0 0 4px var(--bg-panel), 0 0 2px var(--bg-panel); }
.fm-silo .sl-legs { width: 44px; height: 10px; border-inline: 3px solid var(--line-strong); }
.fm-silo .sl-n { font-size: var(--fs-xs); color: var(--ink-2); text-align: center; line-height: 1.4; margin-top: 4px; }
.fm-cover { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-cover .cv-v { font-size: 34px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.fm-cover .cv-v small { font-size: 15px; font-weight: 650; color: var(--ink-2); margin-inline-start: 4px; }
.fm-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fm-days span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--ink-2); }
.fm-days span i { display: block; width: 100%; height: 22px; border-radius: 6px; background: var(--bg-sunken); border: 1.5px dashed var(--critical); }
.fm-days span.today { color: var(--brand-strong); font-weight: 800; }
.fm-days span.on i { background: var(--ok); border: 1.5px solid var(--ok); }
.fm-days span.part i { border: 1.5px solid var(--warn); background: linear-gradient(to left, var(--warn) var(--p, 50%), var(--bg-sunken) var(--p, 50%)); }

/* پیش‌بینی */
.fm-fc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-fc > div { background: var(--bg-sunken); border-radius: 14px; padding: 12px; min-width: 0; }
.fm-fc .f-l { font-size: var(--fs-sm); color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.fm-fc .f-v { font-size: 21px; font-weight: 800; line-height: 1.35; letter-spacing: -.3px; }
.fm-fc .f-s { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.6; }
.fm-fc .wide { grid-column: 1 / -1; }
.fm-fc .money { background: var(--brand-soft); }
.fm-fc .money .f-v { font-size: 27px; color: var(--brand-strong); }
.fm-scene { margin-top: var(--s3); border-radius: 14px; overflow: hidden; background: var(--sc-ground); }
.fm-scene svg { display: block; width: 100%; height: auto; }

/* دکمهٔ شناور و نوار ثبت */
.fab.fm-fab { bottom: 76px; }
.fm-bar { position: fixed; z-index: 24; bottom: 60px; right: 0; left: 0; max-width: 560px; margin: 0 auto; padding: 10px var(--s4) 12px; background: color-mix(in srgb, var(--bg-panel) 95%, transparent); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px color-mix(in srgb, var(--ink) 8%, transparent); display: flex; flex-direction: column; gap: 6px; }
.fm-bar .b-prog { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--ink-2); }
.fm-bar .b-prog .bar { flex: 1; height: 6px; }

/* فرم ثبت روزانه */
.fm-dayhead { display: flex; align-items: center; gap: var(--s3); }
.fm-dayhead .d-badge { width: 62px; height: 62px; border-radius: 18px; background: var(--brand); color: var(--brand-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; flex: none; }
.fm-dayhead .d-badge b { font-size: 25px; font-weight: 800; }
.fm-dayhead .d-badge span { font-size: 11px; opacity: .9; }
.fm-dayhead .d-badge.late { background: var(--warn); color: var(--ink); }
.fm-dayhead h1 { font-size: 21px; font-weight: 800; }
.fm-dayhead .d-sub { font-size: var(--fs-sm); color: var(--ink-2); }
.fm-recent { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-recent span { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); border-radius: var(--r-pill); padding: 3px 10px; background: var(--bg-sunken); color: var(--ink-2); font-weight: 600; }
.fm-recent span.ok { background: var(--ok-soft); color: var(--ok-ink); }
.fm-recent span.late { background: var(--warn-soft); color: var(--warn-ink); }
.fm-recent span.miss { background: var(--critical-soft); color: var(--critical-ink); }
.fm-recent .ic { width: 13px; height: 13px; }
.fm-fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fm-fld + .fm-fld { margin-top: var(--s4); }
.fm-fld > label, .fm-fld .lbl { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fm-fld .opt { font-size: var(--fs-xs); font-weight: 500; color: var(--ink-3); }
.fm-fld.req > label::after, .fm-fld.req .lbl::after { content: '*'; color: var(--critical-ink); }
.fm-fld .help { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.5; }
.fm-inp { display: flex; align-items: center; min-height: 56px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: var(--bg-panel); padding: 0 12px; gap: 8px; }
.fm-inp:focus-within { border-color: var(--focus); outline: 2px solid var(--focus); outline-offset: 0; }
.fm-inp input { flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; height: 52px; font-size: 21px; font-weight: 750; text-align: left; font-variant-numeric: tabular-nums; }
.fm-inp input:focus { outline: none; }
.fm-inp .u { font-size: var(--fs-sm); color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.fm-inp > .ic { color: var(--ink-3); }
.fm-fld.err .fm-inp, .fm-fld.err .fm-step, .fm-fld.err .fm-ta { border-color: var(--critical); }
.fm-err { font-size: var(--fs-sm); color: var(--critical-ink); font-weight: 600; display: flex; gap: 6px; align-items: flex-start; }
.fm-err .ic { margin-top: 3px; width: 15px; height: 15px; }
.fm-ta { width: 100%; min-height: 84px; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 10px 12px; background: var(--bg-panel); font-size: var(--fs-lg); resize: vertical; }
.fm-ta:focus { outline: 2px solid var(--focus); border-color: var(--focus); }
.fm-sel { width: 100%; min-height: 52px; border: 1.5px solid var(--line-strong); border-radius: 12px; padding: 0 12px; background: var(--bg-panel); font-size: var(--fs-lg); }
.fm-step { display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; gap: 8px; border: 1.5px solid var(--line-strong); border-radius: 16px; padding: 6px; background: var(--bg-panel); }
.fm-step button { height: 60px; border-radius: 12px; border: 0; background: var(--bg-sunken); color: var(--ink); display: grid; place-items: center; }
.fm-step button:active { background: var(--brand-soft); }
.fm-step button .ic { width: 26px; height: 26px; stroke-width: 2.2; }
.fm-step input { border: 0; background: transparent; text-align: center; font-size: 36px; font-weight: 800; height: 60px; min-width: 0; width: 100%; font-variant-numeric: tabular-nums; }
.fm-step input:focus { outline: 2px solid var(--focus); border-radius: 10px; }
.fm-step.sm { grid-template-columns: 52px minmax(0, 1fr) 52px; border-radius: 14px; }
.fm-step.sm button { height: 48px; }
.fm-step.sm input { font-size: 24px; height: 48px; }
.fm-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-pair .fm-fld + .fm-fld { margin-top: 0; }
.fm-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.fm-pill { min-height: 48px; padding: 0 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--bg-panel); font-size: var(--fs-md); font-weight: 650; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fm-pill .ic { width: 16px; height: 16px; }
.fm-pill:hover { border-color: var(--brand); color: var(--brand-strong); }
.fm-pill[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.fm-pill.sm { min-height: 40px; font-size: var(--fs-sm); padding: 0 12px; }
.fm-hint { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; font-size: var(--fs-md); line-height: 1.55; }
.fm-hint .ic { margin-top: 2px; flex: none; }
.fm-hint.ok { background: var(--ok-soft); color: var(--ok-ink); }
.fm-hint.warn { background: var(--warn-soft); color: var(--warn-ink); }
.fm-hint.critical { background: var(--critical-soft); color: var(--critical-ink); }
.fm-hint.info { background: var(--info-soft); color: var(--bank-strong); }
.fm-hint .h-b { flex: 1; min-width: 0; }
.fm-hint .h-b .btn { margin-top: 8px; }
.fm-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-photos button { aspect-ratio: 1; min-height: 48px; border: 1.5px dashed var(--line-strong); border-radius: 12px; background: var(--bg-sunken); color: var(--ink-3); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: var(--fs-xs); }
.fm-photos button.has { border-style: solid; border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); }
.fm-guide { display: flex; gap: 10px; align-items: center; background: var(--info-soft); color: var(--bank-strong); border-radius: 12px; padding: 10px 12px; font-size: var(--fs-sm); line-height: 1.6; }
.fm-guide .ic { flex: none; }
.fm-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

/* کارت خلاصهٔ ثبت */
.fm-done { border-radius: 20px; padding: 20px var(--s4); background: var(--ok-soft); display: flex; flex-direction: column; gap: var(--s3); }
.fm-done .d-top { display: flex; gap: var(--s3); align-items: center; }
.fm-done .d-ok { width: 56px; height: 56px; border-radius: 50%; background: var(--ok); color: var(--ink-inverse); display: grid; place-items: center; flex: none; animation: fm-pop .2s ease-out; }
.fm-done .d-ok .ic { width: 30px; height: 30px; stroke-width: 2.6; }
.fm-done h2 { font-size: 19px; font-weight: 800; color: var(--ok-ink); line-height: 1.4; }
.fm-done .d-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fm-done .d-grid > div { background: var(--bg-panel); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fm-done .d-grid .l { font-size: var(--fs-xs); color: var(--ink-2); }
.fm-done .d-grid .v { font-size: 22px; font-weight: 800; line-height: 1.3; }
@keyframes fm-pop { from { transform: scale(.6); opacity: 0; } }

/* درخواست‌ها */
.fm-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-act { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 136px; padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--bg-panel); text-align: right; color: var(--ink); }
.fm-act:hover { border-color: var(--brand); background: var(--bg-hover); }
.fm-act .a-t { font-weight: 800; font-size: 16px; line-height: 1.35; }
.fm-act .a-s { font-size: var(--fs-xs); color: var(--ink-2); line-height: 1.55; }
.fm-act .a-s b { color: var(--brand-strong); }
.fm-reqs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fm-req { background: var(--bg-panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }
.fm-req .r-h { display: flex; gap: 10px; align-items: center; }
.fm-req .r-b { flex: 1; min-width: 0; }
.fm-req .r-t { font-weight: 750; font-size: 15px; line-height: 1.4; }
.fm-req .r-m { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }
.fm-req .r-h .fm-st { align-self: flex-start; flex: none; }
.fm-steps { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); }
.fm-steps .s { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.3; }
.fm-steps .s::before { content: ''; position: absolute; top: 9px; left: 50%; width: 100%; height: 3px; background: var(--line); }
.fm-steps .s:first-child::before { display: none; }
.fm-steps .s i { position: relative; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-panel); border: 2px solid var(--line-strong); display: grid; place-items: center; }
.fm-steps .s i .ic { width: 12px; height: 12px; stroke-width: 2.6; }
.fm-steps .s.done::before, .fm-steps .s.on::before { background: var(--brand); }
.fm-steps .s.done i { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.fm-steps .s.on i { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.fm-steps .s.on { color: var(--ink); font-weight: 700; }
.fm-calc { background: var(--brand-soft); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-md); }
.fm-calc .c-r { display: flex; justify-content: space-between; gap: 8px; }
.fm-calc .c-r b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fm-calc .c-r.tot { border-top: 1px dashed var(--brand); padding-top: 6px; margin-top: 2px; font-weight: 800; color: var(--brand-strong); font-size: var(--fs-lg); }
.fm-modal { display: flex; flex-direction: column; gap: var(--s4); font-size: var(--fs-lg); }

/* مالی */
.fm-switch { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--bg-sunken); border-radius: 14px; padding: 4px; gap: 4px; }
.fm-switch a { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; color: var(--ink-2); font-weight: 700; text-decoration: none; font-size: 15px; }
.fm-switch a.on { background: var(--bg-panel); color: var(--brand-strong); box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 14%, transparent); }
.fm-switch a:hover { text-decoration: none; }
.fm-money { border-radius: 20px; padding: 18px var(--s4); color: var(--ink-inverse); background: radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--ink-inverse) 14%, transparent) 0, transparent 50%), linear-gradient(155deg, var(--brand) 0%, var(--brand-deep) 100%); display: flex; flex-direction: column; gap: 6px; }
.fm-money.bank { background: radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--ink-inverse) 14%, transparent) 0, transparent 50%), linear-gradient(155deg, var(--bank) 0%, var(--bank-deep) 100%); }
.fm-money .m-l { font-size: var(--fs-sm); opacity: .88; display: flex; gap: 6px; align-items: center; }
.fm-money .m-v { font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -.5px; }
.fm-money .m-v small { font-size: 15px; font-weight: 600; opacity: .85; margin-inline-start: 4px; letter-spacing: 0; }
.fm-money .m-s { font-size: var(--fs-sm); opacity: .9; }
.fm-money .m-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.fm-money .m-row > div { background: color-mix(in srgb, var(--ink-inverse) 13%, transparent); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.fm-money .m-row .l { font-size: 11px; opacity: .88; }
.fm-money .m-row .v { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-stls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fm-stl { width: 100%; text-align: right; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.fm-stl:hover { border-color: var(--brand); }
.fm-stl .s-h { display: flex; align-items: center; gap: 10px; width: 100%; }
.fm-stl .s-hb { flex: 1; min-width: 0; }
.fm-stl .s-t { font-weight: 800; font-size: 15px; }
.fm-stl .s-d { font-size: var(--fs-xs); color: var(--ink-2); }
.fm-stl .s-net { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; width: 100%; }
.fm-stl .s-net b { font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.fm-stl .s-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; font-size: var(--fs-xs); color: var(--ink-2); width: 100%; }
.fm-stl .s-g b { display: block; font-size: var(--fs-sm); color: var(--ink); }
.fm-flow { list-style: none; margin: 0; padding: 0; counter-reset: fm; display: flex; flex-direction: column; gap: 12px; }
.fm-flow li { counter-increment: fm; position: relative; padding-inline-start: 40px; min-height: 30px; }
.fm-flow li::before { content: counter(fm, persian); position: absolute; right: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; display: grid; place-items: center; font-size: var(--fs-sm); }
.fm-flow .f-t { font-weight: 700; font-size: 15px; }
.fm-flow .f-m { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.7; }
.fm-flow .f-v { font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; }
.fm-flow li.tot::before { background: var(--brand); color: var(--brand-ink); }
.fm-flow li.tot .f-v { font-size: 22px; color: var(--brand-strong); }
.fm-costs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-costs .fm-fld + .fm-fld { margin-top: 0; }
.fm-costs .fm-inp { min-height: 50px; }
.fm-costs .fm-inp input { font-size: 18px; height: 46px; }
.fm-costs .fm-fld > label { font-size: var(--fs-sm); }
.fm-loan { display: flex; flex-direction: column; gap: var(--s3); }
.fm-inst { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fm-inst li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); min-height: 56px; }
.fm-inst li:last-child { border-bottom: 0; }
.fm-inst .i-n { width: 32px; height: 32px; border-radius: 10px; background: var(--bg-sunken); display: grid; place-items: center; font-weight: 800; font-size: var(--fs-sm); flex: none; }
.fm-inst li.paid .i-n { background: var(--ok-soft); color: var(--ok-ink); }
.fm-inst li.late .i-n { background: var(--critical-soft); color: var(--critical-ink); }
.fm-inst li.next .i-n { background: var(--brand); color: var(--brand-ink); }
.fm-inst .i-b { flex: 1; min-width: 0; }
.fm-inst .i-t { font-weight: 700; font-size: 15px; }
.fm-inst .i-m { font-size: var(--fs-xs); color: var(--ink-2); }
.fm-kgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.fm-kgrid > div { background: var(--bg-sunken); border-radius: 12px; padding: 8px 12px; min-width: 0; }
.fm-kgrid .l { font-size: var(--fs-xs); color: var(--ink-2); }
.fm-kgrid .v { font-size: 17px; font-weight: 800; }

/* بیشتر */
.fm-menu { list-style: none; margin: 0; padding: 0; background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--r-modal); overflow: hidden; }
.fm-menu li + li { border-top: 1px solid var(--line); }
.fm-menu a, .fm-menu button { display: flex; align-items: center; gap: var(--s3); min-height: 72px; padding: 10px 14px; color: var(--ink); text-decoration: none; width: 100%; border: 0; background: transparent; text-align: right; }
.fm-menu a:hover, .fm-menu button:hover { background: var(--bg-hover); text-decoration: none; }
.fm-menu .m-b { flex: 1; min-width: 0; }
.fm-menu .m-t { font-weight: 750; font-size: 16px; }
.fm-menu .m-s { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.5; }
.fm-menu .m-go { color: var(--ink-3); }
.fm-menu .danger .m-t { color: var(--critical-ink); }
.fm-profile { display: flex; gap: var(--s3); align-items: center; }
.fm-avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 22px; font-weight: 800; flex: none; }

/* قرارداد */
.fm-rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fm-rules li { display: flex; gap: 12px; align-items: flex-start; }
.fm-rules li .fm-ico { width: 36px; height: 36px; border-radius: 10px; }
.fm-rules .r-t { font-size: 15px; line-height: 1.75; min-width: 0; }
.fm-rules .r-t b { font-weight: 800; }
.fm-big { font-size: 34px; font-weight: 800; letter-spacing: -.6px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.fm-big small { font-size: 15px; font-weight: 650; color: var(--ink-2); margin-inline-start: 4px; letter-spacing: 0; }
.fm-range { display: flex; flex-direction: column; gap: 0; }
.fm-range .r-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fm-range .r-h label { font-weight: 700; font-size: 15px; }
.fm-range .r-h b { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fm-range input[type=range] { height: 48px; margin: 0; }
.fm-range .r-s { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-3); margin-top: -6px; }
.fm-curve { width: 100%; height: auto; display: block; }
.fm-curve .gl { stroke: var(--chart-grid); stroke-width: 1; }
.fm-curve .ln { stroke: var(--series-1); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.fm-curve .area { fill: color-mix(in srgb, var(--series-1) 12%, transparent); }
.fm-curve .dot { fill: var(--series-1); stroke: var(--bg-panel); stroke-width: 3; }
.fm-curve .tgt { stroke: var(--series-2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.fm-curve text { font-size: 11px; fill: var(--ink-3); font-family: var(--font); }
.fm-curve text.lb { fill: var(--series-2); font-weight: 700; }
.fm-curve text.cur { fill: var(--series-1); font-weight: 800; font-size: 12px; }
.fm-cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fm-cols2 > div { border-radius: 14px; padding: 12px; background: var(--bg-sunken); min-width: 0; }
.fm-cols2 h3 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.fm-cols2 ul { margin: 0; padding: 0 16px 0 0; font-size: var(--fs-sm); line-height: 1.75; color: var(--ink-2); }
.fm-cols2 > .me { background: var(--brand-soft); }
.fm-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.65; }
.fm-checks li > .ic { color: var(--ok-ink); margin-top: 4px; flex: none; }
.fm-checks li.no > .ic { color: var(--warn-ink); }

/* نوسازی */
.fm-tier { border-radius: 18px; border: 1px solid var(--line); background: var(--bg-panel); overflow: hidden; }
.fm-tier .t-h { padding: 14px var(--s4); display: flex; gap: 10px; align-items: center; background: var(--bg-sunken); }
.fm-tier.rec { border: 2px solid var(--brand); }
.fm-tier.rec .t-h { background: var(--brand-soft); }
.fm-tier .t-hb { flex: 1; min-width: 0; }
.fm-tier .t-h h3 { font-size: 17px; font-weight: 800; }
.fm-tier .t-h .sub { font-size: var(--fs-xs); color: var(--ink-2); }
.fm-tier .t-b { padding: 14px var(--s4); display: flex; flex-direction: column; gap: 12px; }
.fm-tier .t-gain { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.fm-tier .t-gain b { font-size: 28px; font-weight: 800; color: var(--ok-ink); letter-spacing: -.4px; }
.fm-tier .t-gain span { font-size: var(--fs-sm); color: var(--ink-2); }
.fm-items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.fm-items li { display: flex; gap: 8px; align-items: flex-start; font-size: var(--fs-md); line-height: 1.55; }
.fm-items li > .ic { color: var(--brand); margin-top: 3px; flex: none; }
.fm-items .i-b { flex: 1; min-width: 0; }
.fm-items .i-w { font-size: var(--fs-xs); color: var(--ink-3); }
.fm-items .i-v { font-size: var(--fs-xs); color: var(--ink-2); white-space: nowrap; font-weight: 700; }
.fm-loanbox { border-radius: 14px; background: var(--bank-soft); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.fm-loanbox .lb-t { font-weight: 750; font-size: var(--fs-md); color: var(--bank-strong); display: flex; align-items: center; gap: 6px; }
.fm-loanbox .lb-v { font-size: 20px; font-weight: 800; line-height: 1.35; }
.fm-loanbox .lb-s { font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.6; }
.fm-share { display: flex; align-items: center; gap: 8px; font-size: var(--fs-xs); color: var(--ink-2); }
.fm-share .bar { flex: 1; height: 10px; background: var(--bg-panel); }
.fm-pick { display: flex; flex-direction: column; gap: 8px; }
.fm-pick label { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 14px; cursor: pointer; }
.fm-pick label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.fm-pick input { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.fm-pick .p-b { flex: 1; min-width: 0; }
.fm-pick .p-t { font-weight: 700; font-size: 15px; }
.fm-pick .p-m { font-size: var(--fs-xs); color: var(--ink-2); }

/* اسناد */
.fm-docsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fm-docsum > div { border-radius: 14px; padding: 10px 8px; background: var(--bg-sunken); text-align: center; }
.fm-docsum b { display: block; font-size: 26px; font-weight: 800; line-height: 1.2; }
.fm-docsum span { font-size: var(--fs-xs); color: var(--ink-2); display: inline-flex; gap: 4px; align-items: center; }
.fm-docsum .ok b { color: var(--ok-ink); } .fm-docsum .warn b { color: var(--warn-ink); } .fm-docsum .critical b { color: var(--critical-ink); }
.fm-drop { width: 100%; border: 2px dashed var(--line-strong); border-radius: 18px; background: var(--bg-sunken); padding: 22px var(--s4); display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-2); text-align: center; min-height: 120px; justify-content: center; }
.fm-drop:hover { border-color: var(--brand); color: var(--brand-strong); }
.fm-drop .ic { width: 30px; height: 30px; }
.fm .docs { grid-template-columns: minmax(0, 1fr); }
.fm .doc { border-radius: 16px; padding: 12px 14px; }
.fm .doc .btn.sm { min-height: 40px; }

/* نمودار و جدول داخل پوستهٔ مرغدار */
.fm .tbl-wrap { border-radius: var(--r-modal); }
.fm .kv { font-size: var(--fs-md); }
.fm .callout { border-radius: 14px; font-size: var(--fs-md); }
.fm .bar { height: 10px; }

@media (max-width: 380px) {
  .fm-stat .s-v { font-size: 23px; }
  .fm-cyc .c-day { font-size: 26px; }
  .fm-silo { width: 54px; } .fm-silo .sl-tank { width: 50px; } .fm-silo .sl-roof { border-inline-width: 25px; }
  .fm-feed { gap: 12px; }
  .fm-money .m-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fm-cols2, .fm-costs { grid-template-columns: minmax(0, 1fr); }
}

/* مودال‌ها وقتی پوستهٔ مرغدار باز است: لمس ≥ ۴۸px */
body:has(.fapp) .modal-f .btn { min-height: 48px; padding: 0 18px; font-size: 15px; border-radius: 12px; }
body:has(.fapp) .modal-h .icon-btn { width: 48px; height: 48px; }
body:has(.fapp) .modal-b { font-size: var(--fs-lg); }
.fm details > summary { list-style: none; }
.fm details > summary::-webkit-details-marker { display: none; }
