/* ─── SteveDrop Academy - Dark Theme ──────────────────────────────────────── */

:root {
    --sd-bg-primary:    #050a14;
    --sd-bg-secondary:  #0d1b2e;
    --sd-bg-card:       #0f2035;
    --sd-bg-hover:      #152844;
    --sd-border:        #1e3a5f;
    --sd-border-light:  #2a4d75;

    --sd-blue:          #0066ff;
    --sd-blue-light:    #3388ff;
    --sd-blue-glow:     #0066ff40;
    --sd-cyan:          #00d4ff;

    --sd-text-primary:  #e2e8f0;
    --sd-text-muted:    #64748b;
    --sd-text-light:    #94a3b8;

    --sd-success:       #10b981;
    --sd-warning:       #f59e0b;
    --sd-danger:        #ef4444;
    --sd-info:          #0ea5e9;

    --sd-sidebar-w:     260px;
    --sd-topbar-h:      64px;
    --sd-radius:        12px;
    --sd-radius-sm:     8px;
    --sd-transition:    0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    color: var(--sd-text-primary);
}

body.sd-body {
    background: var(--sd-bg-primary);
    min-height: 100vh;
    display: flex;
}

/* ─── Sidebar ─────────────────────────────────────────────────────────────── */

.sd-sidebar {
    width: var(--sd-sidebar-w);
    background: var(--sd-bg-secondary);
    border-right: 1px solid var(--sd-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 1000;
    transition: transform var(--sd-transition);
    overflow-y: auto;
}

.sd-sidebar-brand {
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid var(--sd-border);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sd-logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}
.sd-logo-steve { color: #ffffff; }
.sd-logo-drop  { color: var(--sd-blue); }

.sd-logo-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--sd-text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

.sd-nav { padding: 1rem 0; flex: 1; }

.sd-nav-section {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--sd-text-muted);
    padding: 0.75rem 1.25rem 0.3rem;
}

.sd-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: var(--sd-text-light);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all var(--sd-transition);
}
.sd-nav-link:hover {
    background: var(--sd-bg-hover);
    color: var(--sd-text-primary);
    border-left-color: var(--sd-border-light);
}
.sd-nav-link.active {
    background: var(--sd-blue-glow);
    color: var(--sd-blue-light);
    border-left-color: var(--sd-blue);
}
.sd-nav-link i { width: 18px; text-align: center; font-size: 1rem; }

.sd-nav-locked {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    color: #2a3f5c;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    cursor: not-allowed;
    user-select: none;
}
.sd-nav-locked i { width: 18px; text-align: center; font-size: .85rem; color: #1e3a5f; }

.sd-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--sd-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sd-user-mini { display: flex; align-items: center; gap: 0.6rem; flex: 1; overflow: hidden; }

.sd-avatar-sm {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--sd-border);
    flex-shrink: 0;
}

.sd-user-info { overflow: hidden; }
.sd-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sd-user-role { font-size: 0.7rem; color: var(--sd-blue-light); }

.sd-logout-btn {
    background: none;
    border: 1px solid var(--sd-border);
    color: var(--sd-text-muted);
    border-radius: var(--sd-radius-sm);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    transition: all var(--sd-transition);
    flex-shrink: 0;
}
.sd-logout-btn:hover { border-color: var(--sd-danger); color: var(--sd-danger); }

/* ─── Main Layout ─────────────────────────────────────────────────────────── */

