/* Admin accents are scoped to their own controls. */
#mfAdminLockVisible{background:#6b234e!important;color:#fff!important;border:1px solid #a64679!important;box-shadow:0 2px 8px #6b234e20;font-weight:800}
#mfAdminLockVisible:hover{background:#852b62!important}
/* Phone header: keep the lock button inside its 54px tools column so it never overlaps the login button. */
#topAppHeader #mfMobileHeaderActions #mfAdminLockVisible{box-sizing:border-box;width:54px;min-width:0;max-width:54px;padding:3px 2px;font-size:8px;line-height:1.25;white-space:normal}
.mf-admin-metric-active{background:#11683c!important;border-color:#45c489!important}
.mf-admin-metric-banned{background:#962b3b!important;border-color:#ff8b9b!important}
.mf-admin-metric-active>div,.mf-admin-metric-banned>div{color:#fff!important}
#mainViewportContainer:has(#adminView:not(.hidden)){max-width:1800px!important;width:calc(100% - 32px)}
#adminDynamicGrid[data-workspace=split]{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:20px;direction:rtl}
#adminDynamicGrid[data-workspace=split]>div{min-width:0}
html[dir=ltr] #adminDynamicGrid[data-workspace=split]{direction:ltr}
#adminDynamicGrid [hidden]{display:none!important}
/* The sheet stays a table on small screens. Its own scroll area contains its width. */
#adminSubscribersList{max-width:100%;min-width:0;max-height:70dvh;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#adminSubscribersList .mf-sheet{display:table!important;width:100%;min-width:1360px;table-layout:fixed;border-collapse:separate;border-spacing:0}
#adminSubscribersList .mf-sheet thead{display:table-header-group!important;position:sticky;top:0;z-index:2}
#adminSubscribersList .mf-sheet tbody{display:table-row-group!important}
#adminSubscribersList .mf-sheet tr{display:table-row!important;border:0;border-radius:0;margin:0;padding:0}
#adminSubscribersList .mf-sheet th,#adminSubscribersList .mf-sheet td{display:table-cell!important;width:auto;min-width:0!important;padding:9px 8px;vertical-align:top;border-inline-end:1px solid var(--mf-border,#d9e5ef);border-bottom:1px solid var(--mf-border,#d9e5ef);text-align:start}
#adminSubscribersList .mf-sheet th{background:var(--mf-soft,#edf4fa);color:var(--mf-ink,#12304e);font-size:12px;padding-block:12px;white-space:nowrap}
#adminSubscribersList .mf-sheet th:nth-child(1){width:170px}
#adminSubscribersList .mf-sheet th:nth-child(2){width:175px}
#adminSubscribersList .mf-sheet th:nth-child(3){width:145px}
#adminSubscribersList .mf-sheet th:nth-child(4){width:200px}
#adminSubscribersList .mf-sheet th:nth-child(5){width:130px}
#adminSubscribersList .mf-sheet th:nth-child(6){width:180px}
#adminSubscribersList .mf-sheet th:nth-child(7){width:180px}
#adminSubscribersList .mf-sheet th:nth-child(8){width:130px}
#adminSubscribersList .mf-sheet th:nth-child(9){width:130px}
#adminSubscribersList .mf-sheet td::before{display:none!important}
#adminSubscribersList .mf-sheet tr:nth-child(even){background:var(--mf-soft,#f6f9fc)!important}
#adminSubscribersList .mf-copy-value{display:block;width:100%;max-width:100%;padding:3px 0;margin:0;border:0;background:none;color:inherit;font:inherit;font-size:12px;line-height:1.6;text-align:start;cursor:copy;overflow-wrap:anywhere;white-space:normal}
#adminSubscribersList .mf-copy-value:hover,#adminSubscribersList .mf-copy-value:focus-visible{color:var(--mf-accent,#1974c9);text-decoration:underline}
.mf-sheet-value{display:flex;align-items:start;gap:6px;min-width:0}
.mf-sheet-value details{flex:1;min-width:0}
.mf-sheet-value summary{display:block;cursor:pointer;padding:3px 0;list-style:none}
.mf-sheet-value summary::-webkit-details-marker{display:none}
.mf-sheet-value summary span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:1.6}
.mf-sheet-value summary:hover span{color:var(--mf-accent,#1974c9);text-decoration:underline}
.mf-sheet-value details[open] summary{display:none}
.mf-sheet-expanded{padding:3px 0;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.6;user-select:text}
#adminSubscribersList .mf-copy{flex:none;padding:2px 5px;margin:2px 0;font-size:10px;min-width:30px}
#adminSubscribersList .mf-sheet-order{font-size:10px;color:var(--mf-muted-ink,#64748b);margin:3px 0 0}
#adminSubscribersList .mf-count-note{padding:10px;margin:0;font-size:12px;color:var(--mf-muted-ink,#64748b)}
.anki-single-num-tip,.mf-instant-tooltip{font-family:'Cairo','Tahoma',Arial,sans-serif!important;font-size:16px!important;font-weight:900!important;line-height:1.8!important;letter-spacing:0!important;background:transparent!important;border:0!important;box-shadow:none!important;text-shadow:none!important}
@media(max-width:1100px){#adminDynamicGrid[data-workspace=split]{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){#mainViewportContainer:has(#adminView:not(.hidden)){width:calc(100% - 16px)}#adminSubscribersList{max-height:65dvh}}
#adminDynamicGrid[data-workspace=split] > :is(#adminSubsColWrap,#adminCardsColWrap){grid-column:auto!important;width:100%!important;min-width:0!important}

.mf-sheet-value details[open] summary{display:block}
.mf-sheet-value details[open] summary span{white-space:normal;overflow-wrap:anywhere}
.mf-sheet-value .mf-sheet-expanded{display:none}

/* Subscribers table: fits the page width, no inner scrollbars, every column visible without sideways scrolling. */
#adminSubscribersList{max-height:none!important;overflow:visible!important;max-width:100%;min-width:0;scrollbar-gutter:auto}
#adminSubscribersList .mf-sheet{min-width:0!important;width:100%!important;table-layout:auto!important}
#adminSubscribersList .mf-sheet th,#adminSubscribersList .mf-sheet td{padding:7px 5px!important;overflow-wrap:anywhere;word-break:break-word}
#adminSubscribersList .mf-sheet th{white-space:normal!important;font-size:11px}
#adminSubscribersList .mf-sheet th:nth-child(n){width:auto!important}
#adminSubscribersList .mf-sheet td{font-size:11px}
#adminSubscribersList .mf-sheet-value span,#adminSubscribersList .mf-copy-value{font-size:11px!important;white-space:normal!important}

/* Student details popup: still a modal popup, but large enough that its actions are visible without scrolling. */
#mfSubscriberDialog{width:min(1200px,96vw)!important;max-width:96vw!important;max-height:94dvh!important;padding:20px 24px!important;overflow:auto}
#mfSubscriberDialog .mf-dialog-body{display:grid;gap:14px}
#mfSubscriberDialog .mf-dialog-body h2{margin:4px 0 2px}
#mfSubscriberDialog .mf-detail-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px}
#mfSubscriberDialog .mf-actions{display:flex;flex-wrap:wrap;gap:8px}
#mfSubscriberDialog .mf-dialog-body>p{margin:0}

/* Student details popup: tighter sizes so everything shows on one screen without scrolling. */
#mfSubscriberDialog{width:min(980px,94vw)!important;max-width:94vw!important;max-height:92dvh!important;padding:14px 18px!important}
#mfSubscriberDialog .mf-dialog-body{gap:8px}
#mfSubscriberDialog .mf-dialog-body h2{font-size:16px;margin:0}
#mfSubscriberDialog .mf-detail-fields{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:6px}
#mfSubscriberDialog .mf-detail-fields>div{padding:5px 7px}
#mfSubscriberDialog .mf-detail-fields small{font-size:10px}
#mfSubscriberDialog .mf-detail-fields strong{font-size:12px}
#mfSubscriberDialog .mf-dialog-body>p{font-size:11px;line-height:1.5;margin:0}
#mfSubscriberDialog button{font-size:11px;padding:4px 8px;min-height:28px}
#mfSubscriberDialog .mf-actions{gap:5px}
#mfSubscriberDialog .mf-review-detail,#mfSubscriberDialog .mf-receipts{font-size:11px}

/* Count badges on the admin section switch: what needs a decision now. */
.mf-switch-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;margin-inline-start:6px;border-radius:999px;background:#dc2626;color:#fff;font-size:11px;font-weight:800;vertical-align:middle}
.mf-switch-badge[hidden]{display:none}

/* WhatsApp action in the student details popup: WhatsApp's brand green. */
#mfSubscriberDialog a.mf-whatsapp-link{background:#25D366!important;border-color:#1ebe57!important;color:#fff!important;font-weight:800}
#mfSubscriberDialog a.mf-whatsapp-link:hover{background:#1ebe57!important}

/* Subscription orders in the student details popup: one card per order, its number and state apart, the decisions below. */
#mfSubscriberDialog .mf-orders{margin-block:12px}
#mfSubscriberDialog .mf-orders h3{margin:0 0 6px;font-size:12.5px;font-weight:800}
#mfSubscriberDialog .mf-order-row{display:grid;gap:4px;margin-block:8px;padding:10px 12px;border:1px solid #d9e5ef;border-radius:12px;background:#f8fbff}
#mfSubscriberDialog .mf-order-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
#mfSubscriberDialog .mf-order-head b{font-family:Inter,sans-serif;letter-spacing:.02em}
#mfSubscriberDialog .mf-order-head .mf-receipt-state{padding:2px 10px;border-radius:999px;background:#eef4fb;color:#1e64b4}
#mfSubscriberDialog .mf-order-head .mf-receipt-state.needs_info{background:#fff5e1;color:#8a5300}
#mfSubscriberDialog .mf-order-head .mf-receipt-state.rejected{background:#fef1ef;color:#b42318}
#mfSubscriberDialog .mf-order-head .mf-receipt-state.activated{background:#e7f6ef;color:#0f7b55}
#mfSubscriberDialog .mf-order-head .mf-receipt-state.awaiting_proof,#mfSubscriberDialog .mf-order-head .mf-receipt-state.cancelled{background:#f1f4f8;color:#475569}
#mfSubscriberDialog .mf-order-row p,#mfSubscriberDialog .mf-order-row small{margin:0}
#mfSubscriberDialog .mf-order-note{padding:6px 10px;border-inline-start:3px solid #d98a04;border-radius:8px;background:#fffaf0}
#mfSubscriberDialog .mf-order-row .mf-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
#mfSubscriberDialog .mf-order-row .mf-actions .mf-button{display:inline-flex;margin:0}
html[data-theme=dark] #mfSubscriberDialog .mf-order-row{background:#13243b;border-color:#2a4c78}
html[data-theme=dark] #mfSubscriberDialog .mf-order-head .mf-receipt-state{background:#1f3a5e;color:#9cc3ee}
html[data-theme=dark] #mfSubscriberDialog .mf-order-head .mf-receipt-state.needs_info{background:#3a2c10;color:#f7c266}
html[data-theme=dark] #mfSubscriberDialog .mf-order-head .mf-receipt-state.rejected{background:#3a1d1f;color:#ff9a8f}
html[data-theme=dark] #mfSubscriberDialog .mf-order-head .mf-receipt-state.activated{background:#123528;color:#4ade9b}
html[data-theme=dark] #mfSubscriberDialog .mf-order-note{background:#2a2414}

/* Exam season and the pricing simulator (Actions page). */
.mf-season-admin{margin-top:18px;padding:16px;border:1px solid #d9e5ef;border-radius:16px;background:#f8fbff;font-size:13px}
.mf-season-admin h2{margin:0 0 6px;font-size:16px;font-weight:900;color:#0b2e59}
.mf-season-admin h3{margin:18px 0 8px;font-size:14px;font-weight:900;color:#0b2e59}
.mf-season-note{margin:6px 0;color:#5b6b80;font-weight:600;line-height:1.8}
.mf-season-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:10px;align-items:end}
.mf-season-admin label{display:grid;gap:4px;font-weight:800;color:#0b2e59}
.mf-season-admin input,.mf-season-admin select{min-height:38px;padding:6px 10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;font:inherit}
.mf-season-curve{grid-column:1/-1;border:1px solid #d9e5ef;border-radius:12px;padding:8px 12px}
.mf-season-curve table{border-collapse:collapse}
.mf-season-curve td,.mf-season-curve th{padding:4px 8px;text-align:start}
.mf-season-curve input{width:110px}
.mf-season-actions{grid-column:1/-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.mf-season-today{margin:12px 0 0;padding:10px 12px;border-radius:12px;background:#e7f6ef;color:#0f7b55;font-weight:800;line-height:1.8}
.mf-season-day{display:grid;grid-template-columns:minmax(150px,200px) minmax(0,1fr);gap:12px;align-items:start}
@media (max-width:640px){.mf-season-day{grid-template-columns:1fr}}
.mf-season-draft{margin:10px 0 0;padding:8px 12px;border-radius:12px;background:#fff6e0;color:#8a5a00;font-weight:800;line-height:1.7}
.mf-season-draft.is-bad{background:#fdecec;color:#b42318}
.mf-season-out caption{caption-side:top;text-align:start;padding:4px 0 6px;font-weight:900;color:#0b2e59}
.mf-season-out table{overflow-wrap:anywhere}
.mf-season-chart{position:relative}
.mf-season-chart .mf-chart-svg{direction:ltr}
.mf-chart-grid{stroke:#e5eef8;stroke-width:1}
.mf-chart-label{font-size:11px;fill:#5b6b80;font-family:inherit}
/* One colour per strategy (validated categorical order), plus a dash pattern so no line is told apart by colour alone. */
.mf-s-saved{--c:#2a78d6}.mf-s-draft{--c:#eb6834}.mf-s-a{--c:#1baf7a}.mf-s-b{--c:#eda100}.mf-s-c{--c:#e87ba4}
.mf-line{fill:none;stroke:var(--c);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
.mf-line.mf-s-saved{stroke-width:3}
.mf-line.mf-s-draft{stroke-width:2.5}
.mf-line.mf-s-a{stroke-dasharray:7 5}
.mf-line.mf-s-b{stroke-dasharray:2 5}
.mf-line.mf-s-c{stroke-dasharray:10 4 2 4}
.mf-dot{fill:var(--c);stroke:#fff;stroke-width:2}
.mf-chart-hover{pointer-events:none}
.mf-chart-hover line{stroke:#5b6b80;stroke-width:1;stroke-dasharray:3 3}
.mf-chart-toggles{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 6px}
.mf-chart-toggle{display:inline-flex;align-items:center;gap:6px;min-height:32px;padding:4px 12px;border:1px solid #cbd5e1;border-radius:999px;background:#fff;color:#0b2e59;font:inherit;font-size:12.5px;font-weight:800;cursor:pointer;transition:opacity .15s,background-color .15s}
.mf-chart-toggle svg,.mf-chart-tip svg{width:24px;height:8px;flex:none}
.mf-chart-toggle[aria-pressed="false"]{opacity:.5;background:transparent;text-decoration:line-through}
.mf-chart-toggle:focus-visible{outline:2px solid #378ae6;outline-offset:2px}
.mf-chart-tip{position:absolute;top:56px;min-width:190px;padding:8px 12px;border:1px solid #d9e5ef;border-radius:10px;background:#fff;box-shadow:0 6px 18px rgba(11,46,89,.14);font-size:12.5px;line-height:1.7;pointer-events:none;z-index:2}
.mf-chart-tip b{display:block;color:#0b2e59}
.mf-chart-tip div{display:flex;justify-content:space-between;align-items:center;gap:12px}
.mf-chart-tip div span:first-child{display:inline-flex;align-items:center;gap:6px}
.mf-num{font-variant-numeric:tabular-nums;font-weight:800;direction:ltr}
.mf-season-final{grid-column:1/-1;padding:10px 12px;border:1.5px solid #378ae6;border-radius:12px;background:#eef6ff}
.mf-season-final input{max-width:260px}
.mf-season-final small{font-size:12px;font-weight:600;color:#5b6b80;line-height:1.7}
.mf-season-presets>span{align-self:center;font-weight:800;color:#0b2e59}
.mf-season-out dl{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:0}
.mf-season-out dl div{padding:8px 10px;border:1px solid #d9e5ef;border-radius:10px;background:#fff}
.mf-season-out dt{font-size:11.5px;font-weight:800;color:#5b6b80}
.mf-season-out dd{margin:2px 0 0;font-weight:900;color:#0b2e59}
.mf-season-out table{width:100%;margin:0 0 10px;border-collapse:collapse;background:#fff}
.mf-season-out th,.mf-season-out td{padding:6px 8px;border-bottom:1px solid #e5eef8;text-align:start}
.mf-season-chart .mf-chart-svg{display:block;width:100%;max-width:680px;height:auto;margin-top:10px;border:1px solid #d9e5ef;border-radius:12px;background:#fff}
.mf-season-sim{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}
.mf-season-presets{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.mf-season-presets .mf-button{margin:0}
html[data-theme=dark] .mf-season-admin{background:#13243b;border-color:#2a4c78}
html[data-theme=dark] .mf-season-admin :is(h2,h3,label,.mf-season-out dd){color:#eaf2ff}
html[data-theme=dark] .mf-season-out dl div,html[data-theme=dark] .mf-season-out table,html[data-theme=dark] .mf-season-chart .mf-chart-svg{background:#16304f;border-color:#2a4c78}
html[data-theme=dark] .mf-season-today{background:#123528;color:#4ade9b}
html[data-theme=dark] .mf-season-draft{background:#3a2c0b;color:#f5c66b}
html[data-theme=dark] .mf-season-draft.is-bad{background:#3b1414;color:#fda29b}
html[data-theme=dark] :is(.mf-season-out caption,.mf-season-presets>span){color:#eaf2ff}
html[data-theme=dark] .mf-chart-grid{stroke:#2a4c78}
html[data-theme=dark] .mf-chart-label{fill:#a9bdd6}
html[data-theme=dark] :is(.mf-season-note,.mf-season-out dt,.mf-season-final small){color:#a9bdd6}
html[data-theme=dark] .mf-s-saved{--c:#3987e5}
html[data-theme=dark] .mf-s-draft{--c:#d95926}
html[data-theme=dark] .mf-s-a{--c:#199e70}
html[data-theme=dark] .mf-s-b{--c:#c98500}
html[data-theme=dark] .mf-s-c{--c:#d55181}
html[data-theme=dark] .mf-dot{stroke:#13243b}
html[data-theme=dark] .mf-chart-toggle{background:#16304f;border-color:#2a4c78;color:#eaf2ff}
html[data-theme=dark] .mf-chart-toggle[aria-pressed="false"]{background:transparent}
html[data-theme=dark] .mf-chart-tip{background:#16304f;border-color:#2a4c78;color:#d3e0f0}
html[data-theme=dark] .mf-chart-tip b{color:#eaf2ff}
html[data-theme=dark] .mf-season-final{background:#16304f;border-color:#3987e5}
