/* ============================================================================
   Teachfluence Admin — Mobile Design Kit (_kit.css)
   Single source of truth for tokens + component classes used across every
   canvas. Author screens by composing these classes; never hand-roll colors.
   Theme is set per-frame with .theme-light / .theme-dark on .tf-frame.
   Rules: Inter only · radius 8 · border-first (1px hairline) · no in-UI shadow
          · rhythm 24 / 16 / 12 · Light + Dark both mandatory.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   1. TOKENS
---------------------------------------------------------------------------- */
.theme-light {
  --screen: #F5F6F8;      /* app background behind cards */
  --card: #FFFFFF;        /* card / sheet / app-bar surface */
  --fill: #F1F3F5;        /* subtle neutral fill (icon tiles) */
  --skel: #E1E5EB;        /* skeleton — distinct from card/screen so it never washes out */
  --fg: #09090B;          /* strong text */
  --fg-2: #3F4754;        /* secondary text */
  --muted: #5A6B82;       /* muted / meta text */
  --hair: #E4E7EC;        /* 1px hairline */
  --hair-2: #D6DAE0;      /* stronger hairline / pressed */
  --primary: #208AEF;     /* brand azure: accents, icons, links, active */
  --primary-solid: #208AEF;/* filled button background */
  --primary-press: #1B76CC;
  --primary-fg: #FFFFFF;  /* text on primary-solid */
  --tint: #E8F2FE;        /* primary tint background (selected rows, avatars) */
  --tint-fg: #1667C7;     /* text/icon on tint */
  --success: #15803D;   --success-tint: #E6F4EA;   --success-tint-fg: #15803D;
  --warning: #B45309;   --warning-tint: #FEF3E2;   --warning-tint-fg: #B45309;
  --danger:  #B91C1C;   --danger-tint:  #FDECEC;   --danger-tint-fg:  #B91C1C;
  --info:    #2563EB;   --info-tint:    #E8F1FE;   --info-tint-fg:    #2563EB;
  --overlay: rgba(9,12,20,.42);
  --frame-bezel: #0A0C10;
  color-scheme: light;
}
.theme-dark {
  --screen: #0B0E14;
  --card: #14171E;
  --fill: #1C212B;
  --skel: #2A313D;
  --fg: #F3F5F8;
  --fg-2: #C3CAD6;
  --muted: #9CA3AF;
  --hair: #242A35;
  --hair-2: #2E3542;
  --primary: #4DA3F2;
  --primary-solid: #2F87DD;
  --primary-press: #2A79C6;
  --primary-fg: #FFFFFF;
  --tint: #12233A;
  --tint-fg: #7CB8F5;
  --success: #34D399;   --success-tint: #0F251B;   --success-tint-fg: #4ADE80;
  --warning: #FBBF24;   --warning-tint: #2A1E0A;   --warning-tint-fg: #FBBF24;
  --danger:  #F87171;   --danger-tint:  #2A1214;   --danger-tint-fg:  #F87171;
  --info:    #60A5FA;   --info-tint:    #0F2036;   --info-tint-fg:    #93C5FD;
  --overlay: rgba(0,0,0,.55);
  --frame-bezel: #05070B;
  color-scheme: dark;
}

