/* Mradilab — one stylesheet for the public page (/upgrade) and the application.
   Layout modelled on Goodstack Pro (icon rail, gradient hero, plan cards, Kanban); Mradilab palette (forest green +
   terracotta) and type (Plus Jakarta Sans). The variable names (--navy, --amber…) are kept from CERC Grants. */

:root {
  --navy: #56369f; --navy-dk: #40267b; --navy-2: #8363e2; --amber: #00b695; --amber-dk: #00967b; --amber-lt: #dcf6ee;
  --green: #2e8a5f; --green-lt: #e4f4ec; --red: #d1495b; --blue: #3790ab;
  --bg: #f6f7f9; --card: #ffffff; --text: #1a1b1f; --muted: #616161; --rule: #e4e8ec; --soft: #f1eef9;
  --tint: #e6dff4; --shadow: 0 1px 2px rgba(26,27,31,.06), 0 4px 16px rgba(26,27,31,.06);
  --hero: linear-gradient(180deg, #ece6f8 0%, #e6f7f2 100%);
  --display: "Outfit", system-ui, sans-serif; --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --navy: #7fd3bd; --navy-dk: #e2f6ef; --navy-2: #5cc1a6; --amber: #f08a62; --amber-dk: #f08a62; --amber-lt: #3a2219;
  --green: #5cc493; --green-lt: #183a2a; --bg: #101815; --card: #18221e; --text: #e8f0ec; --muted: #9db0a8; --rule: #2b3a34;
  --soft: #1f2b26; --tint: #223630; --shadow: 0 1px 2px rgba(0,0,0,.3); --hero: linear-gradient(180deg, #16302a 0%, #2c1d16 100%); color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #7fd3bd; --navy-dk: #e2f6ef; --navy-2: #5cc1a6; --amber: #f08a62; --amber-dk: #f08a62; --amber-lt: #3a2219;
    --green: #5cc493; --green-lt: #183a2a; --bg: #101815; --card: #18221e; --text: #e8f0ec; --muted: #9db0a8; --rule: #2b3a34;
    --soft: #1f2b26; --tint: #223630; --shadow: 0 1px 2px rgba(0,0,0,.3); --hero: linear-gradient(180deg, #16302a 0%, #2c1d16 100%); color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 var(--body); }
a { color: var(--navy); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .4em; }
.display { font-family: var(--display); font-weight: 700; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.hidden { display: none !important; }
html[lang="fr"] [lang="en"]:not(html), html[lang="en"] [lang="fr"]:not(html) { display: none !important; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 16px; height: 16px; }

/* buttons, inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 40px; padding: .5em 1em; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--card); color: var(--text); font: 600 .95rem var(--body); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--navy-2); }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .btn.primary { color: #101815; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { color: #101815; } }
.btn.primary:hover { background: var(--navy-dk); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: #0a3d32; }
.btn.amber:hover { background: var(--amber-dk); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 32px; padding: .3em .7em; font-size: .85rem; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.pill { display: inline-flex; align-items: center; gap: .4em; padding: .25em .75em; border-radius: 999px; border: 1px solid var(--rule); background: var(--card); font-size: .85rem; font-weight: 600; }
input, textarea, select { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: .6em .8em; width: 100%; }
input:focus, textarea:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
label.f { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .3em; }
.field { margin: 0 0 1rem; }
.badge { display: inline-flex; align-items: center; gap: .35em; padding: .2em .65em; border-radius: 999px; font-size: .78rem; font-weight: 700; background: var(--soft); color: var(--muted); }
.badge.excellent { background: var(--green-lt); color: var(--green); }
.badge.good { background: var(--tint); color: var(--navy); }
.badge.possible { background: var(--amber-lt); color: var(--amber-dk); }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: 16px; box-shadow: var(--shadow); }

/* ---------- public page ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .7rem max(16px, calc((100vw - 1120px) / 2));
  background: color-mix(in srgb, var(--card) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rule); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy); }
.brand img { height: 34px; }
.brand b { font: 700 1.35rem var(--display); }
/* name + tagline « Get Funded » (2026-11-29) */
.brand-t { display: flex; flex-direction: column; line-height: 1.1; }
.brand-t small { font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--amber-dk); text-transform: uppercase; }
.topbar .sp { flex: 1; }
.lang { font-weight: 700; font-size: .85rem; }
.page { max-width: 1120px; margin: 0 auto; padding: 0 16px 64px; }
.upg-hero { text-align: center; padding: 40px 0 28px; }
.clients { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; margin: -8px 0 26px; }
.clients p { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.clients img { height: 44px; width: auto; display: block; }
:root[data-theme="dark"] .clients img { filter: brightness(0) invert(1); opacity: .85; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .clients img { filter: brightness(0) invert(1); opacity: .85; } }
.upg-hero .pill { color: var(--navy); background: var(--tint); border-color: transparent; }
.upg-hero h1 { font: 700 clamp(2rem, 5vw, 3.3rem) var(--display); margin: .5rem 0 .4rem; color: var(--navy-dk); }
.upg-hero h1 em { font-style: normal; color: var(--amber-dk); }
.upg-hero p { margin: 0; color: var(--muted); }
.stars { color: var(--amber); letter-spacing: 2px; margin-right: .4em; }

.agent { display: grid; grid-template-columns: 1.05fr 1fr; gap: 28px; padding: 36px; border-radius: 24px; color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #8363e2 0%, #56369f 45%, #40267b 100%); box-shadow: 0 10px 40px rgba(64,38,123,.25); }
.agent h2 { font: 700 2.4rem var(--display); margin: 0 0 .3rem; }
.agent .lead { font-size: 1.1rem; margin: 0 0 .4rem; }
.agent .sub { color: #e6dff4; font-size: .92rem; margin: 0 0 1.2rem; }
.agent .price { font: 700 3.2rem/1 var(--body); margin: 1rem 0 .2rem; }
.agent .price small { font-size: 1rem; font-weight: 500; color: #e6dff4; }
.agent .fine { color: #e6dff4; font-size: .85rem; margin: 0 0 1.2rem; }
.agent .k { text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; color: #e6dff4; font-weight: 700; margin: 1.6rem 0 .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chips span { padding: .3em .8em; border-radius: 999px; background: rgba(255,255,255,.1); font-size: .85rem; }
.deliver { display: grid; gap: 12px; align-content: start; }
.deliver .box { border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.06); border-radius: 14px; padding: 16px 18px; }
.deliver .big { font-size: 1.6rem; font-weight: 700; }
.deliver .row { display: flex; align-items: center; gap: .7rem; font-weight: 600; }
.ok { width: 22px; height: 22px; border-radius: 50%; background: #2fae74; display: grid; place-items: center; flex: none; }
.ok svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 3; fill: none; }
.stat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat .box b { display: block; font-size: 1.5rem; color: var(--amber); }

.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 28px 0; }
.plan { padding: 28px; position: relative; }
.plan.best { border: 2px solid var(--navy); }
.plan .tag { position: absolute; top: -13px; left: 24px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 700; padding: .25em .8em; border-radius: 999px; }
:root[data-theme="dark"] .plan .tag { color: #101815; }
.plan h3 { font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.plan .price { font: 700 2.8rem/1 var(--body); margin: .3rem 0; color: var(--navy-dk); }
.plan .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.plan .strike { text-decoration: line-through; color: var(--muted); margin-right: .5em; }
.plan .save { display: inline-block; background: var(--green-lt); color: var(--green); font-weight: 700; font-size: .8rem; padding: .15em .6em; border-radius: 6px; }
.plan ul { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .55rem; }
.plan li { display: flex; gap: .6rem; align-items: flex-start; }
.plan li .ok { width: 20px; height: 20px; margin-top: 2px; background: var(--navy); }
.plan .btn { width: 100%; min-height: 48px; }
.section-k { text-align: center; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--muted); margin: 48px 0 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { padding: 22px; }
.tile .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--tint); color: var(--navy); display: grid; place-items: center; margin-bottom: .8rem; }
.tile h3 { font-size: 1.1rem; }
.tile p { margin: 0; color: var(--muted); }
.faq { max-width: 820px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.faq summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: .6rem 0 0; color: var(--muted); }
.pay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pay .card { padding: 16px; }
.pay b { display: block; }
.pay code { font: 600 .95rem ui-monospace, Menlo, monospace; word-break: break-all; }
.cta { text-align: center; padding: 40px 24px; margin-top: 48px; border-radius: 24px; background: var(--hero); }
.cta h2 { font: 700 2rem var(--display); color: var(--navy-dk); }
.cta .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 1rem; }
.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 32px 16px; }

/* ---------- application ---------- */
.shell { display: grid; grid-template-columns: 72px 1fr; min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0;
  background: var(--card); border-right: 1px solid var(--rule); z-index: 30; }
.rail .logo { width: 40px; height: 40px; margin-bottom: 10px; }
.rail hr { width: 36px; border: 0; border-top: 1px solid var(--rule); margin: 6px 0; }
.rail a, .rail button { position: relative; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--navy);
  background: none; border: 0; cursor: pointer; text-decoration: none; }
.rail a:hover, .rail button:hover { background: var(--soft); }
.rail a.on { background: var(--tint); }
.rail .tip { position: absolute; left: 54px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--navy-dk); color: #fff;
  font-size: .8rem; font-weight: 600; padding: .3em .6em; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .12s; }
:root[data-theme="dark"] .rail .tip { color: #101815; }
.rail a:hover .tip, .rail button:hover .tip, .rail a:focus-visible .tip { opacity: 1; }
.rail .sp { flex: 1; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--amber), var(--navy)); }
.dotn { position: absolute; top: 8px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }
.main { min-width: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 64px; }
.menu { position: fixed; left: 80px; bottom: 16px; z-index: 40; width: 260px; padding: 8px; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--rule); margin-bottom: 6px; }
.menu a, .menu button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .7rem; border-radius: 8px; border: 0; background: none; color: var(--text); font: inherit; text-decoration: none; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--soft); }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.page-h h1 { font-size: 1.7rem; margin: 0; }
.page-h p { margin: .2rem 0 0; color: var(--muted); }