.sd-main {
    margin-left: var(--sd-sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sd-topbar {
    height: var(--sd-topbar-h);
    background: var(--sd-bg-secondary);
    border-bottom: 1px solid var(--sd-border);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.sd-hamburger {
    display: none;
    background: none;
    border: 1px solid var(--sd-border);
    color: var(--sd-text-primary);
    border-radius: var(--sd-radius-sm);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1.1rem;
}

.sd-topbar-title {
    font-size: 0.95rem;
    font-weight: 600;
    flex: 1;
    color: var(--sd-text-primary);
}

.sd-topbar-right { display: flex; align-items: center; gap: 0.75rem; }

.sd-sub-badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    border: 1px solid;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.sd-sub-badge--inactive {
    background: #ef444420;
    color: #ef4444;
    border-color: #ef444440;
}

.sd-content {
    padding: 1.5rem;
    flex: 1;
}

/* ─── Cards ───────────────────────────────────────────────────────────────── */

.sd-card {
    background: var(--sd-bg-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1.25rem;
}

.sd-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--sd-border);
}

.sd-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sd-text-primary);
    margin: 0;
}

/* ─── Stat Cards ──────────────────────────────────────────────────────────── */

.sd-stat-card {
    background: var(--sd-bg-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--sd-transition);
}
.sd-stat-card:hover { border-color: var(--sd-blue); transform: translateY(-2px); }

.sd-stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.sd-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: var(--sd-text-primary);
}
.sd-stat-label {
    font-size: 0.8rem;
    color: var(--sd-text-muted);
    margin-top: 2px;
}

/* ─── Buttons ─────────────────────────────────────────────────────────────── */

.sd-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border-radius: var(--sd-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--sd-transition);
    line-height: 1;
}

.sd-btn-primary {
    background: var(--sd-blue);
    color: #fff;
    box-shadow: 0 0 15px var(--sd-blue-glow);
}
.sd-btn-primary:hover {
    background: var(--sd-blue-light);
    color: #fff;
    box-shadow: 0 0 25px var(--sd-blue-glow);
}

.sd-btn-outline {
    background: transparent;
    color: var(--sd-text-light);
    border: 1px solid var(--sd-border);
}
.sd-btn-outline:hover {
    border-color: var(--sd-blue);
    color: var(--sd-blue-light);
}

.sd-btn-danger {
    background: var(--sd-danger);
    color: #fff;
}
.sd-btn-danger:hover { background: #dc2626; color: #fff; }

.sd-btn-success {
    background: var(--sd-success);
    color: #fff;
}
.sd-btn-success:hover { background: #059669; color: #fff; }

.sd-btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

/* ─── Tables ──────────────────────────────────────────────────────────────── */

.sd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.sd-table th {
    background: var(--sd-bg-secondary);
    color: var(--sd-text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--sd-border);
}
.sd-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--sd-border);
    color: var(--sd-text-primary);
    vertical-align: middle;
}
.sd-table tr:last-child td { border-bottom: none; }
.sd-table tr:hover td { background: var(--sd-bg-hover); }

/* ─── Forms ───────────────────────────────────────────────────────────────── */

.sd-form-control {
    background: var(--sd-bg-secondary);
    border: 1px solid var(--sd-border);
    color: var(--sd-text-primary);
    border-radius: var(--sd-radius-sm);
    padding: 0.6rem 0.9rem;
    width: 100%;
    font-size: 0.875rem;
    transition: border-color var(--sd-transition);
    font-family: 'Inter', sans-serif;
}
.sd-form-control:focus {
    outline: none;
    border-color: var(--sd-blue);
    background: var(--sd-bg-secondary);
    color: var(--sd-text-primary);
    box-shadow: 0 0 0 3px var(--sd-blue-glow);
}
.sd-form-control::placeholder { color: var(--sd-text-muted); }
select.sd-form-control option { background: var(--sd-bg-secondary); }
textarea.sd-form-control { resize: vertical; }

.sd-form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sd-text-light);
    margin-bottom: 0.4rem;
    display: block;
}

/* ─── Alerts ──────────────────────────────────────────────────────────────── */

