/*
 * Subscription & billing screens ("calm workspace"): plan banners, plan chooser extras, checkout, order-success page and the Billing tab.
 * Loaded automatically on every app page (templates/boot-material/css/ux/*.css). Tokens come from fm-ui.css (--fm-*).
 *
 *   .fm-sub-banner   the strip at the top of every app page (trial / renewal / read-only / over limits)
 *   .fmpl-cycle      monthly / yearly switch on the plan chooser
 *   .fmco-*          checkout + order-success
 *   .bl-*            the Billing tab (templates/boot-material/options/billing.php)
 */

/* ------------------------------------------------------------------ banners */
.fm-sub-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 11px 16px; border-radius: 14px; border: 1px solid; font-size: 13.5px; line-height: 1.45; }
.fm-sub-banner__icon { flex: 0 0 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; }
.fm-sub-banner__text { flex: 1 1 auto; min-width: 0; }
.fm-sub-banner__text strong { margin-right: 4px; }
.fm-sub-banner__actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.fm-sub-banner__btn { display: inline-block; padding: 7px 14px; border-radius: 10px; font-weight: 700; font-size: 13px; text-decoration: none !important; white-space: nowrap; }
.fm-sub-banner__x { border: 0; background: transparent; font-size: 22px; line-height: 1; padding: 0 4px; cursor: pointer; opacity: .55; color: inherit; }
.fm-sub-banner__x:hover { opacity: 1; }
.fm-sub-banner--info { background: #eff8ff; border-color: #bfe3f8; color: #0c4a6e; }
.fm-sub-banner--info .fm-sub-banner__icon { background: #d6eefc; color: #0369a1; }
.fm-sub-banner--info .fm-sub-banner__btn { background: #0369a1; color: #fff !important; }
.fm-sub-banner--warn { background: #fffaeb; border-color: #fde6a8; color: #78350f; }
.fm-sub-banner--warn .fm-sub-banner__icon { background: #fdeabf; color: #b45309; }
.fm-sub-banner--warn .fm-sub-banner__btn { background: #b45309; color: #fff !important; }
.fm-sub-banner--danger { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.fm-sub-banner--danger .fm-sub-banner__icon { background: #fee2e2; color: #b91c1c; }
.fm-sub-banner--danger .fm-sub-banner__btn { background: #b91c1c; color: #fff !important; }
@media (max-width: 640px) {
	.fm-sub-banner { flex-wrap: wrap; align-items: flex-start; }
	.fm-sub-banner__actions { width: 100%; justify-content: flex-end; }
}

/* ------------------------------------------------------------------ plan chooser: cycle switch */
.fmpl-cycle { display: inline-flex; margin-top: 18px; padding: 4px; background: #fff; border: 1px solid #dbe4ee; border-radius: 999px; box-shadow: 0 2px 8px rgba(8, 47, 73, .06); }
.fmpl-cycle button { border: 0; background: transparent; padding: 8px 20px; border-radius: 999px; font: 700 14px Inter, sans-serif; color: #475569; cursor: pointer; transition: background .15s, color .15s; }
.fmpl-cycle button em { font-style: normal; font-size: 11.5px; background: #d1fae5; color: #047857; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.fmpl-cycle button[aria-pressed="true"] { background: #0369a1; color: #fff; }
.fmpl-cycle button[aria-pressed="true"] em { background: rgba(255, 255, 255, .22); color: #fff; }
.fmpl-save[hidden] { display: none !important; }
.pl-feat li.pl-pos.is-off { opacity: .6; border-style: solid; border-color: #cbd5e1; background: #f8fafc; }
.pl-card.is-hot .pl-feat li.pl-pos.is-off { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .25); }

/* ------------------------------------------------------------------ checkout */
.fmco { max-width: 1120px; margin: 0 auto; padding: 22px 18px 64px; color: var(--fm-ink, #1b2437); }
.fmco *, .fmco *::before, .fmco *::after { box-sizing: border-box; }
.fmco-head { margin-bottom: 20px; }
.fmco-back { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; font-size: 13.5px; color: var(--fm-primary, #0369a1); text-decoration: none; padding: 4px 0; }
.fmco-back:hover { text-decoration: underline; }
.fmco-head h2 { font: 800 clamp(26px, 3.4vw, 34px)/1.15 'Plus Jakarta Sans', Inter, sans-serif; letter-spacing: -.02em; margin: 6px 0 8px; color: #082f49; }
.fmco-head h2 span { color: #0284c7; }
.fmco-lead { font-size: 15px; line-height: 1.6; color: var(--fm-muted, #6b7689); margin: 0; max-width: 720px; }
.fmco-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.fmco-main { display: grid; gap: 18px; }
.fmco-card { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 18px; padding: 22px 24px; box-shadow: 0 1px 2px rgba(8, 47, 73, .04), 0 12px 30px rgba(8, 47, 73, .05); }
.fmco-card h3 { display: flex; align-items: center; gap: 10px; font: 800 17px 'Plus Jakarta Sans', Inter, sans-serif; margin: 0 0 16px; color: #082f49; }
.fmco-card h3 small { font: 500 12.5px Inter, sans-serif; color: var(--fm-muted, #6b7689); margin-left: 2px; }
.fmco-n { width: 26px; height: 26px; border-radius: 50%; background: #e0f2fe; color: #0369a1; font: 800 13px Inter, sans-serif; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }

.fmco-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.fmco-seg label { margin: 0; cursor: pointer; }
.fmco-seg input { position: absolute; opacity: 0; pointer-events: none; }
.fmco-seg span { display: block; padding: 14px 16px; border: 2px solid var(--fm-line, #e4e8f0); border-radius: 14px; transition: border-color .15s, background .15s; }
.fmco-seg b { display: block; font-size: 15px; }
.fmco-seg small { color: var(--fm-muted, #6b7689); font-size: 13px; }
.fmco-seg input:checked + span { border-color: #0284c7; background: #f0f9ff; box-shadow: 0 0 0 3px rgba(14, 165, 233, .15); }
.fmco-seg input:focus-visible + span { outline: 2px solid #0369a1; outline-offset: 2px; }

.fmco-addons { display: grid; gap: 10px; }
.fmco-addon { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 14px; transition: border-color .15s, background .15s; }
.fmco-addon.is-on { border-color: #0284c7; background: #f0f9ff; }
.fmco-addon__info b { display: block; font-size: 14.5px; }
.fmco-addon__info small { color: var(--fm-muted, #6b7689); }
.fmco-step { display: inline-flex; align-items: center; background: #fff; border: 1px solid #dbe4ee; border-radius: 12px; padding: 3px; flex: 0 0 auto; }
.fmco-step__b { width: 32px; height: 32px; border: 0; border-radius: 9px; background: #e0f2fe; color: #0369a1; font: 700 18px/1 Inter, sans-serif; cursor: pointer; }
.fmco-step__b:hover { background: #bae6fd; }
.fmco-step input { width: 48px; border: 0; text-align: center; font: 700 15px Inter, sans-serif; background: transparent; -moz-appearance: textfield; }
.fmco-step input::-webkit-outer-spin-button, .fmco-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.fmco-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fmco-f { display: block; margin: 0; }
.fmco-f--wide { grid-column: 1 / -1; }
.fmco-f span { display: block; font-size: 12.5px; font-weight: 650; color: var(--fm-ink-2, #3a4560); margin-bottom: 5px; }
.fmco-f input, .fmco-f select { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d7dfea; border-radius: 10px; background: #fff; font-size: 14.5px; }
.fmco-f input:focus, .fmco-f select:focus { outline: 0; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, .2); }
.fmco-f.has-error input, .fmco-f.has-error select { border-color: #dc2626; background: #fff7f7; }
.fmco-f .fmco-err { display: none; color: #b91c1c; font-size: 12px; margin-top: 4px; font-weight: 500; }
.fmco-f.has-error .fmco-err { display: block; }

.fmco-side { position: sticky; top: 76px; }
.fmco-sum { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 18px; overflow: hidden; box-shadow: 0 1px 2px rgba(8, 47, 73, .05), 0 16px 38px rgba(8, 47, 73, .08); }
.fmco-sum > h3 { margin: 0; padding: 15px 22px; font: 800 12.5px Inter, sans-serif; letter-spacing: .09em; text-transform: uppercase; color: #fff; background: linear-gradient(135deg, #082f49, #0369a1); }
.fmco-sum__body { padding: 18px 22px 6px; }
.fmco-line { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.fmco-line small { display: block; color: var(--fm-muted, #6b7689); font-size: 12.5px; }
.fmco-line b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.fmco-line--sub { color: #047857; }
.fmco-line--total { border-top: 1px dashed #cbd5e1; margin-top: 8px; padding-top: 14px; font: 800 17px 'Plus Jakarta Sans', Inter, sans-serif; }
.fmco-line--total b { font-size: 26px; color: #082f49; }
.fmco-when { margin: 12px 0 4px; padding: 10px 12px; border-radius: 12px; background: #f0f9ff; color: #0c4a6e; font-size: 13px; line-height: 1.5; }
.fmco-skel { height: 16px; border-radius: 8px; background: linear-gradient(90deg, #eef2f7, #f8fafc, #eef2f7); background-size: 200% 100%; animation: fmcoSkel 1.2s infinite; margin: 12px 0; }
@keyframes fmcoSkel { to { background-position: -200% 0; } }
.fmco-coupon { padding: 6px 22px 4px; }
.fmco-coupon label { font-size: 12.5px; font-weight: 650; color: var(--fm-ink-2, #3a4560); margin: 0 0 5px; display: block; }
.fmco-coupon__row { display: flex; gap: 8px; }
.fmco-coupon__row input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid #d7dfea; border-radius: 10px; text-transform: uppercase; }
.fmco-coupon__msg { min-height: 20px; font-size: 12.5px; margin-top: 5px; }
.fmco-coupon__msg.is-ok { color: #047857; }
.fmco-coupon__msg.is-bad { color: #b91c1c; }
.fmco-pay { padding: 8px 22px 6px; display: grid; gap: 10px; }
.fmco-note { padding: 0 22px; font-size: 12.5px; color: var(--fm-muted, #6b7689); margin: 4px 0 0; }
.fmco-trust { list-style: none; margin: 10px 0 0; padding: 14px 22px 18px; display: grid; gap: 7px; background: #f8fafc; border-top: 1px solid var(--fm-line-2, #eef1f6); font-size: 12.5px; color: #475569; }
.fmco-trust i { width: 18px; color: #0369a1; }
.fmco-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: #0369a1; color: #fff !important; font: 700 15px Inter, sans-serif; padding: 12px 20px; cursor: pointer; text-decoration: none !important; transition: filter .15s, transform .15s; }
.fmco-btn:hover { filter: brightness(1.08); }
.fmco-btn:disabled { opacity: .55; cursor: not-allowed; }
.fmco-btn--ghost { background: #fff; color: #0369a1 !important; border: 1.5px solid #bae6fd; }
.fmco-btn--block { width: 100%; }
.fmco-paypal { min-height: 46px; }
.fmco-spin { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: fmcoSpin .7s linear infinite; }
@keyframes fmcoSpin { to { transform: rotate(360deg); } }

/* order success */
.fmco--done { display: flex; justify-content: center; }
.fmco-done { max-width: 640px; width: 100%; text-align: center; background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 22px; padding: 38px 32px; box-shadow: 0 16px 44px rgba(8, 47, 73, .08); margin-top: 20px; }
.fmco-done h2 { font: 800 28px 'Plus Jakarta Sans', Inter, sans-serif; margin: 14px 0 8px; color: #082f49; }
.fmco-done .fmco-lead { margin: 0 auto 20px; }
.fmco-done__icon { width: 68px; height: 68px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; }
.fmco-done__icon.is-ok { background: #d1fae5; color: #047857; }
.fmco-done__icon.is-wait { background: #fef3c7; color: #b45309; }
.fmco-done__icon.is-bad { background: #fee2e2; color: #b91c1c; }
.fmco-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0 0 22px; text-align: left; }
.fmco-facts div { background: #f8fafc; border: 1px solid var(--fm-line-2, #eef1f6); border-radius: 12px; padding: 10px 14px; }
.fmco-facts dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--fm-muted, #6b7689); font-weight: 700; }
.fmco-facts dd { margin: 2px 0 0; font-weight: 700; }
.fmco-how { text-align: left; margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 14px; }
.fmco-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 920px) {
	.fmco-grid { grid-template-columns: 1fr; }
	.fmco-side { position: static; order: -1; }
}
@media (max-width: 560px) {
	.fmco-fields { grid-template-columns: 1fr; }
	.fmco-card { padding: 18px 16px; }
	.fmco-addon { flex-direction: column; align-items: flex-start; }
	.fmco-facts { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------------ billing tab */
.bl { max-width: 1120px; margin: 26px auto 56px; padding: 0 16px; }
.bl-plan { background: linear-gradient(135deg, #082f49, #0369a1 65%, #0ea5e9); color: #e0f2fe; border-radius: 22px; padding: 28px 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; box-shadow: 0 18px 40px rgba(8, 47, 73, .25); position: relative; overflow: hidden; }
.bl-plan::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255, 255, 255, .07); pointer-events: none; }
.bl-plan--bad { background: linear-gradient(135deg, #450a0a, #b91c1c 70%, #ef4444); }
.bl-plan--warn { background: linear-gradient(135deg, #451a03, #b45309 70%, #f59e0b); }
.bl-plan small { display: block; text-transform: uppercase; letter-spacing: .09em; font-weight: 700; font-size: 11.5px; opacity: .85; }
.bl-plan h2 { font: 800 32px/1.1 'Plus Jakarta Sans', Inter, sans-serif; color: #fff; margin: 4px 0 10px; }
.bl-plan h2 em { font-style: normal; font-size: 15px; font-weight: 600; opacity: .85; margin-left: 8px; }
.bl-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.bl-pill { display: inline-flex; gap: 8px; align-items: center; background: rgba(255, 255, 255, .16); border-radius: 999px; padding: 5px 14px; font-weight: 600; font-size: 13.5px; }
.bl-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; justify-content: flex-end; }
.bl-btn { display: inline-flex; gap: 8px; align-items: center; padding: 11px 20px; border-radius: 12px; font-weight: 700; text-decoration: none !important; border: 0; cursor: pointer; font-size: 14.5px; }
.bl-btn--w { background: #fff; color: #075985 !important; }
.bl-btn--g { border: 1px solid rgba(255, 255, 255, .5); color: #fff !important; background: transparent; }
.bl-btn--p { background: #0369a1; color: #fff !important; }
.bl-btn--o { background: #fff; color: #0369a1 !important; border: 1.5px solid #bae6fd; }
.bl-btn--d { background: #fff; color: #b91c1c !important; border: 1.5px solid #fecaca; }
.bl-h { font: 800 18px 'Plus Jakarta Sans', Inter, sans-serif; margin: 34px 0 6px; color: #082f49; }
.bl-sub { color: var(--fm-muted, #6b7689); margin: 0 0 14px; font-size: 13.5px; }

.bl-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.bl-tile { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; padding: 16px 18px; }
.bl-tile small { display: block; font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--fm-muted, #6b7689); font-weight: 700; margin-bottom: 4px; }
.bl-tile b { font: 800 20px 'Plus Jakarta Sans', Inter, sans-serif; color: #082f49; }
.bl-tile p { margin: 4px 0 0; font-size: 13px; color: var(--fm-muted, #6b7689); }
.bl-note { margin: 16px 0 0; padding: 12px 16px; border-radius: 14px; background: #fffaeb; border: 1px solid #fde6a8; color: #78350f; font-size: 13.5px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.bl-note > span { flex: 1 1 260px; }
.bl-note--info { background: #eff8ff; border-color: #bfe3f8; color: #0c4a6e; }

.bl-usage { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.bl-use { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; padding: 16px 18px; text-decoration: none !important; color: inherit; display: block; transition: box-shadow .15s, transform .15s; }
.bl-use:hover { box-shadow: 0 10px 26px rgba(8, 47, 73, .1); transform: translateY(-2px); }
.bl-use header { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; font-weight: 650; }
.bl-use header i { width: 32px; height: 32px; border-radius: 10px; background: #e0f2fe; color: #0369a1; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.bl-use b { font: 800 22px 'Plus Jakarta Sans', Inter, sans-serif; }
.bl-use b span { font: 600 14px Inter, sans-serif; color: var(--fm-muted, #6b7689); }
.bl-bar { height: 8px; border-radius: 999px; background: #e2e8f0; margin-top: 10px; overflow: hidden; }
.bl-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #38bdf8, #0369a1); }
.bl-use.is-warn .bl-bar i { background: linear-gradient(90deg, #fbbf24, #d97706); }
.bl-use.is-full .bl-bar i { background: linear-gradient(90deg, #f87171, #dc2626); }
.bl-use small { color: var(--fm-muted, #6b7689); font-size: 12.5px; display: block; margin-top: 6px; }

.bl-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.bl-card { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 18px; padding: 20px 22px; }
.bl-card h4 { font: 800 16px 'Plus Jakarta Sans', Inter, sans-serif; margin: 0 0 4px; color: #082f49; }
.bl-card > p { color: var(--fm-muted, #6b7689); font-size: 13px; margin: 0 0 14px; }
.bl-form { display: grid; gap: 12px; }
.bl-form label { display: block; margin: 0; font-size: 12.5px; font-weight: 650; color: var(--fm-ink-2, #3a4560); }
.bl-form input[type=text], .bl-form input[type=email] { display: block; width: 100%; height: 42px; margin-top: 5px; padding: 0 12px; border: 1px solid #d7dfea; border-radius: 10px; font-size: 14.5px; }
.bl-form input:focus { outline: 0; border-color: #0ea5e9; box-shadow: 0 0 0 3px rgba(14, 165, 233, .2); }
.bl-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.bl-check input { margin-top: 3px; width: 17px; height: 17px; accent-color: #0369a1; }
.bl-row { display: flex; gap: 8px; }
.bl-row input { flex: 1; min-width: 0; }
.bl-msg { font-size: 12.5px; min-height: 18px; }
.bl-msg.is-ok { color: #047857; }
.bl-msg.is-bad { color: #b91c1c; }
.bl-chip { display: inline-flex; align-items: center; gap: 8px; background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; border-radius: 999px; padding: 4px 12px; font-weight: 700; font-size: 13px; }
.bl-chip button { border: 0; background: transparent; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; padding: 0; }

.bl-inv { background: #fff; border: 1px solid var(--fm-line, #e4e8f0); border-radius: 16px; overflow: auto; }
.bl-inv table { margin: 0; width: 100%; border-collapse: collapse; min-width: 640px; }
.bl-inv th { background: var(--fm-bg, #f2f7fb); color: var(--fm-muted, #6b7689); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; text-align: left; white-space: nowrap; }
.bl-inv td { padding: 13px 16px; border-top: 1px solid var(--fm-line-2, #eef1f6); vertical-align: middle; }
.bl-inv td.r, .bl-inv th.r { text-align: right; }
.bl-inv .bl-links { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.bl-empty { text-align: center; color: var(--fm-muted, #6b7689); padding: 34px 16px; }
.bl-mail li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--fm-line-2, #eef1f6); font-size: 13.5px; list-style: none; }
.bl-mail { padding: 0; margin: 0; }
.bl-mail li:first-child { border-top: 0; }
.bl-mail time { color: var(--fm-muted, #6b7689); white-space: nowrap; }

@media (max-width: 860px) {
	.bl-plan { grid-template-columns: 1fr; }
	.bl-actions { justify-content: flex-start; }
	.bl-cols { grid-template-columns: 1fr; }
	.bl-two { grid-template-columns: 1fr; }
}
