@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;700;800;900&family=DM+Mono:wght@400;500&display=swap');

/*
 * SportCal AI - Filament Admin Theme
 * Primary: #0a2342 (navy)
 * Secondary: #00c9bc (gold)
 * Sidebar: navy branded
 */

/* ============================================================
   PRIMARY COLOR SCALE - Navy #0a2342
   Generated from base #0a2342 with lightness steps
   ============================================================ */

:root,
.light,
[data-theme="light"] {
    --fi-primary-50:  #eef3f8;
    --fi-primary-100: #d5e3ef;
    --fi-primary-200: #acc7df;
    --fi-primary-300: #7aa4c8;
    --fi-primary-400: #4e82b0;
    --fi-primary-500: #2c5f8a;
    --fi-primary-600: #0a2342;
    --fi-primary-700: #152f4a;
    --fi-primary-800: #0f2238;
    --fi-primary-900: #091628;
    --fi-primary-950: #050d18;

    /* Sidebar - navy branded */
    --fi-sidebar-bg: #0a2342;
    --fi-sidebar-text: rgba(255, 255, 255, 0.85);
    --fi-sidebar-icon: rgba(255, 255, 255, 0.6);
    --fi-sidebar-item-active-bg: rgba(255, 255, 255, 0.12);
    --fi-sidebar-item-active-text: #ffffff;
    --fi-sidebar-item-hover-bg: rgba(255, 255, 255, 0.08);
    --fi-sidebar-group-label: rgba(255, 255, 255, 0.45);
    --fi-sidebar-border: rgba(255, 255, 255, 0.08);
}

.dark,
[data-theme="dark"] {
    /* Primary scale - inverted for dark */
    --fi-primary-50:  #050d18;
    --fi-primary-100: #091628;
    --fi-primary-200: #0f2238;
    --fi-primary-300: #152f4a;
    --fi-primary-400: #0a2342;
    --fi-primary-500: #2c5f8a;
    --fi-primary-600: #4e82b0;
    --fi-primary-700: #7aa4c8;
    --fi-primary-800: #acc7df;
    --fi-primary-900: #d5e3ef;
    --fi-primary-950: #eef3f8;

    /* Gray scale - navy-tinted instead of default slate */
    --fi-color-gray-950: #080f1a;
    --fi-color-gray-900: #0d1b2e;
    --fi-color-gray-800: #112336;
    --fi-color-gray-700: #1a3252;
    --fi-color-gray-600: #254569;
    --fi-color-gray-500: #4d7399;
    --fi-color-gray-400: #7fa3c0;
    --fi-color-gray-300: #adc4d8;
    --fi-color-gray-200: #ccdde9;
    --fi-color-gray-100: #e4eef5;
    --fi-color-gray-50:  #f2f7fb;

    /* Sidebar dark - deeper navy */
    --fi-sidebar-bg: #091628;
    --fi-sidebar-text: rgba(255, 255, 255, 0.85);
    --fi-sidebar-icon: rgba(255, 255, 255, 0.55);
    --fi-sidebar-item-active-bg: rgba(255, 255, 255, 0.10);
    --fi-sidebar-item-active-text: #ffffff;
    --fi-sidebar-item-hover-bg: rgba(255, 255, 255, 0.06);
    --fi-sidebar-group-label: rgba(255, 255, 255, 0.40);
    --fi-sidebar-border: rgba(255, 255, 255, 0.06);
}

/* ============================================================
   SIDEBAR - Deep navy gradient, flat & modern
   Correct class names verified from Filament v5 blade templates
   ============================================================ */