.sd-alert-success { background: #10b98120; border: 1px solid #10b98140; color: #34d399; border-radius: var(--sd-radius-sm); padding: 0.75rem 1rem; }
.sd-alert-error   { background: #ef444420; border: 1px solid #ef444440; color: #fca5a5; border-radius: var(--sd-radius-sm); padding: 0.75rem 1rem; }
.sd-alert-warning { background: #f59e0b20; border: 1px solid #f59e0b40; color: #fcd34d; border-radius: var(--sd-radius-sm); padding: 0.75rem 1rem; }
.sd-alert-info    { background: #0ea5e920; border: 1px solid #0ea5e940; color: #7dd3fc; border-radius: var(--sd-radius-sm); padding: 0.75rem 1rem; }

/* ─── Course Cards ────────────────────────────────────────────────────────── */

.sd-course-card {
    background: var(--sd-bg-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all var(--sd-transition);
}
.sd-course-card:hover {
    border-color: var(--sd-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--sd-blue-glow);
    color: inherit;
}
.sd-course-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: linear-gradient(135deg, #0d1b2e 0%, #1e3a5f 100%);
}
.sd-course-thumb-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #0d1b2e 0%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--sd-blue);
}
.sd-course-body { padding: 1rem; }
.sd-course-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.4rem; }
.sd-course-meta { font-size: 0.75rem; color: var(--sd-text-muted); display: flex; gap: 1rem; }

.sd-progress-bar {
    height: 5px;
    background: var(--sd-border);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 0.75rem;
}
.sd-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--sd-blue), var(--sd-cyan));
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ─── Plan Cards ──────────────────────────────────────────────────────────── */

.sd-plan-card {
    background: var(--sd-bg-card);
    border: 2px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1.75rem;
    text-align: center;
    transition: all var(--sd-transition);
    position: relative;
}
.sd-plan-card.featured {
    border-color: var(--sd-blue);
    box-shadow: 0 0 30px var(--sd-blue-glow);
}
.sd-plan-card:hover { transform: translateY(-5px); }

.sd-plan-featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sd-blue);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.9rem;
    border-radius: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

.sd-plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}
.sd-plan-period {
    font-size: 0.8rem;
    color: var(--sd-text-muted);
    margin-top: 0.25rem;
}
.sd-plan-features { list-style: none; text-align: left; margin: 1.25rem 0; }
.sd-plan-features li {
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: var(--sd-text-light);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.sd-plan-features li::before { content: "✓"; color: var(--sd-success); font-weight: 700; flex-shrink: 0; }

/* ─── Chat (WhatsApp Style) ───────────────────────────────────────────────── */

.wa-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--sd-topbar-h));
    height: calc(100dvh - var(--sd-topbar-h));
    background: var(--sd-bg-primary);
}

