/* ============================================================
   BASE47 FLOW — LMS Design System
   Version: 1.0
   Compiled from base47/lovable academy/base47.css
   with plugin-specific additions for Base47 Flow LMS
   ============================================================ */

/* ==========================================================
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================== */
:root {
    /* --- Brand --- */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --primary-glow: rgba(79, 70, 229, 0.12);

    /* --- Accent / Orange --- */
    --accent-orange: #f97316;
    --accent-orange-soft: #fff7ed;
    --accent-orange-hover: #ea580c;

    /* --- Surfaces --- */
    --bg: #f8fafc;
    --bg-dark: #0f172a;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --surface: #ffffff;
    --surface-hover: #fafbff;
    --surface-active: #f5f7ff;
    --surface-dark: #0f172a;

    /* --- Status --- */
    --success: #22c55e;
    --success-soft: #f0fdf4;
    --warning: #eab308;
    --warning-soft: #fefce8;
    --error: #ef4444;
    --error-soft: #fef2f2;
    --info: #3b82f6;
    --info-soft: #eff6ff;

    /* --- Text --- */
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --text-main: #0f172a;
    --text-white: #ffffff;

    /* --- Borders --- */
    --border-color: #e2e8f0;
    --border-soft: rgba(0, 0, 0, 0.06);
    --border-medium: #e2e8f0;
    --border-focus: var(--primary);
    --border-radius: 12px;

    /* --- Radii --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* --- Shadows --- */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.04);
    --shadow-lg: 0 10px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.03);
    --shadow-xl: 0 20px 40px -8px rgb(0 0 0 / 0.08);
    --shadow-card: 0 1px 3px rgb(0 0 0 / 0.04), 0 4px 12px rgb(0 0 0 / 0.03);
    --shadow-card-hover: 0 8px 30px -4px rgb(0 0 0 / 0.08);
    --shadow-primary: 0 4px 14px 0 rgba(79, 70, 229, 0.25);

    /* --- Spacing --- */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* --- Typography --- */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* --- Transitions --- */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* --- Layout --- */
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
}


/* ==========================================================
   2. RESET & BASE STYLES
   ========================================================== */
.b47flow-wrap *,
.b47flow-wrap *::before,
.b47flow-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.b47flow-wrap {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.b47flow-wrap a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.b47flow-wrap a:hover { color: var(--primary-hover); }

.b47flow-wrap img { max-width: 100%; height: auto; display: block; }

/* ==========================================================
   3. TYPOGRAPHY
   ========================================================== */
.b47flow-wrap h1,
.b47flow-wrap h2,
.b47flow-wrap h3,
.b47flow-wrap h4,
.b47flow-wrap h5,
.b47flow-wrap h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    color: var(--text-primary);
}

.b47flow-wrap h1 { font-size: 1.875rem; }
.b47flow-wrap h2 { font-size: 1.5rem; }
.b47flow-wrap h3 { font-size: 1.25rem; }
.b47flow-wrap h4 { font-size: 1.125rem; }
.b47flow-wrap h5 { font-size: 1rem; }

.text-muted { color: var(--text-muted); font-size: 0.875rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }

/* ==========================================================
   4. APP SHELL LAYOUT (Sidebar + Main)
   ========================================================== */
.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    background: var(--bg);
}

.app-layout.sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

/* ==========================================================
   5. SIDEBAR
   ========================================================== */
.sidebar {
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-soft);
    padding: var(--space-xl) var(--space-lg);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: width var(--transition-slow);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    letter-spacing: -0.03em;
}

.sidebar-logo .logo-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    display: inline-block;
}

.sidebar-section {
    margin-bottom: var(--space-xl);
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-light);
    padding: 0 var(--space-md);
    margin-bottom: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px var(--space-md);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    cursor: pointer;
    margin-bottom: 2px;
    text-decoration: none;
}

.nav-item:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-orange);
    color: var(--text-white);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.nav-item .nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-item .nav-icon svg {
    width: 18px;
    height: 18px;
    stroke-width: 1.5;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: var(--space-lg);
}