.hero { background: var(--hero); text-align: center; padding: 48px 24px 40px; }
.hero h1 { font: 700 clamp(2rem, 4.5vw, 3rem) var(--display); color: var(--navy-dk); margin: 0 0 .3rem; }
.hero p { color: var(--muted); font-size: 1.1rem; margin: 0 0 1.6rem; }
.searchbox { display: flex; align-items: center; gap: .6rem; max-width: 780px; margin: 0 auto; padding: 8px 8px 8px 16px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); border: 1px solid var(--rule); }
.searchbox span { color: var(--muted); white-space: nowrap; }
.searchbox input { border: 0; padding: .5em 0; background: transparent; }
.searchbox input:focus { outline: none; }
.searchbox .btn { min-width: 46px; padding: 0 .9em; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 1.2rem; }
.hero .actions .btn { border-radius: 999px; }

.grant { padding: 20px 22px 0; margin-bottom: 14px; }
.grant h3 { font-size: 1.1rem; margin: 0; }
.grant .funder { color: var(--muted); font-size: .92rem; margin: .1rem 0 .6rem; }
.grant .sum { margin: 0 0 .8rem; }
.grant .why { background: var(--soft); border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin-bottom: .8rem; }
.grant .why b { color: var(--navy); display: flex; align-items: center; gap: .35rem; font-size: .8rem; margin-bottom: .2rem; }
.grant .meta { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; font-size: .88rem; color: var(--muted); margin-bottom: .9rem; }
.grant .meta span { display: inline-flex; align-items: center; gap: .3rem; }
.grant .acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid var(--rule); padding: 12px 0 14px; }
.grant .acts .sp { flex: 1; }
.grant details { font-size: .9rem; margin-bottom: .8rem; }
.grant details summary { cursor: pointer; color: var(--navy); font-weight: 600; }

.dash { display: grid; grid-template-columns: 1fr 320px; gap: 20px; }
.meter { display: grid; grid-template-columns: 260px 1fr; overflow: hidden; }
.meter .l { background: radial-gradient(120% 140% at 0% 0%, #8363e2 0%, #56369f 50%, #40267b 100%); color: #fff; display: grid; place-items: center; padding: 24px; text-align: center; }
.ring { width: 150px; height: 150px; position: relative; }
.ring svg { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2rem; }
.meter .r { padding: 24px 28px; }
.steps { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: grid; grid-template-columns: 26px 1fr; gap: 10px; }
.steps .c { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--rule); display: grid; place-items: center; }
.steps .done .c { background: var(--navy); border-color: var(--navy); }
.steps .done .c svg { stroke: #fff; width: 13px; height: 13px; stroke-width: 3; fill: none; }
.steps .done strong { text-decoration: line-through; color: var(--muted); }
.steps p { margin: .1rem 0 .5rem; color: var(--muted); font-size: .9rem; }
.notif { padding: 20px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; }
.empty .ic { width: 52px; height: 52px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; margin: 0 auto .6rem; }
.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 20px 0; }
.quick a { display: flex; align-items: center; gap: .8rem; padding: 16px 18px; text-decoration: none; color: var(--text); font-weight: 700; }
.quick a .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--navy); }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.panel { padding: 20px; }
.panel .ph { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: .8rem; }
.panel .ph h2 { font-size: 1.15rem; margin: 0; }
.mini { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.mini:first-of-type { border-top: 0; }
.mini b { display: block; }

.board { display: grid; grid-template-columns: repeat(6, minmax(180px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: var(--soft); border-radius: 12px; padding: 10px; min-height: 420px; }
.col h3 { font-size: .9rem; display: flex; align-items: center; gap: .45rem; margin: 2px 4px 10px; }
.col h3 .n { margin-left: auto; color: var(--muted); font-weight: 600; }
.col h3 .d { width: 8px; height: 8px; border-radius: 50%; }
.col.drop { outline: 2px dashed var(--navy-2); }
.kcard { padding: 10px 12px; margin-bottom: 8px; cursor: pointer; border-radius: 10px; }
.kcard b { display: block; font-size: .92rem; }
.kcard .small { margin-top: .2rem; }
.newapp { width: 100%; justify-content: flex-start; background: none; border: 0; color: var(--muted); }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); font-size: .92rem; vertical-align: top; }
table.list th { color: var(--muted); font-weight: 600; }
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: none; padding: .45em .9em; font: 600 .88rem var(--body); color: var(--muted); cursor: pointer; display: flex; gap: .35rem; align-items: center; }
.seg button.on { background: var(--tint); color: var(--navy); }