/* ----------------------------------------------------------------------------
   2. RESET / BASE
---------------------------------------------------------------------------- */
* { box-sizing: border-box; }
.tf-frame, .tf-frame * {
  font-family: Inter, -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.tf-frame a { color: var(--primary); text-decoration: none; }
.tf-num { font-variant-numeric: tabular-nums; }

/* ----------------------------------------------------------------------------
   3. DEVICE FRAME (iOS)  — width 390, rounded bezel, status bar, home indicator
   Use .tf-frame.tall for scroll-content screens; height auto by default.
---------------------------------------------------------------------------- */
.tf-frame {
  width: 390px;
  background: var(--frame-bezel);
  border-radius: 44px;
  padding: 6px;
  box-shadow: 0 20px 50px -24px rgba(9,12,20,.45);  /* canvas presentation only */
  display: inline-block;
  vertical-align: top;
}
.tf-screen {
  background: var(--screen);
  border-radius: 38px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}
/* status bar */
.tf-status {
  height: 50px; flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 30px;
  font: 600 15px Inter; color: var(--fg);
  position: relative;
}
.tf-status .r { display: flex; align-items: center; gap: 7px; }
.tf-notch {
  position: absolute; left: 50%; top: 11px; transform: translateX(-50%);
  width: 118px; height: 33px; border-radius: 18px; background: #000;
}
.theme-dark .tf-notch { background: #000; }
/* home indicator */
.tf-home { height: 26px; flex: none; display: flex; align-items: center; justify-content: center; }
.tf-home::after { content: ""; width: 134px; height: 5px; border-radius: 3px; background: var(--fg); opacity: .85; }

/* scroll body */
.tf-body { flex: 1 1 auto; overflow: hidden; padding: 4px 0 0; }
.tf-scroll { padding: 0 20px 20px; display: flex; flex-direction: column; gap: 16px; }
.tf-body.pad { padding: 16px 20px 20px; }

/* ----------------------------------------------------------------------------
   4. APP BAR + NAV
---------------------------------------------------------------------------- */
.tf-appbar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 6px 18px 12px; background: var(--screen);
}
.tf-appbar .grow { flex: 1 1 auto; min-width: 0; }
.tf-appbar .org { font: 700 15px Inter; color: var(--fg); letter-spacing: -.2px; display: flex; align-items: center; gap: 7px; }
.tf-appbar .org .chev { color: var(--muted); }
.tf-appbar .sub { font: 500 12px Inter; color: var(--muted); margin-top: 1px; }
.tf-appbar-actions { display: flex; align-items: center; gap: 6px; }

/* large-title header (inside scroll) */
.tf-h1 { font: 800 26px Inter; letter-spacing: -.6px; color: var(--fg); }
.tf-h1-sub { font: 500 13px Inter; color: var(--muted); margin-top: 3px; }

/* back / stack header */
.tf-navbar { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 12px 10px; background: var(--screen); }
.tf-navbar .title { font: 700 17px Inter; color: var(--fg); letter-spacing: -.3px; }
.tf-back { display: inline-flex; align-items: center; gap: 3px; color: var(--primary); font: 600 15px Inter; }

/* icon button (bell, avatar, kebab) */
.tf-iconbtn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--hair);
  background: var(--card); color: var(--fg); display: inline-flex; align-items: center; justify-content: center;
  position: relative; flex: none;
}
.tf-iconbtn.plain { border: 0; background: transparent; }
.tf-dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); border: 2px solid var(--card); }
.tf-badge-count {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--danger); color: #fff; font: 700 11px Inter;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--screen);
}

/* bottom tab bar */
.tf-tabbar {
  flex: none; display: flex; align-items: stretch; gap: 2px;
  padding: 8px 8px 2px; background: var(--card); border-top: 1px solid var(--hair);
}
.tf-tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px 2px; color: var(--muted); }
.tf-tab .lbl { font: 600 10px Inter; letter-spacing: -.1px; }
.tf-tab.active { color: var(--primary); }
.tf-tab .tf-ic { width: 22px; height: 22px; }
.tf-tab .badge { position: relative; }
.tf-tab .badge::after { content: ""; position: absolute; top: -2px; right: -6px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }

/* ----------------------------------------------------------------------------
   5. TYPOGRAPHY HELPERS
---------------------------------------------------------------------------- */
.tf-eyebrow { font: 600 11px Inter; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); }
.tf-title { font: 700 17px Inter; letter-spacing: -.3px; color: var(--fg); }
.tf-strong { font: 600 15px Inter; color: var(--fg); }
.tf-text { font: 500 14px Inter; color: var(--fg-2); }
.tf-meta { font: 500 12px Inter; color: var(--muted); }
.tf-mut { color: var(--muted); }

/* ----------------------------------------------------------------------------
   6. CARD + SECTION
---------------------------------------------------------------------------- */
.tf-card { background: var(--card); border: 1px solid var(--hair); border-radius: 12px; }
.tf-card.p { padding: 16px; }
.tf-card-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--hair); }
.tf-card-hd .tf-title { font-size: 15px; }
.tf-sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 0; }
.tf-divider { height: 1px; background: var(--hair); border: 0; margin: 0; }