/* Background gradient - <aside class="fi-sidebar fi-main-sidebar"> */
.fi-sidebar {
    background: linear-gradient(180deg, #0B1F3A 0%, #0F2747 100%) !important;
    border-right: none !important;
}

/* Section group labels - <span class="fi-sidebar-group-label"> */
.fi-sidebar-group-label {
    color: #6B7C93 !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
}

/* Nav item link - <a class="fi-sidebar-item-btn"> */
.fi-sidebar-item-btn {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.625rem 0.75rem !important;
    border-radius: 0.75rem !important;
    color: #E8F0FA !important;
    font-weight: 400 !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

/* Hover */
.fi-sidebar-item-btn:hover {
    background-color: rgba(19, 47, 82, 0.7) !important;
    color: #ffffff !important;
}

/* Active - <li class="fi-sidebar-item fi-active"> */
.fi-sidebar-item.fi-active .fi-sidebar-item-btn {
    background-color: #132F52 !important;
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Icons - <svg class="fi-sidebar-item-icon"> */
.fi-sidebar-item-icon {
    color: #C5D5E8 !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    flex-shrink: 0 !important;
    transition: color 0.2s ease !important;
}

/* Icons - hover */
.fi-sidebar-item-btn:hover .fi-sidebar-item-icon {
    color: #ffffff !important;
}

/* Icons - active */
.fi-sidebar-item.fi-active .fi-sidebar-item-icon {
    color: #ffffff !important;
}

/* Header - <header class="fi-sidebar-header"> */
.fi-sidebar-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.fi-sidebar-header a,
.fi-brand-name {
    color: #ffffff !important;
    font-weight: 700 !important;
}

/* Footer - <div class="fi-sidebar-footer"> */
.fi-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

/* ============================================================
   TOPBAR / HEADER
   ============================================================ */

.fi-topbar {
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
}

.dark .fi-topbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: #0d1b2e;
}

/* Main content area - dark navy background */
.dark .fi-main,
.dark .fi-body,
.dark body {
    background-color: #080f1a !important;
}

/* Page wrapper / layout background */
.dark .fi-layout,
.dark .fi-main-ctn {
    background-color: #080f1a !important;
}

/* System theme (OS-level dark preference) - same rules without .dark class */
@media (prefers-color-scheme: dark) {
    .fi-topbar {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
        background: #0d1b2e !important;
    }
    .fi-main, .fi-body, body {
        background-color: #080f1a !important;
    }
    .fi-layout, .fi-main-ctn {
        background-color: #080f1a !important;
    }
    .fi-sidebar-group-label {
        color: rgba(255, 255, 255, 0.45) !important;
    }
    .fi-sidebar-item-button {
        color: rgba(255, 255, 255, 0.8) !important;
    }
    .fi-sidebar-header {
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    .fi-sidebar-footer {
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    }
    .fi-user-menu-button {
        color: rgba(255, 255, 255, 0.8) !important;
    }
}

/* ============================================================
   BUTTONS - primary actions use navy
   ============================================================ */

.fi-btn-color-primary {
    --tw-bg-opacity: 1;
    background-color: #0a2342 !important;
    border-color: #0a2342 !important;
    color: #ffffff !important;
}

.fi-btn-color-primary:hover {
    background-color: #152f4a !important;
    border-color: #152f4a !important;
}

/* ============================================================
   BADGES & INDICATORS
   ============================================================ */

.fi-badge-color-primary {
    background-color: rgba(26, 58, 92, 0.1) !important;
    color: #0a2342 !important;
}

/* ============================================================
   TABLES - flat design (no shadow/elevation)
   ============================================================ */

.fi-ta-ctn {
    box-shadow: none !important;
}

.fi-ta-row:hover td {
    background-color: #f8fafc !important;
}

.dark .fi-ta-row:hover td {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

/* ============================================================
   FORMS - focus ring uses navy
   ============================================================ */

.fi-input:focus,
.fi-select-input:focus {
    --tw-ring-color: rgba(26, 58, 92, 0.4) !important;
    border-color: #2c5f8a !important;
}

/* ============================================================
   RICH EDITOR - preview public typography inside admin editor
   ============================================================ */

.cms-rich-editor-input,
.cms-rich-editor-input .fi-fo-rich-editor-content,
.cms-rich-editor-input .fi-prose,
.cms-rich-editor-input .tiptap,
.cms-rich-editor-input .tiptap.ProseMirror {
    color: var(--cms-editor-body-color, #1f2937) !important;
    font-family: var(--cms-editor-font-body, system-ui, sans-serif) !important;
    font-size: var(--cms-editor-base-size, 16px) !important;
    font-weight: var(--cms-editor-body-weight, 400) !important;
}

.cms-rich-editor-input :where(h2),
.cms-rich-editor-input .tiptap :where(h2),
.cms-rich-editor-input .tiptap.ProseMirror :where(h2) {
    color: var(--cms-editor-heading-color, #111827) !important;
    font-family: var(--cms-editor-font-heading, system-ui, sans-serif) !important;
    font-size: var(--cms-editor-h2-size, 2rem) !important;
    font-weight: var(--cms-editor-heading-weight, 700) !important;
    line-height: 1.3 !important;
}

.cms-rich-editor-input :where(h3),
.cms-rich-editor-input .tiptap :where(h3),
.cms-rich-editor-input .tiptap.ProseMirror :where(h3) {
    color: var(--cms-editor-heading-color, #111827) !important;
    font-family: var(--cms-editor-font-heading, system-ui, sans-serif) !important;
    font-size: var(--cms-editor-h3-size, 1.5rem) !important;
    font-weight: var(--cms-editor-heading-weight, 700) !important;
    line-height: 1.3 !important;
}

.cms-rich-editor-input :where(h4),
.cms-rich-editor-input .tiptap :where(h4),
.cms-rich-editor-input .tiptap.ProseMirror :where(h4) {
    color: var(--cms-editor-heading-color, #111827) !important;
    font-family: var(--cms-editor-font-heading, system-ui, sans-serif) !important;
    font-size: var(--cms-editor-h4-size, 1.25rem) !important;
    font-weight: var(--cms-editor-heading-weight, 700) !important;
    line-height: 1.3 !important;
}

.cms-rich-editor-input :where(h5),
.cms-rich-editor-input .tiptap :where(h5),
.cms-rich-editor-input .tiptap.ProseMirror :where(h5) {
    color: var(--cms-editor-heading-color, #111827) !important;
    font-family: var(--cms-editor-font-heading, system-ui, sans-serif) !important;
    font-size: var(--cms-editor-h5-size, 1rem) !important;
    font-weight: var(--cms-editor-heading-weight, 700) !important;
    line-height: 1.3 !important;
}

/* ============================================================
   NOTIFICATION / ALERT accents
   ============================================================ */

.fi-no-header-icon {
    color: #0a2342 !important;
}

/* ============================================================
   PAGE HEADERS
   ============================================================ */

.fi-header-heading {
    color: #0a2342 !important;
}

.dark .fi-header-heading {
    color: #d5e3ef !important;
}

/* ============================================================
   SPORTCAL PORTAL - shared look with the public site
   ============================================================ */

:root {
    --sc-ocean: #0a2342;
    --sc-turquoise: #00c9bc;
    --sc-display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
    --sc-mono: 'DM Mono', ui-monospace, monospace;
}

.sc-brand { display: inline-flex; align-items: baseline; color: var(--sc-ocean); font: 900 1.6rem/1 var(--sc-display); letter-spacing: -.01em; white-space: nowrap; }
.sc-brand span { color: var(--sc-turquoise); font-weight: 400; }
.sc-brand small { align-self: center; margin-left: 5px; padding: 1px 5px; border: 1px solid rgb(0 201 188 / .5); border-radius: 4px; color: var(--sc-turquoise); font: 500 .55rem/1.4 var(--sc-mono); }
.fi-sidebar .sc-brand, .dark .sc-brand { color: #fff; }

.fi-header-heading, .fi-section-header-heading { font-family: var(--sc-display) !important; letter-spacing: -.01em; }
.fi-header-heading { font-size: 2.25rem !important; font-weight: 800 !important; }
.fi-section-header-heading { font-size: 1.25rem !important; font-weight: 700 !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-btn { box-shadow: inset 3px 0 0 var(--sc-turquoise); }

/* Sign-in and registration pages */
.fi-simple-layout { background: radial-gradient(circle at 85% -10%, rgb(0 201 188 / .18), transparent 45%), linear-gradient(160deg, #0a2342 0%, #0f3460 100%) !important; }
.fi-simple-main { border-radius: 18px !important; box-shadow: 0 24px 60px rgb(0 0 0 / .3) !important; }
.fi-simple-header .sc-brand { font-size: 2rem; }

/* Dashboard */
.sc-dashboard { display: grid; gap: 1.5rem; }
.sc-hero { position: relative; overflow: hidden; padding: 1.75rem 2rem; border-radius: 16px; background: linear-gradient(135deg, #0a2342 0%, #0f3460 100%); color: #fff; }
.sc-hero::after { content: ''; position: absolute; right: -90px; top: -120px; width: 320px; height: 320px; border: 1px solid rgb(255 255 255 / .08); border-radius: 50%; pointer-events: none; }
.sc-kicker { color: #79d8d2; font: 500 .7rem var(--sc-mono); letter-spacing: .14em; text-transform: uppercase; }
.sc-hero h2 { margin: .35rem 0 .4rem; font: 800 2.4rem/1.05 var(--sc-display); }
.sc-hero > p:not(.sc-kicker) { max-width: 36rem; color: #c0cbd7; font-size: .9rem; }
.sc-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.25rem; }
.sc-action { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 1rem; border: 1px solid rgb(255 255 255 / .18); border-radius: 10px; color: #fff; font-size: .875rem; font-weight: 600; transition: background .15s; }
.sc-action:hover { background: rgb(255 255 255 / .08); }
.sc-action-primary { border-color: transparent; background: var(--sc-turquoise); color: var(--sc-ocean); }
.sc-action-primary:hover { background: #33d6cc; }
.sc-action-icon { width: 1.1rem; height: 1.1rem; }

.sc-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 0; }
.sc-stat { padding: 1rem 1.25rem; border: 1px solid rgb(10 35 66 / .1); border-radius: 14px; background: #fff; }
.sc-stat dt { color: #56697b; font: 500 .68rem var(--sc-mono); letter-spacing: .1em; text-transform: uppercase; }
.sc-stat dd { margin: .25rem 0 0; color: var(--sc-ocean); font: 800 2.4rem/1 var(--sc-display); }
.sc-stat-alert { border-color: rgb(255 107 53 / .45); background: #fff6f2; }
.sc-stat-alert dd { color: #a63c20; }

.sc-panel { overflow: hidden; border: 1px solid rgb(10 35 66 / .1); border-radius: 14px; background: #fff; }
.sc-panel-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid rgb(10 35 66 / .08); }
.sc-panel-header h2 { font: 700 1.35rem var(--sc-display); color: var(--sc-ocean); }
.sc-panel-header a { color: #0b6f6a; font-size: .85rem; font-weight: 600; }
.sc-event { display: grid; grid-template-columns: 3rem 2rem minmax(0, 1fr) auto; align-items: center; gap: .9rem; min-height: 64px; padding: .7rem 1.25rem; border-left: 4px solid var(--sport-color); border-bottom: 1px solid rgb(10 35 66 / .06); transition: background .15s; }
.sc-event:hover { background: #f6f9fb; }
.sc-event time { display: grid; justify-items: center; padding: .3rem 0; border-radius: 8px; background: #e9eff8; }
.sc-event time strong { font: 800 1.35rem/1 var(--sc-display); color: var(--sc-ocean); }
.sc-event time small { font: .6rem var(--sc-mono); text-transform: uppercase; color: #56697b; }
.sc-event-icon { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: color-mix(in srgb, var(--sport-color) 20%, #fff); }
.sc-event-body { display: grid; min-width: 0; }
.sc-event-body strong { overflow: hidden; color: var(--sc-ocean); font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sc-event-body small { color: #56697b; font-size: .8rem; }
.sc-status { padding: .15rem .6rem; border-radius: 999px; background: #e3f6ec; color: #166534; font-size: .72rem; font-weight: 600; }
.sc-status-draft { background: #eef1f4; color: #475569; }
.sc-empty { padding: 1.5rem 1.25rem; color: #56697b; }
.sc-empty a { color: #0b6f6a; font-weight: 600; text-decoration: underline; }
.sc-notice { display: flex; gap: 1rem; padding: 1.5rem; border: 1px solid rgb(255 107 53 / .35); border-radius: 14px; background: #fff6f2; }
.sc-notice-icon { flex: none; width: 1.75rem; height: 1.75rem; color: #a63c20; }
.sc-notice h2 { font: 700 1.5rem var(--sc-display); color: var(--sc-ocean); }
.sc-notice p { margin-top: .3rem; color: #56697b; }

.dark .sc-stat, .dark .sc-panel { border-color: rgb(255 255 255 / .08); background: #0d1b2e; }
.dark .sc-stat dd, .dark .sc-panel-header h2, .dark .sc-event-body strong, .dark .sc-event time strong, .dark .sc-notice h2 { color: #e7eef5; }
.dark .sc-stat dt, .dark .sc-event-body small, .dark .sc-event time small, .dark .sc-empty, .dark .sc-notice p { color: #a8b8c7; }
.dark .sc-stat-alert { background: #36201a; border-color: #6b3828; }
.dark .sc-stat-alert dd { color: #ffa585; }
.dark .sc-event { border-bottom-color: rgb(255 255 255 / .05); }
.dark .sc-event:hover { background: #112336; }
.dark .sc-event time { background: #172a3d; }
.dark .sc-event-icon { background: color-mix(in srgb, var(--sport-color) 25%, #0d1b2e); }
.dark .sc-panel-header { border-bottom-color: rgb(255 255 255 / .06); }
.dark .sc-panel-header a, .dark .sc-empty a { color: #5fe0d6; }
.dark .sc-notice { background: #36201a; border-color: #6b3828; }
.dark .sc-status { background: #11301f; color: #86efac; }
.dark .sc-status-draft { background: #1a3252; color: #cbd5e1; }

@media (max-width: 640px) {
    .sc-hero { padding: 1.25rem; }
    .sc-hero h2 { font-size: 1.9rem; }
    .sc-action { flex: 1 1 100%; justify-content: center; }
    .sc-event { grid-template-columns: 2.75rem minmax(0, 1fr) auto; padding: .7rem 1rem; }
    .sc-event-icon { display: none; }
}

/* Sidebar labels inherit the light link colour (the default label colour was unreadable on navy). */
.fi-sidebar-item-label { color: inherit !important; }
.fi-sidebar-group-label { color: #9fb0c4 !important; }
.fi-sidebar-item-icon { color: rgb(232 240 250 / .75) !important; }
.fi-sidebar-item.fi-active .fi-sidebar-item-icon { color: var(--sc-turquoise) !important; }

/* Primary buttons use the brand navy (turquoise in dark mode), matching the public site. */
.fi-btn.fi-color-primary { background-color: var(--sc-ocean) !important; color: #fff !important; }
.fi-btn.fi-color-primary:hover { background-color: #0f3460 !important; }
.dark .fi-btn.fi-color-primary { background-color: var(--sc-turquoise) !important; color: var(--sc-ocean) !important; }
.dark .fi-btn.fi-color-primary:hover { background-color: #33d6cc !important; }

/* SVG sport icons in the portal */
.sc-event-icon { color: color-mix(in srgb, var(--sport-color) 75%, #0a2342); }
.dark .sc-event-icon { color: color-mix(in srgb, var(--sport-color) 75%, #fff); }
.sc-event-icon svg { width: 1.1rem; height: 1.1rem; }

/* Unselected toggle buttons (such as the sport icon picker) stay outlined; only the chosen one is filled. */
.fi-fo-toggle-buttons-input:not(:checked) + .fi-btn.fi-color-primary { background-color: #fff !important; color: #0a2342 !important; box-shadow: inset 0 0 0 1px rgb(10 35 66 / .18) !important; }
.fi-fo-toggle-buttons-input:not(:checked) + .fi-btn.fi-color-primary:hover { background-color: #f1f5f9 !important; }
.dark .fi-fo-toggle-buttons-input:not(:checked) + .fi-btn.fi-color-primary { background-color: transparent !important; color: #e7eef5 !important; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .2) !important; }

/* Import events page */
.sc-import { display: grid; gap: 1.5rem; }
.sc-import-copy { margin-bottom: 1rem; color: #56697b; }
.sc-import-columns { display: grid; gap: .5rem; margin-top: 1.25rem; font-size: .875rem; }
.sc-import-columns div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .5rem 0; border-top: 1px solid rgb(10 35 66 / .08); }
.sc-import-columns dt { font-family: var(--sc-mono); font-size: .8rem; color: #0a2342; }
.sc-import-columns dd { color: #56697b; }
.sc-import-form { display: grid; gap: 1rem; justify-items: start; }
.sc-import-form > :first-child { width: 100%; }
.sc-import-file-error { margin-top: 1rem; padding: .75rem 1rem; border-radius: 10px; background: #fff6f2; color: #a63c20; font-weight: 600; }
.sc-import-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.sc-import-stat { padding: .6rem 1rem; border: 1px solid rgb(10 35 66 / .1); border-radius: 12px; background: #fff; color: #56697b; font-size: .875rem; }
.sc-import-stat strong { margin-right: .25rem; font: 800 1.4rem var(--sc-display); color: #0a2342; }
.sc-import-actions { display: flex; gap: .5rem; margin-left: auto; }
.sc-import-table-wrap { overflow-x: auto; border: 1px solid rgb(10 35 66 / .1); border-radius: 14px; background: #fff; }
.sc-import-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.sc-import-table th { padding: .7rem 1rem; text-align: left; color: #56697b; font: 500 .68rem var(--sc-mono); letter-spacing: .08em; text-transform: uppercase; border-bottom: 1px solid rgb(10 35 66 / .1); }
.sc-import-table td { padding: .7rem 1rem; vertical-align: top; border-bottom: 1px solid rgb(10 35 66 / .06); }
.sc-import-table td strong { display: block; color: #0a2342; }
.sc-import-table td small { color: #56697b; }
.sc-import-table tr.is-error { background: #fff6f2; }
.sc-import-table tr.is-warning { background: #fffbeb; }
.sc-import-msg { display: block; margin-bottom: .25rem; font-weight: 600; }
.sc-import-msg.sc-ok, .sc-import-stat.sc-ok strong { color: #166534; }
.sc-import-msg.sc-bad, .sc-import-stat.sc-bad strong { color: #a63c20; }
.sc-import-msg.sc-warn, .sc-import-stat.sc-warn strong { color: #8a5a00; }
.dark .sc-import-stat, .dark .sc-import-table-wrap { border-color: rgb(255 255 255 / .08); background: #0d1b2e; }
.dark .sc-import-stat strong, .dark .sc-import-table td strong, .dark .sc-import-columns dt { color: #e7eef5; }
.dark .sc-import-copy, .dark .sc-import-columns dd, .dark .sc-import-stat, .dark .sc-import-table td small, .dark .sc-import-table th { color: #a8b8c7; }
.dark .sc-import-table tr.is-error, .dark .sc-import-file-error { background: #36201a; }
.dark .sc-import-table tr.is-warning { background: #2e2610; }
.dark .sc-import-msg.sc-ok, .dark .sc-import-stat.sc-ok strong { color: #86efac; }
.dark .sc-import-msg.sc-bad, .dark .sc-import-stat.sc-bad strong, .dark .sc-import-file-error { color: #ffa585; }
.dark .sc-import-msg.sc-warn, .dark .sc-import-stat.sc-warn strong { color: #fcd34d; }
@media (max-width: 640px) { .sc-import-columns div { grid-template-columns: 1fr; gap: .2rem; } .sc-import-actions { margin-left: 0; width: 100%; } }

/* Import events: step list and column guide */
.sc-import-intro { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.sc-import-steps { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 0; padding: 0; list-style: none; color: #0a2342; font-size: .9rem; }
.sc-import-steps li { display: flex; align-items: center; gap: .5rem; }
.sc-import-steps span { display: inline-grid; place-items: center; flex: none; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: #e9eff8; color: #0a2342; font: 800 .9rem var(--sc-display); }
.sc-import-guide-wrap { overflow-x: auto; border: 1px solid rgb(10 35 66 / .1); border-radius: 12px; }
.sc-import-guide { width: 100%; border-collapse: collapse; font-size: .85rem; }
.sc-import-guide caption { padding: .7rem 1rem; caption-side: top; text-align: left; color: #56697b; font-size: .8rem; border-bottom: 1px solid rgb(10 35 66 / .08); }
.sc-import-guide thead th { padding: .55rem 1rem; text-align: left; color: #56697b; font: 500 .68rem var(--sc-mono); letter-spacing: .08em; text-transform: uppercase; background: #f6f9fb; border-bottom: 1px solid rgb(10 35 66 / .08); }
.sc-import-guide tbody th, .sc-import-guide td { padding: .6rem 1rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgb(10 35 66 / .06); }
.sc-import-guide tbody tr:last-child > * { border-bottom: 0; }
.sc-import-guide code { font: 500 .8rem var(--sc-mono); color: #0a2342; white-space: nowrap; }
.sc-import-guide td { color: #3b4a5a; }
.sc-import-example { font-family: var(--sc-mono); font-size: .78rem; color: #56697b !important; white-space: nowrap; }
.sc-import-need { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: #eef1f4; color: #475569; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.sc-import-need.is-required { background: #e0f5f3; color: #0b6f6a; }
.sc-import-need.is-muted { background: transparent; color: #8796a5; }
.dark .sc-import-steps, .dark .sc-import-guide code { color: #e7eef5; }
.dark .sc-import-steps span { background: #172a3d; color: #e7eef5; }
.dark .sc-import-guide-wrap { border-color: rgb(255 255 255 / .08); }
.dark .sc-import-guide caption, .dark .sc-import-guide thead th, .dark .sc-import-example { color: #a8b8c7 !important; }
.dark .sc-import-guide thead th { background: #112336; }
.dark .sc-import-guide caption, .dark .sc-import-guide thead th, .dark .sc-import-guide tbody th, .dark .sc-import-guide td { border-color: rgb(255 255 255 / .06); }
.dark .sc-import-guide td { color: #cbd5e1; }
.dark .sc-import-need { background: #1a3252; color: #cbd5e1; }
.dark .sc-import-need.is-required { background: #0f3b3a; color: #5fe0d6; }
.dark .sc-import-need.is-muted { background: transparent; color: #8fa2b4; }
@media (max-width: 640px) { .sc-import-intro .fi-btn { width: 100%; justify-content: center; } }

/* Mobile alignment fixes for the portal and admin (phones) */
.sc-import, .sc-dashboard { grid-template-columns: minmax(0, 1fr); }
.sc-import .fi-section, .sc-import .fi-section-content-ctn, .sc-import .fi-section-content { min-width: 0; }
@media (max-width: 640px) {
    .sc-import-intro { flex-direction: column; align-items: stretch; }
    .sc-import-intro .fi-btn { justify-content: center; }
    .sc-import-steps { flex-direction: column; gap: .5rem; }
    /* Column guide: one card per column instead of a wide table. */
    .sc-import-guide thead { display: none; }
    .sc-import-guide, .sc-import-guide tbody { display: block; }
    .sc-import-guide tr { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; padding: .7rem 1rem; border-bottom: 1px solid rgb(10 35 66 / .06); }
    .sc-import-guide tbody th, .sc-import-guide td { padding: 0; border: 0; }
    .sc-import-guide td:nth-child(3), .sc-import-guide td:nth-child(4) { grid-column: 1 / -1; }
    .sc-import-guide td:nth-child(4) { white-space: normal; }
    .sc-import-guide td:nth-child(4)::before { content: 'e.g. '; font-family: var(--sc-mono); }
    .dark .sc-import-guide tr { border-color: rgb(255 255 255 / .06); }
    .sc-import-summary { flex-direction: column; align-items: stretch; }
    .sc-import-actions { flex-direction: column; }
    .sc-import-actions .fi-btn { justify-content: center; }
    .sc-panel-header a { display: inline-flex; align-items: center; min-height: 44px; }
    .sc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sc-stat dd { font-size: 2rem; }
    .fi-header-heading { font-size: 1.85rem !important; }
    .fi-ta-actions .fi-link, .fi-ta-record-actions .fi-link { min-height: 36px; }
    .fi-fo-toggle-buttons .fi-btn { min-height: 40px; }
}
@media (max-width: 640px) {
    .sc-import-guide caption { display: block; width: auto; }
    .sc-event { grid-template-columns: 2.75rem minmax(0, 1fr); row-gap: .35rem; }
    .sc-event .sc-status { grid-column: 2; justify-self: start; }
    .sc-event-body strong { white-space: normal; }
}