.editor { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.editor textarea.doc { min-height: 62vh; font: 15px/1.6 ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.preview { padding: 24px 28px; min-height: 62vh; overflow-wrap: anywhere; }
.preview h2, .preview h3 { color: var(--navy); margin-top: 1.2em; }
.preview table { border-collapse: collapse; width: 100%; }
.preview td, .preview th { border: 1px solid var(--rule); padding: 6px 8px; }
.preview .todo { background: var(--amber-lt); color: var(--amber-dk); border-radius: 4px; padding: 0 .2em; font-weight: 600; }
.side { display: grid; gap: 16px; }
.side .panel h3 { font-size: 1rem; }
.review li { margin-bottom: .35rem; }
.score { font: 700 2.4rem var(--body); color: var(--navy); }

.kb { display: grid; grid-template-columns: 1fr 300px; gap: 20px; }
.drop-zone { border: 2px dashed var(--rule); border-radius: 16px; padding: 40px; text-align: center; }
.drop-zone.over { border-color: var(--navy); background: var(--tint); }
.howit ol { padding-left: 1.2rem; }

.chat { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; min-height: calc(100vh - 56px); }
.chat .hello { text-align: center; padding: 32px 0 10px; }
.chat .hello .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.chat .hello h1 { font: 700 2.2rem var(--display); color: var(--navy-dk); }
.starters { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 640px; margin: 20px auto; }
.starters button { text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--rule); background: var(--card); cursor: pointer; font: inherit; color: var(--text); box-shadow: var(--shadow); }
.starters button b { display: block; color: var(--navy); margin: .3rem 0 .1rem; }
.msgs { flex: 1; display: grid; gap: 14px; align-content: start; padding: 10px 0; }
.msg { max-width: 88%; padding: 12px 16px; border-radius: 14px; overflow-wrap: anywhere; }
.msg.user { justify-self: end; background: var(--navy); color: #fff; }
:root[data-theme="dark"] .msg.user { color: #101815; }
.msg.ai { justify-self: start; background: var(--card); border: 1px solid var(--rule); }
.msg.ai p:first-child { margin-top: 0; } .msg.ai p:last-child { margin-bottom: 0; }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0 20px; display: flex; gap: 10px; }
.composer textarea { min-height: 52px; max-height: 200px; resize: none; }

.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,20,32,.5); display: grid; place-items: center; padding: 16px; }
.modal > .card { width: min(560px, 100%); max-height: 92vh; overflow: auto; }
.modal .mh { padding: 22px 24px; color: #fff; border-radius: 16px 16px 0 0; background: radial-gradient(120% 140% at 100% 0%, #8363e2 0%, #56369f 50%, #40267b 100%); position: relative; }
.modal .mh h2 { font-size: 1.35rem; margin: .4rem 0 .2rem; }
.modal .mh p { margin: 0; color: #d6d5ee; }
.modal .mb { padding: 20px 24px 24px; }
.modal .x { position: absolute; top: 12px; right: 12px; color: #fff; background: none; border: 0; cursor: pointer; font-size: 1.4rem; }
.feat { display: flex; gap: .8rem; padding: 12px; border: 1px solid var(--rule); border-radius: 12px; margin-bottom: 8px; }
.feat .ic { width: 34px; height: 34px; border-radius: 8px; background: var(--tint); color: var(--navy); display: grid; place-items: center; flex: none; }
.feat b { display: block; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 70; background: var(--navy-dk); color: #fff; padding: .7em 1.1em; border-radius: 10px; box-shadow: var(--shadow); }
:root[data-theme="dark"] .toast { color: #101815; }
.spin { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: s .8s linear infinite; display: inline-block; }
@keyframes s { to { transform: rotate(360deg); } }
.working { text-align: center; padding: 40px 16px; color: var(--muted); }
.working .spin { width: 32px; height: 32px; color: var(--navy); margin-bottom: 1rem; }
.signin { max-width: 440px; margin: 8vh auto; padding: 32px; }
.signin h1 { font: 700 2rem var(--display); color: var(--navy-dk); }
.timeline { position: relative; padding-left: 40px; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 8px; bottom: 0; width: 2px; background: var(--rule); }
.timeline .day { position: relative; font-weight: 700; margin: 0 0 12px; }
.timeline .day::before { content: ""; position: absolute; left: -34px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: var(--navy); box-shadow: 0 0 0 4px var(--tint); }
.hist { margin-bottom: 12px; }
.hist > summary { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; list-style: none; }
.hist > summary .q { flex: 1; }
.hist .body { padding: 0 18px 4px; border-top: 1px solid var(--rule); }
.hist .body .grant { box-shadow: none; margin: 14px 0; }
.adm table.list td { font-size: .85rem; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

@media (max-width: 960px) {
  .agent, .plans, .dash, .two, .editor, .kb, .meter { grid-template-columns: 1fr; }
  .tiles, .quick { grid-template-columns: 1fr; }
  .pay { grid-template-columns: 1fr 1fr; }
  .agent { padding: 24px; }
  .agent h2 { font-size: 1.85rem; overflow-wrap: anywhere; }
  .agent > * { min-width: 0; }
}
@media (max-width: 640px) {
  .shell { grid-template-columns: 1fr; padding-bottom: 64px; }
  .rail { position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: 60px; flex-direction: row; justify-content: space-around; padding: 0 6px; border-right: 0; border-top: 1px solid var(--rule); }
  .rail .logo, .rail hr, .rail .sp, .rail .tip { display: none; }
  .menu { left: 8px; right: 8px; bottom: 70px; width: auto; }
  .wrap { padding: 20px 16px 40px; }
  .pay, .starters, .stat, .grid2 { grid-template-columns: 1fr; }
  .searchbox span { display: none; }
  .topbar .hide-m { display: none; }
}

/* ---------- Goodstack /pro/ look (2026-11-28): soft gradient behind every page, home details ---------- */
.main, .pro-bg { background: linear-gradient(135deg, #f4f1fb 0%, #f7f7fa 45%, #eef8f5 100%); min-height: 100vh; }
:root[data-theme="dark"] .main, :root[data-theme="dark"] .pro-bg { background: var(--bg); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .main, :root:not([data-theme="light"]) .pro-bg { background: var(--bg); } }
.pro-bg .topbar { background: transparent; border-bottom: 0; backdrop-filter: none; position: static; }
.home .hello { font-size: 2.1rem; margin: 22px 0 .2rem; }
.home .org { margin: 0 0 32px; font-weight: 600; }
.home .dash { grid-template-columns: 1fr 290px; gap: 24px; }
.home .meter { grid-template-columns: 300px 1fr; min-height: 470px; }
.home .meter .l { background: linear-gradient(180deg, #8363e2 0%, #56369f 55%, #40267b 100%); }
.home .ring, .home .ring svg { width: 170px; height: 170px; transform: none; }
.home .ring b { font-weight: 600; letter-spacing: .04em; }
.home text.arc { font: 700 11px var(--body); letter-spacing: .16em; fill: rgba(255,255,255,.55); }
.home .meter .r { padding: 52px 48px 24px; }
.home .meter .r h2 { font-size: 1.15rem; font-weight: 600; margin: 0; }
.chev { width: 22px; height: 22px; border: 1px solid var(--rule); border-radius: 50%; display: grid; place-items: center; color: var(--muted); margin: 20px 0 6px; }
.chev:last-child { margin: 8px 0 0; }
.steps.tl { position: relative; gap: 18px; margin: 8px 0 0; }
.steps.tl::before { content: ""; position: absolute; left: 11px; top: -24px; bottom: -10px; width: 2px; background: var(--rule); z-index: 0; }
.steps.tl li { position: relative; z-index: 1; }
.steps.tl .c { background: var(--card); }
.steps.tl .now .c { border-color: var(--tint); background: var(--tint); color: var(--navy); }
.steps.tl .now strong { color: var(--navy); font-weight: 600; }
.steps.tl strong { font-weight: 500; }
.steps.tl p { margin: .05rem 0 .6rem; font-size: .88rem; }
.home .notif h2 { font-size: 1.1rem; font-weight: 600; margin: 4px 0 0; }
.home .quick { margin: 28px 0; gap: 24px; }
.home .quick a { padding: 10px 12px; font-weight: 600; border-radius: 10px; }
.home .quick a .ic { width: 32px; height: 32px; border-radius: 8px; background: var(--navy); color: #fff; }
.home .two { gap: 24px; }
.home .panel { min-height: 360px; padding: 24px; }
.home .panel .ph h2 { font-weight: 600; }
.link { color: var(--navy-2); text-decoration: none; font-weight: 500; }
.link:hover { text-decoration: underline; }
.grow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 10px; box-shadow: none; border-radius: 10px; text-decoration: none; color: var(--text); }
.grow > div { flex: 1; min-width: 0; }
.grow b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.grow .lg { width: 40px; height: 40px; border-radius: 8px; background: var(--soft); color: var(--navy); display: grid; place-items: center; font-weight: 700; flex: none; }
.grow .btn.sm { min-height: 30px; padding: 0 .55em; }
@media (max-width: 960px) { .home .meter { grid-template-columns: 1fr; min-height: 0; } .home .meter .r { padding: 24px; } .home .dash { grid-template-columns: 1fr; } }
.steps.tl .done .c { background: var(--navy); border-color: var(--navy); }

/* ---------- « Mon abonnement » (/billing), Mradilab brand (2026-11-29) ----------
   header band · usage · 1. plan · 2. payment (method tabs + summary) · history. Mobile first: one column, then
   the summary moves beside the payment from 900px. Logos in /assets/img/pay/. */
.bill { --b-radius: 16px; }
.bill .b-hero { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 20px; margin: 8px 0 16px; padding: 24px 22px;
  border-radius: 18px; color: #fff; background: radial-gradient(120% 140% at 100% 0%, #8363e2 0%, transparent 55%), linear-gradient(135deg, #56369f 0%, #40267b 100%); box-shadow: var(--shadow); }
.bill .b-hero h1 { font: 700 clamp(1.9rem, 6vw, 2.9rem)/1.05 var(--display); margin: .25rem 0 .35rem; color: #fff; letter-spacing: .01em; }
.bill .b-hero p { margin: 0; color: #ddd4f2; max-width: 560px; }
.bill .b-hero p b { color: #fff; }
.bill .b-eye { display: inline-flex; align-items: center; gap: .4em; font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--amber) !important; }
.bill .b-side { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bill .b-hero .btn { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.28); color: #fff; }
.bill .b-hero .btn:hover { background: rgba(255,255,255,.18); }
.bill .b-chip { display: inline-flex; gap: .45em; align-items: center; padding: .45em .9em; border-radius: 999px; background: rgba(0,182,149,.22); color: #c9f2e6; font-size: .88rem; }
.bill .b-chip b { color: var(--amber); font-size: 1rem; }

/* usage: one card, three meters */
.bill .b-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--rule); border-radius: var(--b-radius); }
.bill .b-kpi { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; min-width: 0; }
.bill .b-kpi + .b-kpi { border-left: 1px solid var(--rule); }
.bill .b-kpi > svg { flex: none; color: var(--navy); background: var(--tint); border-radius: 10px; padding: 8px; width: 38px; height: 38px; }
.bill .b-kpi > div { flex: 1; min-width: 0; }
.bill .b-kpi span { display: block; font-size: .85rem; color: var(--muted); }
.bill .b-kpi b { font: 700 1.45rem/1.2 var(--body); color: var(--navy-dk); }
.bill .b-kpi b small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.bill .b-bar { display: block; height: 6px; border-radius: 99px; background: var(--soft); margin-top: 6px; overflow: hidden; }
.bill .b-bar em { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--navy-2), var(--amber)); }
.bill .b-note { margin: 8px 2px 0; }

/* steps and plan cards */
.bill .b-step { display: flex; align-items: center; gap: .6rem; font: 700 1.35rem var(--display); color: var(--navy-dk); margin: 28px 0 14px; }
.bill .b-step span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--amber); color: #0a3d32; font: 700 .95rem var(--body); }
.bill .b-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; border: 0; margin: 0; padding: 0; }
.bill .b-plans.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bill .b-plan { position: relative; display: flex; flex-direction: column; gap: .2rem; padding: 22px 20px 18px; background: var(--card); border: 1.5px solid var(--rule); border-radius: var(--b-radius); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.bill .b-plan:hover { border-color: var(--navy-2); transform: translateY(-1px); }
.bill .b-plan input { position: absolute; opacity: 0; pointer-events: none; }
.bill .b-plan.on { border: 2px solid var(--navy); box-shadow: 0 6px 22px rgba(64,38,123,.14); background: linear-gradient(180deg, var(--tint) 0%, var(--card) 70%); }
.bill .b-plan:focus-within { outline: 2px solid var(--amber); outline-offset: 2px; }
.bill .b-plan > b { color: var(--muted); font-weight: 600; padding-right: 30px; }
.bill .b-price { font: 700 2.4rem/1.1 var(--body); color: var(--navy-dk); }
.bill .b-tick { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--rule); color: transparent; }
.bill .b-plan.on .b-tick { background: var(--navy); border-color: var(--navy); color: #fff; }
.bill .b-tag { position: absolute; top: -11px; left: 18px; background: var(--amber); color: #0a3d32; font-size: .72rem; font-weight: 700; padding: .2em .7em; border-radius: 999px; }

/* payment: methods + summary */
.bill .b-pay { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.bill .b-box { padding: 0; overflow: hidden; min-width: 0; }
.bill .b-panel { padding: 22px 24px 24px; }
.bill .b-panel h3 { font: 700 1.15rem var(--body); color: var(--navy-dk); margin: 0 0 .3rem; }
.bill .b-plogo { display: block; width: auto; margin: 0 0 .6rem; }
.bill .b-go { min-height: 48px; padding: .6em 1.4em; font-size: 1rem; }
.bill .b-brands { display: flex; gap: 8px; flex-wrap: wrap; margin: .9rem 0 1rem; }
.bill .b-mark { display: inline-flex; align-items: center; gap: .4rem; height: 40px; padding: 0 .8rem; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.bill .b-mark img { display: block; width: auto; }
.bill .b-mark b { font: 700 .85rem var(--body); color: #231f20; }
.bill .b-ops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: .8rem 0 1rem; border: 0; padding: 0; }
.bill .b-op { position: relative; display: flex; flex-direction: column; gap: .1rem; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer; background: var(--card); }
.bill .b-op input { position: absolute; opacity: 0; pointer-events: none; }
.bill .b-opdot { display: flex; align-items: center; height: 34px; margin-bottom: .4rem; padding: 2px 6px; border-radius: 8px; background: #fff; align-self: flex-start; }
.bill .b-opdot img { height: 28px; width: auto; max-width: 130px; }
.bill .b-op:has(input:checked) { border-color: var(--op); box-shadow: 0 0 0 1px var(--op) inset; background: color-mix(in srgb, var(--op) 7%, var(--card)); }
.bill .b-op:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }
.bill .b-op.soon { opacity: .55; cursor: not-allowed; }
.bill .b-op.live .small { color: var(--green); font-weight: 600; }
.bill .b-acc { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: .8rem 0; }
.bill .b-acc.one { grid-template-columns: minmax(0, 360px); }
.bill .b-acc > div { padding: 12px 14px; border-radius: 12px; background: var(--soft); min-width: 0; }
.bill .b-acc span { display: block; font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.bill .b-acc code { font: 600 .95rem ui-monospace, Menlo, monospace; color: var(--navy-dk); overflow-wrap: anywhere; }
.bill .b-copy { margin-top: .35rem; padding: .15em .6em; min-height: 28px; font-size: .78rem; border-color: var(--rule); }
.bill #payf { border-top: 1px solid var(--rule); margin-top: 1rem; padding-top: .2rem; }
.bill .b-sum { position: sticky; top: 16px; padding: 22px; border-top: 4px solid var(--amber); }
.bill .b-sum h3 { font: 700 1.1rem var(--display); color: var(--navy-dk); margin: 0 0 .6rem; }
.bill .b-sum-plan { margin: 0; font-weight: 600; }
.bill .b-sum-amt { font: 700 2.2rem/1.15 var(--body); color: var(--navy-dk); margin: .1rem 0 .8rem; }
.bill .b-sum-amt small { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); }
.bill .b-sum ul { list-style: none; padding: 14px 0 0; margin: 0 0 12px; border-top: 1px solid var(--rule); display: grid; gap: .55rem; font-size: .9rem; }
.bill .b-sum li { display: flex; gap: .5rem; align-items: flex-start; }
.bill .b-sum li svg { color: var(--green); margin-top: 3px; }

/* history */
.bill .b-hist { margin-top: 28px; padding: 20px 22px; }
.bill .b-hist h2 { display: flex; align-items: center; gap: .45rem; font: 700 1.15rem var(--display); color: var(--navy-dk); }
.bill .b-hist code { font: 600 .88rem ui-monospace, Menlo, monospace; }
.badge.warn { background: var(--amber-lt); color: var(--amber-dk); }
.badge.bad { background: #fbe7ea; color: var(--red); }
:root[data-theme="dark"] .badge.bad { background: #3a1d23; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge.bad { background: #3a1d23; } }

@media (max-width: 899px) {
  .bill .b-pay { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .bill .b-hero { padding: 22px 18px; }
  .bill .b-kpis { grid-template-columns: minmax(0, 1fr); }
  .bill .b-kpi + .b-kpi { border-left: 0; border-top: 1px solid var(--rule); }
  .bill .b-kpi { padding: 12px 16px; align-items: center; }
  .bill .b-kpi > svg { width: 32px; height: 32px; padding: 6px; }
  .bill .b-kpi b { font-size: 1.2rem; }
  .bill .b-plans, .bill .b-plans.four { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .bill .b-plan { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 .6rem; padding: 16px 52px 14px 16px; }
  .bill .b-plan > b { flex: 1 0 100%; padding: 0; }
  .bill .b-price { font-size: 1.8rem; }
  .bill .b-tick { top: 50%; transform: translateY(-50%); }
  .bill .b-panel { padding: 18px 16px 20px; }
  .bill .b-ops { grid-template-columns: minmax(0, 1fr); }
  .bill .b-op { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 .8rem; }
  .bill .b-opdot { margin: 0; }
  .bill .b-op b { flex: 1; }
  .bill .b-op .small { flex: 1 0 100%; }
  .bill .b-acc { grid-template-columns: minmax(0, 1fr); }
  .bill .b-go { width: 100%; }
  .bill .b-hist { padding: 16px; }
  /* history rows become cards */
  .bill .b-hist table, .bill .b-hist tbody, .bill .b-hist tr, .bill .b-hist td { display: block; }
  .bill .b-hist tr:first-child { display: none; }
  .bill .b-hist tr { padding: 12px 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; }
  .bill .b-hist td { padding: 0; border: 0; }
  .bill .b-hist td:nth-child(1) { color: var(--muted); font-size: .85rem; }
  .bill .b-hist td:nth-child(2) { grid-column: 1; font-weight: 600; }
  .bill .b-hist td:nth-child(3) { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-weight: 700; font-size: 1.05rem; }
  .bill .b-hist td:nth-child(4) { grid-column: 1; font-size: .85rem; }
  .bill .b-hist td:nth-child(5) { grid-column: 2; text-align: right; }
}
@media (prefers-reduced-motion: reduce) { .bill .b-plan { transition: none; } .bill .b-plan:hover { transform: none; } }
/* the visually hidden radios of the plan and operator buttons stay inside their card (they pushed the page 4px wide on phones) */
.bill .b-plan input, .bill .b-op input { left: 0; top: 0; width: 1px; height: 1px; margin: 0; }
.bill .b-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); }
.bill .b-lang button { border: 0; background: transparent; color: #ddd4f2; font: 700 .8rem var(--body); letter-spacing: .04em; padding: .35em .8em; border-radius: 999px; cursor: pointer; }
.bill .b-lang button[aria-pressed="true"] { background: #fff; color: var(--navy-dk); }
.bill .b-lang button:focus-visible { outline: 2px solid var(--amber); outline-offset: 1px; }
.bill .b-soon { display: flex; gap: .7rem; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: #fff3e6; border: 1px solid #ffd2a6; color: #7a3d00; margin-bottom: .6rem; }
.bill .b-soon svg { color: #ff7900; margin-top: 3px; }
.bill .b-soon p { margin: .2rem 0 0; }
:root[data-theme="dark"] .bill .b-soon { background: #3a2a18; border-color: #6b4521; color: #ffd2a6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bill .b-soon { background: #3a2a18; border-color: #6b4521; color: #ffd2a6; } }
.bill .b-op.soon { opacity: 1; cursor: pointer; } .bill .b-op.soon .small { color: #c25e00; }
/* mobile money buttons: the operator's logo only (name and status for screen readers) */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.bill .b-op { align-items: center; justify-content: center; min-height: 92px; padding: 14px; }
.bill .b-opdot { align-self: center; height: 56px; margin: 0; padding: 0; background: transparent; }
.bill .b-opdot img { height: 46px; max-width: 160px; }
@media (max-width: 640px) { .bill .b-ops { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .bill .b-op { min-height: 72px; padding: 8px; } .bill .b-opdot { height: 44px; } .bill .b-opdot img { height: 34px; max-width: 100%; } }
/* the M-Pesa mark is a red banner: rounded like a card */
.bill .b-opdot img[src*="m-pesa"] { border-radius: 6px; height: 54px; max-width: 170px; }
@media (max-width: 640px) { .bill .b-opdot img[src*="m-pesa"] { height: 38px; } }
/* Airtel Money's mark is upright (logo over « money »): a little taller than the wide marks */
.bill .b-opdot img[src*="airtel-money"] { height: 60px; }
@media (max-width: 640px) { .bill .b-opdot img[src*="airtel-money"] { height: 46px; } }
/* dark mode: operator logos on a white chip (Orange Money's black lettering vanished on the dark card) */
:root[data-theme="dark"] .bill .b-opdot { background: #fff !important; padding: 6px 10px; border-radius: 10px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bill .b-opdot { background: #fff !important; padding: 6px 10px; border-radius: 10px; } }

.bill [hidden] { display: none !important; }

/* ---------- payment in the style of a checkout (owner's model: Starlink order page, 2026-11-29) ----------
   method tiles in two columns (name left, square logo right), country code + phone, info box,
   and one button under « Total à payer aujourd'hui » with FAQ in the summary column */
.bill .b-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 22px 24px 0; border: 0; }
.bill .b-meth { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; padding: 12px 14px 12px 18px; border: 1.5px solid var(--rule); border-radius: 10px; background: var(--card); cursor: pointer; transition: background .15s, border-color .15s; }
.bill .b-meth:hover { border-color: var(--navy-2); }
.bill .b-meth input { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.bill .b-meth.on { background: var(--tint); border-color: var(--navy); }
.bill .b-meth.on .b-mname { font-weight: 700; color: var(--navy-dk); }
.bill .b-meth:has(input:focus-visible) { outline: 2px solid var(--amber); outline-offset: 2px; }
.bill .b-mname { font: 500 1.05rem var(--body); color: var(--text); letter-spacing: .01em; min-width: 0; }
.bill .b-mname small { display: block; font-size: .72rem; font-weight: 600; color: #c25e00; letter-spacing: 0; }
.bill .b-mico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 6px; background: #fff; overflow: hidden; color: var(--navy); }
.bill .b-mico img { width: 100%; height: 100%; object-fit: contain; }
.bill .b-mico img[src$=".svg"] { padding: 6px; }
.bill .b-mico svg { width: 26px; height: 26px; }
.bill .b-meth:not(.on) .b-mico { box-shadow: 0 0 0 1px var(--rule); }
.bill .b-panel { padding: 20px 24px 6px; border-top: 1px solid var(--rule); margin-top: 22px; }
.bill .b-lead { margin: 0 0 .8rem; color: var(--muted); }
.bill .b-brands { margin: 0 0 .6rem; }
.bill .b-inline { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.bill .b-st { margin: .4rem 0 0; min-height: 1.2em; font-weight: 600; color: var(--navy); }
.bill .b-tel { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); border: 1.5px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--card); }
.bill .b-tel:focus-within { border-color: var(--navy); }
.bill .b-cc { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-right: 1.5px solid var(--rule); background: var(--soft); }
.bill .b-cc svg { flex: none; border-radius: 3px; }
.bill .b-cc span { display: grid; line-height: 1.2; font-weight: 600; }
.bill .b-cc small { font-size: .72rem; color: var(--muted); font-weight: 500; }
.bill .b-tel input { border: 0; border-radius: 0; padding: 14px 16px; font-size: 1.05rem; background: transparent; min-width: 0; }
.bill .b-tel input:focus { outline: 0; }
.bill .b-info { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 8px; padding: 14px 16px; border-radius: 10px; background: #eaf2fb; color: #1d3550; }
.bill .b-info svg { flex: none; color: #2f7fd1; margin-top: 2px; }
.bill .b-info p { margin: 0; font-size: .93rem; line-height: 1.5; }
:root[data-theme="dark"] .bill .b-info { background: #182433; color: #cfe0f3; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .bill .b-info { background: #182433; color: #cfe0f3; } }
.bill #payf { border-top: 0; margin: 10px 0 0; padding: 0 24px 22px; }
.bill .b-panel + #payf, .bill .b-box > #payf { padding: 6px 24px 22px; }
.bill .b-slot #payf { padding: 6px 0 16px; }
/* summary column */
.bill .b-sum { padding: 24px; border-top: 0; }
.bill .b-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 6px; }
.bill .b-total span { font: 700 1.15rem var(--display); color: var(--navy-dk); }
.bill .b-total b { font: 700 1.9rem/1 var(--body); color: var(--navy-dk); }
.bill .b-sum-plan { margin: 0 0 16px; color: var(--muted); font-size: .92rem; }
.bill .b-cta { width: 100%; min-height: 54px; font-size: 1.05rem; border-radius: 10px; }
.bill .b-cta[disabled] { background: var(--soft); border-color: var(--rule); color: var(--muted); opacity: 1; }
.bill .b-cta-note { margin: .6rem 0 0; color: var(--muted); text-align: center; min-height: 1.2em; }
.bill .b-faq { margin-top: 22px; border-top: 1px solid var(--rule); }
.bill .b-faq h3 { font: 600 1rem var(--body); color: var(--navy-dk); margin: 16px 0 6px; }
.bill .b-faq details { border-bottom: 1px solid var(--rule); }
.bill .b-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; font-size: .93rem; }
.bill .b-faq summary::-webkit-details-marker { display: none; }
.bill .b-faq summary::after { content: "›"; font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .15s; }
.bill .b-faq details[open] summary::after { transform: rotate(90deg); }
.bill .b-faq details p { margin: 0 0 12px; font-size: .88rem; color: var(--muted); }
.bill .b-help { display: flex; justify-content: space-between; align-items: center; padding: 14px 0 4px; font-size: .93rem; text-decoration: none; color: var(--text); }
.bill .b-help:hover { color: var(--navy); }
.bill .b-terms { margin: 12px 0 0; }
@media (max-width: 899px) { .bill .b-sum { position: static; } }
@media (max-width: 640px) {
  .bill .b-methods { gap: 8px; padding: 16px 14px 0; }
  .bill .b-meth { min-height: 56px; padding: 10px 10px 10px 14px; }
  .bill .b-mname { font-size: .95rem; }
  .bill .b-mico { width: 34px; height: 34px; }
  .bill .b-panel { padding: 16px 14px 4px; margin-top: 16px; }
  .bill #payf, .bill .b-box > #payf { padding: 4px 14px 18px; }
  .bill .b-tel { grid-template-columns: auto minmax(0, 1fr); }
  .bill .b-sum { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { .bill .b-meth, .bill .b-faq summary::after { transition: none; } }

/* long titles wrap instead of widening the page (owner 2026-11-29: « scroll right / left, not à la ligne ») */
.two > *, .dash > *, .editor > *, .kb > *, .main, .wrap { min-width: 0; }
.mini > div, .grow > div { min-width: 0; }
.mini b, .mini .small, .grow .small, .card h3, .card b { overflow-wrap: anywhere; }
@media (max-width: 960px) { .two { grid-template-columns: minmax(0, 1fr); } }

/* « Système et clients » (/admin, 2026-11-29) */
.adm-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; border-bottom: 1px solid var(--rule); }
.adm-tabs button { display: inline-flex; align-items: center; gap: .4rem; border: 0; background: none; padding: 10px 14px; font: 600 .95rem var(--body); color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.adm-tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--navy); }
.adm-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.adm-kpi { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.adm-kpi span { color: var(--muted); font-size: .88rem; } .adm-kpi b { font: 700 1.7rem var(--display); color: var(--navy); } .adm-kpi small { color: var(--muted); }
.adm-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.adm-table table { min-width: 860px; }
.adm-table input[type=date] { width: 150px; }
.adm-form h2 { font-size: 1.15rem; } .adm-check { display: flex; gap: .5rem; align-items: center; margin: .4rem 0 1rem; font-size: .92rem; }
/* phones: admin tables become cards (no sideways scroll), long addresses wrap */
.adm code { overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .adm-table { overflow: visible; }
  .adm-table table { min-width: 0; width: 100%; }
  .adm-table tr:first-child:has(th) { display: none; }
  .adm-table table, .adm-table tbody, .adm-table tr, .adm-table td { display: block; width: 100%; }
  .adm-table tr { border: 1px solid var(--rule); border-radius: 12px; padding: 10px 12px; margin: 0 0 12px; background: var(--card); }
  .adm-table td { border: 0; padding: 4px 0; }
  .adm-table td:last-child { white-space: normal !important; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 8px; }
  .adm-table input[type=date] { width: 100%; }
}

/* knowledge base: one-time import of the official website */
.kb-site { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); }
.kb-site form { display: flex; gap: 8px; flex-wrap: wrap; } .kb-site input { flex: 1; min-width: 160px; }

/* ---------- admin console (admin.*, 2026-11-29: « rebrand as for company admin portal ») ---------- */
body.ap { background: #f4f5f8; }
.ap-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.ap-side { background: #17122b; color: #cfc8e6; display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; }
.ap-brand { display: flex; align-items: center; gap: .7rem; padding: 4px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 14px; }
.ap-brand b { display: block; color: #fff; font: 700 1.15rem var(--display); } .ap-brand small { display: block; color: #8f86b3; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.ap-nav { display: flex; flex-direction: column; gap: 2px; }
.ap-nav button { display: flex; align-items: center; gap: .7rem; width: 100%; border: 0; background: none; color: #cfc8e6; font: 500 .95rem var(--body); padding: 10px 12px; border-radius: 8px; cursor: pointer; text-align: left; border-left: 3px solid transparent; }
.ap-nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.ap-nav button[aria-current="page"] { background: #2a2147; color: #fff; border-left-color: #00b695; }
.ap-foot { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 14px; }
.ap-who { display: flex; gap: .6rem; align-items: center; padding: 0 6px 10px; } .ap-who b { display: block; color: #fff; font-size: .86rem; overflow-wrap: anywhere; } .ap-who small { color: #8f86b3; font-size: .76rem; }
.ap-who .avatar { width: 34px; height: 34px; flex: none; }
.ap-acts { display: flex; flex-direction: column; } .ap-acts button { display: flex; gap: .5rem; align-items: center; border: 0; background: none; color: #a9a1c9; font: 500 .88rem var(--body); padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; } .ap-acts button:hover { background: rgba(255,255,255,.06); color: #fff; }
.ap-main { min-width: 0; display: flex; flex-direction: column; }
.ap-top { display: flex; align-items: center; gap: 14px; height: 60px; padding: 0 28px; background: #fff; border-bottom: 1px solid #e4e6ec; position: sticky; top: 0; z-index: 5; }
.ap-crumb { color: #6b7280; font-size: .92rem; } .ap-crumb span { margin: 0 .3rem; color: #c4c8d0; } .ap-crumb b { color: #111827; }
.ap-sp { flex: 1; }
.ap-env { font: 700 .74rem var(--body); letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: #fff4d6; color: #8a5a00; }
.ap-env.live { background: #dcf6ee; color: #00704f; }
.ap-link { display: inline-flex; gap: .35rem; align-items: center; font-size: .9rem; font-weight: 600; text-decoration: none; }
.ap-content { padding: 26px 28px 40px; }
.ap-content .wrap { max-width: none !important; padding: 0; }
.ap .adm-tabs { display: none; }
.ap .page-h h1 { font-size: 1.6rem; }
.ap .card { box-shadow: 0 1px 2px rgba(17,24,39,.05); border: 1px solid #e6e8ee; }
/* admin sign-in */
.ap-login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ap-login-side { background: #17122b; color: #cfc8e6; padding: 48px 56px; display: flex; flex-direction: column; gap: 22px; }
.ap-login-side h2 { color: #fff; font: 700 1.9rem/1.25 var(--display); max-width: 440px; margin: 40px 0 0; }
.ap-login-side ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; } .ap-login-side li { display: flex; gap: .6rem; align-items: center; }
.ap-login-side .small { margin-top: auto; color: #8f86b3; }
.ap-login > .signin { align-self: center; justify-self: center; width: min(420px, 92%); margin: 40px 0; }
@media (max-width: 900px) {
  .ap-shell { grid-template-columns: 1fr; } .ap-side { position: static; height: auto; } .ap-nav { flex-direction: row; overflow-x: auto; } .ap-nav button { white-space: nowrap; width: auto; border-left: 0; border-bottom: 3px solid transparent; } .ap-nav button[aria-current="page"] { border-bottom-color: #00b695; }
  .ap-foot { display: none; } .ap-top { padding: 0 16px; } .ap-content { padding: 18px 16px 32px; }
  .ap-login { grid-template-columns: 1fr; } .ap-login-side { padding: 28px 22px; } .ap-login-side h2 { margin-top: 10px; font-size: 1.4rem; } .ap-login-side ul, .ap-login-side .small { display: none; }
}

.ap-side, .ap-nav, .ap-main { min-width: 0; }
.ap-out-m { display: none; border: 0; background: none; color: #6b7280; cursor: pointer; padding: 6px; }
@media (max-width: 900px) { .ap-out-m { display: inline-flex; } .ap-link { font-size: .82rem; } .ap-crumb > span, .ap-crumb > :not(b) { display: none; } .ap-top { gap: 10px; } }

/* status menu on application cards and list rows */
.st-sel{width:auto;max-width:100%;font-size:.8rem;padding:.2rem .45rem;margin-top:.4rem;border-radius:8px}
table.list .st-sel{margin-top:0}

/* client sign-in / sign-up: purple side panel beside the form */
.cl-login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.cl-side { background: linear-gradient(160deg, #56369f 0%, #40267b 70%, #2f1b5e 100%); color: #e6defa; padding: 44px 56px; display: flex; flex-direction: column; gap: 22px; }
.cl-side a { color: #fff; }
.cl-brand { display: inline-flex; gap: .7rem; align-items: center; text-decoration: none; }
.cl-brand img { border-radius: 10px; background: #fff; padding: 2px; }
.cl-brand b { display: block; font: 700 1.35rem var(--display); color: #fff; }
.cl-brand small { display: block; font: 700 .72rem var(--body); letter-spacing: .08em; text-transform: uppercase; color: #7ff0d4; }
.cl-side h2 { color: #fff; font: 700 2rem/1.2 var(--display); max-width: 460px; margin: 28px 0 0; }
.cl-lead { margin: 0; max-width: 460px; font-size: 1.05rem; line-height: 1.5; color: #d9cff5; }
.cl-feats { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 14px; max-width: 460px; }
.cl-feats li { display: flex; gap: .8rem; align-items: flex-start; font-size: .95rem; line-height: 1.4; color: #d9cff5; }
.cl-feats li > span { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,182,149,.18); color: #7ff0d4; }
.cl-feats b { display: block; color: #fff; font-weight: 700; }
.cl-trial { max-width: 460px; padding: 16px 18px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.cl-trial b { display: inline-flex; gap: .45rem; align-items: center; color: #ffc93c; }
.cl-trial p { margin: .4rem 0 0; font-size: .93rem; line-height: 1.45; }
.cl-clients { display: flex; gap: .8rem; align-items: center; font-size: .85rem; color: #bfb2e6; }
.cl-clients img { background: #fff; border-radius: 8px; padding: 5px 9px; height: 34px; width: auto; }
.cl-foot { margin: auto 0 0; font-size: .82rem; color: #a99bd6; }
.cl-login > .signin { align-self: center; justify-self: center; width: min(440px, 92%); margin: 40px 0; }
.cl-login .cl-mbrand { display: none; }
@media (max-width: 900px) {
  .cl-login { grid-template-columns: 1fr; }
  .cl-login > .signin { order: -1; margin: 20px auto; padding: 24px 20px; }
  .cl-login .cl-mbrand { display: inline-flex; }
  .cl-side { padding: 28px 20px 32px; gap: 18px; }
  .cl-side > .cl-brand { display: none; }
  .cl-side h2 { margin-top: 0; font-size: 1.45rem; }
}

/* sign-up: the visitor picks the plan; the chosen one opens its list of benefits */
.pl-pick { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: 8px; min-width: 0; }
.pl-pick legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: 8px; }
.pl-opt { display: grid; grid-template-columns: 18px minmax(0, 1fr); column-gap: .7rem; align-items: start; padding: 12px 14px; border: 1.5px solid var(--rule); border-radius: 12px; cursor: pointer; background: var(--card); }
.pl-opt:hover { border-color: var(--navy-2); }
.pl-opt input { accent-color: var(--navy); width: 18px; height: 18px; margin: 3px 0 0; }
.pl-head { display: flex; align-items: flex-start; gap: .6rem; min-width: 0; }
.pl-head > span { flex: 1; min-width: 0; line-height: 1.3; }
.pl-head b { font-weight: 700; color: var(--text); }
.pl-head small { display: block; color: var(--muted); font-size: .82rem; }
.pl-head em { font: 700 1.1rem var(--display); font-style: normal; color: var(--navy); white-space: nowrap; }
.pl-tag { display: inline-block; margin-left: .45rem; padding: 1px 8px; border-radius: 999px; background: var(--amber-lt); color: var(--amber-dk); font: 700 .7rem var(--body); font-style: normal; vertical-align: 2px; }
.pl-perks { display: none; grid-column: 2; list-style: none; margin: .6rem 0 0; padding: .6rem 0 0; border-top: 1px solid var(--rule); gap: 6px; }
.pl-perks li { display: flex; gap: .45rem; align-items: flex-start; font-size: .86rem; line-height: 1.35; color: var(--text); }
.pl-perks .i { flex: none; color: var(--amber-dk); margin-top: 1px; }
.pl-opt:has(input:checked) { border-color: var(--navy); background: color-mix(in srgb, var(--navy) 6%, var(--card)); }
.pl-opt:has(input:checked) .pl-perks { display: grid; }
.pl-opt:has(input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.pl-drc { display: flex; gap: .5rem; align-items: flex-start; margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--soft); font-size: .82rem; line-height: 1.4; color: var(--muted); }
.pl-drc .i { flex: none; color: var(--navy); margin-top: 2px; }
.bill .b-total b { white-space: nowrap; }
/* billing: what each plan gives, under its price (on phones only the chosen plan shows its list) */
.bill .b-perks { list-style: none; margin: .7rem 0 0; padding: .7rem 0 0; border-top: 1px solid var(--rule); display: grid; gap: 6px; }
.bill .b-perks li { display: flex; gap: .4rem; align-items: flex-start; font-size: .84rem; line-height: 1.35; color: var(--text); font-weight: 400; }
.bill .b-perks .i { flex: none; color: var(--amber-dk); margin-top: 1px; }
.bill .b-drc { margin: 12px 0 0; }
@media (max-width: 640px) { .bill .b-perks { flex: 1 0 100%; } .bill .b-plan:not(.on) .b-perks { display: none; } }