.sidebar-help-card {
    background: linear-gradient(135deg, #f1f5f9, #e8ecf1);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
}

.sidebar-help-card .help-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.sidebar-help-card h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.sidebar-help-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.sidebar-upgrade-btn {
    display: block;
    width: 100%;
    padding: 10px;
    background: var(--accent-orange);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-top: var(--space-md);
}

.sidebar-upgrade-btn:hover {
    background: var(--accent-orange-hover);
    transform: translateY(-1px);
}

/* Powered-by badge (Free_Mode) */
.b47flow-powered-by {
    text-align: center;
    padding: var(--space-md) 0;
    font-size: 0.7rem;
    color: var(--text-light);
}

.b47flow-powered-by a {
    color: var(--text-muted);
    font-weight: 600;
}


/* ==========================================================
   6. MAIN CONTENT AREA
   ========================================================== */
.main-content {
    padding: var(--space-2xl);
    max-width: 1200px;
    width: 100%;
}

.main-content-wide {
    max-width: 100%;
}

/* ==========================================================
   7. TOP BAR
   ========================================================== */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-2xl);
    gap: var(--space-lg);
}

.topbar-breadcrumb {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.topbar-breadcrumb span { color: var(--text-light); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.search-box {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--bg);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 8px 16px;
    min-width: 220px;
    transition: all var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--text-primary);
    width: 100%;
    font-family: var(--font-family);
}

.search-box input::placeholder { color: var(--text-light); }

.topbar-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-medium);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-muted);
    position: relative;
}

.topbar-btn:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.topbar-btn .notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--accent-orange);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
}

/* ==========================================================
   8. CARDS
   ========================================================== */
.b47-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--space-lg);
    border: 1px solid var(--border-soft);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.b47-card:hover {
    box-shadow: var(--shadow-card-hover);
}

.b47-card-interactive:hover {
    transform: translateY(-2px);
}

.b47-card-flat {
    box-shadow: none;
    border: 1px solid var(--border-medium);
}

.b47-card-orange {
    background: var(--accent-orange);
    color: white;
    border: none;
}

.b47-card-dark {
    background: var(--bg-dark);
    color: white;
    border: none;
}

.b47-card-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
}

/* ==========================================================
   9. STAT CARDS
   ========================================================== */
.stat-card {
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 500;
}

.stat-card .stat-change {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    font-size: 0.8rem;
    font-weight: 700;
}

/* Stat card color variants */
.b47flow-stat-primary {
    background: var(--primary);
    color: white;
}

.b47flow-stat-orange {
    background: var(--accent-orange);
    color: white;
}

.b47flow-stat-success {
    background: var(--success);
    color: white;
}

.b47flow-stat-dark {
    background: var(--bg-dark);
    color: white;
}


/* ==========================================================
   10. BUTTONS
   ========================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    line-height: 1.4;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
    color: white;
}

.btn-orange {
    background: var(--accent-orange);
    color: white;
}

.btn-orange:hover {
    background: var(--accent-orange-hover);
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-outline:hover {
    background: var(--bg);
    border-color: var(--text-light);
    color: var(--text-primary);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    padding: 8px 12px;
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text-primary);
}

.btn-soft {
    background: var(--primary-soft);
    color: var(--primary);
}

.btn-soft:hover {
    background: #dde3ff;
}

.btn-dark {
    background: var(--bg-dark);
    color: white;
}

.btn-dark:hover {
    background: #1e293b;
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ==========================================================
   11. BADGES
   ========================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-orange  { background: var(--accent-orange-soft); color: var(--accent-orange); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-error   { background: var(--error-soft); color: var(--error); }
.badge-info    { background: var(--info-soft); color: var(--info); }
.badge-dark    { background: #1e293b; color: white; }
.badge-pro     { background: linear-gradient(135deg, var(--accent-orange), #f59e0b); color: white; }

/* ==========================================================
   12. PROGRESS BARS
   ========================================================== */
