/* Phase FN1 + FN11: Network CRM theme (FN11 "Fresh light": indigo, multicolour icon tiles, Plus Jakarta Sans). Prefix fn-. */
:root {
  --fn-font: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --fn-pri: #4f46e5; --fn-pri-2: #6366f1; --fn-pri-soft: #eef2ff; --fn-ink: #0f172a; --fn-ink-2: #334155; --fn-muted: #64748b;
  --fn-bg: #f5f6fb; --fn-card: #ffffff; --fn-line: #e5e7f0; --fn-good: #15803d; --fn-good-bg: #e8f7ee; --fn-watch: #b45309; --fn-watch-bg: #fef4e2;
  --fn-risk: #dc2626; --fn-risk-bg: #fdecec; --fn-wa: #16a34a; --fn-r: 16px; --fn-shadow: 0 1px 2px rgba(15,23,42,.04), 0 6px 20px rgba(15,23,42,.05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--fn-font); color: var(--fn-ink); background: var(--fn-bg); }
a { color: var(--fn-pri); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
small { font-size: 12px; }
.fn-muted { color: var(--fn-muted); }
.fn-warn { color: var(--fn-risk); }
.fn-mt { margin-top: 16px; }

/* shell */
.fn-app { display: flex; min-height: 100vh; }
.fn-side { position: sticky; top: 0; height: 100vh; width: 248px; flex: none; display: flex; flex-direction: column; background: #fff; color: var(--fn-ink-2); padding: 18px 14px; border-right: 1px solid var(--fn-line); overflow-y: auto; }
.fn-brand { display: flex; gap: 10px; align-items: center; color: var(--fn-ink); margin: 0 4px 20px; }
.fn-brand:hover { text-decoration: none; }
.fn-brand b { display: block; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.fn-brand small { display: block; color: var(--fn-muted); font-size: 11px; font-weight: 500; }
.fn-brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #ec4899 100%); color: #fff; font-weight: 800; flex: none; box-shadow: 0 6px 14px rgba(99,102,241,.35); }
.fn-nav { display: flex; flex-direction: column; gap: 2px; }
.fn-nav-h { margin: 14px 10px 6px; font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.fn-nav a { display: flex; gap: 11px; align-items: center; padding: 7px 10px; border-radius: 12px; color: var(--fn-ink-2); font-weight: 600; font-size: 13.5px; }
.fn-nav a:hover { background: #f5f6fb; text-decoration: none; color: var(--fn-ink); }
.fn-nav a.on { background: var(--fn-pri-soft); color: #3730a3; }
.fn-side-foot { margin-top: auto; border-top: 1px solid var(--fn-line); padding-top: 14px; }
.fn-me { display: flex; gap: 10px; align-items: center; }
.fn-me b { display: block; font-size: 13px; }
.fn-me small { display: block; color: var(--fn-muted); }
.fn-me-links { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 10px; }
.fn-me-links a { color: var(--fn-pri); font-size: 12px; font-weight: 600; }
.fn-av { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--fn-pri-soft); color: var(--fn-pri); font-weight: 700; font-size: 12px; flex: none; }
.fn-side .fn-av { background: linear-gradient(135deg, #e0e7ff, #fce7f3); color: #4338ca; }
.fn-av-s { width: 30px; height: 30px; font-size: 11px; }
.fn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fn-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px 28px; background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fn-line); }
.fn-top-brand { display: none; align-items: center; gap: 8px; color: var(--fn-ink); }
.fn-title { font-size: 19px; font-weight: 800; letter-spacing: -.01em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-search-btn { display: flex; align-items: center; gap: 8px; min-width: 300px; padding: 8px 12px; border: 1px solid var(--fn-line); border-radius: 10px; background: #fff; color: var(--fn-muted); font: inherit; cursor: pointer; }
.fn-search-btn span { flex: 1; text-align: left; }
.fn-search-btn kbd { font: 11px var(--fn-font); padding: 2px 6px; border: 1px solid var(--fn-line); border-radius: 6px; background: var(--fn-bg); }
.fn-content { padding: 22px 28px 40px; max-width: 1440px; width: 100%; }
.fn-flash { margin: 14px 28px 0; padding: 10px 14px; border-radius: 10px; font-weight: 500; }
.fn-flash-ok { background: var(--fn-good-bg); color: var(--fn-good); }
.fn-flash-bad { background: var(--fn-risk-bg); color: var(--fn-risk); }
.fn-tabs { display: none; }

/* cards + basics */
.fn-card { background: var(--fn-card); border: 1px solid var(--fn-line); border-radius: var(--fn-r); box-shadow: var(--fn-shadow); padding: 16px 18px; margin-bottom: 16px; }
.fn-card-flush { padding: 0; overflow: hidden; }
.fn-card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.fn-card-h h3 { font-size: 15px; font-weight: 600; }
.fn-card-h a { font-size: 13px; font-weight: 500; }
.fn-empty { color: var(--fn-muted); margin: 6px 0; }
.fn-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--fn-line); background: #fff; color: var(--fn-ink); font: 600 13px var(--fn-font); cursor: pointer; white-space: nowrap; }
.fn-btn:hover { text-decoration: none; border-color: #c7d2fe; background: #fafbff; }
.fn-btn-pri { background: var(--fn-pri); border-color: var(--fn-pri); color: #fff; }
.fn-btn-pri:hover { background: #4338ca; color: #fff; }
.fn-btn-wa { background: var(--fn-wa); border-color: var(--fn-wa); color: #fff; }
.fn-btn-wa:hover { background: #0f7a41; color: #fff; }
.fn-btn-sm { padding: 6px 10px; font-size: 12px; }
.fn-btn-block { width: 100%; margin-top: 8px; }
.fn-btn[disabled] { opacity: .6; pointer-events: none; }
.fn-input { padding: 9px 11px; border: 1px solid var(--fn-line); border-radius: 10px; background: #fff; font: 14px var(--fn-font); color: var(--fn-ink); min-width: 0; }
.fn-input:focus, .fn-btn:focus-visible, a:focus-visible { outline: 2px solid var(--fn-pri-2); outline-offset: 1px; }
textarea.fn-input { width: 100%; resize: vertical; }
.fn-grow { flex: 1; }
.fn-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fn-ib { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--fn-line); color: var(--fn-pri); background: #fff; }
.fn-ib:hover { background: var(--fn-pri-soft); text-decoration: none; }
.fn-ib-wa { color: var(--fn-wa); }
.fn-tag { display: inline-block; padding: 3px 9px; border-radius: 999px; background: #f1f5f9; color: var(--fn-ink-2); font-size: 12px; font-weight: 500; }
.fn-tag-bad { background: var(--fn-risk-bg); color: var(--fn-risk); }
.fn-tag-ok { background: var(--fn-good-bg); color: var(--fn-good); }
.fn-band { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.fn-band::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: currentColor; vertical-align: 1px; }
.fn-band-good { background: var(--fn-good-bg); color: var(--fn-good); }
.fn-band-watch { background: var(--fn-watch-bg); color: var(--fn-watch); }
.fn-band-risk { background: var(--fn-risk-bg); color: var(--fn-risk); }
.fn-off { opacity: .55; }

/* home */
.fn-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 24px; margin-bottom: 16px; border-radius: 18px; color: #fff; background: radial-gradient(120% 160% at 100% 0, #a855f7 0, #6366f1 40%, #3730a3 100%); }
.fn-hero h2 { font-size: 24px; font-weight: 700; margin: 2px 0 6px; }
.fn-hero .fn-muted { color: #e0e7ff; margin: 0; max-width: 640px; }
.fn-eyebrow { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #c7d2fe; }
.fn-hero-ring { --p: 0; width: 92px; height: 92px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.2) 0); }
.fn-hero-ring span { width: 74px; height: 74px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: #4338ca; text-align: center; }
.fn-hero-ring b { font-size: 22px; line-height: 1; }
.fn-hero-ring small { color: #e0e7ff; font-size: 11px; }
.fn-callout { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--fn-r); background: #fff8e8; border: 1px solid #f3dfb0; }
.fn-callout-soft { background: var(--fn-pri-soft); border-color: #c7d2fe; }
.fn-callout p { margin: 2px 0 0; color: var(--fn-ink-2); }
.fn-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fn-tile { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--fn-r); background: #fff; border: 1px solid var(--fn-line); box-shadow: var(--fn-shadow); color: var(--fn-ink); }
.fn-tile:hover { text-decoration: none; border-color: #c7d2fe; }
.fn-tile-l { font-size: 12px; color: var(--fn-muted); font-weight: 500; }
.fn-tile b { font-size: 26px; line-height: 1.15; font-weight: 700; }
.fn-tile small { color: var(--fn-muted); }
.fn-tile-risk { border-left: 4px solid var(--fn-risk); }
.fn-tile-watch { border-left: 4px solid var(--fn-watch); }
.fn-grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fn-stack > .fn-card:last-child { margin-bottom: 0; }
.fn-att { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--fn-line); }
.fn-att:first-of-type { border-top: 0; padding-top: 0; }
.fn-att-b { flex: 1; min-width: 0; }
.fn-att-n { font-weight: 600; color: var(--fn-ink); }
.fn-att-b small { display: block; color: var(--fn-muted); margin-top: 2px; }
.fn-att-a { display: flex; gap: 6px; }
.fn-why { margin: 6px 0 0; padding-left: 16px; color: var(--fn-ink-2); font-size: 13px; }
.fn-why li { margin: 1px 0; }
.fn-more { display: block; text-align: center; padding-top: 10px; font-weight: 500; }
.fn-ring { --p: 0; --c: var(--fn-good); width: 46px; height: 46px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), #e2e8f0 0); color: var(--fn-ink); }
.fn-ring:hover { text-decoration: none; }
.fn-ring span { width: 36px; height: 36px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; font-weight: 700; font-size: 13px; line-height: 1; text-align: center; }
.fn-ring-watch { --c: var(--fn-watch); }
.fn-ring-risk { --c: var(--fn-risk); }
.fn-ring-lg { width: 84px; height: 84px; }
.fn-ring-lg span { width: 68px; height: 68px; font-size: 22px; }
.fn-ring-lg small { display: block; font-size: 10px; font-weight: 500; color: var(--fn-muted); margin-top: 2px; }
.fn-fu { display: block; padding: 10px 0; border-top: 1px solid var(--fn-line); color: var(--fn-ink); }
.fn-fu:first-of-type { border-top: 0; padding-top: 0; }
.fn-fu:hover { text-decoration: none; }
.fn-fu b { display: block; font-weight: 600; }
.fn-fu small { display: block; color: var(--fn-muted); }
.fn-fu-d { float: right; font-size: 12px; font-weight: 600; color: var(--fn-pri); }
.fn-fu-d.late { color: var(--fn-risk); }
.fn-act { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--fn-line); color: var(--fn-ink); }
.fn-act:first-of-type { border-top: 0; padding-top: 0; }
.fn-act:hover { text-decoration: none; }
.fn-act-b { min-width: 0; }
.fn-act-b b { display: block; font-weight: 600; font-size: 13px; }
.fn-act-b small { display: block; }
.fn-act-i { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: #f1f5f9; color: var(--fn-ink-2); font-weight: 700; font-size: 12px; }
.fn-t-call { background: #e3f1ff; color: #1d5fb8; }
.fn-t-whatsapp { background: #e4f7ec; color: var(--fn-wa); }
.fn-t-meeting, .fn-t-visit { background: #f1eafe; color: #6b3fc6; }
.fn-t-note, .fn-t-email { background: #fff4dc; color: #8a5a00; }
.fn-t-service { background: var(--fn-pri-soft); color: var(--fn-pri); }
.fn-t-request { background: #fde9e7; color: #b42318; }
.fn-t-admission { background: var(--fn-good-bg); color: var(--fn-good); }
.fn-t-onboarding { background: #eaf0ff; color: #3a55b8; }

/* centres list */
.fn-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fn-chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.fn-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--fn-line); background: #fff; color: var(--fn-ink-2); font: 500 13px var(--fn-font); cursor: pointer; }
.fn-chip:hover { text-decoration: none; border-color: #c7d2fe; }
.fn-chip.on { background: var(--fn-pri); border-color: var(--fn-pri); color: #fff; }
.fn-chip-risk::before, .fn-chip-watch::before, .fn-chip-good::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.fn-chip-risk::before { background: var(--fn-risk); }
.fn-chip-watch::before { background: var(--fn-watch); }
.fn-chip-good::before { background: var(--fn-good); }
.fn-chip.on::before { background: #fff; }
.fn-chips-sm .fn-chip { padding: 4px 10px; font-size: 12px; }
.fn-count { margin-left: auto; font-size: 13px; }
.fn-table { width: 100%; border-collapse: collapse; }
.fn-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--fn-muted); padding: 10px 12px; background: #f8fafc; border-bottom: 1px solid var(--fn-line); white-space: nowrap; }
.fn-table td { padding: 11px 12px; border-bottom: 1px solid var(--fn-line); vertical-align: top; }
.fn-table tr:last-child td { border-bottom: 0; }
.fn-table tbody tr:hover { background: #fafbff; }
.fn-table td small { display: block; color: var(--fn-muted); }
.fn-table td > b + small { display: inline; }
.fn-col-name b { color: var(--fn-ink); }
.fn-col-ck { width: 36px; }
.fn-col-act { white-space: nowrap; text-align: right; }
.fn-col-act > * { vertical-align: middle; }
.fn-why1 { margin-top: 4px; max-width: 260px; }
.fn-bulk { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: center; margin-top: 12px; padding: 10px 14px; border-radius: 12px; background: #111827; color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.fn-bulk[hidden] { display: none; }
.fn-bulk span { flex: 1; }

/* centre 360 */
.fn-backlink { display: inline-block; margin-bottom: 10px; font-weight: 500; }
.fn-c-head { display: flex; gap: 18px; align-items: center; padding: 18px 20px; margin-bottom: 12px; background: #fff; border: 1px solid var(--fn-line); border-radius: 18px; box-shadow: var(--fn-shadow); }
.fn-c-id { flex: 1; min-width: 0; }
.fn-c-id h2 { font-size: 21px; font-weight: 700; }
.fn-c-id p { margin: 3px 0 8px; }
.fn-c-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.fn-c-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.fn-whybar { padding: 10px 14px; margin-bottom: 16px; border-radius: 12px; background: #fff8e8; border: 1px solid #f3dfb0; color: #6b4a00; font-size: 13px; }
.fn-c-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.fn-person { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--fn-line); }
.fn-person:first-of-type { border-top: 0; padding-top: 0; }
.fn-person b { display: block; font-size: 13px; }
.fn-person small, .fn-person a { display: block; font-size: 12px; }
.fn-person small { color: var(--fn-muted); }
.fn-addr { margin: 10px 0 0; font-size: 12px; color: var(--fn-ink-2); }
.fn-links a { display: block; padding: 6px 0; font-size: 13px; border-top: 1px solid var(--fn-line); }
.fn-links a:first-child { border-top: 0; }
.fn-composer .fn-seg { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 12px; background: #f1f5f9; }
.fn-seg label { min-width: 0; }
.fn-seg span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-bars-empty { margin: 4px 0 0; font-size: 12px; color: var(--fn-muted); }
@media (max-width: 560px) { .fn-composer .fn-seg { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.fn-seg input { position: absolute; opacity: 0; pointer-events: none; }
.fn-seg span { display: block; text-align: center; padding: 7px 8px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--fn-ink-2); cursor: pointer; }
.fn-seg input:checked + span { background: #fff; color: var(--fn-pri); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.fn-seg input:focus-visible + span { outline: 2px solid var(--fn-pri-2); }
.fn-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.fn-pills:empty { display: none; }
.fn-pill { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--fn-line); background: #fff; font: 500 12px var(--fn-font); color: var(--fn-ink-2); cursor: pointer; }
.fn-pill.on { background: var(--fn-pri-soft); border-color: var(--fn-pri-2); color: var(--fn-pri); }
.fn-composer-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.fn-composer-row select { flex: 1; min-width: 150px; }
.fn-date { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--fn-muted); }
.fn-tl { list-style: none; margin: 0; padding: 0; }
.fn-tl-day { position: sticky; top: 64px; z-index: 1; margin: 12px 0 6px; padding: 4px 0; font-size: 12px; font-weight: 600; color: var(--fn-muted); background: linear-gradient(#fff 70%, rgba(255,255,255,0)); }
.fn-tl-day:first-child { margin-top: 0; }
.fn-tl-i[hidden], .fn-tl-day[hidden], .fn-person[hidden], .fn-btn[hidden] { display: none; }
.fn-tl-i { display: flex; gap: 10px; padding: 8px 0; }
.fn-tl-i b { font-size: 13px; font-weight: 600; }
.fn-tl-i p { margin: 2px 0; color: var(--fn-ink-2); font-size: 13px; overflow-wrap: anywhere; }
.fn-tl-i small { display: block; }
.fn-periods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.fn-period { padding: 10px 12px; border-radius: 12px; background: #f8fafc; }
.fn-period:first-child { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 10px; }
.fn-period span { display: block; font-size: 12px; color: var(--fn-muted); }
.fn-period b { display: block; font-size: 22px; line-height: 1.2; }
.fn-period small { display: block; font-weight: 600; color: var(--fn-muted); }
.fn-period small em { font-style: normal; font-weight: 400; color: var(--fn-muted); margin-left: 4px; }
.fn-up { color: var(--fn-good) !important; }
.fn-down { color: var(--fn-risk) !important; }
.fn-bars-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--fn-muted); margin: 10px 0 6px; }
.fn-legend { display: flex; align-items: center; gap: 6px; }
.fn-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.fn-lg-now { background: var(--fn-pri); }
.fn-lg-ly { background: #fff; border: 2px solid #cbd5e1; margin-left: 6px; }
.fn-bars { display: flex; align-items: flex-end; gap: 4px; height: 110px; padding-bottom: 18px; position: relative; border-bottom: 1px solid var(--fn-line); }
.fn-bar { position: relative; flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; cursor: default; }
.fn-bar i { position: absolute; bottom: 0; display: block; border-radius: 4px 4px 0 0; }
.fn-bar-now { left: 18%; right: 18%; background: var(--fn-pri); min-height: 0; }
.fn-bar-ly { left: 6%; right: 6%; border: 2px solid #cbd5e1; border-bottom: 0; background: transparent; }
.fn-bar span { position: absolute; bottom: -18px; font-size: 10px; color: var(--fn-muted); }
.fn-bar:hover .fn-bar-now { background: var(--fn-pri-2); }
.fn-bars-day { height: 54px; padding-bottom: 0; gap: 2px; }
.fn-bars-day .fn-bar-now { left: 8%; right: 8%; }
.fn-mini-t { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12px; }
.fn-mini-t th, .fn-mini-t td { padding: 4px 6px; text-align: right; border-bottom: 1px solid var(--fn-line); }
.fn-mini-t th:first-child, .fn-mini-t td:first-child { text-align: left; }
.fn-mini-t th { color: var(--fn-muted); font-weight: 600; }
.fn-kv > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-top: 1px solid var(--fn-line); font-size: 13px; }
.fn-kv > div:first-child { border-top: 0; padding-top: 0; }
.fn-kv span { color: var(--fn-ink-2); }
.fn-kv-warn b { color: var(--fn-risk); }
.fn-req { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 8px 0; border-top: 1px solid var(--fn-line); }
.fn-req:first-of-type { border-top: 0; padding-top: 0; }
.fn-req b { font-size: 13px; }
.fn-req small { grid-column: 1; color: var(--fn-muted); }
.fn-req a { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 12px; }

/* Phase FN2: calls */
.fn-callchip { margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: #eef4ff; color: #1d4ed8; font-size: 13px; font-weight: 500; }
.fn-callchip.ok { background: var(--fn-good-bg); color: var(--fn-good); }
.fn-callchip.bad { background: var(--fn-risk-bg); color: var(--fn-risk); }
.fn-callchip[hidden], .fn-pair-msg[hidden] { display: none; }
.fn-callinfo { display: block; margin-top: 2px; font-size: 12px; color: var(--fn-ink-2); }
.fn-audio { display: block; width: 100%; max-width: 360px; height: 36px; margin: 6px 0 2px; }
.fn-card-warn { border-left: 4px solid var(--fn-watch); }
.fn-linkbtn { padding: 0; border: 0; background: none; color: var(--fn-pri); font: 12px var(--fn-font); cursor: pointer; }
.fn-sheet-row { padding: 10px 4px; border: 0; border-bottom: 1px solid var(--fn-line); background: none; text-align: left; color: var(--fn-ink); font: 500 14px var(--fn-font); cursor: pointer; }
.fn-steps { margin: 4px 0 6px; padding-left: 20px; color: var(--fn-ink-2); font-size: 13px; }
.fn-steps li { margin: 4px 0; }
.fn-btn-danger { color: var(--fn-risk); border-color: #f3c5b4; }

/* Phase FN4: inbox + ticket */
.fn-navbadge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #e0e7ff; color: #3730a3; font: 600 11px var(--fn-font); font-style: normal; text-align: center; }
.fn-navbadge.late { background: #f97316; color: #fff; }
.fn-tabs .fn-navbadge { margin-left: 2px; padding: 0 5px; background: var(--fn-pri); }
.fn-tabs .fn-navbadge.late { background: #f97316; color: #fff; }
.fn-t-new { background: #e0edff; color: #1d4ed8; }
.fn-t-prog { background: var(--fn-watch-bg); color: var(--fn-watch); }
.fn-t-wait { background: #fde9e7; color: #b42318; }
.fn-t-ticket { background: #fff1e6; color: #c2410c; }
.fn-row-late td:first-child { box-shadow: inset 4px 0 0 var(--fn-risk); }
.fn-dotnew { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2563eb; margin-right: 6px; vertical-align: 1px; }
.fn-tk-head h2 { font-size: 20px; margin: 8px 0 4px; }
.fn-tk-grid { grid-template-columns: minmax(0, 1fr) 320px; }
.fn-thread { display: flex; flex-direction: column; gap: 10px; }
.fn-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--fn-line); background: #fff; }
.fn-msg-centre { align-self: flex-start; background: #f8fafc; }
.fn-msg-office { align-self: flex-end; background: var(--fn-pri-soft); border-color: #c7d2fe; }
.fn-msg-note { align-self: flex-end; background: #fff8e8; border-color: #f3dfb0; }
.fn-msg-h { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; margin-bottom: 4px; }
.fn-msg-h small { color: var(--fn-muted); }
.fn-msg-b { font-size: 14px; overflow-wrap: anywhere; }
.fn-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fn-files a { padding: 4px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--fn-line); font-size: 12px; }
.fn-sys { align-self: center; font-size: 12px; color: var(--fn-muted); background: #f5f6fb; padding: 4px 12px; border-radius: 999px; text-align: center; }
.fn-composer .fn-seg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fn-composer-row input[type=file] { flex: 1; min-width: 160px; padding: 6px; font-size: 12px; }
.fn-kv-form { display: flex; flex-direction: column; gap: 10px; }
@media (max-width: 991px) { .fn-tk-grid { grid-template-columns: minmax(0, 1fr); } .fn-msg { max-width: 94%; } }

/* Phase FN5 + FN6 */
.fn-ml-auto { margin-left: auto; }
.fn-tiles-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fn-bars-tall { height: 170px; }
.fn-mini-lg { font-size: 13px; }
.fn-mini-lg td, .fn-mini-lg th { padding: 7px 6px; }
.fn-mini-lg tr.on td { background: var(--fn-pri-soft); font-weight: 600; }
.fn-spark { display: inline-flex; align-items: flex-end; gap: 2px; height: 26px; vertical-align: middle; }
.fn-spark i { display: block; width: 5px; background: var(--fn-pri); border-radius: 2px 2px 0 0; }
.fn-spark i.z { background: #cbd5e1; }
.fn-trend { font-weight: 600; }
.fn-trend-up { color: var(--fn-good); }
.fn-trend-down, .fn-trend-zero { color: var(--fn-risk); }
.fn-trend-flat { color: var(--fn-muted); }
.fn-why-sm { font-size: 12px; margin-top: 2px; padding-left: 14px; min-width: 190px; }
.fn-table td > b + small { margin-left: 4px; }
.fn-table .fn-band { white-space: nowrap; }
.fn-page-discipline .fn-table td small, .fn-page-growth .fn-table td small, .fn-page-team .fn-table td small { display: block; margin-left: 0; }
.fn-page-discipline .fn-col-name { min-width: 150px; }
.fn-page-discipline .fn-card-flush, .fn-page-growth .fn-card-flush { overflow-x: auto; }
.fn-page-discipline .fn-col-act a { display: flex; margin: 0 0 6px; }
.fn-disc { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.fn-disc small { color: var(--fn-muted); }
.fn-staffcalls { margin-top: 10px; font-size: 13px; }
.fn-staffcalls > b { display: block; margin-bottom: 4px; font-size: 12px; color: var(--fn-muted); }
.fn-staffcalls div { display: flex; justify-content: space-between; padding: 3px 0; border-top: 1px dashed var(--fn-line); }
@media (max-width: 1280px) { .fn-tiles-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Phase FN3: WhatsApp */
.fn-wa-nums { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.fn-wa-more { padding: 6px 10px; font-size: 13px; border-radius: 999px; max-width: 100%; }
.fn-seg.fn-seg-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 12px; background: #f1f5f9; }
.fn-seg.fn-seg-2 label { min-width: 0; }
.fn-dot-open { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; margin-left: 4px; vertical-align: 1px; }
.fn-wa-thread { display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; padding: 10px; margin-bottom: 10px; border-radius: 12px; background: #efeae2; }
.fn-wa-thread .fn-empty { background: #fff; padding: 8px 12px; border-radius: 10px; align-self: center; }
.fn-bub { max-width: 82%; padding: 7px 10px; border-radius: 10px; background: #fff; font-size: 13px; box-shadow: 0 1px 1px rgba(0,0,0,.08); overflow-wrap: anywhere; }
.fn-bub.out { align-self: flex-end; background: #d9fdd3; }
.fn-bub.in { align-self: flex-start; }
.fn-bub[hidden] { display: none; }
.fn-bub-t { display: block; font-size: 11px; color: #4f46e5; font-weight: 600; margin-bottom: 2px; }
.fn-bub-m { display: block; text-align: right; font-size: 10px; color: var(--fn-muted); margin-top: 2px; }
.fn-wa-text { display: flex; gap: 8px; align-items: flex-end; }
.fn-wa-text[hidden], .fn-wa-closed[hidden], .fn-wa-prev[hidden] { display: none; }
.fn-wa-text textarea { flex: 1; }
.fn-wa-closed { padding: 8px 12px; margin-bottom: 8px; border-radius: 10px; background: #fff8e8; color: #6b4a00; font-size: 13px; }
.fn-wa-tpl { margin-top: 8px; }
.fn-wa-tpl summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--fn-pri); margin-bottom: 8px; }
.fn-wa-prev { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #d9fdd3; font-size: 13px; white-space: pre-wrap; }
.fn-grid-bulk { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.fn-pad { padding: 14px 16px 0; }
.fn-bw-list { max-height: 560px; overflow-y: auto; padding: 4px 8px 8px; }
.fn-bw-row { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.fn-bw-row:hover { background: #f8fafc; }
.fn-bw-row span:nth-child(2) { flex: 1; min-width: 0; }
.fn-bw-row b { display: block; font-size: 13px; }
.fn-bw-row small { display: block; color: var(--fn-muted); font-size: 12px; }
.fn-bw-map { display: grid; grid-template-columns: 52px 1fr 1fr 1fr; gap: 6px; align-items: center; margin-top: 8px; }
.fn-bw-map input[hidden] { display: none; }
@media (max-width: 767px) { .fn-bw-map { grid-template-columns: 1fr; } }

/* Phase FN7: marketing */
.fn-mkt-t { border-top: 1px solid var(--fn-line); padding: 10px 0; }
.fn-mkt-t:first-of-type { border-top: 0; padding-top: 0; }
.fn-mkt-t summary { cursor: pointer; list-style: none; }
.fn-mkt-t summary::-webkit-details-marker { display: none; }
.fn-mkt-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.fn-mkt-t small { display: block; color: var(--fn-muted); margin-top: 4px; }
.fn-prog { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.fn-prog i { display: block; height: 100%; background: var(--fn-pri); border-radius: 999px; }
.fn-steps-list { list-style: none; margin: 10px 0 0; padding: 0; }
.fn-steps-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0 7px 12px; border-left: 3px solid #cbd5e1; margin-bottom: 4px; }
.fn-steps-list li.done { border-left-color: var(--fn-good); }
.fn-steps-list li.done b { color: var(--fn-muted); text-decoration: line-through; }
.fn-steps-list b { display: block; font-size: 13px; }
.fn-mkt-assign { margin-top: 10px; }
.fn-mkt-assign summary { cursor: pointer; font-weight: 600; color: var(--fn-pri); font-size: 13px; margin-bottom: 8px; }
.fn-ck-1 { grid-template-columns: minmax(0, 1fr); max-height: 260px; }
.fn-office-step { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--fn-line); }
.fn-office-step b { display: block; font-size: 13px; }
.fn-office-step small { display: block; color: var(--fn-muted); }
.fn-t-marketing { background: #fde7f3; color: #a3195b; }

/* coordinators */
.fn-page-h { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.fn-page-h p { margin: 0; max-width: 760px; }
.fn-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.fn-field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; }
.fn-field .fn-input { width: 100%; }
.fn-check { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.fn-ck { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; max-height: 360px; overflow: auto; margin: 10px 0; padding: 4px; }
.fn-ck label { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--fn-line); border-radius: 10px; cursor: pointer; }
.fn-ck label:has(input:checked) { border-color: var(--fn-pri-2); background: var(--fn-pri-soft); }
.fn-ck b { display: block; font-size: 13px; font-weight: 600; }
.fn-ck small { display: block; color: var(--fn-muted); }
.fn-form-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.fn-denied { text-align: center; padding: 40px 20px; }
.fn-denied h3 { margin-bottom: 8px; }

/* search palette, sheets, tooltip */
.fn-pal { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; background: rgba(15,23,42,.45); }
.fn-pal[hidden], .fn-sheet[hidden] { display: none; }
.fn-pal-box { width: 100%; max-width: 560px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.25); overflow: hidden; }
.fn-pal-box input { width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--fn-line); font: 16px var(--fn-font); outline: none; }
.fn-pal-list { max-height: 50vh; overflow: auto; padding: 6px; }
.fn-pal-list p { padding: 10px 12px; margin: 0; }
.fn-pal-list a { display: block; padding: 9px 12px; border-radius: 10px; color: var(--fn-ink); }
.fn-pal-list a b { display: block; font-weight: 600; }
.fn-pal-list a small { color: var(--fn-muted); }
.fn-pal-list a.on, .fn-pal-list a:hover { background: var(--fn-pri-soft); text-decoration: none; }
.fn-pal-foot { padding: 8px 14px; font-size: 11px; color: var(--fn-muted); border-top: 1px solid var(--fn-line); }
.fn-sheet { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15,23,42,.45); }
.fn-sheet-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; padding: 18px; background: #fff; border-radius: 16px; }
.fn-sheet-box > a:not(.fn-btn) { padding: 10px 4px; border-bottom: 1px solid var(--fn-line); color: var(--fn-ink); font-weight: 500; }
.fn-sheet-box button[data-fn-close] { margin-top: 4px; padding: 10px; border: 0; background: none; color: var(--fn-muted); font: 500 14px var(--fn-font); cursor: pointer; }
.fn-sheet-box p { margin: 0 0 6px; }
.fn-tip { position: fixed; z-index: 120; pointer-events: none; padding: 6px 9px; border-radius: 8px; background: #111827; color: #fff; font-size: 12px; max-width: 240px; }
.fn-tip[hidden] { display: none; }
.fn-toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 130; padding: 10px 16px; border-radius: 10px; background: #111827; color: #fff; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.fn-toast.bad { background: var(--fn-risk); }

/* login */
.fn-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: radial-gradient(100% 120% at 0 0, #6366f1 0, #3730a3 50%, #1e1b4b 100%); }
.fn-login-wrap { display: grid; grid-template-columns: 1fr 400px; gap: 40px; align-items: center; width: 100%; max-width: 940px; }
.fn-login-art { color: #e0e7ff; }
.fn-login-art h2 { color: #fff; font-size: 34px; margin: 18px 0 10px; }
.fn-login-art p { font-size: 16px; color: #c7d2fe; max-width: 420px; }
.fn-brand-xl { width: 56px; height: 56px; font-size: 24px; border-radius: 16px; }
.fn-login-card { display: flex; flex-direction: column; gap: 14px; padding: 26px; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.fn-login-card .fn-flash { margin: 0; }
.fn-login-head { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.fn-login-head b { display: block; font-size: 17px; }
.fn-login-head small { color: var(--fn-muted); }
.fn-pw { display: flex; border: 1px solid var(--fn-line); border-radius: 10px; overflow: hidden; }
.fn-pw input { flex: 1; border: 0; padding: 10px 11px; font: 14px var(--fn-font); outline: none; min-width: 0; }
.fn-pw button { border: 0; background: #f5f6fb; padding: 0 12px; font: 600 12px var(--fn-font); color: var(--fn-ink-2); cursor: pointer; }
.fn-login-card .fn-field input { padding: 10px 11px; border: 1px solid var(--fn-line); border-radius: 10px; font: 14px var(--fn-font); }
.fn-login-note { font-size: 12px; margin: 0; text-align: center; }

/* responsive */
@media (max-width: 1280px) {
  .fn-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fn-c-grid { grid-template-columns: 260px minmax(0, 1fr); }
  .fn-c-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
  .fn-c-right .fn-card { margin-bottom: 0; }
}
@media (max-width: 991px) {
  .fn-side { display: none; }
  .fn-top { padding: 10px 16px; }
  .fn-top-brand { display: flex; }
  .fn-title { display: none; }
  .fn-search-btn { min-width: 0; flex: 1; }
  .fn-search-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fn-search-btn kbd { display: none; }
  .fn-content { padding: 16px 16px calc(90px + env(safe-area-inset-bottom)); }
  .fn-flash { margin: 12px 16px 0; }
  .fn-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--fn-line); padding-bottom: env(safe-area-inset-bottom); }
  .fn-tabs a, .fn-tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border: 0; background: none; color: var(--fn-muted); font: 500 11px var(--fn-font); cursor: pointer; }
  .fn-tabs a.on { color: var(--fn-pri); }
  .fn-tabs a:hover { text-decoration: none; }
  .fn-grid-2, .fn-c-grid { grid-template-columns: minmax(0, 1fr); }
  .fn-c-right { display: block; }
  .fn-c-right .fn-card { margin-bottom: 16px; }
  .fn-c-mid { order: -1; }
  .fn-c-left { order: 1; }
  .fn-c-right { order: 0; }
  .fn-c-head { flex-wrap: wrap; }
  .fn-c-actions { width: 100%; justify-content: stretch; }
  .fn-c-actions .fn-btn { flex: 1; }
  .fn-ck { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-sheet { align-items: flex-end; padding: 0; }
  .fn-sheet-box { max-width: none; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .fn-tl-day { top: 56px; }
  .fn-login-wrap { grid-template-columns: 1fr; gap: 20px; max-width: 420px; }
  .fn-login-art { display: none; }
}
@media (max-width: 767px) {
  .fn-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fn-tile b { font-size: 22px; }
  .fn-hero { padding: 18px; }
  .fn-hero h2 { font-size: 20px; }
  .fn-hero-ring { width: 72px; height: 72px; }
  .fn-hero-ring span { width: 58px; height: 58px; }
  .fn-callout, .fn-page-h { flex-direction: column; align-items: stretch; }
  .fn-filters .fn-input { flex: 1 1 45%; }
  .fn-filters .fn-grow { flex-basis: 100%; }
  .fn-count { margin-left: 0; width: 100%; }
  .fn-card-flush { background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .fn-table thead { display: none; }
  .fn-table, .fn-table tbody, .fn-table td { display: block; width: 100%; }
  .fn-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 14px; width: 100%; }
  .fn-table td.fn-col-name, .fn-table td.fn-col-act, .fn-table td[data-l="Health"] { grid-column: 1 / -1; }
  .fn-table td small { font-size: 12px; }
  .fn-table tr { position: relative; margin-bottom: 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--fn-line); border-radius: var(--fn-r); box-shadow: var(--fn-shadow); }
  .fn-table td { padding: 4px 0; border: 0; }
  .fn-table td[data-l]:not(.fn-col-name)::before { content: attr(data-l); display: block; font-size: 11px; color: var(--fn-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
  .fn-table td.fn-col-name { padding-right: 34px; font-size: 15px; }
  .fn-table .fn-col-ck { position: absolute; top: 12px; right: 12px; width: auto; }
  .fn-table .fn-col-act { text-align: left; padding-top: 10px; }
  .fn-table tbody tr:hover { background: #fff; }
  .fn-ck { grid-template-columns: minmax(0, 1fr); }
  .fn-form-grid { grid-template-columns: minmax(0, 1fr); }
  .fn-bulk { bottom: calc(70px + env(safe-area-inset-bottom)); flex-wrap: wrap; }
}

/* Phase FN9: retention */
.fn-kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.fn-col { background: #f1f5f9; border-radius: 14px; padding: 10px; min-height: 120px; }
.fn-col-h { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 13px; }
.fn-col-h span { background: #fff; border-radius: 999px; padding: 0 8px; font-weight: 600; }
.fn-col-lost .fn-col-h b { color: var(--fn-risk); }
.fn-col-renewed .fn-col-h b { color: var(--fn-good); }
.fn-kcard { background: #fff; border: 1px solid var(--fn-line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.fn-kcard.late { border-left: 4px solid var(--fn-risk); }
.fn-kcard b { display: block; font-size: 13px; color: var(--fn-ink); }
.fn-kcard small { display: block; font-size: 12px; color: var(--fn-muted); }
.fn-kcard .fn-input { padding: 6px 8px; font-size: 12px; }
.fn-ren-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
[data-ren-lost][hidden] { display: none; }
.fn-page-retention .fn-table td small { display: block; }

/* Phase FN10: AI centre summary */
.fn-ai { margin-bottom: 16px; border-color: #c7d2fe; background: linear-gradient(180deg, #f5f7ff 0, #fff 120px); }
.fn-ai.busy .fn-ai-wait::after { content: ''; display: inline-block; width: 12px; height: 12px; margin-left: 8px; border: 2px solid var(--fn-pri-2); border-right-color: transparent; border-radius: 50%; animation: fnspin .8s linear infinite; vertical-align: -2px; }
@keyframes fnspin { to { transform: rotate(360deg); } }
.fn-ai-badge { display: inline-block; padding: 1px 7px; margin-right: 6px; border-radius: 6px; background: var(--fn-pri); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .04em; vertical-align: 2px; }
.fn-btn-ghost { background: transparent; }
.fn-ai #fnAiBody { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; }
.fn-ai #fnAiBody > .fn-empty, .fn-ai #fnAiBody > .fn-ai-meta { grid-column: 1 / -1; }
.fn-ai-sum p { margin: 0 0 8px; font-size: 15px; line-height: 1.55; }
.fn-ai-sum ul { margin: 0; padding-left: 18px; color: var(--fn-ink-2); font-size: 14px; }
.fn-ai-sum li { margin-bottom: 4px; }
.fn-ai-acts h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--fn-muted); }
.fn-ai-act { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--fn-line); }
.fn-ai-act:first-of-type { border-top: 0; padding-top: 0; }
.fn-ai-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--fn-pri-soft); color: var(--fn-pri); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.fn-ai-act-b { min-width: 0; }
.fn-ai-act-b b { display: block; font-size: 14px; }
.fn-ai-act-b p { margin: 2px 0 4px; font-size: 13.5px; color: var(--fn-ink-2); }
.fn-ai-act-b small { display: block; font-size: 12px; }
.fn-ai-act-btns { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.fn-ai-meta { margin: 4px 0 0; font-size: 12px; color: var(--fn-muted); }
.fn-ai-tools { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--fn-line); flex-wrap: wrap; }
.fn-ai-draft { flex: 1 1 420px; min-width: 0; }
.fn-ai-draft summary { cursor: pointer; font-weight: 600; color: var(--fn-pri); padding: 6px 0; }
.fn-ai-draft-f { display: grid; grid-template-columns: 1.2fr .8fr 1.6fr auto; gap: 8px; align-items: end; margin-top: 8px; }
.fn-ai-draft-f label span { display: block; font-size: 12px; color: var(--fn-muted); margin-bottom: 3px; }
.fn-ai-draft-f label { min-width: 0; }
.fn-ai-draft-f .fn-input, .fn-ai-report .fn-input { width: 100%; min-width: 0; box-sizing: border-box; }
.fn-ai-out { margin-top: 10px; }
.fn-ai-out textarea { width: 100%; box-sizing: border-box; font-size: 14px; line-height: 1.5; }
.fn-ai-out-btns { display: flex; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.fn-ai-report { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fn-ai-report > span { font-weight: 600; font-size: 14px; }
.fn-ai-report select.fn-input { width: auto; }
.fn-flash-target { box-shadow: 0 0 0 3px var(--fn-pri-2); transition: box-shadow .3s; }
@media (max-width: 900px) {
  .fn-ai #fnAiBody { grid-template-columns: 1fr; }
  .fn-ai-draft-f { grid-template-columns: 1fr 1fr; }
  .fn-ai-goal { grid-column: 1 / -1; }
  .fn-ai-draft-f .fn-btn { grid-column: 1 / -1; }
  .fn-ai-report { width: 100%; display: grid; grid-template-columns: 1fr auto; }
  .fn-ai-report > span { grid-column: 1 / -1; }
}

/* ==================================================================
   Phase FN11: "Fresh light" theme parts + Centre 360 redesign
   ================================================================== */
body { font-size: 14px; letter-spacing: -.003em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, .fn-card-h h3 { letter-spacing: -.01em; }
.fn-card-h h3 { font-size: 15.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fn-card { border-color: #e9ebf3; }
.fn-btn { border-radius: 11px; font-weight: 700; }
.fn-btn svg { flex: none; }
.fn-btn-pri { background: linear-gradient(135deg, #6366f1, #4f46e5); border-color: #4f46e5; box-shadow: 0 4px 12px rgba(79,70,229,.25); }
.fn-btn-pri:hover { background: #4338ca; }
.fn-btn-wa { box-shadow: 0 4px 12px rgba(22,163,74,.22); }
.fn-btn-wa:hover { background: #15803d; }
.fn-input:focus { outline: 2px solid #a5b4fc; outline-offset: 0; border-color: #818cf8; }
.fn-chip.on { background: var(--fn-ink); border-color: var(--fn-ink); }
.fn-tag { background: #f1f5f9; }
.fn-tile:hover, .fn-chip:hover { border-color: #c7d2fe; }

/* multicolour icon tiles (menu, card titles) */
.fn-ico { --c: #4f46e5; --cb: #eef2ff; display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--cb); color: var(--c); }
.fn-ico svg { width: 17px; height: 17px; }
.fn-ico-sm { width: 26px; height: 26px; border-radius: 8px; }
.fn-ico-indigo { --c: #4f46e5; --cb: #eef2ff; }
.fn-ico-blue { --c: #2563eb; --cb: #e0edff; }
.fn-ico-orange { --c: #ea580c; --cb: #ffedd5; }
.fn-ico-green { --c: #16a34a; --cb: #dcfce7; }
.fn-ico-pink { --c: #db2777; --cb: #fce7f3; }
.fn-ico-violet { --c: #7c3aed; --cb: #ede9fe; }
.fn-ico-teal { --c: #0d9488; --cb: #ccfbf1; }
.fn-ico-amber { --c: #d97706; --cb: #fef3c7; }
.fn-ico-cyan { --c: #0891b2; --cb: #cffafe; }
.fn-ico-slate { --c: #475569; --cb: #e2e8f0; }
.fn-ico-red { --c: #dc2626; --cb: #fee2e2; }
.fn-nav a.on .fn-ico { background: var(--c); color: #fff; box-shadow: 0 4px 10px rgba(15,23,42,.12); }
.fn-tabs a.on { color: var(--fn-pri); }
.fn-tabs a.on svg { filter: drop-shadow(0 2px 4px rgba(79,70,229,.3)); }

/* ---- Centre 360: header card (like Hiring CRM) */
.fn-c-card { padding: 0; overflow: hidden; }
.fn-c-card .fn-c-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; padding: 20px 22px; margin: 0; background: linear-gradient(120deg, #f5f7ff 0, #fff 45%, #fff 70%, #fdf4ff 100%); border: 0; border-radius: 0; box-shadow: none; }
.fn-c-who { display: flex; gap: 16px; align-items: center; min-width: 0; flex: 1 1 420px; }
.fn-c-id h2 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.fn-c-sub { display: flex; flex-wrap: wrap; gap: 2px 0; margin-top: 8px; color: var(--fn-ink-2); font-size: 13px; }
.fn-c-sub span { white-space: nowrap; }
.fn-c-sub span + span::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 9px 2px; border-radius: 50%; background: #cbd5e1; }
.fn-tag-coord { background: #ede9fe; color: #6d28d9; }
.fn-c-card .fn-c-actions { flex: 0 1 auto; align-items: center; }
.fn-c-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--fn-line); }
.fn-c-stats > div { padding: 12px 18px; border-left: 1px solid var(--fn-line); min-width: 0; }
.fn-c-stats > div:first-child { border-left: 0; }
.fn-c-stats span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fn-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-c-stats b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.01em; margin-top: 2px; }
.fn-c-stats small { display: block; font-size: 12px; color: var(--fn-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-c-why { padding: 10px 22px; border-top: 1px solid #fde7c2; background: #fffaf0; color: #7c4a03; font-size: 13px; }

/* ---- Centre 360: two columns */
.fn-c2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.fn-c-main, .fn-c-aside { min-width: 0; }
.fn-activity .fn-composer { padding: 12px; margin-bottom: 14px; border-radius: 14px; background: #f8f9fd; border: 1px solid var(--fn-line); }
.fn-activity .fn-composer textarea { background: #fff; }
.fn-composer .fn-seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin-bottom: 10px; background: none; border-radius: 0; }
.fn-composer .fn-seg label { flex: 1 1 auto; min-width: 0; }
.fn-composer .fn-seg span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--fn-line); background: #fff; font-size: 13px; font-weight: 600; color: var(--fn-ink-2); white-space: nowrap; overflow: visible; text-overflow: clip; }
.fn-composer .fn-seg span:hover { border-color: #c7d2fe; }
.fn-composer .fn-seg input:checked + span { color: #fff; background: var(--fn-pri); box-shadow: 0 3px 10px rgba(15,23,42,.14); border-color: transparent; }
.fn-seg-call input:checked + span { background: #2563eb; }
.fn-seg-whatsapp input:checked + span { background: #16a34a; }
.fn-seg-meeting input:checked + span { background: #7c3aed; }
.fn-seg-visit input:checked + span { background: #db2777; }
.fn-seg-email input:checked + span { background: #0891b2; }
.fn-seg-note input:checked + span { background: #d97706; }
.fn-seg-call span svg { color: #2563eb; } .fn-seg-whatsapp span svg { color: #16a34a; } .fn-seg-meeting span svg { color: #7c3aed; }
.fn-seg-visit span svg { color: #db2777; } .fn-seg-email span svg { color: #0891b2; } .fn-seg-note span svg { color: #d97706; }
.fn-composer .fn-seg input:checked + span svg { color: #fff; }
.fn-tl-h { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 10px; }
.fn-tl-h b { font-size: 14px; }
.fn-tl-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.fn-tl-tabs .fn-chip { flex: none; }
.fn-tl-tabs .fn-chip b { padding: 0 7px; border-radius: 999px; background: #f1f5f9; color: var(--fn-ink); font-size: 11px; }
.fn-tl-tabs .fn-chip.on b { background: rgba(255,255,255,.2); color: #fff; }
.fn-tl-day { top: 62px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.fn-tl-i { position: relative; padding: 9px 0; }
.fn-tl-i .fn-act-i { width: 32px; height: 32px; border-radius: 50%; }
.fn-tl-i:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 44px; bottom: -6px; width: 2px; background: #eceef5; }

/* ---- WhatsApp chat box */
.fn-wa-h h3 { gap: 8px; }
.fn-wa-bar { display: none; }
.fn-wa-thread { height: 400px; max-height: none; overscroll-behavior: contain; background-color: #efeae2; background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 14px 14px; border: 1px solid #e7e1d6; scroll-behavior: smooth; }
.fn-wa-open { display: none; }
.fn-wa-comp { padding: 8px; margin: 0 -2px; border-radius: 12px; background: #f8f9fd; }
.fn-wa-text textarea { background: #fff; border-radius: 20px; padding: 9px 14px; min-height: 42px; }
.fn-wa-text .fn-btn { border-radius: 999px; height: 42px; }
.fn-bub { border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.fn-bub.out { border-top-right-radius: 3px; }
.fn-bub.in { border-top-left-radius: 3px; }
.fn-bub-t { color: #4f46e5; }

/* ---- AI card in the new colours */
.fn-ai { border-color: #dfe3fb; background: linear-gradient(180deg, #f5f7ff 0, #fff 140px); }
.fn-ai-badge { background: linear-gradient(135deg, #6366f1, #a855f7); }
.fn-ai-n { background: #eef2ff; color: #4f46e5; }

@media (max-width: 1360px) {
  .fn-c-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fn-c-stats > div:nth-child(4) { border-left: 0; }
  .fn-c-stats > div:nth-child(n+4) { border-top: 1px solid var(--fn-line); }
}
@media (max-width: 1180px) {
  /* one column: cards in priority order (chat preview, activity, help requests, renewal, numbers, contacts...) */
  .fn-c2 { display: flex; flex-direction: column; gap: 0; }
  .fn-c-main, .fn-c-aside { display: contents; }
  .fn-c2 > * > .fn-card, .fn-c2 > * > section { order: 20; min-width: 0; width: 100%; max-width: 100%; }
  #fnWa { order: 1; } #fnActivity { order: 2; } #fnTickets { order: 3; } #fnRet { order: 4; } #fnGrowth { order: 5; }
  #fnLeads { order: 6; } [data-fn-people] { order: 7; } #fnMkt { order: 8; } #fnOldReq { order: 9; }
}
@media (max-width: 991px) {
  .fn-side { display: none; }
  .fn-c-card .fn-c-head { padding: 16px; }
  .fn-c-who { flex-basis: 100%; }
  .fn-c-id h2 { font-size: 20px; }
  .fn-c-who { align-items: flex-start; gap: 12px; }
  .fn-c-who .fn-ring-lg { width: 62px; height: 62px; }
  .fn-c-who .fn-ring-lg span { width: 50px; height: 50px; font-size: 17px; }
  .fn-c-who .fn-ring-lg small { font-size: 9px; }
  .fn-c-sub { font-size: 12.5px; }
  .fn-c-card .fn-c-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .fn-c-stats > div { padding: 10px 14px; }
  .fn-c-why { padding: 10px 16px; }
  /* phones: chat as a preview, "Open chat" makes it full screen */
  .fn-wa-thread { height: 210px; }
  .fn-wa:not(.full) .fn-wa-thread { pointer-events: none; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%); mask-image: linear-gradient(to bottom, transparent 0, #000 35%); }
  .fn-wa:not(.full) .fn-wa-comp { display: none; }
  .fn-wa-open { display: flex; }
  .fn-wa.full { position: fixed; inset: 0; z-index: 95; margin: 0; padding: 0; border: 0; border-radius: 0; display: flex; flex-direction: column; background: #efeae2; }
  .fn-wa.full .fn-wa-h, .fn-wa.full .fn-wa-open { display: none; }
  .fn-wa.full .fn-wa-bar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 6px; background: #075e54; color: #fff; }
  .fn-wa.full .fn-wa-bar .fn-av { background: rgba(255,255,255,.2); color: #fff; }
  .fn-wa-bar-t { min-width: 0; }
  .fn-wa-bar-t b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fn-wa-bar-t small { color: #cdeee6; }
  .fn-wa-back { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: #fff; cursor: pointer; }
  .fn-wa.full .fn-wa-nums { margin: 0; padding: 8px 10px; background: #fff; border-bottom: 1px solid #e7e1d6; flex-wrap: nowrap; overflow-x: auto; }
  .fn-wa.full .fn-wa-nums .fn-chip { flex: none; }
  .fn-wa.full .fn-wa-thread { flex: 1; height: auto; margin: 0; border: 0; border-radius: 0; }
  .fn-wa.full .fn-wa-comp { display: block; margin: 0; border-radius: 0; background: #f0f2f5; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); max-height: 55vh; overflow-y: auto; }
  body.fn-noscroll { overflow: hidden; }
  body.fn-noscroll .fn-tabs { display: none; }
}
@media (max-width: 560px) {
  .fn-composer .fn-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fn-composer .fn-seg span { padding: 8px 6px; font-size: 12.5px; gap: 5px; }
  .fn-c-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fn-c-stats > div:nth-child(n) { border-left: 1px solid var(--fn-line); border-top: 1px solid var(--fn-line); }
  .fn-c-stats > div:nth-child(odd) { border-left: 0; }
  .fn-c-stats > div:nth-child(-n+2) { border-top: 0; }
}

/* ==================================================================
   Phase FN12: Today dashboard - main actions + charts
   categorical (contacts): call #2563eb, WhatsApp #16a34a, meet #7c3aed, other #d97706 (validated, CVD-safe)
   ================================================================== */
.fn-hero { padding: 20px 24px; }
.fn-cta { display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.fn-cta-next { grid-row: span 1; display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: var(--fn-r); background: #fff; border: 1px solid #dfe3fb; box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 10px 26px rgba(79,70,229,.10); position: relative; overflow: hidden; }
.fn-cta-next::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899); }
.fn-cta-k { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6366f1; }
.fn-cta-row { display: flex; gap: 12px; align-items: center; }
.fn-cta-b { min-width: 0; }
.fn-cta-name { display: block; font-size: 17px; font-weight: 800; color: var(--fn-ink); letter-spacing: -.01em; }
.fn-cta-b p, .fn-cta-next > p { margin: 2px 0; font-size: 13px; color: var(--fn-ink-2); }
.fn-cta-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.fn-cta-a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--fn-r); background: #fff; border: 1px solid var(--fn-line); box-shadow: var(--fn-shadow); color: var(--fn-ink); transition: transform .12s, box-shadow .12s; }
.fn-cta-a:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,23,42,.08); border-color: #c7d2fe; }
.fn-cta-a .fn-ico { margin-bottom: 6px; }
.fn-cta-a b { font-size: 24px; font-weight: 800; line-height: 1.1; }
.fn-cta-a b.fn-cta-t { font-size: 15px; line-height: 1.3; }
.fn-cta-a > span:not(.fn-ico) { font-weight: 700; font-size: 13px; }
.fn-cta-a small { color: var(--fn-muted); font-size: 12px; }
.fn-cta-a.hot { border-color: #fdba74; background: linear-gradient(180deg, #fff7ed 0, #fff 70%); }
.fn-cta-a.hot b { color: #c2410c; }

.fn-charts { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.fn-ch { display: flex; flex-direction: column; }
.fn-ch-wide .fn-ch-adm { flex: 1; min-height: 200px; height: auto; }
.fn-charts > .fn-card { margin-bottom: 0; }
.fn-ch-sum { margin: -4px 0 10px; font-size: 13px; color: var(--fn-ink-2); }
.fn-ch-sum b { font-size: 20px; color: var(--fn-ink); margin-right: 4px; }
.fn-ch-adm { height: 200px; gap: 8px; }
.fn-ch-adm .fn-bar-now { left: 16%; right: 16%; border-radius: 4px 4px 0 0; }
.fn-bar-v { position: absolute; left: 0; right: 0; text-align: center; font: 700 12px var(--fn-font); font-style: normal; color: var(--fn-ink); }
.fn-ch-adm .fn-bar span { font-size: 11px; bottom: -20px; }
.fn-ch-tbl { margin-top: 18px; font-size: 13px; }
.fn-ch-tbl summary { cursor: pointer; color: var(--fn-muted); font-weight: 600; font-size: 12px; }
.fn-ch-sub { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--fn-line); font-size: 13px; }

/* donut: status colours (healthy / watch / at risk) + labels, never colour alone */
.fn-donut-w { display: flex; align-items: center; gap: 20px; }
.fn-donut { --g: 0%; --w: 0%; width: 120px; height: 120px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--fn-good) 0 var(--g), #fff 0 calc(var(--g) + .4%), var(--fn-watch) 0 var(--w), #fff 0 calc(var(--w) + .4%), var(--fn-risk) 0 100%); }
.fn-donut span { width: 84px; height: 84px; border-radius: 50%; background: #fff; display: grid; place-items: center; align-content: center; text-align: center; }
.fn-donut b { font-size: 24px; font-weight: 800; line-height: 1; }
.fn-donut small { color: var(--fn-muted); font-size: 11px; }
.fn-dl { list-style: none; margin: 0; padding: 0; flex: 1; }
.fn-dl a { display: flex; align-items: center; gap: 8px; padding: 6px 0; color: var(--fn-ink-2); font-size: 13px; border-top: 1px solid var(--fn-line); }
.fn-dl li:first-child a { border-top: 0; }
.fn-dl a:hover { text-decoration: none; color: var(--fn-ink); }
.fn-dl i { width: 10px; height: 10px; border-radius: 3px; }
.fn-dl b { margin-left: auto; color: var(--fn-ink); }
.fn-d-good { background: var(--fn-good); } .fn-d-watch { background: var(--fn-watch); } .fn-d-risk { background: var(--fn-risk); }

/* horizontal bars (renewal stages, lead funnel, ranking) */
.fn-hbar { display: grid; grid-template-columns: 96px minmax(0, 1fr) 36px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.fn-hbar span { color: var(--fn-ink-2); }
.fn-hbar i, .fn-rk i { display: block; height: 10px; border-radius: 999px; background: #f1f3f9; overflow: hidden; }
.fn-hbar em, .fn-rk em { display: block; height: 100%; border-radius: 999px; background: #6366f1; }
.fn-hbar b { text-align: right; }
.fn-hb-renewed { background: var(--fn-good) !important; }
.fn-hb-lost { background: var(--fn-risk) !important; }
.fn-fun { grid-template-columns: 170px minmax(0, 1fr) 48px; }
.fn-fun-0 { background: #a5b4fc !important; } .fn-fun-1 { background: #6366f1 !important; } .fn-fun-2 { background: #3730a3 !important; }

/* stacked contacts per day */
.fn-wl { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 14px; margin: -4px 0 10px; padding: 0; font-size: 12px; color: var(--fn-ink-2); }
.fn-wl li { display: flex; align-items: center; gap: 6px; }
.fn-wl i { width: 10px; height: 10px; border-radius: 3px; }
.fn-wl b { color: var(--fn-ink); }
.fn-w-call { background: #2563eb; } .fn-w-whatsapp { background: #16a34a; } .fn-w-meet { background: #7c3aed; } .fn-w-other { background: #d97706; }
.fn-stack-bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-bottom: 18px; border-bottom: 1px solid var(--fn-line); position: relative; }
.fn-sb { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.fn-sb-col { width: 70%; max-width: 26px; display: flex; flex-direction: column; gap: 2px; min-height: 0; }
.fn-sb-col i { display: block; min-height: 3px; }
.fn-sb-col i:first-child { border-radius: 4px 4px 0 0; }
.fn-sb span { position: absolute; bottom: -18px; font-size: 10px; color: var(--fn-muted); }
.fn-sb:hover .fn-sb-col { filter: brightness(1.1); }
.fn-sla { display: flex; flex-direction: column; gap: 2px; margin-top: 26px; padding: 12px 14px; border-radius: 12px; background: #f8f9fd; }
.fn-sla div { display: flex; align-items: baseline; gap: 10px; }
.fn-sla b { font-size: 24px; font-weight: 800; }
.fn-sla span { font-size: 13px; color: var(--fn-ink-2); }

/* ranking */
.fn-rank { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.fn-rank-h { display: block; font-size: 12px; font-weight: 700; color: var(--fn-muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.fn-rk { display: grid; grid-template-columns: minmax(0, 1fr) 90px 30px; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--fn-line); color: var(--fn-ink); font-size: 13px; }
.fn-rk:hover { text-decoration: none; color: var(--fn-pri); }
.fn-rk span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-rk b { text-align: right; }
.fn-rk-low small { color: var(--fn-muted); font-size: 11px; text-align: right; white-space: nowrap; }
.fn-rk-low b { color: var(--fn-risk); }

@media (max-width: 1360px) {
  .fn-cta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fn-cta-next { grid-column: 1 / -1; }
}
@media (max-width: 1180px) {
  .fn-charts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .fn-cta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .fn-cta-btns .fn-btn { flex: 1; }
  .fn-cta-a { padding: 12px; }
  .fn-cta-a small { display: none; }
  .fn-ch-adm { height: 160px; gap: 4px; }
  .fn-rank { grid-template-columns: minmax(0, 1fr); }
  .fn-fun { grid-template-columns: 120px minmax(0, 1fr) 40px; }
  .fn-donut { width: 104px; height: 104px; }
  .fn-donut span { width: 72px; height: 72px; }
}

/* Phase FN13: centre requests */
.fn-h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.fn-rq-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.fn-rq-tab { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 14px; border: 1px solid var(--fn-line); background: #fff; color: var(--fn-ink-2); font-weight: 700; font-size: 13.5px; box-shadow: var(--fn-shadow); }
.fn-rq-tab:hover { text-decoration: none; border-color: #c7d2fe; color: var(--fn-ink); }
.fn-rq-tab.on { border-color: #a5b4fc; background: var(--fn-pri-soft); color: #3730a3; }
.fn-rq-tab .fn-navbadge { margin-left: 2px; }
.fn-rq-empty { text-align: center; padding: 34px 18px; }
.fn-rq-empty b { display: block; font-size: 16px; margin-bottom: 4px; }
.fn-rq-table td small { display: block; color: var(--fn-muted); }
.fn-rq-acts { gap: 8px; }
.fn-c-actions form { display: inline-flex; }
.fn-chipset { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-chipset span { padding: 4px 10px; border-radius: 999px; background: #f1f5f9; font-size: 12.5px; font-weight: 600; color: var(--fn-ink-2); }
.fn-ck-1 label span { min-width: 0; }
.fn-ck-auto { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); max-height: 300px; }
@media (max-width: 767px) {
  .fn-rq-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .fn-rq-tab { flex: none; }
  .fn-c-actions form, .fn-c-actions form .fn-btn { width: 100%; }
}

/* Phase FN14: HelpDesk */
.fn-hd-form { max-width: 980px; }
.fn-hd-form .fn-card[hidden], .fn-hd-form [data-hd-sec][hidden], .fn-hd-students label[hidden], [data-hd-none][hidden] { display: none; }
.fn-hd-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--fn-line); }
.fn-hd-row:first-child { border-top: 0; }
.fn-hd-kept { grid-column: 1 / -1; font-size: 12px; }
.fn-hd-find { width: 100%; margin-bottom: 8px; }
.fn-hd-foot { position: sticky; bottom: 12px; justify-content: flex-end; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.9); backdrop-filter: blur(6px); }
.fn-hd-item { padding: 12px 0; border-top: 1px solid var(--fn-line); }
.fn-hd-item:first-of-type { border-top: 0; padding-top: 0; }
.fn-hd-item > b { display: block; font-size: 14px; }
.fn-hd-desc { margin-top: 6px; color: var(--fn-ink-2); font-size: 14px; overflow-wrap: anywhere; }
.fn-hd-desc p { margin: 0 0 6px; }
.fn-hd-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fn-hd-pick { max-width: 640px; }
.fn-hd-q { min-width: 220px; }
@media (max-width: 767px) {
  .fn-hd-row { grid-template-columns: minmax(0, 1fr); }
  .fn-hd-foot { bottom: calc(70px + env(safe-area-inset-bottom)); }
  .fn-hd-foot .fn-btn { width: 100%; }
}

/* Phase FN15: onboarding, notify, setup */
.fn-onb-prog { display: block; width: 160px; height: 8px; margin: 2px 0 4px; }
.fn-onb-prog-lg { width: 200px; display: inline-block; vertical-align: middle; margin: 0 0 0 6px; }
.fn-onb-dates { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.fn-onb-step .fn-card-h h3 { gap: 10px; }
.fn-onb-sub { margin: 14px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--fn-muted); }
.fn-onb-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid var(--fn-line); font-size: 13px; }
.fn-onb-item:first-of-type { border-top: 0; }
.fn-onb-item p { margin: 4px 0; color: var(--fn-ink-2); }
.fn-onb-add { margin-top: 8px; }
.fn-onb-add summary { cursor: pointer; color: var(--fn-pri); font-weight: 600; font-size: 13px; }
.fn-span2 { grid-column: 1 / -1; }
.fn-onb-thread { gap: 6px; }
.fn-onb-thread .fn-msg { max-width: 92%; padding: 7px 11px; }
.fn-onb-list { list-style: none; margin: 0 0 6px; padding: 0; }
.fn-onb-list li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 4px; border-top: 1px solid var(--fn-line); }
.fn-onb-list li:first-child { border-top: 0; }
.fn-onb-list label { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; min-width: 0; }
.fn-onb-list label small { display: block; color: var(--fn-muted); font-size: 11px; }
.fn-onb-mv { display: flex; gap: 2px; flex: none; }
.fn-onb-mv button { width: 26px; height: 26px; border: 1px solid var(--fn-line); border-radius: 7px; background: #fff; cursor: pointer; color: var(--fn-ink-2); }
.fn-onb-mv button:hover { border-color: #a5b4fc; color: var(--fn-pri); }
[data-nt-list][hidden], .fn-setup-wait[hidden] { display: none; }
.fn-nt-to { margin-bottom: 4px; }
.fn-setup { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; align-items: start; }
.fn-setup .fn-card { margin-bottom: 0; }
.fn-setup-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.fn-setup-bar .fn-backlink { margin: 0; }
.fn-setup-bar select { margin-left: auto; max-width: 280px; }
.fn-setup-wrap { position: relative; background: #fff; border: 1px solid var(--fn-line); border-radius: var(--fn-r); overflow: hidden; box-shadow: var(--fn-shadow); }
.fn-setup-wait { position: absolute; top: 16px; left: 18px; }
.fn-setup-frame { display: block; width: 100%; height: calc(100vh - 150px); min-height: 520px; border: 0; background: #f5f6fb; }
@media (max-width: 767px) {
  .fn-setup-bar select { margin-left: 0; max-width: none; width: 100%; }
  .fn-setup-frame { height: calc(100vh - 230px); }
  .fn-onb-prog-lg { width: 120px; }
}
/* Phase FN15: more menu items - tighter sidebar */
.fn-side { scrollbar-width: thin; padding-top: 14px; }
.fn-brand { margin-bottom: 14px; }
.fn-nav a { padding: 5px 10px; }
.fn-nav-h { margin: 10px 10px 4px; }
.fn-nav .fn-ico { width: 28px; height: 28px; }
.fn-brand small { white-space: nowrap; }

/* Phase FN16: call only from the app, send email / WhatsApp by phone, templates, live chat */
.fn-logfields[hidden], .fn-send[hidden], .fn-callonly[hidden], [data-way][hidden], [data-tplfile][hidden] { display: none; }
.fn-callonly { display: flex; gap: 12px; align-items: flex-start; padding: 14px; margin: 4px 0 2px; border: 1px dashed #c7d2fe; border-radius: 12px; background: #eef2ff; font-size: 13px; }
.fn-callonly p { margin: 4px 0 6px; color: var(--fn-ink-2); }
.fn-send { display: flex; flex-direction: column; gap: 10px; padding: 14px; margin: 4px 0 2px; border: 1px solid var(--fn-line); border-radius: 12px; background: #fafbff; }
.fn-send-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fn-send textarea { resize: vertical; min-height: 96px; }
.fn-send-files { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.fn-filebtn { position: relative; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.fn-filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fn-filebtn span { padding: 6px 12px; border: 1px dashed #a5b4fc; border-radius: 999px; color: var(--fn-pri); font-weight: 600; background: #fff; }
.fn-filebtn em { font-style: normal; color: var(--fn-muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-send-foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.fn-send-foot .fn-linkbtn { margin-left: auto; }
.fn-send-ways { align-self: flex-start; }
.fn-hint { margin: 0; font-size: 12px; color: var(--fn-muted); }
.fn-note-bad { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fef2f2; color: #991b1b; font-size: 12.5px; }
.fn-logfields { display: flex; flex-direction: column; gap: 10px; }
.fn-logfields > .fn-linkbtn { align-self: flex-start; }
.fn-live { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #dcfce7; color: #166534; font-style: normal; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fn-tpl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.fn-tpl { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.fn-tpl h4 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.fn-tpl pre { margin: 0; white-space: pre-wrap; font: 12.5px/1.5 var(--fn-font); color: var(--fn-ink-2); max-height: 150px; overflow: auto; }
.fn-tpl-foot { display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; font-size: 12px; color: var(--fn-muted); }
.fn-tpl-foot form { margin: 0 0 0 auto; }
.fn-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-vars code { padding: 2px 7px; border-radius: 6px; background: #eef2ff; color: #3730a3; font-size: 12px; cursor: pointer; }
.fn-tpl-form { display: grid; gap: 12px; max-width: 720px; }
@media (max-width: 767px) {
  .fn-send-grid { grid-template-columns: 1fr; }
  .fn-send-foot .fn-btn { flex: 1 1 auto; }
  .fn-send-foot .fn-linkbtn { margin-left: 0; }
}
.fn-page-act { display: flex; gap: 8px; flex-wrap: wrap; }

/* Phase FN17: Centre 360 slim header + colourful tabs, students */
.fn-csticky { position: sticky; top: 61px; z-index: 15; margin: -6px -28px 16px; padding: 8px 28px 0; background: rgba(245,246,251,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fn-line); }
.fn-cbar { display: flex; align-items: center; gap: 12px; min-width: 0; }
.fn-cbar-back { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: var(--fn-ink-2); flex: none; }
.fn-cbar-back:hover { background: #fff; text-decoration: none; }
.fn-ring-sm { width: 38px; height: 38px; }
.fn-ring-sm span { width: 30px; height: 30px; font-size: 12px; }
.fn-cbar-id { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.fn-cbar-id b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-cbar-id small { color: var(--fn-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-cbar-act { display: flex; gap: 8px; flex: none; }
.fn-ctabs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 10px; scrollbar-width: thin; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.fn-ctab { display: inline-flex; align-items: center; gap: 8px; flex: none; padding: 6px 14px 6px 6px; border: 1px solid var(--fn-line); border-radius: 999px; background: #fff; color: var(--fn-ink); font-size: 13px; font-weight: 600; white-space: nowrap; scroll-snap-align: start; transition: border-color .15s, box-shadow .15s, transform .15s; }
.fn-ctab:hover { text-decoration: none; border-color: #c7d2fe; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(79,70,229,.10); }
.fn-ctab.on { background: var(--fn-ink); border-color: var(--fn-ink); color: #fff; box-shadow: 0 6px 16px rgba(15,23,42,.18); }
.fn-ctab.on .fn-ico { background: rgba(255,255,255,.16); color: #fff; }
.fn-ctab-body { min-width: 0; }
.fn-ctab-more { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 14px; font-size: 13px; }
.fn-ctab-links p { margin: 0 0 14px; }
.fn-linkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.fn-linktile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--fn-line); border-radius: 14px; background: #fafbff; color: var(--fn-ink); transition: border-color .15s, box-shadow .15s; }
.fn-linktile:hover { text-decoration: none; border-color: #a5b4fc; box-shadow: 0 6px 18px rgba(79,70,229,.10); }
.fn-linktile small { color: var(--fn-pri); font-weight: 600; }
.fn-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fn-stat-link { display: flex; flex-direction: column; gap: 4px; margin: 0; color: var(--fn-ink); }
.fn-stat-link:hover { text-decoration: none; border-color: #a5b4fc; }
.fn-stat-link b { font-size: 28px; }
.fn-stat-link small { color: var(--fn-muted); }
.fn-tag-warn { background: var(--fn-watch-bg); color: var(--fn-watch); }
.fn-block { display: block; }
.fn-av-lg { width: 64px; height: 64px; font-size: 20px; }
.fn-av-img { object-fit: cover; padding: 0; }
.fn-stu-photo { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; flex: none; border: 1px solid var(--fn-line); }
.fn-stu-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fn-stu-filters .fn-stu-q { flex: 1 1 260px; min-width: 0; }
.fn-stu-filters select { max-width: 240px; }
.fn-tablecard { padding: 0; overflow: hidden; }
.fn-stu-who { display: flex; align-items: center; gap: 10px; color: var(--fn-ink); }
.fn-stu-who:hover { text-decoration: none; }
.fn-stu-who:hover b { color: var(--fn-pri); }
.fn-stu-who span { display: flex; flex-direction: column; min-width: 0; }
.fn-stu-who small { color: var(--fn-muted); font-size: 12px; }
.fn-stu-act { white-space: nowrap; text-align: right; }
.fn-stu-act .fn-btn { margin-left: 4px; }
.fn-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.fn-table-sm td, .fn-table-sm th { padding: 8px 10px; font-size: 13px; }
.fn-att-days { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-att { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; padding: 6px 4px; border-radius: 10px; background: #f1f5f9; font-size: 11px; color: var(--fn-muted); }
.fn-att b { font-size: 14px; color: var(--fn-ink); }
.fn-att-p { background: var(--fn-good-bg); } .fn-att-p b { color: var(--fn-good); }
.fn-att-a { background: var(--fn-risk-bg); } .fn-att-a b { color: var(--fn-risk); }
.fn-att-l, .fn-att-h { background: var(--fn-watch-bg); } .fn-att-l b, .fn-att-h b { color: var(--fn-watch); }
@media (max-width: 1023px) {
  .fn-csticky { top: 57px; margin: -4px -16px 14px; padding: 6px 16px 0; }
}
@media (max-width: 767px) {
  .fn-cbar-id small, .fn-cbar .fn-ring { display: none; }
  .fn-cbar-id b { font-size: 15px; }
  .fn-ctabs { padding: 8px 2px; }
  .fn-ctab { padding: 4px 12px 4px 4px; font-size: 12.5px; }
  .fn-cbar-act .fn-btn:not(.fn-btn-pri) { display: none; }
  .fn-grid3 { grid-template-columns: 1fr; }
  .fn-stu-filters select { max-width: none; flex: 1 1 45%; }
  .fn-stu-act { text-align: left; }
  .fn-stu-act .fn-btn { margin: 0 4px 0 0; }
}
/* Phase FN17: student details as a two-column list */
.fn-dl-grid { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 14px; margin: 0; font-size: 13.5px; }
.fn-dl-grid dt { color: var(--fn-muted); font-weight: 500; margin: 0; }
.fn-dl-grid dd { margin: 0; color: var(--fn-ink); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 767px) { .fn-linkgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .fn-linktile { padding: 12px; } }

/* Phase FN17b: no top bar on computers (search in the sidebar), slim centre tabs while scrolling,
   phones: menu drawer + top bar and bottom tabs hide while scrolling down */
.fn-side-search { width: 100%; min-width: 0; margin: 0 0 14px; padding: 8px 10px; font-size: 13px; }
.fn-side-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-side-close, .fn-top-menu, .fn-top-search { display: none; }
.fn-ptitle { margin: 0 0 14px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--fn-ink); }
.fn-scrim[hidden] { display: none; }
@media (min-width: 992px) {
  .fn-top { display: none; }
  .fn-csticky { top: 0; margin: -22px -28px 16px; padding: 12px 28px 0; }
}
/* slim tabs once the page is scrolled */
.fn-csticky .fn-cbar, .fn-csticky .fn-ctabs, .fn-csticky .fn-ctab, .fn-csticky .fn-ctab .fn-ico { transition: padding .18s ease, font-size .18s ease, width .18s ease, height .18s ease, opacity .18s ease; }
.fn-csticky.is-compact { padding-top: 4px; box-shadow: 0 6px 16px rgba(15,23,42,.06); }
.fn-csticky.is-compact .fn-cbar { display: none; }
.fn-csticky.is-compact .fn-ctabs { padding: 4px 2px 6px; scrollbar-width: none; }
.fn-csticky.is-compact .fn-ctabs::-webkit-scrollbar { display: none; }
.fn-csticky.is-compact .fn-ctab { padding: 3px 11px 3px 3px; font-size: 12px; }
.fn-csticky.is-compact .fn-ctab .fn-ico { width: 22px; height: 22px; border-radius: 7px; }
.fn-csticky.is-compact .fn-ctab .fn-ico svg { width: 13px; height: 13px; }
.fn-ctab-name { display: none; }
.fn-csticky.is-compact .fn-ctab-name { display: inline-flex; align-items: center; flex: none; max-width: 180px; padding: 0 8px 0 2px; font-size: 12.5px; font-weight: 800; color: var(--fn-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 991px) {
  .fn-top { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px; transition: transform .22s ease; }
  .fn-top-menu, .fn-top-search { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 12px; background: transparent; color: var(--fn-ink); cursor: pointer; flex: none; }
  .fn-top-menu:active, .fn-top-search:active { background: var(--fn-pri-soft); }
  .fn-top-brand { display: flex; flex: 1; min-width: 0; }
  .fn-top-search svg { width: 21px; height: 21px; }
  .fn-tabs { transition: transform .22s ease; }
  body.fn-bars-hidden .fn-top { transform: translateY(-100%); }
  body.fn-bars-hidden .fn-tabs { transform: translateY(110%); }
  /* menu drawer */
  .fn-side { display: flex; position: fixed; top: 0; left: 0; bottom: 0; z-index: 90; width: min(86vw, 310px); height: auto; transform: translateX(-105%); transition: transform .24s ease; box-shadow: 0 0 40px rgba(15,23,42,.18); padding-top: 16px; }
  body.fn-drawer-open .fn-side { transform: none; }
  body.fn-drawer-open { overflow: hidden; }
  .fn-scrim { position: fixed; inset: 0; z-index: 85; background: rgba(15,23,42,.42); }
  .fn-side-close { display: inline-grid; place-items: center; position: absolute; top: 14px; right: 10px; width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f1f5f9; color: var(--fn-ink-2); cursor: pointer; }
  .fn-side .fn-brand { padding-right: 40px; }
  .fn-side .fn-nav a { padding-top: 9px; padding-bottom: 9px; }
  /* centre tabs follow the top bar */
  .fn-csticky { top: 56px; transition: top .22s ease; }
  body.fn-bars-hidden .fn-csticky { top: 0; }
  .fn-ptitle { font-size: 19px; }
}
@media (max-width: 991px) { .fn-page-centre .fn-csticky:not(.is-compact) .fn-cbar { display: none; } .fn-page-centre .fn-csticky:not(.is-compact) { padding-top: 0; } }

/* Phase FN17c: tab arrows + a thin scrollbar that stays visible in the slim tabs */
.fn-ctabs-wrap { position: relative; }
.fn-ctabs-arrow { position: absolute; top: 50%; z-index: 2; display: inline-grid; place-items: center; width: 34px; height: 34px; margin-top: -19px; border: 1px solid var(--fn-line); border-radius: 50%; background: #fff; color: var(--fn-ink); box-shadow: 0 4px 14px rgba(15,23,42,.14); cursor: pointer; }
.fn-ctabs-arrow:hover { border-color: #a5b4fc; color: var(--fn-pri); }
.fn-ctabs-arrow[hidden] { display: none; }
.fn-ctabs-left { left: -6px; }
.fn-ctabs-right { right: -6px; }
.fn-ctabs-wrap::before, .fn-ctabs-wrap::after { content: ''; position: absolute; top: 0; bottom: 8px; width: 40px; z-index: 1; pointer-events: none; }
.fn-ctabs-wrap::before { left: 0; background: linear-gradient(90deg, rgba(245,246,251,.95), rgba(245,246,251,0)); }
.fn-ctabs-wrap::after { right: 0; background: linear-gradient(270deg, rgba(245,246,251,.95), rgba(245,246,251,0)); }
.fn-csticky.is-compact .fn-ctabs { scrollbar-width: thin; padding-bottom: 7px; }
.fn-csticky.is-compact .fn-ctabs::-webkit-scrollbar { display: block; height: 4px; }
.fn-ctabs::-webkit-scrollbar { height: 5px; }
.fn-ctabs::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
.fn-csticky.is-compact .fn-ctabs-arrow { width: 28px; height: 28px; margin-top: -17px; }
.fn-csticky.is-compact .fn-ctabs-arrow svg { width: 15px; height: 15px; }
@media (max-width: 767px) {
  .fn-ctabs-arrow { width: 30px; height: 30px; margin-top: -17px; }
  .fn-ctabs-left { left: -4px; }
  .fn-ctabs-right { right: -4px; }
}

/* Phase FN18: admit card, marksheet & certificate tab */
.fn-ex-subs { margin-bottom: 0; }
.fn-ex-common { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.fn-ex-common .fn-field { flex: 1 1 220px; max-width: 320px; }
.fn-ex-common .fn-hint { flex: 1 1 100%; }
[data-ex-states] { align-items: center; }
.fn-ex-q { margin-left: auto; max-width: 260px; padding: 6px 10px; font-size: 13px; }
.fn-ex-cb { width: 36px; }
.fn-input-sm { padding: 6px 8px; font-size: 13px; max-width: 200px; }
.fn-tag-btn { border: 0; cursor: pointer; font: 600 12px var(--fn-font); }
.fn-ex-bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: 14px; background: var(--fn-ink); color: #fff; box-shadow: 0 10px 30px rgba(15,23,42,.25); }
.fn-ex-bar[hidden], [data-pane][hidden] { display: none; }
.fn-ms-box { max-width: 860px; width: calc(100% - 32px); max-height: calc(100vh - 60px); overflow-y: auto; }
.fn-marks { margin-top: 14px; }
.fn-marks .row, .fn-marks .col-md-12, .fn-marks .card { margin: 0; padding: 0; border: 0; box-shadow: none; background: none; }
.fn-marks .table-responsive { overflow-x: auto; }
.fn-marks table { width: 100%; border-collapse: collapse; font-size: 13px; }
.fn-marks th, .fn-marks td { padding: 8px 10px; border: 1px solid var(--fn-line); text-align: center; }
.fn-marks thead th { background: #eef2ff; color: #3730a3; font-weight: 700; }
.fn-marks .fs-4 { font-size: 13px !important; }
.fn-marks input.form-control { width: 100%; min-width: 70px; padding: 6px 8px; border: 1px solid var(--fn-line); border-radius: 8px; font: 600 14px var(--fn-font); text-align: center; }
.fn-marks input.form-control:focus { outline: 2px solid #a5b4fc; border-color: #6366f1; }
@media (max-width: 767px) {
  .fn-ex-q { margin-left: 0; max-width: none; flex: 1 1 100%; }
  .fn-ex-common .fn-field { max-width: none; }
  .fn-ms-box { width: 100%; max-height: 92vh; }
}
/* Phase FN18: filtered rows stay hidden on phones (card rows use display: grid); old marks template input size */
.fn-ex-table tr[hidden] { display: none !important; }
.fn-marks .custom_setting_input, .fn-marks input.form-control { font-size: 14px !important; }
.fn-marks input.form-control::placeholder { font-size: 12px; font-weight: 500; color: #94a3b8; }
.fn-marks input.fn-bad { border-color: var(--fn-risk) !important; background: var(--fn-risk-bg); }
.fn-marks .form-label { display: block; margin: 12px 0 4px; font-size: 12px; font-weight: 600; color: var(--fn-muted); }
.fn-marks input[readonly], .fn-marks .percentage-display, .fn-marks .result-status-display { font-weight: 700; }

/* Phase FN19: profile / courses / batches / staff tabs */
.fn-form2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fn-form3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fn-cm-row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--fn-line); }
.fn-cm-row:first-child { border-top: 0; padding-top: 0; }
.fn-cm-inline { display: flex; gap: 8px; align-items: center; }
.fn-cm-inline .fn-input { flex: 1; min-width: 0; }
.fn-cm-x { justify-self: start; color: #b91c1c; }
.fn-linkgrid-1 { grid-template-columns: 1fr; }
.fn-switch { position: relative; display: inline-block; width: 42px; height: 24px; cursor: pointer; }
.fn-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.fn-switch span { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .15s; }
.fn-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.3); transition: transform .15s; }
.fn-switch input:checked + span { background: var(--fn-good); }
.fn-switch input:checked + span::after { transform: translateX(18px); }
.fn-switch input:focus-visible + span { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.fn-switch input:disabled + span { opacity: .6; }
.fn-row-on td { background: #eef2ff; }
.fn-cm-trainer { margin: 16px 0 0; padding: 12px 14px 14px; border: 1px solid var(--fn-line); border-radius: 12px; }
.fn-cm-trainer[hidden] { display: none; }
.fn-cm-trainer legend { padding: 0 6px; font-size: 12px; font-weight: 700; color: var(--fn-muted); text-transform: uppercase; letter-spacing: .04em; }
.fn-perm { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.fn-perm-g { padding: 10px 12px; border: 1px solid var(--fn-line); border-radius: 12px; background: #fafbff; }
.fn-perm-h { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.fn-perm-kids { display: grid; gap: 4px; padding-left: 22px; font-size: 12.5px; }
.fn-perm-kids .fn-check { font-size: 12.5px; }
@media (max-width: 991px) { .fn-form3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .fn-form2, .fn-form3 { grid-template-columns: 1fr; } }
/* Phase FN20 */
.fn-up { color: var(--fn-good); }
[data-move-for][hidden] { display: none; }
#fnMoveSheet .fn-sheet-box { max-width: 520px; }
.fn-ex-common > .fn-seg { display: inline-flex; flex: none; align-self: flex-end; }
.fn-ex-common > .fn-seg label { white-space: nowrap; }

/* Phase FN21: centre cards, view switch, searchable dropdown, quick search, missing paper warning */
.fn-viewsw { display: inline-flex; margin-left: auto; border: 1px solid var(--fn-line); border-radius: 10px; overflow: hidden; background: #fff; }
.fn-viewsw a { display: inline-grid; place-items: center; width: 36px; height: 32px; color: var(--fn-muted); }
.fn-viewsw a.on { background: var(--fn-ink); color: #fff; }
.fn-viewsw a:hover { text-decoration: none; }
.fn-ccards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fn-ccard { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--fn-line); border-left-width: 4px; border-radius: 16px; background: #fff; box-shadow: var(--fn-shadow); min-width: 0; }
.fn-ccard[hidden] { display: none; }
.fn-ccard-good { border-left-color: var(--fn-good); }
.fn-ccard-watch { border-left-color: var(--fn-watch); }
.fn-ccard-risk { border-left-color: var(--fn-risk); }
.fn-ccard-top { display: flex; gap: 10px; align-items: flex-start; color: var(--fn-ink); min-width: 0; }
.fn-ccard-top:hover { text-decoration: none; }
.fn-ccard-top:hover b { color: var(--fn-pri); }
.fn-ccard-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.fn-ccard-id b { font-size: 15px; line-height: 1.3; }
.fn-ccard-id small { font-size: 12.5px; color: var(--fn-ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fn-ccard-id small.fn-muted { color: var(--fn-muted); }
.fn-ccard-badge { flex: none; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--fn-risk); color: #fff; font-weight: 800; font-size: 13px; display: inline-grid; place-items: center; }
.fn-ccard-pend { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; min-height: 24px; align-items: center; }
.fn-pchip { display: inline-flex; gap: 4px; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.fn-pchip:hover { text-decoration: none; filter: brightness(.96); }
.fn-pchip-red { background: #fdecec; color: #b91c1c; }
.fn-pchip-violet { background: #f1ecfe; color: #6d28d9; }
.fn-pchip-blue { background: #e8f0fe; color: #1d4ed8; }
.fn-pchip-amber { background: #fef4e2; color: #b45309; }
.fn-ccard-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 10px 0; border-top: 1px solid var(--fn-line); border-bottom: 1px solid var(--fn-line); }
.fn-ccard-stats div { display: flex; flex-direction: column; min-width: 0; }
.fn-ccard-stats b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fn-ccard-stats small { font-size: 11px; color: var(--fn-muted); line-height: 1.3; }
.fn-ccard-why { margin: 0; font-size: 12px; color: var(--fn-watch); }
.fn-ccard-act { display: flex; gap: 8px; margin-top: auto; }
.fn-ccard-act .fn-btn { flex: 1; justify-content: center; }
.fn-ccard-act .fn-btn svg { margin-right: 4px; }
#fnCentres tr[hidden] { display: none; }
.fn-combo { position: relative; display: inline-block; min-width: 220px; max-width: 100%; }
.fn-combo-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0; pointer-events: none; }
.fn-combo-btn { width: 100%; text-align: left; cursor: pointer; padding-right: 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
.fn-combo-panel { position: absolute; z-index: 60; top: calc(100% + 4px); left: 0; width: max(100%, 300px); max-width: 92vw; padding: 8px; border: 1px solid var(--fn-line); border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(15,23,42,.16); }
.fn-combo-panel[hidden] { display: none; }
.fn-combo-q { width: 100%; margin-bottom: 6px; }
.fn-combo-list { max-height: 280px; overflow-y: auto; }
.fn-combo-o { padding: 7px 10px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.fn-combo-o small { display: block; color: var(--fn-muted); font-size: 11.5px; }
.fn-combo-o:hover, .fn-combo-o.act { background: #eef2ff; }
.fn-combo-o.on b { color: var(--fn-pri); }
.fn-combo-none { padding: 10px; color: var(--fn-muted); font-size: 13px; }
.fn-qs-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.fn-qs-bar .fn-input { flex: 1; max-width: 420px; }
.fn-qs-hide { display: none !important; }
.fn-paper-warn { margin: 4px 0 14px; padding: 12px 14px; border: 1px solid #fecaca; border-radius: 12px; background: #fef2f2; color: #7f1d1d; font-size: 13px; }
.fn-paper-warn ul { margin: 6px 0 10px; padding-left: 18px; }
.fn-paper-warn li small { color: #991b1b; }
.fn-paper-warn .fn-check { align-items: flex-start; color: var(--fn-ink); }
@media (max-width: 767px) {
  .fn-ccards { grid-template-columns: 1fr; }
  .fn-combo { min-width: 0; width: 100%; }
  .fn-viewsw { margin-left: 0; }
}

/* Phase FN22: automation page */
.fn-mb { margin-bottom: 12px; }
.fn-note-warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: #fffbeb; color: #92400e; font-size: 12.5px; }
.fn-tile-good { border-left: 4px solid var(--fn-good); }
.fn-ar-bar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 6px; }
.fn-ar-gh { display: flex; gap: 8px; align-items: center; margin: 18px 0 10px; font-size: 15px; }
.fn-ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; align-items: start; }
.fn-ar { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fn-ar.is-off { opacity: .72; }
.fn-ar-h { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.fn-ar-h > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fn-ar-h small { font-size: 12px; line-height: 1.4; }
.fn-ar-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fn-ar-bubble { position: relative; padding: 10px 12px 12px; border-radius: 4px 14px 14px 14px; background: #e7fbe9; border: 1px solid #c9efcf; font-size: 13px; line-height: 1.5; color: #14281a; overflow-wrap: anywhere; }
.fn-ar-bubble-sm { margin-top: 6px; font-size: 12.5px; max-width: 460px; }
.fn-ar-btn { display: block; margin: 10px -12px -12px; padding: 8px; border-top: 1px solid #c9efcf; text-align: center; color: #0b7a55; font-weight: 600; font-size: 12.5px; }
.fn-ar-edit summary { cursor: pointer; font-weight: 600; color: var(--fn-pri); font-size: 13px; }
.fn-ar-edit form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.fn-ar-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; }
.fn-ar-row .fn-field { flex: 1 1 140px; }
.fn-ar-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 12px; }
.fn-ar-params .fn-field { font-size: 12px; }
.fn-ar-edit .fn-form-foot { flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-start; }
.fn-ar-num { width: 100px; }
.fn-table details summary { cursor: pointer; font-size: 12px; }
@media (max-width: 767px) {
  .fn-ar-grid { grid-template-columns: 1fr; }
  .fn-ar-num { width: 100%; }
}
.fn-ar-h .fn-band { flex: none; white-space: nowrap; }

/* Phase FN23: activate / deactivate centres */
.fn-cstatus-tabs { margin-bottom: 10px; }
.fn-cstatus-tabs .fn-chip b { margin-left: 4px; }
.fn-cstatus { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; border: 1px solid var(--fn-line); font-size: 13px; }
.fn-cstatus.is-off { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.fn-cstatus small { display: block; margin-top: 2px; }
.fn-cstatus-f { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.fn-cstatus-f details summary { cursor: pointer; font-size: 13px; }
.fn-cstatus-d { display: flex; gap: 8px; margin: 8px 0 4px; flex-wrap: wrap; }
.fn-cstatus-d .fn-input { min-width: 260px; flex: 1; }
.fn-btn-red { background: #dc2626; border-color: #dc2626; color: #fff; }
.fn-btn-red:hover { background: #b91c1c; color: #fff; }
.fn-ccard { position: relative; }
.fn-ccard-ck { position: absolute; top: 10px; right: 10px; z-index: 2; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #fff; border: 1px solid var(--fn-line); cursor: pointer; }
.fn-ccard-ck input { width: 16px; height: 16px; margin: 0; cursor: pointer; }
.fn-ccard:has(.fn-ccard-ck) .fn-ccard-top { padding-right: 30px; }
.fn-ccard:has(.fn-ccard-ck input:checked) { outline: 2px solid var(--fn-pri); outline-offset: -1px; }
.fn-ccards-all { margin: 0 0 8px; font-size: 13px; }
.fn-bulk .fn-input[name=reason] { min-width: 200px; }


/* Phase FN24: WhatsApp chats - two panes (list + chat), WhatsApp-like bubbles, phones: list then full-screen chat */
.fn-page-chats .fn-content { padding: 14px 18px; max-width: none; }
.fnc { --fnc-bg: #efeae2; --fnc-out: #d9fdd3; --fnc-in: #fff; --fnc-g: #00a884; display: grid; grid-template-columns: minmax(300px, 380px) 1fr; height: calc(100vh - 28px); min-height: 520px;
  border: 1px solid var(--fn-line); border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--fn-shadow); }
.fnc-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--fn-line); background: #fff; }
.fnc-lh { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 10px; }
.fnc-lh h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.fnc-live { display: inline-flex; align-items: center; gap: 6px; color: var(--fnc-g); font-weight: 600; font-size: 12px; }
.fnc-live i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: fncPulse 2s infinite; }
.fnc-live.off { color: #94a3b8; }
.fnc-live.off i { animation: none; }
@keyframes fncPulse { 0% { box-shadow: 0 0 0 0 rgba(0,168,132,.45); } 70% { box-shadow: 0 0 0 7px rgba(0,168,132,0); } 100% { box-shadow: 0 0 0 0 rgba(0,168,132,0); } }
.fnc-lh-n { font-size: 12px; font-weight: 700; color: var(--fnc-g); }
.fnc-search { position: relative; margin: 0 14px 10px; }
.fnc-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; width: 17px; height: 17px; }
.fnc-search input { width: 100%; height: 40px; padding: 0 12px 0 38px; border: 0; border-radius: 12px; background: #f1f5f9; font: inherit; font-size: 14px; outline: none; }
.fnc-search input:focus { background: #fff; box-shadow: 0 0 0 2px var(--fnc-g) inset; }
.fnc-filters { display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; }
.fnc-filters::-webkit-scrollbar { display: none; }
.fnc-filters button { flex: none; padding: 6px 12px; border-radius: 999px; border: 0; background: #f1f5f9; color: #475569; font: 600 12.5px var(--fn-font); cursor: pointer; }
.fnc-filters button.on { background: #e7f8f2; color: #047857; }
.fnc-items { flex: 1; overflow-y: auto; min-height: 0; padding: 2px 6px 10px; }
.fnc-it { display: flex; gap: 12px; width: 100%; padding: 11px 10px; border: 0; border-radius: 14px; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; align-items: center; }
.fnc-it:hover { background: #f8fafc; }
.fnc-it.on { background: #eef6f3; }
.fnc-av { --c: #4f46e5; position: relative; flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--c); font-weight: 800; font-size: 15px; }
.fnc-av-ch { position: absolute; right: -1px; bottom: -1px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid #fff; }
.fnc-av-meta { background: #22c55e; }
.fnc-av-qr { background: #0d9488; }
.fnc-av-phone { background: #64748b; }
.fnc-av-new { background: #cbd5e1; }
.fnc-it-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fnc-it-t { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.fnc-it-t b { font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fnc-it-t time { flex: none; font-size: 11.5px; color: #94a3b8; }
.fnc-it.un .fnc-it-t time { color: var(--fnc-g); font-weight: 700; }
.fnc-it-c { display: flex; gap: 4px; align-items: center; min-width: 0; }
.fnc-it-cn { font-size: 11.5px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fnc-it-l { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #64748b; min-width: 0; }
.fnc-it-l > span:not(.fnc-tick) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fnc-it.un .fnc-it-l > span:not(.fnc-tick) { color: #0f172a; font-weight: 600; }
.fnc-it-l em { flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--fnc-g); color: #fff; font: 700 11px/20px var(--fn-font); text-align: center; font-style: normal; }
.fnc-b { flex: none; padding: 1px 7px; border-radius: 999px; font: 700 10.5px/16px var(--fn-font); letter-spacing: .01em; }
.fnc-b-owner { background: #eef2ff; color: #4338ca; }
.fnc-b-staff { background: #fef3c7; color: #92400e; }
.fnc-b-meta { background: #dcfce7; color: #15803d; }
.fnc-b-qr { background: #ccfbf1; color: #0f766e; }
.fnc-b-phone { background: #f1f5f9; color: #475569; }
.fnc-b-new { background: #f1f5f9; color: #64748b; }
.fnc-b-off { background: #fee2e2; color: #b91c1c; }
.fnc-sep { margin: 12px 10px 4px; font: 700 11px var(--fn-font); color: #94a3b8; text-transform: uppercase; letter-spacing: .06em; }
.fnc-none { padding: 30px 16px; text-align: center; color: #94a3b8; font-size: 13px; }
.fnc-pane { position: relative; min-width: 0; min-height: 0; background: var(--fnc-bg); background-image: radial-gradient(rgba(0,0,0,.035) 1px, transparent 1px); background-size: 18px 18px; }
.fnc-empty { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: #475569; background: #f8fafc; }
.fnc-empty[hidden] { display: none; }
.fnc-empty-ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; background: #e7f8f2; color: var(--fnc-g); margin-bottom: 18px; }
.fnc-empty-ico svg { width: 40px; height: 40px; }
.fnc-empty h3 { margin: 0 0 8px; font-size: 20px; color: #0f172a; }
.fnc-empty p { max-width: 440px; margin: 0; font-size: 14px; line-height: 1.6; }
.fnc-warn { margin-top: 12px !important; color: #b91c1c; }
.fnc-chat { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.fnc-chat[hidden] { display: none; }
.fnc-ch { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--fn-line); }
.fnc-ch .fnc-av { width: 42px; height: 42px; }
.fnc-ch-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fnc-ch-who b { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 15.5px; }
.fnc-ch-who small { font-size: 12px; color: #64748b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fnc-ch-act { display: flex; gap: 4px; }
.fnc-ib { display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 50%; background: none; color: #475569; cursor: pointer; text-decoration: none; }
.fnc-ib:hover { background: #f1f5f9; color: #0f172a; text-decoration: none; }
.fnc-ib[hidden] { display: none; }
.fnc-back { display: none; }
.fnc-msgs { flex: 1; overflow-y: auto; min-height: 0; padding: 18px 6% 12px; display: flex; flex-direction: column; gap: 3px; overscroll-behavior: contain; }
.fnc-day { display: flex; justify-content: center; margin: 12px 0 8px; }
.fnc-day span { padding: 5px 12px; border-radius: 9px; background: rgba(255,255,255,.92); color: #54656f; font-size: 12px; font-weight: 600; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.fnc-m { display: flex; flex-direction: column; max-width: min(72%, 560px); }
.fnc-m.in { align-self: flex-start; }
.fnc-m.out { align-self: flex-end; align-items: flex-end; }
.fnc-bub { position: relative; padding: 7px 10px 6px; border-radius: 12px; background: var(--fnc-in); box-shadow: 0 1px 1.5px rgba(11,20,26,.13); font-size: 14.2px; line-height: 1.45; color: #111b21; overflow-wrap: anywhere; animation: fncIn .18s ease-out; }
.fnc-m.out .fnc-bub { background: var(--fnc-out); }
.fnc-m.in + .fnc-m.out .fnc-bub, .fnc-m.out + .fnc-m.in .fnc-bub, .fnc-day + .fnc-m .fnc-bub { margin-top: 8px; }
.fnc-m.failed .fnc-bub { background: #fff1f2; }
@keyframes fncIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fnc-tx a { color: #027eb5; }
.fnc-meta { float: right; margin: 6px 0 -3px 12px; font-size: 11px; color: #667781; white-space: nowrap; }
.fnc-meta i { font-style: normal; color: #94a3b8; }
.fnc-tick { margin-left: 2px; color: #8696a0; letter-spacing: -2px; font-size: 11.5px; }
.fnc-tick.read { color: #53bdeb; }
.fnc-tick.fail { color: #dc2626; letter-spacing: 0; }
.fnc-err { margin-top: 3px; font-size: 11.5px; color: #b91c1c; max-width: 100%; }
.fnc-img img { display: block; max-width: 280px; max-height: 320px; border-radius: 8px; margin-bottom: 4px; }
.fnc-file { display: inline-flex; gap: 6px; padding: 8px 10px; margin-bottom: 4px; border-radius: 8px; background: rgba(0,0,0,.05); font-weight: 600; font-size: 13px; color: #111b21; }
.fnc-older { align-self: center; margin-bottom: 8px; padding: 6px 14px; border: 0; border-radius: 999px; background: rgba(255,255,255,.95); color: #475569; font: 600 12px var(--fn-font); cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.fnc-loading { display: flex; gap: 6px; justify-content: center; margin: auto; }
.fnc-loading i { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; animation: fncDot 1s infinite; }
.fnc-loading i:nth-child(2) { animation-delay: .15s; }
.fnc-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes fncDot { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-4px); } }
.fnc-jump { position: absolute; right: 24px; bottom: 86px; padding: 8px 14px; border: 0; border-radius: 999px; background: #fff; color: var(--fnc-g); font: 700 12.5px var(--fn-font); box-shadow: 0 4px 14px rgba(0,0,0,.15); cursor: pointer; }
.fnc-jump[hidden] { display: none; }
.fnc-note { margin: 0 6% 6px; padding: 9px 12px; border-radius: 10px; background: #fffbeb; color: #78350f; font-size: 12.5px; line-height: 1.5; }
.fnc-note[hidden] { display: none; }
.fnc-linkbtn { border: 0; background: none; padding: 0; color: #047857; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.fnc-compose { display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #f0f2f5; }
.fnc-compose textarea { flex: 1; min-height: 44px; max-height: 160px; padding: 11px 16px; border: 0; border-radius: 22px; background: #fff; font: 14.5px/1.45 var(--fn-font); resize: none; outline: none; box-shadow: 0 1px 1px rgba(0,0,0,.05); }
.fnc-compose textarea:disabled { background: #e2e8f0; cursor: not-allowed; }
.fnc-send { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 0; border-radius: 50%; background: var(--fnc-g); color: #fff; cursor: pointer; transition: transform .1s; }
.fnc-send:active { transform: scale(.94); }
.fnc-tpl { position: absolute; inset: 0; z-index: 5; display: flex; align-items: flex-end; justify-content: center; background: rgba(15,23,42,.35); }
.fnc-tpl[hidden] { display: none; }
.fnc-tpl-box { width: min(560px, 100%); max-height: 80%; display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-radius: 18px 18px 0 0; background: #fff; box-shadow: 0 -10px 30px rgba(0,0,0,.15); }
.fnc-tpl-box header { display: flex; justify-content: space-between; align-items: center; }
.fnc-tpl-box > input { height: 38px; padding: 0 12px; border: 1px solid var(--fn-line); border-radius: 10px; font: inherit; }
.fnc-tpl-list { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.fnc-tpl-list[hidden], .fnc-tpl-form[hidden] { display: none; }
.fnc-tpl-list button { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border: 1px solid var(--fn-line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.fnc-tpl-list button:hover { border-color: var(--fnc-g); background: #f6fdfa; }
.fnc-tpl-list small { color: #64748b; font-size: 12px; line-height: 1.4; }
.fnc-tpl-form { overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.fnc-tpl-prev { padding: 10px 12px; border-radius: 10px; background: var(--fnc-out); font-size: 13.5px; line-height: 1.5; }
.fnc-tpl-prev mark { background: #fde68a; border-radius: 4px; padding: 0 2px; }
.fnc-tpl-foot { display: flex; justify-content: space-between; gap: 8px; }
.fnc-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 2147483000; padding: 10px 16px; border-radius: 12px; background: #0f172a; color: #fff; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.fnc-toast[hidden] { display: none; }
.fnc-toast.bad { background: #b91c1c; }
@media (max-width: 991px) {
  .fn-page-chats .fn-content { padding: 0; }
  .fnc { display: block; height: auto; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
  .fnc-list { border-right: 0; min-height: calc(100vh - 140px); }
  .fnc-items { overflow: visible; }
  .fnc-pane { display: none; }
  body.fnc-thread-on .fnc-pane { display: block; position: fixed; inset: 0; z-index: 2147482000; height: 100dvh; }
  body.fnc-thread-on .fn-tabs, body.fnc-thread-on .fn-top { display: none !important; }
  body.fnc-thread-on { overflow: hidden; }
  .fnc-back { display: inline-grid; }
  .fnc-ch { padding: 8px 8px 8px 4px; gap: 8px; }
  .fnc-msgs { padding: 12px 10px 8px; }
  .fnc-m { max-width: 86%; }
  .fnc-note { margin: 0 10px 6px; }
  .fnc-jump { bottom: 80px; right: 14px; }
  .fnc-it { padding: 10px 12px; border-radius: 0; border-bottom: 1px solid #f1f5f9; }
}