/* Header */
.wa-header {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .6rem 1rem;
    background: var(--sd-bg-secondary);
    border-bottom: 1px solid var(--sd-border);
    flex-shrink: 0;
}
.wa-header-logo {
    width: 38px; height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--sd-border);
}
.wa-header-info { flex: 1; overflow: hidden; }
.wa-header-name { font-size: .9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-header-sub  { font-size: .72rem; color: var(--sd-text-muted); }
.wa-header-actions { display: flex; gap: .85rem; color: var(--sd-text-muted); font-size: 1.05rem; cursor: pointer; flex-shrink: 0; }
.wa-header-actions i:hover { color: var(--sd-text-primary); }

/* Pinned bar */
.wa-pinned {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem 1rem;
    background: #fbbf2410;
    border-bottom: 1px solid #fbbf2425;
    flex-shrink: 0;
    cursor: pointer;
    overflow: hidden;
}
.wa-pinned i { color: #fbbf24; flex-shrink: 0; }
.wa-pinned-label { font-size: .62rem; color: #fbbf24; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.wa-pinned-text  { font-size: .78rem; color: var(--sd-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Scrollable message area */
.wa-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: .75rem .85rem .5rem;
    background-color: var(--sd-bg-primary);
    background-image:
        radial-gradient(ellipse at 15% 30%, #0066ff09 0%, transparent 55%),
        radial-gradient(ellipse at 85% 70%, #00d4ff07 0%, transparent 55%);
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.wa-messages-inner {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-height: 100%;
    justify-content: flex-end;
}

/* Date separator */
.wa-date-sep {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: .85rem 0 .5rem;
}
.wa-date-sep span {
    background: var(--sd-bg-secondary);
    border: 1px solid var(--sd-border);
    color: var(--sd-text-muted);
    font-size: .68rem;
    font-weight: 600;
    padding: .2rem .8rem;
    border-radius: 20px;
    letter-spacing: .3px;
}

/* Message rows */
.wa-msg {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    max-width: 72%;
    margin-bottom: .25rem;
}
.wa-in  { align-self: flex-start; }
.wa-out { align-self: flex-end; flex-direction: row-reverse; max-width: 72%; }

.wa-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    margin-bottom: 2px;
}

/* Bubbles */
.wa-bubble {
    padding: .42rem .72rem .3rem;
    font-size: .875rem;
    line-height: 1.45;
    position: relative;
    word-break: break-word;
    max-width: 100%;
}
.wa-bubble-in {
    background: #0d1b2e;
    border: 1px solid #1e3a5f;
    border-radius: 12px 12px 12px 2px;
}
.wa-bubble-out {
    background: #0a2855;
    border: 1px solid #0d3870;
    border-radius: 12px 12px 2px 12px;
}

/* Sender name inside incoming bubble */
.wa-sender {
    font-size: .7rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: .15rem;
}
.wa-sender-admin { color: #fbbf24; }
.wa-admin-tag {
    display: inline-block;
    background: #fbbf2420;
    color: #fbbf24;
    border: 1px solid #fbbf2440;
    font-size: .58rem;
    padding: .08rem .3rem;
    border-radius: 8px;
    margin-left: .3rem;
    font-weight: 700;
    vertical-align: middle;
}

.wa-text { color: var(--sd-text-primary); }

/* Timestamp + ticks inside bubble */
.wa-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .25rem;
    margin-top: .25rem;
}
.wa-time  { font-size: .63rem; color: #475569; }
.wa-ticks { font-size: .7rem; color: #60a5fa; }

/* Input bar */
.wa-input-wrap {
    flex-shrink: 0;
    padding: .55rem .75rem;
    background: #0a1628;
    border-top: 1px solid var(--sd-border);
}
.wa-input-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: var(--sd-bg-secondary);
    border: 1px solid var(--sd-border);
    border-radius: 28px;
    padding: .38rem .45rem .38rem .85rem;
}
.wa-icon-btn {
    background: none;
    border: none;
    color: var(--sd-text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: .1rem .2rem;
    flex-shrink: 0;
    transition: color .2s;
    line-height: 1;
}
.wa-icon-btn:hover { color: var(--sd-text-light); }
.wa-input-field {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--sd-text-primary);
    font-size: .9rem;
    font-family: 'Inter', sans-serif;
    padding: .3rem 0;
    min-width: 0;
}
.wa-input-field::placeholder { color: #475569; }
.wa-send-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--sd-blue);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
    transition: background .2s, transform .15s;
    box-shadow: 0 0 12px var(--sd-blue-glow);
}
.wa-send-btn:hover { background: var(--sd-blue-light); transform: scale(1.08); }

/* Legacy pin (dashboard/other) */
.sd-chat-pin {
    background: #fbbf2415;
    border: 1px solid #fbbf2430;
    border-radius: var(--sd-radius-sm);
    padding: 0.6rem 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    color: #fcd34d;
}

/* ─── Video Player ────────────────────────────────────────────────────────── */

.sd-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--sd-radius);
    overflow: hidden;
    background: #000;
}
.sd-video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* ─── Lesson Sidebar ──────────────────────────────────────────────────────── */

.sd-lesson-sidebar {
    height: calc(100vh - var(--sd-topbar-h));
    overflow-y: auto;
    position: sticky;
    top: var(--sd-topbar-h);
}

.sd-lesson-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1rem;
    border-radius: var(--sd-radius-sm);
    font-size: 0.82rem;
    color: var(--sd-text-light);
    text-decoration: none;
    transition: all var(--sd-transition);
    cursor: pointer;
}
.sd-lesson-item:hover { background: var(--sd-bg-hover); color: var(--sd-text-primary); }
.sd-lesson-item.active { background: var(--sd-blue-glow); color: var(--sd-blue-light); }
.sd-lesson-item.completed .sd-lesson-check { color: var(--sd-success); }

.sd-section-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--sd-text-muted);
    padding: 0.75rem 1rem 0.3rem;
}

