/* ============================================================
 * tiko-ui.css  -  Tiko Learn shared design system (plain CSS)
 * ------------------------------------------------------------
 * Used by index.html (learner hubs) and meant to be reused by the
 * SGBV module restyle and the master-trainer dashboards.
 * Link it BEFORE a page's own <style> so the page can override:
 *     <link rel="stylesheet" href="tiko-ui.css" />
 * Visual language: Plus Jakarta Sans, purple #702082 / dark #4A1556,
 * teal #1D9E75, gold #D97706; 2px bordered cards with a thicker bottom
 * edge ("duo" tactile buttons), gradient hero bars, glass tiles over a
 * purple gradient, 16-24px radii, bottom sheets with a handle.
 *
 * RULES OF THIS FILE
 *  - Everything is prefixed .tk- (no clash with page CSS).
 *  - Colours/radii come from CSS variables on :root (--tk-*). Every
 *    var() carries its light-theme fallback, so old Android WebViews
 *    without custom properties still render correctly.
 *  - No :has(), no gap (margins are used), no logical properties.
 *    Prefixed flex/transform where Android 4.4-6 needs it.
 *  - Dark mode: set <html data-theme="dark"> (or "light"). Following the
 *    OS is opt-in: add class "tk-auto-theme" to <html>. (index.html is
 *    light-only, so it does not opt in.)
 *  - RTL: set dir="rtl"; the few directional rules have [dir=rtl] twins.
 *
 * COMPONENTS (modifiers in brackets)
 *  .tk-hero       gradient hero bar            [--teal --gold --coral --dark]
 *    .tk-hero-kicker .tk-hero-title .tk-hero-sub .tk-hero-side
 *  .tk-card       2px bordered card, thick bottom edge
 *                 states: .is-complete .is-progress .is-locked .is-current
 *                 [.tk-card-btn = whole card is a <button>]
 *    .tk-card-icon (+ .tk-card-num) .tk-card-body .tk-card-title
 *    .tk-card-step .tk-card-meta .tk-card-go
 *  .tk-btn        duo press button             [--primary(default) --green
 *                 --ghost --gold --block --sm]
 *  .tk-chip       small pill                   [--purple --green --gold
 *                 --red --gray --outline]
 *  .tk-progress   bar: <span class="tk-progress"><i style="width:40%"></i></span>
 *                 [--teal --gold --sm]
 *  .tk-ring       SVG progress ring: <span class="tk-ring"><svg viewBox="0 0 44 44">
 *                 <circle class="tk-ring-bg" cx="22" cy="22" r="18"/><circle
 *                 class="tk-ring-fg" cx="22" cy="22" r="18" stroke-dasharray="x 113.1"
 *                 transform="rotate(-90 22 22)"/></svg><span class="tk-ring-label">1/3</span></span>
 *                 [--sm --lg --light(on dark/gradient)]
 *  .tk-sheet      bottom sheet + .tk-sheet-overlay; add .is-open to both.
 *                 Parts: .tk-sheet-handle .tk-sheet-head .tk-sheet-body
 *  .tk-stage      purple gradient stage for glass tiles
 *  .tk-glass      glass stat tile (inside .tk-glass-grid) .tk-glass-num .tk-glass-label
 *  .tk-tabs       segmented tabs (role=tablist, .tk-tab[aria-selected=true])
 *  .tk-list       list rows (.tk-item .tk-item-icon .tk-item-body .tk-item-value)
 *  .tk-bottom-nav bottom navigation (built by tiko-nav.js: TikoNav.mount)
 *  .tk-toast      transient message (.is-show)
 *  .tk-empty      empty state, .tk-sr-only screen-reader text, .tk-hide
 * ============================================================ */