/* ----------------------------------------------------------------------------
   7. STAT CARD  (label · value · delta)
---------------------------------------------------------------------------- */
.tf-stat { background: var(--card); border: 1px solid var(--hair); border-radius: 12px; padding: 14px 16px; }
.tf-stat .lbl { font: 500 13px Inter; color: var(--muted); }
.tf-stat .val { font: 700 24px Inter; letter-spacing: -.6px; color: var(--fg); margin-top: 5px; line-height: 1.05; }
.tf-stat.hero .val { font-size: 30px; letter-spacing: -.9px; }
.tf-delta { display: inline-flex; align-items: center; gap: 4px; font: 600 12px Inter; margin-top: 8px; }
.tf-delta .cap { color: var(--muted); font-weight: 500; }
.tf-up { color: var(--success); }
.tf-down { color: var(--danger); }
.tf-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ----------------------------------------------------------------------------
   8. LIST ROW  (leading · title/subtitle · trailing)
---------------------------------------------------------------------------- */
.tf-list { background: var(--card); border: 1px solid var(--hair); border-radius: 12px; overflow: hidden; }
.tf-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.tf-row + .tf-row { border-top: 1px solid var(--hair); }
.tf-row .lead { flex: none; }
.tf-row .grow { flex: 1 1 auto; min-width: 0; }
.tf-row .t { font: 600 14.5px Inter; color: var(--fg); letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-row .s { font: 500 12.5px Inter; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tf-row .trail { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.tf-row .trail .v { font: 600 14px Inter; color: var(--fg); }
.tf-row .trail .m { font: 500 12px Inter; color: var(--muted); }
.tf-row.unread { background: color-mix(in srgb, var(--tint) 55%, var(--card)); }
.tf-row .chev { color: var(--muted); flex: none; }
.tf-row.tap:active { background: var(--fill); }

/* leading icon tile */
.tf-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; }
.tf-ico .tf-ic { width: 19px; height: 19px; }
.tf-ico.neutral { background: var(--fill); color: var(--fg-2); }
.tf-ico.primary { background: var(--tint); color: var(--primary); }
.tf-ico.success { background: var(--success-tint); color: var(--success-tint-fg); }
.tf-ico.warning { background: var(--warning-tint); color: var(--warning-tint-fg); }
.tf-ico.danger  { background: var(--danger-tint);  color: var(--danger-tint-fg); }
.tf-ico.info    { background: var(--info-tint);    color: var(--info-tint-fg); }

/* day section header (inbox) */
.tf-day { font: 600 11px Inter; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); padding: 12px 14px 6px; }

/* ----------------------------------------------------------------------------
   9. AVATAR
---------------------------------------------------------------------------- */
.tf-av { border-radius: 50%; background: var(--tint); color: var(--tint-fg); display: inline-flex; align-items: center; justify-content: center; font: 600 13px Inter; flex: none; overflow: hidden; }
.tf-av.s24 { width: 24px; height: 24px; font-size: 10px; }
.tf-av.s32 { width: 32px; height: 32px; font-size: 12px; }
.tf-av.s40 { width: 40px; height: 40px; font-size: 14px; }
.tf-av.s48 { width: 48px; height: 48px; font-size: 16px; }
.tf-av.s56 { width: 56px; height: 56px; font-size: 19px; }
.tf-av.sq { border-radius: 12px; }

/* ----------------------------------------------------------------------------
   10. PILLS / BADGES / CHIPS
---------------------------------------------------------------------------- */
.tf-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font: 600 11.5px Inter; letter-spacing: .1px; }
.tf-pill .tf-ic { width: 12px; height: 12px; }
.tf-pill.success { background: var(--success-tint); color: var(--success-tint-fg); }
.tf-pill.warning { background: var(--warning-tint); color: var(--warning-tint-fg); }
.tf-pill.danger  { background: var(--danger-tint);  color: var(--danger-tint-fg); }
.tf-pill.info    { background: var(--info-tint);    color: var(--info-tint-fg); }
.tf-pill.primary { background: var(--tint);         color: var(--tint-fg); }
.tf-pill.neutral { background: var(--fill);         color: var(--fg-2); }
.tf-pill.dotlead::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* outline tag (counts, +N, secondary tags) */
.tf-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--hair); font: 600 11.5px Inter; color: var(--fg-2); background: var(--card); }
.tf-tag.solid { background: var(--fill); border-color: transparent; }