.progress-bar {
    height: 6px;
    background: var(--primary-soft);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--primary);
    transition: width 0.6s ease;
}

.progress-bar-fill.orange { background: var(--accent-orange); }
.progress-bar-fill.green  { background: var(--success); }
.progress-bar-fill.blue   { background: var(--info); }

.progress-bar-lg { height: 8px; }
.progress-bar-sm { height: 4px; }

/* ==========================================================
   13. FORM INPUTS
   ========================================================== */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.875rem;
    color: var(--text-primary);
    background: var(--bg-input);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-input::placeholder { color: var(--text-light); }

.form-input.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin: var(--space-lg) 0;
    color: var(--text-light);
    font-size: 0.8rem;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-medium);
}

/* Inline form error message */
.b47flow-form-error {
    background: var(--error-soft);
    color: var(--error);
    border: 1px solid var(--error);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
}

/* Inline form success message */
.b47flow-form-success {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: var(--space-md);
    font-size: 0.875rem;
}

/* Button loading state */
.b47flow-btn-loading {
    display: none;
}


/* ==========================================================
   14. TOGGLE / SWITCH
   ========================================================== */
.toggle {
    position: relative;
    width: 48px;
    height: 26px;
    display: inline-block;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--border-medium);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* ==========================================================
   15. TABLES
   ========================================================== */
.b47-table {
    width: 100%;
    border-collapse: collapse;
}

.b47-table th {
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-soft);
}

.b47-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.875rem;
    vertical-align: middle;
}

.b47-table tr:last-child td { border-bottom: none; }
.b47-table tr:hover td { background: var(--bg); }

/* ==========================================================
   16. AVATARS
   ========================================================== */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid var(--surface);
}

.avatar-sm { width: 28px; height: 28px; }
.avatar-lg { width: 48px; height: 48px; }
.avatar-xl { width: 64px; height: 64px; }

.avatar-stack { display: flex; }
.avatar-stack .avatar { margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.avatar-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 700;
    color: white;
    font-size: 0.75rem;
}

.avatar-placeholder.purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.avatar-placeholder.blue   { background: linear-gradient(135deg, #3b82f6, #60a5fa); }
.avatar-placeholder.green  { background: linear-gradient(135deg, #22c55e, #4ade80); }
.avatar-placeholder.orange { background: linear-gradient(135deg, #f97316, #fb923c); }

/* ==========================================================
   17. TABS
   ========================================================== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
}

.tab {
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    background: none;
    font-family: var(--font-family);
}

.tab:hover { color: var(--text-primary); }

.tab.active {
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

/* Tab panels */
.b47flow-tab-panel {
    padding: var(--space-md) 0;
}

/* ==========================================================
   18. ALERTS / INFO BOXES
   ========================================================== */
.info-box {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    background: var(--bg);
    font-size: 0.875rem;
}

.info-box.warning {
    border-left-color: var(--warning);
    background: var(--warning-soft);
}

.info-box.success {
    border-left-color: var(--success);
    background: var(--success-soft);
}

.info-box.error {
    border-left-color: var(--error);
    background: var(--error-soft);
}

/* ==========================================================
   19. GRID & FLEX HELPERS
   ========================================================== */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* ==========================================================
   20. SPACING HELPERS
   ========================================================== */
.mb-xs  { margin-bottom: var(--space-xs); }
.mb-sm  { margin-bottom: var(--space-sm); }
.mb-md  { margin-bottom: var(--space-md); }
.mb-lg  { margin-bottom: var(--space-lg); }
.mb-xl  { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mt-md  { margin-top: var(--space-md); }
.mt-lg  { margin-top: var(--space-lg); }
.mt-xl  { margin-top: var(--space-xl); }


/* ==========================================================
   21. AUTH PAGES (Login, Register, Forgot Password)
   ========================================================== */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.auth-left {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    background: var(--surface);
}

.auth-form-container {
    width: 100%;
    max-width: 420px;
}

.auth-right {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    top: -100px;
    right: -100px;
}

.auth-right::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.03);
    bottom: -80px;
    left: -80px;
}

.auth-promo {
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 400px;
}

.auth-promo h2 {
    font-size: 2rem;
    color: white;
    margin-bottom: var(--space-md);
}

.auth-promo p {
    font-size: 1rem;
    opacity: 0.85;
    line-height: 1.7;
}

/* Google OAuth placeholder button */
.b47flow-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 10px 20px;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-family: var(--font-family);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.b47flow-oauth-btn:hover {
    background: var(--bg);
    border-color: var(--text-light);
}

.b47flow-oauth-btn svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================
   22. DASHBOARD LAYOUT
   ========================================================== */

/* Continue Learning banner */
.b47flow-continue-banner {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.b47flow-continue-banner h3 {
    color: white;
    margin-bottom: var(--space-xs);
}

.b47flow-continue-banner .progress-bar {
    background: rgba(255,255,255,0.2);
    margin-top: var(--space-sm);
}

.b47flow-continue-banner .progress-bar-fill {
    background: white;
}

/* Dashboard stat cards grid */
.b47flow-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Dashboard course table */
.b47flow-course-table {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.b47flow-course-table .table-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

/* ==========================================================
   23. COURSE CARDS & BROWSE GRID
   ========================================================== */
.course-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    transition: all var(--transition-base);
}

.course-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px);
}

.course-card-thumb {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    position: relative;
    overflow: hidden;
}

.course-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-card-body {
    padding: var(--space-lg);
}

.course-card-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.04em;
    margin-bottom: var(--space-sm);
}

.course-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    line-height: 1.4;
}

.course-card-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.course-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-soft);
}