/* ─── Page Header ─────────────────────────────────────────────────────────── */

.sd-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.sd-page-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--sd-text-primary);
}
.sd-page-subtitle {
    font-size: 0.85rem;
    color: var(--sd-text-muted);
    margin-top: 2px;
}

/* ─── Badge / Pills ───────────────────────────────────────────────────────── */

.sd-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
}
.sd-badge-success { background: #10b98120; color: #34d399; border: 1px solid #10b98140; }
.sd-badge-warning { background: #f59e0b20; color: #fcd34d; border: 1px solid #f59e0b40; }
.sd-badge-danger  { background: #ef444420; color: #fca5a5; border: 1px solid #ef444440; }
.sd-badge-info    { background: #0ea5e920; color: #7dd3fc; border: 1px solid #0ea5e940; }
.sd-badge-muted   { background: #1e3a5f40; color: var(--sd-text-muted); border: 1px solid var(--sd-border); }

/* ─── Countdown Timer ─────────────────────────────────────────────────────── */

.sd-countdown-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    align-items: center;
    gap: 0;
    background: var(--sd-bg-secondary);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: .6rem .4rem;
}
.sd-countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.sd-cd-num {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -.02em;
}
.sd-cd-label {
    font-size: .6rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sd-text-muted);
}
.sd-countdown-sep {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--sd-border-light);
    padding: 0 .15rem;
    margin-bottom: .8rem;
}

/* ─── Overlay / Mobile ────────────────────────────────────────────────────── */

.sd-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999;
}
.sd-overlay.show { display: block; }

/* ─── Tables: horizontal scroll on any screen ─────────────────────────────── */
.sd-card { overflow-x: auto; }
.sd-table { min-width: 560px; }

/* ─── Tablet (sidebar collapses earlier) ──────────────────────────────────── */
@media (max-width: 1024px) {
    .sd-sidebar { transform: translateX(-100%); }
    .sd-sidebar.open { transform: translateX(0); }
    .sd-main { margin-left: 0; }
    .sd-hamburger { display: flex !important; }
}

/* ─── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Layout */
    .sd-content { padding: .85rem .75rem; }
    .sd-topbar  { padding: 0 .75rem; gap: .6rem; }
    .sd-topbar-title { font-size: .85rem; }
    .sd-main { overflow-x: hidden; }

    /* Subscription badge in topbar: hide text, keep icon */
    .sd-sub-badge { font-size: .68rem; padding: .2rem .5rem; }

    /* Page header stacks vertically */
    .sd-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: .6rem;
        margin-bottom: 1rem;
    }
    .sd-page-title { font-size: 1.15rem; }

    /* Cards */
    .sd-card { padding: .85rem .75rem; border-radius: 10px; }
    .sd-card-header { flex-wrap: wrap; gap: .5rem; }
    .sd-stat-card { padding: .85rem; }
    .sd-stat-value { font-size: 1.4rem; }
    .sd-stat-icon  { width: 42px; height: 42px; font-size: 1.1rem; }

    /* Buttons */
    .sd-btn { padding: .5rem 1rem; font-size: .82rem; }
    .sd-btn-sm { padding: .32rem .6rem; font-size: .75rem; }

    /* Plan cards */
    .sd-plan-price { font-size: 1.9rem; }
    .sd-plan-card  { padding: 1.25rem 1rem; }

    /* Countdown */
    .sd-cd-num    { font-size: 1.1rem; }
    .sd-cd-label  { font-size: .55rem; }
    .sd-countdown-sep { font-size: .9rem; }

    /* Course cards */
    .sd-course-thumb-placeholder { height: 140px; }

    /* Hero / Welcome */
    .sd-hero-nav  { padding: .85rem 1rem; }
    .sd-hero-nav .d-flex.gap-2 { gap: .35rem !important; }
    .sd-hero-nav .sd-btn { padding: .4rem .75rem; font-size: .8rem; }

    /* Lesson sidebar: full width below video on mobile */
    .sd-lesson-sidebar {
        height: auto;
        position: static;
        max-height: 320px;
        overflow-y: auto;
        border-top: 1px solid var(--sd-border);
    }

    /* Auth */
    .sd-auth-box { padding: 1.4rem 1.15rem; }

    /* Admin tables: smaller font */
    .sd-table { font-size: .8rem; min-width: 500px; }
    .sd-table th, .sd-table td { padding: .6rem .75rem; }

    /* Chat (WhatsApp) */
    .wa-wrap { height: calc(100dvh - var(--sd-topbar-h)); }
    .wa-msg  { max-width: 86%; }
    .wa-out  { max-width: 86%; }
    .wa-bubble { font-size: .84rem; padding: .4rem .65rem .28rem; }
    .wa-input-wrap { padding: .45rem .5rem; }
    .wa-send-btn   { width: 36px; height: 36px; font-size: .85rem; }
    .wa-messages   { padding: .6rem .6rem .4rem; }

    /* Progress admin table */
    .sd-progress-bar { min-width: 70px; }

    /* Topbar right: wrap if needed */
    .sd-topbar-right { gap: .4rem; }
}