/* SLA chip (support) */
.tf-sla { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 7px; font: 700 11.5px Inter; }
.tf-sla.ok { background: var(--fill); color: var(--fg-2); }
.tf-sla.warn { background: var(--warning-tint); color: var(--warning-tint-fg); }
.tf-sla.over { background: var(--danger-tint); color: var(--danger-tint-fg); }

/* filter chips */
.tf-chips { display: flex; gap: 8px; overflow: hidden; }
.tf-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hair); background: var(--card); font: 600 12.5px Inter; color: var(--fg-2); white-space: nowrap; }
.tf-chip .ct { color: var(--muted); font-weight: 700; }
.tf-chip.active { background: var(--primary-solid); border-color: transparent; color: var(--primary-fg); }
.tf-chip.active .ct { color: rgba(255,255,255,.8); }

/* ----------------------------------------------------------------------------
   11. BUTTONS
---------------------------------------------------------------------------- */
.tf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid transparent; font: 600 15px Inter; letter-spacing: -.1px; cursor: default; }
.tf-btn .tf-ic { width: 18px; height: 18px; }
.tf-btn.block { width: 100%; }
.tf-btn.sm { height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.tf-btn.lg { height: 50px; font-size: 16px; }
.tf-btn.primary { background: var(--primary-solid); color: var(--primary-fg); }
.tf-btn.secondary { background: var(--card); border-color: var(--hair); color: var(--fg); }
.tf-btn.ghost { background: transparent; color: var(--primary); }
.tf-btn.danger { background: var(--danger); color: #fff; }
.theme-dark .tf-btn.danger { color: #1A0808; }
.tf-btn.dangeroutline { background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
.tf-btn[disabled], .tf-btn.disabled { opacity: .45; }
.tf-btn.loading { opacity: .7; }
.tf-fab { width: 56px; height: 56px; border-radius: 18px; background: var(--primary-solid); color: var(--primary-fg); display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px -8px rgba(32,138,239,.6); }

/* ----------------------------------------------------------------------------
   12. FIELDS / INPUTS / OTP / SEARCH
---------------------------------------------------------------------------- */
.tf-fieldlbl { font: 600 13px Inter; color: var(--fg); margin-bottom: 7px; display: block; }
.tf-input { height: 46px; width: 100%; border-radius: 10px; border: 1px solid var(--hair); background: var(--card); padding: 0 14px; font: 500 15px Inter; color: var(--fg); display: flex; align-items: center; }
.tf-input .ph { color: var(--muted); }
.tf-input .suffix { margin-left: auto; color: var(--muted); font: 500 14px Inter; }
.tf-input.focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--tint); }
.tf-input.error { border-color: var(--danger); }
.tf-input.select { justify-content: space-between; color: var(--fg); }
.tf-help { font: 500 12.5px Inter; color: var(--muted); margin-top: 7px; }
.tf-help.error { color: var(--danger); }
.tf-textarea { min-height: 92px; width: 100%; border-radius: 10px; border: 1px solid var(--hair); background: var(--card); padding: 12px 14px; font: 500 14.5px Inter; color: var(--fg); }
.tf-search { display: flex; align-items: center; gap: 9px; height: 42px; border-radius: 10px; background: var(--fill); padding: 0 12px; color: var(--muted); font: 500 14.5px Inter; }
.tf-search .tf-ic { width: 17px; height: 17px; }
/* OTP */
.tf-otp { display: flex; gap: 9px; }
.tf-otp .cell { flex: 1; height: 58px; border-radius: 12px; border: 1px solid var(--hair); background: var(--card); display: flex; align-items: center; justify-content: center; font: 700 26px Inter; color: var(--fg); }
.tf-otp .cell.on { border-color: var(--primary); box-shadow: 0 0 0 4px var(--tint); }
.tf-otp .cell.caret { position: relative; }
.tf-otp .cell.caret::after { content: ""; width: 2px; height: 26px; background: var(--primary); }

/* ----------------------------------------------------------------------------
   13. SWITCH ROW / SETTINGS
---------------------------------------------------------------------------- */
.tf-srow { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--card); }
.tf-srow + .tf-srow { border-top: 1px solid var(--hair); }
.tf-srow .grow { flex: 1 1 auto; min-width: 0; }
.tf-srow .t { font: 600 14.5px Inter; color: var(--fg); }
.tf-srow .s { font: 500 12.5px Inter; color: var(--muted); margin-top: 2px; }
.tf-switch { width: 46px; height: 28px; border-radius: 999px; background: var(--hair-2); position: relative; flex: none; }
.tf-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: none; }
.tf-switch.on { background: var(--primary-solid); }
.tf-switch.on::after { left: 21px; }
.tf-radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--hair-2); flex: none; }
.tf-radio.on { border-color: var(--primary); }
.tf-radio.on::after { content: ""; display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); margin: 3px; }
.tf-check { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--hair-2); flex: none; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.tf-check.on { background: var(--primary-solid); border-color: transparent; }