.course-card.locked {
    opacity: 0.7;
    position: relative;
}

.course-card.locked::after {
    content: '🔒';
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    font-size: 1.2rem;
}

/* Browse grid */
.b47flow-browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}


/* ==========================================================
   24. PRICING CARDS
   ========================================================== */
.pricing-card {
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-soft);
    padding: var(--space-xl);
    text-align: center;
    transition: all var(--transition-base);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    position: relative;
    transform: scale(1.02);
}

.pricing-card.featured::before {
    content: 'MOST POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.pricing-amount {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: var(--space-lg) 0;
    letter-spacing: -0.03em;
}

.pricing-amount span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    text-align: left;
    margin: var(--space-lg) 0;
}

.pricing-features li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.pricing-features li::before {
    content: '✓';
    color: var(--success);
    font-weight: 700;
    font-size: 0.8rem;
}

/* Trust indicators */
.trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
    color: var(--text-light);
    font-size: 0.8rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ==========================================================
   25. LESSON PLAYER PAGE
   ========================================================== */
.player-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    height: 100vh;
    background: #0f0f14;
}

.player-video-area {
    display: flex;
    flex-direction: column;
}

.player-video-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a0a0f;
    padding: var(--space-xl);
}

.player-video-placeholder {
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16/9;
    background: #1a1a24;
    border-radius: var(--radius-lg);
    box-shadow: 0 0 80px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 3rem;
}

/* Video embed container */
.b47flow-video-embed {
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16/9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 0 80px rgba(0,0,0,0.5);
}

.b47flow-video-embed iframe,
.b47flow-video-embed video {
    width: 100%;
    height: 100%;
    border: none;
}

.player-controls {
    background: var(--surface);
    padding: var(--space-lg) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-soft);
}

/* Player bottom tabs area */
.b47flow-player-tabs {
    background: var(--surface);
    padding: 0 var(--space-xl);
    border-top: 1px solid var(--border-soft);
}

.player-sidebar {
    background: var(--surface);
    border-left: 1px solid var(--border-soft);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.player-sidebar-header {
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-soft);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
}

.player-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
}

/* Lesson modules in sidebar */
.lesson-module {
    margin-bottom: var(--space-md);
}