/* ─── Small phones ────────────────────────────────────────────────────────── */
@media (max-width: 400px) {
    .sd-content { padding: .6rem .5rem; }
    .wa-msg, .wa-out { max-width: 92%; }
    .sd-plan-price { font-size: 1.6rem; }
    .sd-sub-badge span { display: none; }
}

/* ─── Welcome / Guest ─────────────────────────────────────────────────────── */

.sd-hero {
    min-height: 100vh;
    background: var(--sd-bg-primary);
    color: var(--sd-text-primary);
    display: flex;
    flex-direction: column;
}

.sd-hero-nav {
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--sd-border);
    background: var(--sd-bg-secondary);
}

.sd-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
}

.sd-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.sd-hero-title .highlight {
    color: var(--sd-blue);
    text-shadow: 0 0 40px var(--sd-blue-glow);
}

.sd-hero-sub {
    font-size: 1.1rem;
    color: var(--sd-text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

.sd-glow-orb {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--sd-blue-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* ─── Auth ────────────────────────────────────────────────────────────────── */

.sd-auth-box {
    background: var(--sd-bg-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
}

/* ─── Tool cards ──────────────────────────────────────────────────────────── */

.sd-tool-card {
    background: var(--sd-bg-card);
    border: 1px solid var(--sd-border);
    border-radius: var(--sd-radius);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all var(--sd-transition);
}
.sd-tool-card:hover {
    border-color: var(--sd-blue);
    color: inherit;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--sd-blue-glow);
}
.sd-tool-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.sd-tool-title { font-weight: 700; font-size: 1rem; margin-bottom: 0.3rem; }
.sd-tool-desc { font-size: 0.8rem; color: var(--sd-text-muted); }

/* ─── Utility ─────────────────────────────────────────────────────────────── */

.text-blue { color: var(--sd-blue-light) !important; }
.text-muted-sd { color: var(--sd-text-muted) !important; }
.border-sd { border-color: var(--sd-border) !important; }
.bg-sd-card { background: var(--sd-bg-card) !important; }
.bg-sd { background: var(--sd-bg-secondary) !important; }