/* segmented control */
.tf-seg { display: flex; padding: 3px; background: var(--fill); border-radius: 10px; gap: 2px; }
.tf-seg .opt { flex: 1; text-align: center; padding: 7px 6px; border-radius: 8px; font: 600 13px Inter; color: var(--muted); }
.tf-seg .opt.active { background: var(--card); color: var(--fg); box-shadow: 0 1px 2px rgba(9,12,20,.08); }
.theme-dark .tf-seg .opt.active { box-shadow: none; border: 1px solid var(--hair); }

/* underline tabs */
.tf-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--hair); padding: 0 2px; }
.tf-tabs .tab { padding: 10px 0; font: 600 14px Inter; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tf-tabs .tab.active { color: var(--fg); border-bottom-color: var(--primary); }

/* ----------------------------------------------------------------------------
   14. BOTTOM SHEET / OVERLAY
---------------------------------------------------------------------------- */
.tf-sheetwrap { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; }
.tf-overlay { position: absolute; inset: 0; background: var(--overlay); }
.tf-sheet { position: relative; background: var(--card); border-radius: 22px 22px 0 0; padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.tf-sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: var(--hair-2); align-self: center; margin: 4px 0 6px; }
.tf-sheet .sh-title { font: 700 18px Inter; color: var(--fg); letter-spacing: -.3px; }

/* ----------------------------------------------------------------------------
   15. TOAST
---------------------------------------------------------------------------- */
.tf-toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; color: #fff; font: 600 14px Inter; }
.tf-toast .act { margin-left: auto; font: 700 13px Inter; opacity: .9; text-decoration: underline; }
.tf-toast.success { background: #15803D; }
.tf-toast.danger { background: #B91C1C; }
.tf-toast.neutral { background: #1F2937; }

/* ----------------------------------------------------------------------------
   16. SKELETON / EMPTY / ERROR / PERMISSION
---------------------------------------------------------------------------- */
@keyframes tfpulse { 0%,100%{opacity:.65} 50%{opacity:1} }
.tf-skel { background: var(--skel); border-radius: 8px; animation: tfpulse 1.4s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .tf-skel { animation: none; opacity: .85; } }
.tf-skel.line { height: 12px; }
.tf-skel.circle { border-radius: 50%; }

.tf-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 26px; }
.tf-state .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--fill); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.tf-state .ic .tf-ic { width: 26px; height: 26px; }
.tf-state .h { font: 700 16px Inter; color: var(--fg); }
.tf-state .p { font: 500 13.5px Inter; color: var(--muted); max-width: 240px; line-height: 1.5; }

/* offline banner */
.tf-offline { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--warning-tint); color: var(--warning-tint-fg); font: 600 12.5px Inter; }

/* ----------------------------------------------------------------------------
   17. CHAT (support / community)
---------------------------------------------------------------------------- */
.tf-thread { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.tf-msg { max-width: 80%; padding: 9px 12px; border-radius: 14px; font: 500 14px Inter; line-height: 1.4; }
.tf-msg.in { align-self: flex-start; background: var(--fill); color: var(--fg); border-bottom-left-radius: 5px; }
.tf-msg.out { align-self: flex-end; background: var(--primary-solid); color: var(--primary-fg); border-bottom-right-radius: 5px; }
.tf-msg .time { display: block; font: 500 10.5px Inter; margin-top: 4px; opacity: .7; }
.tf-note { align-self: stretch; background: var(--warning-tint); border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); color: var(--warning-tint-fg); border-radius: 12px; padding: 9px 12px; font: 500 13px Inter; }
.tf-sysline { align-self: center; font: 500 11.5px Inter; color: var(--muted); padding: 2px 0; }

/* composer */
.tf-composer { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-top: 1px solid var(--hair); background: var(--card); }
.tf-composer .box { flex: 1; height: 40px; border-radius: 20px; background: var(--fill); padding: 0 14px; display: flex; align-items: center; font: 500 14px Inter; color: var(--muted); }

/* ----------------------------------------------------------------------------
   18. CHART PRIMITIVES (inline SVG lives per-screen; these are containers)
---------------------------------------------------------------------------- */
.tf-chart { width: 100%; }
.tf-chart svg { width: 100%; display: block; }
.tf-axis { display: flex; justify-content: space-between; font: 500 11px Inter; color: var(--muted); margin-top: 8px; }
.tf-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.tf-legend .it { display: flex; align-items: center; gap: 6px; font: 500 12px Inter; color: var(--muted); }
.tf-legend .sw { width: 10px; height: 10px; border-radius: 3px; }
/* horizontal bar (top spaces / products) */
.tf-bar { display: flex; align-items: center; gap: 10px; }
.tf-bar .track { flex: 1; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; }
.tf-bar .fill { height: 100%; border-radius: 4px; background: var(--primary); }

/* ----------------------------------------------------------------------------
   19. ICONS  — inline lucide-style stroke SVGs use .tf-ic
---------------------------------------------------------------------------- */
.tf-ic { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; flex: none; }
.tf-ic.fill { fill: currentColor; stroke: none; }

/* ----------------------------------------------------------------------------
   20. CANVAS LAYOUT  (banded flow — titles + wrapping rows of frames)
---------------------------------------------------------------------------- */
.dc-page { background: #ECEEF1; padding: 40px 48px 80px; min-height: 100vh; }
.theme-page-dark { background: #0B0E14; }
.dc-band { margin: 0 0 56px; }
.dc-band > .bt { font: 800 20px Inter; color: #0B0E14; letter-spacing: -.4px; margin: 0 0 4px; }
.dc-band > .bd { font: 500 13.5px Inter; color: #5A6B82; margin: 0 0 22px; max-width: 780px; line-height: 1.5; }
.dc-row { display: flex; flex-wrap: wrap; gap: 40px 34px; align-items: flex-start; }
.dc-cap { font: 600 12px Inter; color: #5A6B82; margin: 0 0 10px; }
.dc-fig { display: flex; flex-direction: column; }
.dc-note { font: 500 12px Inter; color: #64748B; margin-top: 8px; max-width: 360px; line-height: 1.45; }
.dc-hr { height: 1px; background: #D8DBDF; border: 0; margin: 0 0 40px; }

/* Addition markers — design-doc annotations that flag NEW frames for the mobile
   team (violet, deliberately unlike the app's azure brand + status pills so a
   reader can tell "this is a new-work marker", not app UI). Not app components. */
.dc-new { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #7C3AED; color: #fff; font: 700 10px Inter; letter-spacing: .5px; vertical-align: middle; }
.dc-cap .dc-new { margin-left: 6px; }
.dc-note.new { color: #4C1D95; border-left: 3px solid #7C3AED; padding-left: 10px; }
.dc-banner { border: 1px solid #C4B5FD; background: #F5F3FF; border-radius: 14px; padding: 16px 18px; margin: 0 0 26px; max-width: 900px; }
.dc-banner .h { font: 800 14px Inter; color: #5B21B6; letter-spacing: -.2px; display: flex; align-items: center; gap: 8px; }
.dc-banner .b { font: 500 12.5px Inter; color: #6D28D9; margin-top: 7px; line-height: 1.55; }
.dc-banner code { font: 600 11.5px ui-monospace, SFMono-Regular, Menlo, monospace; background: #EDE9FE; color: #5B21B6; padding: 1px 5px; border-radius: 5px; }