.lesson-module-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: 4px;
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: 10px var(--space-md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.lesson-item:hover { background: var(--bg); }

.lesson-item.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.lesson-item.completed { color: var(--text-light); }

.lesson-item .lesson-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.6rem;
}

.lesson-item.completed .lesson-check {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.lesson-item.active .lesson-check {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

.lesson-item.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Mark complete button */
.mark-complete-btn:disabled {
    background: var(--success);
    opacity: 0.8;
}


/* ==========================================================
   26. CERTIFICATE CARDS
   ========================================================== */
.cert-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    overflow: hidden;
    transition: all var(--transition-base);
}

.cert-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

.cert-card-preview {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-soft), #dde3ff);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cert-card-preview .cert-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.cert-card-body {
    padding: var(--space-lg);
}

.cert-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.cert-card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--space-md);
}

.cert-card-actions {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* Verified badge on certificates */
.b47flow-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--success);
}

.b47flow-verified-badge svg {
    width: 14px;
    height: 14px;
}

/* Social share links */
.b47flow-share-links {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.b47flow-share-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.b47flow-share-links a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

/* ==========================================================
   27. PROFILE PAGE
   ========================================================== */
.b47flow-profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    padding: var(--space-xl);
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.b47flow-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.b47flow-profile-info h2 {
    margin-bottom: var(--space-xs);
}

.b47flow-profile-info p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Profile sections */
.b47flow-profile-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.b47flow-profile-section h3 {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border-soft);
}

/* Notification preference row */
.b47flow-pref-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
    border-bottom: 1px solid var(--border-soft);
}

.b47flow-pref-row:last-child {
    border-bottom: none;
}

.b47flow-pref-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.b47flow-pref-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Billing summary */
.b47flow-billing-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.b47flow-billing-item {
    padding: var(--space-md);
    background: var(--bg);
    border-radius: var(--radius-md);
}

.b47flow-billing-item .label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: var(--space-xs);
}

.b47flow-billing-item .value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* ==========================================================
   28. STATUS INDICATORS
   ========================================================== */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active   { background: var(--success); }
.status-dot.warning  { background: var(--warning); }
.status-dot.error    { background: var(--error); }
.status-dot.inactive { background: var(--text-light); }

/* ==========================================================
   29. TIMELINE (Activity Feed)
   ========================================================== */
.timeline-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md) 0;
    position: relative;
}

.timeline-item:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: var(--border-medium);
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.timeline-content {
    flex: 1;
}

.timeline-content .timeline-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 2px;
}

.timeline-content .timeline-time {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* ==========================================================
   30. SECTION HEADERS & DIVIDERS
   ========================================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.section-header h2 {
    font-size: 1.125rem;
}

.divider {
    height: 1px;
    background: var(--border-soft);
    margin: var(--space-lg) 0;
}


/* ==========================================================
   31. COURSE DETAIL PAGE
   ========================================================== */
.b47flow-course-hero {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    color: white;
    margin-bottom: var(--space-xl);
    position: relative;
    overflow: hidden;
}

.b47flow-course-hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    top: -80px;
    right: -80px;
}

.b47flow-course-hero h1 {
    color: white;
    margin-bottom: var(--space-md);
}

.b47flow-course-hero .progress-bar {
    background: rgba(255,255,255,0.2);
    margin-top: var(--space-md);
}

.b47flow-course-hero .progress-bar-fill {
    background: white;
}

/* Course content layout */
.b47flow-course-content {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-xl);
}

/* Module list */
.b47flow-module-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.b47flow-module {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    overflow: hidden;
}

.b47flow-module-header {
    padding: var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.b47flow-module-header:hover {
    background: var(--bg);
}

.b47flow-module-header h4 {
    font-size: 0.95rem;
}

.b47flow-module-lessons {
    border-top: 1px solid var(--border-soft);
}

/* Course sidebar (resources, instructor) */
.b47flow-course-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.b47flow-instructor-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-soft);
    padding: var(--space-lg);
    text-align: center;
}