/* ---------- tokens ---------- */
:root {
    --tk-purple: #702082;
    --tk-purple-dark: #4A1556;
    --tk-purple-mid: #8a2ca0;
    --tk-purple-soft: #F3E8FA;
    --tk-teal: #1D9E75;
    --tk-teal-dark: #0f766e;
    --tk-green: #0f8a65;
    --tk-gold: #D97706;
    --tk-gold-dark: #92400e;
    --tk-gold-soft: #fef3c7;
    --tk-coral: #D85A30;
    --tk-red: #dc2626;
    --tk-red-soft: #fee2e2;
    --tk-ink: #1f2937;
    --tk-ink-2: #4b5563;
    --tk-ink-3: #6b7280;
    --tk-bg: #faf7fb;
    --tk-surface: #ffffff;
    --tk-surface-2: #f6f3f8;
    --tk-line: #ece4f0;
    --tk-edge: #dcc9e3;
    --tk-focus: #f5b800;
    --tk-overlay: rgba(45, 12, 52, 0.5);
    --tk-shadow: 0 6px 16px rgba(112, 32, 130, 0.12);
    --tk-r-sm: 12px;
    --tk-r: 16px;
    --tk-r-lg: 22px;
    --tk-font: 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif;
}
html[data-theme="dark"] {
    --tk-purple: #b56fcb;
    --tk-purple-dark: #8a3da0;
    --tk-purple-soft: #3a1d44;
    --tk-teal: #3cc59a;
    --tk-teal-dark: #2aa58f;
    --tk-green: #3cc59a;
    --tk-gold: #f59e0b;
    --tk-gold-dark: #fcd34d;
    --tk-gold-soft: #3d2a08;
    --tk-red-soft: #451a1a;
    --tk-ink: #f3eaf6;
    --tk-ink-2: #cdbfd3;
    --tk-ink-3: #a898b0;
    --tk-bg: #1b0f20;
    --tk-surface: #2a1731;
    --tk-surface-2: #33203b;
    --tk-line: #43284d;
    --tk-edge: #4f3159;
    --tk-overlay: rgba(0, 0, 0, 0.65);
    --tk-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}
@media (prefers-color-scheme: dark) {
    html.tk-auto-theme:not([data-theme="light"]) {
        --tk-purple: #b56fcb;
        --tk-purple-dark: #8a3da0;
        --tk-purple-soft: #3a1d44;
        --tk-teal: #3cc59a;
        --tk-teal-dark: #2aa58f;
        --tk-green: #3cc59a;
        --tk-gold: #f59e0b;
        --tk-gold-dark: #fcd34d;
        --tk-gold-soft: #3d2a08;
        --tk-red-soft: #451a1a;
        --tk-ink: #f3eaf6;
        --tk-ink-2: #cdbfd3;
        --tk-ink-3: #a898b0;
        --tk-bg: #1b0f20;
        --tk-surface: #2a1731;
        --tk-surface-2: #33203b;
        --tk-line: #43284d;
        --tk-edge: #4f3159;
        --tk-overlay: rgba(0, 0, 0, 0.65);
        --tk-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
    }
}

/* ---------- helpers ---------- */
.tk-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.tk-hide { display: none !important; }
.tk-empty { text-align: center; padding: 28px 12px; color: var(--tk-ink-3, #6b7280); font-weight: 700; font-size: 14px; }
.tk-btn:focus, .tk-card-btn:focus, .tk-tab:focus, .tk-item:focus, .tk-nav-item:focus, .tk-chip-btn:focus { outline: 3px solid var(--tk-focus, #f5b800); outline-offset: 2px; }
.tk-btn:focus:not(:focus-visible), .tk-card-btn:focus:not(:focus-visible), .tk-tab:focus:not(:focus-visible), .tk-item:focus:not(:focus-visible), .tk-nav-item:focus:not(:focus-visible), .tk-chip-btn:focus:not(:focus-visible) { outline: 0; }

/* ---------- hero bar ---------- */
.tk-hero {
    position: relative; overflow: hidden; color: #fff; border-radius: var(--tk-r-lg, 22px);
    padding: 16px; margin: 0 0 16px;
    background: #702082;
    background: linear-gradient(135deg, var(--tk-purple-mid, #8a2ca0) 0%, var(--tk-purple, #702082) 50%, var(--tk-purple-dark, #4A1556) 100%);
    box-shadow: var(--tk-shadow, 0 6px 16px rgba(112, 32, 130, 0.12));
    display: -webkit-box; display: -webkit-flex; display: flex;
    -webkit-align-items: center; align-items: center;
}
.tk-hero:before, .tk-hero:after { content: ''; position: absolute; border-radius: 50%; pointer-events: none; background: rgba(255, 255, 255, 0.09); }
.tk-hero:before { width: 140px; height: 140px; right: -40px; top: -60px; }
.tk-hero:after { width: 80px; height: 80px; left: -30px; bottom: -40px; background: rgba(245, 184, 0, 0.2); }
[dir="rtl"] .tk-hero:before { right: auto; left: -40px; }
[dir="rtl"] .tk-hero:after { left: auto; right: -30px; }
.tk-hero--teal { background: linear-gradient(135deg, #22a699 0%, #0f766e 55%, #0b5a54 100%); }
.tk-hero--gold { background: linear-gradient(135deg, #e8932a 0%, #D97706 55%, #92400e 100%); }
.tk-hero--coral { background: linear-gradient(135deg, #e87a52 0%, #D85A30 55%, #9c3a1c 100%); }
.tk-hero--dark { background: linear-gradient(135deg, #6b2a7c 0%, #4A1556 60%, #2d0c34 100%); }
.tk-hero > * { position: relative; z-index: 1; }
.tk-hero-body { -webkit-box-flex: 1; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; }
.tk-hero-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: #ffd166; }
.tk-hero-title { font-size: 20px; font-weight: 800; line-height: 1.2; margin: 2px 0 0; color: #fff; overflow-wrap: anywhere; }
.tk-hero-sub { font-size: 13px; font-weight: 600; margin-top: 4px; opacity: 0.95; overflow-wrap: anywhere; }
.tk-hero-side { -webkit-flex-shrink: 0; flex-shrink: 0; margin-left: 12px; }
[dir="rtl"] .tk-hero-side { margin-left: 0; margin-right: 12px; }

/* ---------- card ---------- */
.tk-card {
    position: relative; display: block; width: 100%; box-sizing: border-box; text-align: left;
    background: var(--tk-surface, #ffffff); color: var(--tk-ink, #1f2937); font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif);
    border: 2px solid var(--tk-line, #ece4f0); border-bottom-width: 5px; border-bottom-color: var(--tk-edge, #dcc9e3);
    border-radius: var(--tk-r-lg, 22px); padding: 12px; margin: 0 0 12px;
    -webkit-transition: -webkit-transform 0.12s, border-color 0.2s; transition: transform 0.12s, border-color 0.2s;
}
[dir="rtl"] .tk-card { text-align: right; }
.tk-card-btn {
    display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center;
    cursor: pointer; -webkit-appearance: none; appearance: none; margin-left: 0; margin-right: 0; min-height: 84px;
}
.tk-card-btn:active { -webkit-transform: translateY(3px); transform: translateY(3px); border-bottom-width: 2px; margin-bottom: 15px; }
.tk-card-icon {
    position: relative; width: 56px; height: 56px; border-radius: 18px; -webkit-flex-shrink: 0; flex-shrink: 0; margin-right: 12px;
    display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
    font-size: 28px; color: #fff; background: #702082; background: linear-gradient(135deg, var(--tk-purple, #702082), var(--tk-purple-mid, #8a2ca0));
    box-shadow: 0 4px 0 rgba(0, 0, 0, 0.14);
}
[dir="rtl"] .tk-card-icon { margin-right: 0; margin-left: 12px; }
.tk-card-num {
    position: absolute; top: -8px; left: -8px; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; text-align: center;
    background: var(--tk-focus, #f5b800); color: #3d2a08; font-size: 12px; font-weight: 800;
}
[dir="rtl"] .tk-card-num { left: auto; right: -8px; }
.tk-card-body { -webkit-box-flex: 1; -webkit-flex: 1 1 100px; flex: 1 1 100px; min-width: 0; display: block; }
.tk-card-title { display: block; font-weight: 800; font-size: 15px; line-height: 1.25; color: var(--tk-ink, #1f2937); overflow-wrap: anywhere; }
.tk-card-step { display: block; font-size: 11px; font-weight: 700; color: var(--tk-purple, #702082); margin-top: 2px; overflow-wrap: anywhere; }
.tk-card-meta { display: block; font-size: 12px; font-weight: 700; color: var(--tk-ink-2, #4b5563); margin-top: 3px; }
.tk-card-go { -webkit-flex-shrink: 0; flex-shrink: 0; margin-left: 8px; }
[dir="rtl"] .tk-card-go { margin-left: 0; margin-right: 8px; }
@media (max-width: 359px) {
    .tk-card-btn { -webkit-flex-wrap: wrap; flex-wrap: wrap; }
    .tk-card-btn .tk-card-go { -webkit-flex-basis: 100%; flex-basis: 100%; margin: 10px 0 0; }
    .tk-card-icon { width: 48px; height: 48px; font-size: 24px; margin-right: 10px; }
}
.tk-card.is-progress { border-color: var(--tk-purple, #702082); }
.tk-card.is-current { border-color: var(--tk-purple, #702082); -webkit-animation: tkPulse 1.9s ease-out infinite; animation: tkPulse 1.9s ease-out infinite; }
.tk-card.is-current .tk-card-meta { color: var(--tk-purple, #702082); }
.tk-card.is-complete { border-color: #a7e3cc; border-bottom-color: #7fcfb0; background: #f7fdf9; background: var(--tk-surface, #ffffff); }
html[data-theme="dark"] .tk-card.is-complete { border-color: #2a6b57; border-bottom-color: #2a6b57; }
.tk-card.is-complete .tk-card-icon { background: var(--tk-green, #0f8a65); }
.tk-card.is-complete .tk-card-meta { color: var(--tk-green, #0f8a65); }
.tk-card.is-locked { background: var(--tk-surface-2, #f6f3f8); }
.tk-card.is-locked .tk-card-icon { background: #e5e7eb; color: #4b5563; box-shadow: 0 4px 0 #cbd5e1; }
.tk-card.is-locked .tk-card-title { color: var(--tk-ink-2, #4b5563); }
.tk-card.is-gold { border-color: #f5b800; background: #fffbea; }
.tk-card.is-gold .tk-card-icon { background: #f5b800; background: linear-gradient(135deg, #f5b800, #ff9d2e); color: #4a2c00; }
html[data-theme="dark"] .tk-card.is-gold { background: var(--tk-gold-soft, #fef3c7); }
@-webkit-keyframes tkPulse { 0% { box-shadow: 0 0 0 0 rgba(163, 73, 184, 0.5); } 70% { box-shadow: 0 0 0 10px rgba(163, 73, 184, 0); } 100% { box-shadow: 0 0 0 0 rgba(163, 73, 184, 0); } }
@keyframes tkPulse { 0% { box-shadow: 0 0 0 0 rgba(163, 73, 184, 0.5); } 70% { box-shadow: 0 0 0 10px rgba(163, 73, 184, 0); } 100% { box-shadow: 0 0 0 0 rgba(163, 73, 184, 0); } }

/* ---------- buttons (duo press) ---------- */
.tk-btn {
    display: -webkit-inline-box; display: -webkit-inline-flex; display: inline-flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center;
    box-sizing: border-box; min-height: 48px; min-width: 44px; padding: 0 20px; margin: 0;
    border: 0; border-radius: var(--tk-r, 16px); font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif); font-weight: 800; font-size: 15px; line-height: 1.2; text-align: center; text-decoration: none;
    cursor: pointer; -webkit-appearance: none; appearance: none; color: #fff;
    background: #702082; background: var(--tk-purple, #702082); box-shadow: 0 5px 0 #4A1556; box-shadow: 0 5px 0 var(--tk-purple-dark, #4A1556);
    margin-bottom: 5px; -webkit-transition: -webkit-transform 0.08s, box-shadow 0.08s; transition: transform 0.08s, box-shadow 0.08s;
}
.tk-btn:active { -webkit-transform: translateY(4px); transform: translateY(4px); box-shadow: 0 1px 0 var(--tk-purple-dark, #4A1556); }
.tk-btn--green { background: var(--tk-teal-dark, #0f766e); box-shadow: 0 5px 0 #0b5a54; }
.tk-btn--green:active { box-shadow: 0 1px 0 #0b5a54; }
.tk-btn--gold { background: var(--tk-gold, #D97706); box-shadow: 0 5px 0 #92400e; }
.tk-btn--gold:active { box-shadow: 0 1px 0 #92400e; }
.tk-btn--ghost { background: var(--tk-surface, #ffffff); color: var(--tk-purple, #702082); border: 2px solid var(--tk-line, #ece4f0); box-shadow: 0 4px 0 var(--tk-edge, #dcc9e3); }
.tk-btn--ghost:active { box-shadow: 0 0 0 var(--tk-edge, #dcc9e3); }
.tk-btn--block { display: -webkit-box; display: -webkit-flex; display: flex; width: 100%; }
.tk-btn--sm { min-height: 44px; padding: 0 14px; font-size: 13px; border-radius: 99px; box-shadow: 0 3px 0 #4A1556; box-shadow: 0 3px 0 var(--tk-purple-dark, #4A1556); margin-bottom: 3px; }
.tk-btn--sm.tk-btn--green { box-shadow: 0 3px 0 #0b5a54; }
.tk-btn--sm.tk-btn--ghost { box-shadow: 0 3px 0 var(--tk-edge, #dcc9e3); }
.tk-btn[disabled], .tk-btn.is-disabled { opacity: 0.55; pointer-events: none; }

/* ---------- chip ---------- */
.tk-chip {
    display: -webkit-inline-box; display: -webkit-inline-flex; display: inline-flex; -webkit-align-items: center; align-items: center;
    box-sizing: border-box; font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif); font-size: 11px; font-weight: 800; line-height: 1.3; padding: 3px 10px; border-radius: 99px;
    background: var(--tk-purple-soft, #F3E8FA); color: var(--tk-purple, #702082); border: 0; white-space: nowrap; margin: 0 6px 4px 0;
}
[dir="rtl"] .tk-chip { margin: 0 0 4px 6px; }
.tk-chip i { margin-right: 4px; font-size: 13px; }
[dir="rtl"] .tk-chip i { margin-right: 0; margin-left: 4px; }
.tk-chip--purple { background: var(--tk-purple-soft, #F3E8FA); color: var(--tk-purple, #702082); }
.tk-chip--green { background: #d1fae5; color: #065f46; }
.tk-chip--gold { background: var(--tk-gold-soft, #fef3c7); color: var(--tk-gold-dark, #92400e); }
.tk-chip--red { background: var(--tk-red-soft, #fee2e2); color: #991b1b; }
.tk-chip--gray { background: var(--tk-surface-2, #f6f3f8); color: var(--tk-ink-2, #4b5563); }
.tk-chip--outline { background: transparent; border: 1.5px solid var(--tk-line, #ece4f0); color: var(--tk-ink-2, #4b5563); }
.tk-chip-btn { cursor: pointer; min-height: 44px; padding: 0 16px; font-size: 13px; -webkit-appearance: none; appearance: none; }
.tk-chip-btn.is-on { background: var(--tk-purple, #702082); color: #fff; }

/* ---------- progress bar ---------- */
.tk-progress { display: block; height: 8px; border-radius: 99px; background: #ece4f0; background: var(--tk-line, #ece4f0); overflow: hidden; margin-top: 8px; }
.tk-progress > i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--tk-teal, #1D9E75); -webkit-transition: width 0.6s ease; transition: width 0.6s ease; }
.tk-progress--sm { height: 5px; margin-top: 6px; }
.tk-progress--gold > i { background: var(--tk-gold, #D97706); }
.tk-progress--purple > i { background: var(--tk-purple, #702082); }

/* ---------- ring ---------- */
.tk-ring { position: relative; display: inline-block; width: 52px; height: 52px; -webkit-flex-shrink: 0; flex-shrink: 0; vertical-align: middle; }
.tk-ring svg { display: block; width: 100%; height: 100%; }
.tk-ring-bg { fill: none; stroke: var(--tk-line, #ece4f0); stroke-width: 5; }
.tk-ring-fg { fill: none; stroke: var(--tk-teal, #1D9E75); stroke-width: 5; stroke-linecap: round; -webkit-transition: stroke-dasharray 0.6s ease; transition: stroke-dasharray 0.6s ease; }
.tk-ring-label { position: absolute; left: 0; top: 0; width: 100%; height: 100%; line-height: 52px; text-align: center; font-size: 12px; font-weight: 800; color: var(--tk-ink, #1f2937); }
.tk-ring--sm { width: 40px; height: 40px; } .tk-ring--sm .tk-ring-label { line-height: 40px; font-size: 10px; }
.tk-ring--lg { width: 72px; height: 72px; } .tk-ring--lg .tk-ring-label { line-height: 72px; font-size: 16px; }
.tk-ring--light .tk-ring-bg { stroke: rgba(255, 255, 255, 0.28); }
.tk-ring--light .tk-ring-fg { stroke: #ffd166; }
.tk-ring--light .tk-ring-label { color: #fff; }

/* ---------- bottom sheet ---------- */
.tk-sheet-overlay { position: fixed; left: 0; right: 0; top: 0; bottom: 0; z-index: 90; background: var(--tk-overlay, rgba(45, 12, 52, 0.5)); opacity: 0; visibility: hidden; -webkit-transition: opacity 0.25s, visibility 0.25s; transition: opacity 0.25s, visibility 0.25s; }
.tk-sheet-overlay.is-open { opacity: 1; visibility: visible; }
.tk-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; box-sizing: border-box; max-width: 520px; margin: 0 auto;
    max-height: 88%; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column;
    background: var(--tk-surface, #ffffff); color: var(--tk-ink, #1f2937); font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif);
    border-radius: 24px 24px 0 0; box-shadow: 0 -10px 34px rgba(0, 0, 0, 0.22);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    -webkit-transform: translateY(105%); transform: translateY(105%); visibility: hidden;
    -webkit-transition: -webkit-transform 0.28s ease, visibility 0.28s; transition: transform 0.28s ease, visibility 0.28s;
}
.tk-sheet.is-open { -webkit-transform: translateY(0); transform: translateY(0); visibility: visible; }
.tk-sheet-handle { width: 44px; height: 5px; border-radius: 99px; background: var(--tk-edge, #dcc9e3); margin: 10px auto 2px; -webkit-flex-shrink: 0; flex-shrink: 0; }
.tk-sheet-head { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: space-between; justify-content: space-between; padding: 8px 16px 10px; }
.tk-sheet-head h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--tk-ink, #1f2937); }
.tk-sheet-close { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--tk-surface-2, #f6f3f8); color: var(--tk-ink-2, #4b5563); font-size: 20px; cursor: pointer; font-family: inherit; }
.tk-sheet-body { padding: 4px 16px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ---------- glass stat tiles ---------- */
.tk-stage { position: relative; overflow: hidden; border-radius: var(--tk-r-lg, 22px); padding: 16px 12px 8px; margin: 0 0 16px; color: #fff;
    background: #702082; background: linear-gradient(160deg, #8a2ca0 0%, #702082 45%, #4A1556 100%); box-shadow: var(--tk-shadow, 0 6px 16px rgba(112, 32, 130, 0.12)); }
.tk-stage:before { content: ''; position: absolute; width: 160px; height: 160px; border-radius: 50%; right: -50px; top: -70px; background: rgba(245, 184, 0, 0.18); pointer-events: none; }
.tk-glass-grid { position: relative; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; margin: 0 -4px; }
.tk-glass { box-sizing: border-box; -webkit-box-flex: 1; -webkit-flex: 1 1 40%; flex: 1 1 40%; min-width: 120px; margin: 4px; padding: 12px 10px; border-radius: 18px; text-align: center;
    background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.35); }
@supports ((-webkit-backdrop-filter: blur(8px)) or (backdrop-filter: blur(8px))) {
    .tk-glass { background: rgba(255, 255, 255, 0.14); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
.low-end .tk-glass, .legacy .tk-glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, 0.2); }
.tk-glass-icon { display: block; font-size: 20px; color: #ffd166; margin-bottom: 2px; }
.tk-glass-num { display: block; font-size: 24px; font-weight: 800; line-height: 1.15; color: #fff; }
.tk-glass-label { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.03em; color: #fff; opacity: 0.92; margin-top: 2px; overflow-wrap: anywhere; }

/* ---------- tabs (segmented) ---------- */
.tk-tabs { display: -webkit-box; display: -webkit-flex; display: flex; padding: 4px; margin: 0 0 14px; border-radius: 99px; background: var(--tk-surface-2, #f6f3f8); border: 2px solid var(--tk-line, #ece4f0); }
.tk-tab { -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; min-height: 44px; border: 0; border-radius: 99px; background: transparent; color: var(--tk-ink-2, #4b5563);
    font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif); font-weight: 800; font-size: 13px; cursor: pointer; padding: 0 8px; -webkit-transition: background 0.2s, color 0.2s; transition: background 0.2s, color 0.2s; }
.tk-tab[aria-selected="true"] { background: var(--tk-purple, #702082); color: #fff; box-shadow: 0 3px 0 var(--tk-purple-dark, #4A1556); }

/* ---------- list rows ---------- */
.tk-list { background: var(--tk-surface, #ffffff); border: 2px solid var(--tk-line, #ece4f0); border-bottom-width: 5px; border-bottom-color: var(--tk-edge, #dcc9e3); border-radius: var(--tk-r-lg, 22px); margin: 0 0 14px; overflow: hidden; }
.tk-item { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; box-sizing: border-box; width: 100%; min-height: 56px; padding: 8px 14px; margin: 0;
    border: 0; border-top: 1px solid var(--tk-line, #ece4f0); background: transparent; text-align: left; font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif); color: var(--tk-ink, #1f2937); cursor: pointer; text-decoration: none; -webkit-appearance: none; appearance: none; }
[dir="rtl"] .tk-item { text-align: right; }
.tk-item:first-child { border-top: 0; }
.tk-item:active { background: var(--tk-surface-2, #f6f3f8); }
.tk-item-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--tk-purple-soft, #F3E8FA); color: var(--tk-purple, #702082); display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; -webkit-justify-content: center; justify-content: center; font-size: 20px; margin-right: 12px; -webkit-flex-shrink: 0; flex-shrink: 0; }
[dir="rtl"] .tk-item-icon { margin-right: 0; margin-left: 12px; }
.tk-item-body { -webkit-box-flex: 1; -webkit-flex: 1 1 auto; flex: 1 1 auto; min-width: 0; display: block; }
.tk-item-title { display: block; font-weight: 800; font-size: 14px; overflow-wrap: anywhere; }
.tk-item-sub { display: block; font-weight: 600; font-size: 12px; color: var(--tk-ink-2, #4b5563); margin-top: 1px; overflow-wrap: anywhere; }
.tk-item-value { font-weight: 800; font-size: 12px; color: var(--tk-ink-3, #6b7280); margin-left: 8px; -webkit-flex-shrink: 0; flex-shrink: 0; }
[dir="rtl"] .tk-item-value { margin-left: 0; margin-right: 8px; }
.tk-item.is-danger .tk-item-title, .tk-item.is-danger .tk-item-icon { color: var(--tk-red, #dc2626); }
.tk-item.is-danger .tk-item-icon { background: var(--tk-red-soft, #fee2e2); }

/* ---------- toast ---------- */
.tk-toast { position: fixed; left: 16px; right: 16px; bottom: 24px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); max-width: 420px; margin: 0 auto; z-index: 95; box-sizing: border-box;
    background: #2d0c34; color: #fff; font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif); font-weight: 700; font-size: 13px; padding: 12px 16px; border-radius: 14px; text-align: center; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    opacity: 0; pointer-events: none; -webkit-transition: opacity 0.2s; transition: opacity 0.2s; }
.tk-toast.is-show { opacity: 1; }

/* ---------- bottom navigation (markup built by tiko-nav.js) ---------- */
.tk-bottom-nav { position: absolute; left: 0; right: 0; bottom: 0; z-index: 40; font-family: var(--tk-font, 'Plus Jakarta Sans', 'Noto Sans Ethiopic', sans-serif);
    -webkit-transition: -webkit-transform 0.28s ease; transition: transform 0.28s ease; }
.tk-bottom-nav.tk-nav-fixed { position: fixed; }
.tk-bottom-nav.is-hidden { -webkit-transform: translateY(115%); transform: translateY(115%); }
.tk-bottom-nav.is-off { display: none; }
.tk-nav-bar { position: relative; display: -webkit-box; display: -webkit-flex; display: flex; -webkit-align-items: stretch; align-items: stretch; box-sizing: border-box;
    height: 64px; max-width: 600px; margin: 0 auto; padding: 0 4px;
    background: #fff; background: var(--tk-surface, #ffffff); border-top: 2px solid #ece4f0; border-top: 2px solid var(--tk-line, #ece4f0); box-shadow: 0 -6px 18px rgba(74, 21, 86, 0.1); }
.tk-nav-safe { height: env(safe-area-inset-bottom, 0px); background: var(--tk-surface, #ffffff); }
.tk-nav-pill { position: absolute; top: 7px; left: 0; width: 56px; height: 30px; border-radius: 99px; background: var(--tk-purple-soft, #F3E8FA); z-index: 0; opacity: 0;
    -webkit-transition: -webkit-transform 0.3s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.2s; transition: transform 0.3s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.2s; }
.tk-nav-pill.is-on { opacity: 1; }
.tk-nav-item { position: relative; z-index: 1; -webkit-box-flex: 1; -webkit-flex: 1 1 0; flex: 1 1 0; min-width: 0; min-height: 44px; margin: 0; padding: 7px 2px 4px; border: 0; background: transparent;
    display: -webkit-box; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: center; align-items: center; -webkit-justify-content: flex-start; justify-content: flex-start;
    font-family: inherit; color: var(--tk-ink-3, #6b7280); cursor: pointer; text-decoration: none; -webkit-appearance: none; appearance: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tk-nav-ic { position: relative; display: block; width: 56px; height: 30px; line-height: 30px; text-align: center; font-size: 22px; -webkit-transition: color 0.2s, -webkit-transform 0.2s; transition: color 0.2s, transform 0.2s; }
.tk-nav-label { display: block; max-width: 100%; margin-top: 2px; font-size: 10px; font-weight: 800; line-height: 1.15; letter-spacing: 0.02em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-nav-item[aria-current="page"] { color: var(--tk-purple, #702082); }
.tk-nav-item[aria-current="page"] .tk-nav-ic { -webkit-transform: translateY(-1px) scale(1.08); transform: translateY(-1px) scale(1.08); }
.tk-nav-badge { position: absolute; top: -1px; right: 8px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 99px; background: var(--tk-red, #dc2626); color: #fff;
    font-size: 10px; font-weight: 800; font-style: normal; text-align: center; border: 2px solid var(--tk-surface, #ffffff); display: none; }
.tk-nav-badge.is-on { display: block; }
.tk-nav-badge.is-dot { min-width: 12px; width: 12px; height: 12px; line-height: 0; padding: 0; right: 14px; top: 1px; font-size: 0; }
[dir="rtl"] .tk-nav-badge { right: auto; left: 8px; }
.tk-nav-center { -webkit-box-flex: 0; -webkit-flex: 0 0 88px; flex: 0 0 88px; padding-top: 0; color: var(--tk-ink, #1f2937); }
.tk-nav-center .tk-nav-label { position: absolute; left: 2px; right: 2px; bottom: 4px; margin: 0; white-space: normal; max-height: 23px; color: var(--tk-purple, #702082); font-size: 10px; }
.tk-nav-fab { position: absolute; top: -26px; left: 50%; margin-left: -31px; width: 62px; height: 62px; border-radius: 50%; display: block; box-sizing: border-box;
    background: #702082; background: linear-gradient(145deg, var(--tk-purple-mid, #8a2ca0), var(--tk-purple-dark, #4A1556)); color: #fff; border: 4px solid var(--tk-surface, #ffffff);
    box-shadow: 0 5px 0 rgba(74, 21, 86, 0.85), 0 8px 16px rgba(74, 21, 86, 0.25); -webkit-transition: -webkit-transform 0.1s, box-shadow 0.1s; transition: transform 0.1s, box-shadow 0.1s; }
.tk-nav-center:active .tk-nav-fab { -webkit-transform: translateY(4px); transform: translateY(4px); box-shadow: 0 1px 0 rgba(74, 21, 86, 0.85); }
.tk-nav-center.is-done .tk-nav-fab { background: linear-gradient(145deg, #22a699, #0f766e); box-shadow: 0 5px 0 #0b5a54, 0 8px 16px rgba(15, 118, 110, 0.3); }
.tk-nav-fab-ring { position: absolute; left: -4px; top: -4px; width: 62px; height: 62px; }
.tk-nav-fab-ring circle { fill: none; stroke-width: 3.5; }
.tk-nav-fab-ring .r-bg { stroke: rgba(255, 255, 255, 0.25); }
.tk-nav-fab-ring .r-fg { stroke: #ffd166; stroke-linecap: round; -webkit-transition: stroke-dasharray 0.6s ease; transition: stroke-dasharray 0.6s ease; }
.tk-nav-fab-ic { position: absolute; left: 0; top: 0; right: 0; bottom: 0; line-height: 54px; text-align: center; font-size: 26px; }
[dir="rtl"] .tk-nav-fab-ic i.ph-play { -webkit-transform: scaleX(-1); transform: scaleX(-1); }
@media (max-width: 340px) {
    .tk-nav-center { -webkit-flex-basis: 80px; flex-basis: 80px; }
    .tk-nav-ic { width: 46px; }
    .tk-nav-label { font-size: 9.5px; letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .tk-bottom-nav, .tk-nav-pill, .tk-sheet, .tk-sheet-overlay, .tk-card.is-current, .tk-progress > i { -webkit-transition: none !important; transition: none !important; -webkit-animation: none !important; animation: none !important; }
}