.b47flow-instructor-card .avatar-xl {
    margin: 0 auto var(--space-md);
}

/* Claim certificate button */
.b47flow-claim-cert {
    background: linear-gradient(135deg, var(--accent-orange), #f59e0b);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
    width: 100%;
    text-align: center;
}

.b47flow-claim-cert:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}

/* Upgrade prompt for locked lessons */
.b47flow-upgrade-prompt {
    background: var(--warning-soft);
    border: 1px solid var(--warning);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
}

.b47flow-upgrade-prompt p {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
}

/* ==========================================================
   32. PUBLIC CERTIFICATE PAGE
   ========================================================== */
.b47flow-cert-public {
    max-width: 700px;
    margin: var(--space-3xl) auto;
    text-align: center;
    padding: 0 var(--space-lg);
}

.b47flow-cert-public-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-soft);
    padding: var(--space-2xl);
    margin-bottom: var(--space-xl);
}

.b47flow-cert-public-card h1 {
    font-size: 1.5rem;
    margin-bottom: var(--space-md);
}

.b47flow-cert-public-card .cert-student {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--space-sm);
}

.b47flow-cert-public-card .cert-course {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.b47flow-cert-public-card .cert-date {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ==========================================================
   33. ANIMATIONS
   ========================================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

.animate-in {
    animation: fadeIn 0.4s ease both;
}

.animate-in-delayed {
    animation: fadeIn 0.4s ease 0.1s both;
}

/* ==========================================================
   34. SCROLLBAR
   ========================================================== */
.b47flow-wrap ::-webkit-scrollbar,
.player-sidebar ::-webkit-scrollbar {
    width: 6px;
}

.b47flow-wrap ::-webkit-scrollbar-track,
.player-sidebar ::-webkit-scrollbar-track {
    background: transparent;
}

.b47flow-wrap ::-webkit-scrollbar-thumb,
.player-sidebar ::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

.b47flow-wrap ::-webkit-scrollbar-thumb:hover,
.player-sidebar ::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ==========================================================
   35. PRINT UTILITY
   ========================================================== */
@media print {
    .sidebar,
    .topbar { display: none !important; }
    .main-content { padding: 0; }
}


/* ==========================================================
   36. RESPONSIVE BREAKPOINTS
   ========================================================== */

/* --- Tablet (≤ 1024px) --- */
@media (max-width: 1024px) {
    .app-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .main-content {
        padding: var(--space-lg);
    }

    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }

    .b47flow-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .player-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
    }

    .player-sidebar {
        display: none;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-right {
        display: none;
    }

    .b47flow-course-content {
        grid-template-columns: 1fr;
    }

    .b47flow-course-sidebar {
        order: -1;
    }

    .b47flow-billing-summary {
        grid-template-columns: 1fr;
    }
}

/* --- Mobile (≤ 640px) --- */
@media (max-width: 640px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .b47flow-stats-grid {
        grid-template-columns: 1fr;
    }

    .b47flow-wrap h1 { font-size: 1.5rem; }

    .topbar {
        flex-wrap: wrap;
    }

    .search-box {
        min-width: 100%;
        order: 3;
    }

    .b47flow-continue-banner {
        flex-direction: column;
        text-align: center;
    }

    .b47flow-profile-card {
        flex-direction: column;
        text-align: center;
    }

    .player-controls {
        flex-wrap: wrap;
        gap: var(--space-sm);
        padding: var(--space-md);
    }

    .pricing-card.featured {
        transform: none;
    }

    .b47flow-course-hero {
        padding: var(--space-xl);
    }

    .auth-left {
        padding: var(--space-lg);
    }
}

/* --- Small Mobile (≤ 480px) --- */
@media (max-width: 480px) {
    .main-content {
        padding: var(--space-md);
    }

    .b47-card,
    .b47flow-profile-section,
    .b47flow-course-table {
        border-radius: var(--radius-md);
        padding: var(--space-md);
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
}
