/**
 * Design System — Clube PRF — Mentoria Pertencerei
 * Tema dark com sidebar, gamificação, navy/green/yellow
 * Mobile-first
 */

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

:root {
    /* Background */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --bg-card: #1E293B;
    --bg-card-hover: #263548;
    --bg-input: #1E293B;

    /* Text */
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    /* Accent Colors */
    --accent-green: #10B981;
    --accent-green-dark: #059669;
    --accent-green-light: #34D399;
    --accent-yellow: #F59E0B;
    --accent-yellow-dark: #D97706;
    --accent-orange: #F97316;
    --accent-red: #EF4444;
    --accent-red-dark: #DC2626;
    --accent-blue: #3B82F6;
    --accent-blue-dark: #2563EB;
    --accent-purple: #8B5CF6;
    --accent-purple-dark: #7C3AED;
    --accent-cyan: #06B6D4;
    --accent-pink: #EC4899;

    /* Borders */
    --border-subtle: #334155;
    --border-accent: #10B981;
    --border-input: #475569;

    /* Gradients */
    --gradient-card: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    --gradient-green: linear-gradient(135deg, var(--accent-green) 0%, var(--accent-green-dark) 100%);
    --gradient-yellow: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    --gradient-blue: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    --gradient-purple: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
    --gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F172A 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-card: 0 4px 6px -1px rgba(0,0,0,0.3);
    --shadow-hover: 0 10px 25px -5px rgba(0,0,0,0.4);
    --shadow-glow-green: 0 0 20px color-mix(in srgb, var(--accent-green) 30%, transparent);
    --shadow-glow-yellow: 0 0 20px rgba(245,158,11,0.3);

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

    /* Sidebar */
    --sidebar-width: 72px;
    --sidebar-expanded: 240px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Z-index */
    --z-sidebar: 100;
    --z-topbar: 90;
    --z-modal: 200;
    --z-toast: 300;
    --z-tooltip: 150;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-green-light);
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================
   TIPOGRAFIA
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 1.875rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { 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; }
.text-3xl { font-size: 1.875rem; }

.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-green { color: var(--accent-green); }
.text-yellow { color: var(--accent-yellow); }
.text-red { color: var(--accent-red); }
.text-blue { color: var(--accent-blue); }
.text-purple { color: var(--accent-purple); }
.text-orange { color: var(--accent-orange); }
.text-center { text-align: center; }
.text-right { text-align: right; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.font-normal { font-weight: 400; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 1.5rem;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    transition: margin-left var(--transition-normal);
}

.sidebar-expanded .main-content {
    margin-left: var(--sidebar-expanded);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    z-index: var(--z-sidebar);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-normal);
    overflow-x: hidden;
    overflow-y: auto;
}

.sidebar:hover,
.sidebar.expanded {
    width: var(--sidebar-expanded);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    height: 72px;
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sidebar-logo-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    transition: width var(--transition-fast), height var(--transition-fast);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.sidebar:hover .sidebar-logo-img,
.sidebar.expanded .sidebar-logo-img {
    width: 130px;
    height: 60px;
}

.sidebar-toggle {
    position: fixed; z-index: calc(var(--z-sidebar) + 1);
    left: calc(var(--sidebar-width) - 12px); top: 24px;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.sidebar-toggle:hover { background: var(--accent-green); color: white; border-color: var(--accent-green); transform: scale(1.1); }
.sidebar-expanded .sidebar-toggle { left: calc(var(--sidebar-expanded) - 12px); transform: rotate(180deg); }
.sidebar-expanded .sidebar-toggle:hover { transform: rotate(180deg) scale(1.1); }

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

.sidebar-nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    gap: 0.75rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

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

.sidebar-nav-item.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border-left-color: var(--accent-green);
}

.sidebar-nav-item .nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sidebar-nav-item .nav-label {
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.sidebar:hover .nav-label,
.sidebar.expanded .nav-label {
    opacity: 1;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

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

.topbar-left h1 {
    font-size: 1.25rem;
}

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

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.topbar-badge.streak { color: var(--accent-orange); }
.topbar-badge.rank { color: var(--accent-yellow); }
.topbar-badge.access-type { color: #60a5fa; font-size: 0.7rem; padding: 0.25rem 0.5rem; transition: all 0.15s; }
.topbar-badge.access-type:hover { background: rgba(96,165,250,0.1); border-color: rgba(96,165,250,0.3); }

/* CSS Tooltip */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-elevated, #1E293B);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 400;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    white-space: normal;
    max-width: 240px;
    text-align: center;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: var(--shadow-md);
    line-height: 1.4;
}
[data-tooltip]:hover::after { opacity: 1; }

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8125rem;
    color: white;
    cursor: pointer;
    flex-shrink: 0;
}
.topbar-menu-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.875rem; font-size: 0.8125rem; color: var(--text-primary);
    text-decoration: none; transition: background 0.1s; white-space: nowrap;
}
.topbar-menu-item:hover { background: var(--bg-secondary); }

/* Notification Bell */
.notif-wrapper { position: relative; }
.topbar-bell {
    position: relative; background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 0.375rem; border-radius: var(--radius-sm);
    transition: color 0.15s;
}
.topbar-bell:hover { color: var(--text-primary); }
.notif-badge {
    position: absolute; top: 0; right: 0;
    min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px; font-size: 0.5625rem; font-weight: 700;
    background: var(--accent-red); color: white;
    display: flex; align-items: center; justify-content: center;
    transform: translate(25%, -25%);
}

/* Notification Dropdown */
.notif-dropdown {
    position: absolute; top: 100%; right: 0; margin-top: 0.5rem;
    width: 360px; max-width: 90vw; max-height: 420px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); z-index: 800;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.notif-dropdown-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.notif-dropdown-body { flex: 1; overflow-y: auto; }
.notif-item {
    display: flex; align-items: flex-start; gap: 0.625rem;
    padding: 0.75rem 1rem; text-decoration: none; color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle); transition: background 0.1s;
}
.notif-item:hover { background: var(--bg-tertiary); }
.notif-item.unread { background: color-mix(in srgb, var(--accent-green) 5%, transparent); }
.notif-item-icon {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--bg-tertiary); display: flex; align-items: center;
    justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
    overflow: hidden;
}
.notif-item-icon.notif-share { background: color-mix(in srgb, var(--accent-green) 15%, transparent); color: var(--accent-green); }
.notif-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent-green); flex-shrink: 0; margin-top: 0.375rem;
}

/* Share Modal styles */
.share-tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border-subtle); }
.share-tab {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
    padding: 0.625rem 0.5rem; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-muted); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.share-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.share-tab.active { color: var(--accent-green); border-bottom-color: var(--accent-green); }

.share-results {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-secondary); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); z-index: 10; max-height: 200px; overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.share-result-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem; border: none; background: none; width: 100%;
    text-align: left; cursor: pointer; color: var(--text-primary); transition: background 0.1s;
}
.share-result-item:hover { background: var(--bg-tertiary); }
.share-result-avatar {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--bg-tertiary); display: flex; align-items: center;
    justify-content: center; font-size: 0.75rem; font-weight: 700; color: var(--text-muted);
}
.share-selected {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.375rem 0.625rem; background: color-mix(in srgb, var(--accent-green) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-green) 30%, transparent);
    border-radius: var(--radius-sm);
}
.share-link-box {
    padding: 0.75rem; background: var(--bg-secondary);
    border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
}
.share-info-text {
    padding: 0.625rem 0.75rem; background: color-mix(in srgb, var(--accent-yellow) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-yellow) 25%, transparent);
    border-radius: var(--radius-sm); color: var(--accent-yellow); font-size: 0.75rem; line-height: 1.5;
}
.share-info-text svg { vertical-align: -2px; margin-right: 0.25rem; }
.share-info-text strong { color: var(--text-primary); }

/* Share button on topbar */
.lp-share-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.3rem 0.625rem; border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--accent-green) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-green) 30%, transparent);
    color: var(--accent-green); font-size: 0.6875rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.lp-share-btn:hover { background: color-mix(in srgb, var(--accent-green) 20%, transparent); border-color: var(--accent-green); }
.share-error {
    padding: 0.625rem 0.75rem; background: color-mix(in srgb, var(--accent-red) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-red) 30%, transparent);
    border-radius: var(--radius-sm); color: var(--accent-red); font-size: 0.8125rem;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all var(--transition-normal);
}

.card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-hover);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.card-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ============================================================
   GRID SYSTEM
   ============================================================ */
.grid {
    display: grid;
    gap: 1.25rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 640px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 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; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

/* ============================================================
   BOTÕES
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

.btn:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--accent-red);
    color: white;
}
.btn-danger:hover {
    background: var(--accent-red-dark);
    color: white;
}

.btn-yellow {
    background: var(--gradient-yellow);
    color: #1a1a1a;
}
.btn-yellow:hover {
    box-shadow: var(--shadow-glow-yellow);
    transform: translateY(-1px);
    color: #1a1a1a;
}

.btn-outline {
    background: transparent;
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}
.btn-outline:hover {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* ============================================================
   FORMULÁRIOS
   ============================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-input);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9375rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

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

.form-input.error {
    border-color: var(--accent-red);
}

.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.375rem;
}

.form-error {
    font-size: 0.75rem;
    color: var(--accent-red);
    margin-top: 0.375rem;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394A3B8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: var(--gradient-green);
    transition: width var(--transition-slow);
    min-width: 0;
}

.progress-bar-fill.yellow {
    background: var(--gradient-yellow);
}

.progress-bar-fill.blue {
    background: var(--gradient-blue);
}

.progress-bar-fill.purple {
    background: var(--gradient-purple);
}

.progress-bar-fill.red {
    background: var(--accent-red);
}

.progress-bar.lg {
    height: 12px;
}

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

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-green { background: color-mix(in srgb, var(--accent-green) 15%, transparent); color: var(--accent-green); }
.badge-yellow { background: rgba(245,158,11,0.15); color: var(--accent-yellow); }
.badge-red { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.badge-blue { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.badge-purple { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.badge-orange { background: rgba(249,115,22,0.15); color: var(--accent-orange); }

/* ============================================================
   ALERTAS
   ============================================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.alert-success {
    background: color-mix(in srgb, var(--accent-green) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent-green) 30%, transparent);
    color: var(--accent-green-light);
}

.alert-error {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.3);
    color: #FCA5A5;
}

.alert-info {
    background: rgba(99,179,237,0.08);
    border: 1px solid rgba(99,179,237,0.25);
    color: #93c5fd;
}

.alert-warning {
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    color: var(--accent-yellow);
}

.alert-info {
    background: rgba(59,130,246,0.1);
    border: 1px solid rgba(59,130,246,0.3);
    color: #93C5FD;
}

/* ============================================================
   TOAST (Notificação de XP)
   ============================================================ */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.75rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-hover);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 3s forwards;
    font-size: 0.875rem;
    font-weight: 600;
}

.toast-xp {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform var(--transition-fast);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.modal-body {
    padding: 1.25rem;
}

.modal-footer {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   AUTH LAYOUT
   ============================================================ */
.auth-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    padding: 1.5rem;
}

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

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-hover);
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo-img {
    width: 180px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.5));
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.auth-footer a {
    font-weight: 600;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

/* ============================================================
   SUBSCRIPTION EXPIRED
   ============================================================ */
.expired-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--gradient-hero);
}

.expired-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.w-full { width: 100%; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* ============================================================
   SKELETON LOADING
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-card-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   RESPONSIVO — Mobile Bottom Nav
   ============================================================ */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    z-index: var(--z-sidebar);
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.125rem;
    padding: 0.25rem 0.25rem;
    color: var(--text-muted);
    font-size: 0.5625rem;
    font-weight: 500;
    text-decoration: none;
    transition: color var(--transition-fast);
    flex: 1;
    min-width: 0;
}

.mobile-nav-item.active {
    color: var(--accent-green);
}

.mobile-nav-item .nav-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.mobile-nav-item span:not(.nav-icon) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    text-align: center;
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }

    /* Esconder botão de toggle da sidebar em mobile */
    .sidebar-toggle {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
        padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
    }

    .mobile-nav {
        display: block;
    }

    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }

    .card {
        padding: 1rem;
    }

    .topbar {
        padding: 0 0 1rem;
    }

    /* Esconder badges de streak e patente no topbar — espaço insuficiente */
    .topbar-badge.streak,
    .topbar-badge.rank {
        display: none;
    }

    /* Esconder subtítulo do topbar em mobile */
    .topbar-left .text-secondary {
        display: none;
    }

    /* Topbar title menor em mobile */
    .topbar-left h1 {
        font-size: 1rem;
    }

    /* Card value menor em mobile */
    .card-value {
        font-size: 1.5rem;
    }

    /* Modal footer em coluna em mobile */
    .modal-footer {
        flex-direction: column-reverse;
    }
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 1.25rem;
    }
}

/* ============================================================
   SCROLLBAR CUSTOMIZADA
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================================
   PASSWORD TOGGLE
   ============================================================ */
.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

/* ============================================================
   QUIZ / BANDQUIZ
   ============================================================ */
.quiz-statement {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.quiz-option:hover:not(:disabled):not(.quiz-option-disabled) {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.quiz-option-selected {
    border-color: var(--accent-blue) !important;
    background: rgba(59, 130, 246, 0.15) !important;
}

.quiz-option-correct {
    border-color: var(--accent-green) !important;
    background: rgba(16, 185, 129, 0.15) !important;
}

.quiz-option-wrong {
    border-color: var(--accent-red) !important;
    background: rgba(239, 68, 68, 0.15) !important;
}

.quiz-option-disabled {
    cursor: default;
    opacity: 0.7;
}

.quiz-option-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    flex-shrink: 0;
    color: var(--text-secondary);
}

.quiz-option-selected .quiz-option-letter {
    background: var(--accent-blue);
    color: white;
}

.quiz-option-correct .quiz-option-letter {
    background: var(--accent-green);
    color: white;
}

.quiz-option-wrong .quiz-option-letter {
    background: var(--accent-red);
    color: white;
}

.quiz-option-text {
    flex: 1;
}

/* Imagem opcional anexada à alternativa */
.quiz-option-img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    border-radius: 6px;
    margin-bottom: 0.4rem;
    border: 1px solid var(--border-subtle);
}

/* Quiz review mode */
.quiz-options-review .quiz-option {
    cursor: default;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}

.quiz-option-review {
    cursor: default !important;
}

/* Quiz feedback */
.quiz-feedback {
    padding: 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.quiz-feedback-correct {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid var(--accent-green);
}

.quiz-feedback-wrong {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid var(--accent-red);
}

.quiz-feedback-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--accent-blue);
}

/* Quiz navigation dots */
.quiz-nav-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--border-subtle);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiz-nav-dot:hover {
    border-color: var(--accent-blue);
}

.quiz-nav-current {
    border-color: var(--accent-blue) !important;
    background: var(--accent-blue) !important;
    color: white !important;
}

.quiz-nav-answered {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.quiz-nav-correct {
    border-color: var(--accent-green) !important;
    background: var(--accent-green) !important;
    color: white !important;
}

.quiz-nav-wrong {
    border-color: var(--accent-red) !important;
    background: var(--accent-red) !important;
    color: white !important;
}

/* Quiz option input (admin form) */
.quiz-option-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   QUIZ DAILY CHART
   ============================================================ */
.quiz-daily-chart {
    display: flex; gap: 0.5rem; align-items: flex-end; height: 120px;
}
.quiz-daily-bar {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.25rem;
}
.quiz-daily-bar-stack {
    width: 100%; min-height: 2px; border-radius: 3px 3px 0 0;
    display: flex; flex-direction: column; overflow: hidden;
}
.quiz-bar-correct { background: var(--accent-green); }
.quiz-bar-wrong { background: var(--accent-red); }
.quiz-daily-label { font-size: 0.5625rem; color: var(--text-muted); }
.quiz-daily-count { font-size: 0.5625rem; color: var(--text-muted); font-weight: 700; }

/* Breadcrumb */
.lp-breadcrumb {
    display: flex; align-items: center; gap: 0.375rem;
    font-size: 0.6875rem; color: var(--text-muted); margin-bottom: 0.75rem;
}
.lp-breadcrumb a { color: var(--text-muted); text-decoration: none; transition: color 0.15s; }
.lp-breadcrumb a:hover { color: var(--accent-green); }
.lp-breadcrumb-sep { color: var(--border-subtle); display: flex; }
.lp-breadcrumb-current { color: var(--text-secondary); }

/* Quiz alert banner */
.lp-quiz-alert {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(245,158,11,0.08) 0%, rgba(245,158,11,0.03) 100%);
    border: 1px solid rgba(245,158,11,0.2); border-radius: var(--radius-md);
    animation: quizAlertPulse 2s ease infinite;
}
@keyframes quizAlertPulse {
    0%, 100% { border-color: rgba(245,158,11,0.2); }
    50% { border-color: rgba(245,158,11,0.5); }
}
.lp-quiz-alert-icon { color: var(--accent-yellow); flex-shrink: 0; }
.lp-quiz-alert-body { flex: 1; }
.lp-quiz-alert-body strong { font-size: 0.8125rem; color: var(--accent-yellow); display: block; margin-bottom: 0.125rem; }
.lp-quiz-alert-body p { font-size: 0.6875rem; color: var(--text-muted); margin: 0; line-height: 1.4; }
.lp-quiz-alert-btn {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.375rem 0.75rem; border-radius: var(--radius-full);
    background: var(--accent-yellow); color: #000; font-size: 0.6875rem; font-weight: 600;
    text-decoration: none; white-space: nowrap; flex-shrink: 0; transition: background 0.15s;
}
.lp-quiz-alert-btn:hover { background: #d97706; }

/* Inline quiz — dark notebook style */
/* ============================================================
   META STEPS — Timeline
   ============================================================ */
.step-item {
    position: relative;
    padding-left: 3rem;
    padding-bottom: 1.5rem;
}
/* Step card — design similar à imagem */
.step-card {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); overflow: hidden;
    transition: all 0.2s; cursor: pointer;
}
.step-card:hover { border-color: var(--border); }
.step-card.locked { opacity: 0.45; pointer-events: none; cursor: not-allowed; }
.step-card.completed { border-color: rgba(16,185,129,0.25); }
.step-card.current { border-color: rgba(245,158,11,0.4); box-shadow: 0 0 0 2px rgba(245,158,11,0.08); }
.step-card-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem;
}
.step-type-icon {
    width: 40px; height: 40px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-card-info { flex: 1; min-width: 0; }
.step-card-title { font-size: 0.9rem; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.step-card-subtitle { font-size: 0.7rem; color: var(--text-muted); margin-top: 1px; }
.step-card-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.step-card-xp { font-size: 0.75rem; font-weight: 700; color: var(--accent-yellow); white-space: nowrap; }
.step-card-badge { font-size: 0.6rem; font-weight: 700; padding: 0.15rem 0.4rem; border-radius: 99px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.step-badge-done { background: rgba(16,185,129,0.12); color: #10B981; }
.step-card-chevron { color: var(--text-muted); transition: transform 0.2s; display: flex; }
.step-card-chevron.rotate { transform: rotate(90deg); }
.step-card-body { padding: 0 1rem 1rem; border-top: 1px solid var(--border-subtle); }
.step-expand-btn {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.5rem; border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle); background: transparent;
    color: var(--text-muted); font-size: 0.65rem; font-weight: 500;
    cursor: pointer; transition: all 0.15s;
}
.step-expand-btn:hover { color: var(--text-primary); border-color: var(--border); }
/* Card em modo fullscreen nativo */
.step-card:fullscreen { background: var(--bg); padding: 2rem; overflow-y: auto; }
.step-card:fullscreen .mq-wrap, .step-card:fullscreen .fc-wrap { max-width: 800px; margin: 0 auto; }
.step-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 36px;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}
.step-item.completed:not(:last-child)::before {
    background: var(--accent-green);
}
.step-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
}
.step-icon.completed { background: var(--accent-green); color: white; }
.step-icon.current { background: var(--accent-yellow); color: #1a1a1a; animation: stepPulse 2s infinite; }
.step-icon.locked { background: var(--bg-tertiary); color: var(--text-muted); }
@keyframes stepPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.4); }
    50% { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
}

/* ============================================================
   BREADCRUMB
   ============================================================ */
.bc-nav {
    display: flex; align-items: center; gap: 0.375rem; flex-wrap: wrap;
    padding: 0.5rem 0.875rem; margin-bottom: 1rem;
    background: var(--bg-secondary); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); font-size: 0.8rem;
}
.bc-link {
    color: var(--text-muted); text-decoration: none; display: inline-flex;
    align-items: center; gap: 0.25rem; transition: color 0.15s;
    padding: 0.15rem 0.375rem; border-radius: var(--radius-sm);
}
.bc-link:hover { color: var(--accent-green); background: rgba(16,185,129,0.06); }
.bc-sep { color: var(--text-muted); opacity: 0.4; display: flex; }
.bc-current {
    color: var(--text-primary); font-weight: 600; display: inline-flex;
    align-items: center; gap: 0.25rem;
}

/* ============================================================
   META CARDS (student index)
   ============================================================ */
.meta-card {
    position: relative; border-radius: var(--radius-lg); padding: 1.25rem;
    transition: all var(--transition-normal); text-decoration: none; display: block; min-height: 180px;
}
.meta-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.meta-card.locked { opacity: 0.5; pointer-events: none; }
.meta-card.locked:hover { transform: none; box-shadow: none; }
.meta-card.current {
    border: 2px solid var(--accent-green);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-green) 12%, transparent), var(--shadow-hover);
    background: color-mix(in srgb, var(--accent-green) 3%, var(--bg-card));
    transform: scale(1.02);
    z-index: 2;
}
.meta-card.completed { border: 1px solid rgba(16,185,129,0.2); opacity: 0.75; }
.meta-card.completed:hover { opacity: 1; }

/* ── Meta Card v2 ────────────────────────────────── */
.mc2 {
    position: relative; display: flex; flex-direction: column;
    padding: 1.25rem; border-radius: var(--radius-lg);
    text-decoration: none; color: inherit; min-height: 200px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mc2:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }

/* Ribbon de status */
.mc2-ribbon {
    position: absolute; top: 0.625rem; right: 0.625rem;
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.2rem 0.6rem; border-radius: 99px;
    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.04em;
    white-space: nowrap;
}
.mc2-ribbon-green  { background: #10B981; color: #fff; box-shadow: 0 2px 8px rgba(16,185,129,0.3); }
.mc2-ribbon-yellow { background: var(--accent-yellow); color: #000; box-shadow: 0 2px 8px rgba(245,158,11,0.3); animation: mc2Pulse 2s ease-in-out infinite; }
.mc2-ribbon-orange { background: #F97316; color: #fff; animation: mc2Pulse 1.5s ease-in-out infinite; }
.mc2-ribbon-purple { background: rgba(139,92,246,0.15); color: #8B5CF6; }
.mc2-ribbon-gray   { background: var(--bg-tertiary); color: var(--text-muted); }
@keyframes mc2Pulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.05); } }

/* Header */
.mc2-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }
.mc2-number {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.125rem; font-weight: 800;
}
.mc2-titles { min-width: 0; }
.mc2-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin: 0; }
.mc2-subtitle { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Tags */
.mc2-tags { display: flex; gap: 0.375rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.mc2-tag {
    display: inline-flex; align-items: center; gap: 0.2rem;
    padding: 0.15rem 0.45rem; border-radius: var(--radius-sm);
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.02em;
}
.mc2-tag-yellow { background: rgba(245,158,11,0.1); color: #F59E0B; }
.mc2-tag-red    { background: rgba(239,68,68,0.1); color: #EF4444; }
.mc2-tag-default { background: var(--bg-tertiary); color: var(--text-muted); }

/* Footer / Progresso */
.mc2-footer { margin-top: auto; }
.mc2-progress { height: 6px; background: rgba(255,255,255,0.08); border-radius: 99px; overflow: hidden; }
.mc2-progress-fill { height: 100%; border-radius: 99px; transition: width 0.4s; }
.mc2-fill-green  { background: linear-gradient(90deg, #10B981, #34D399); }
.mc2-fill-yellow { background: linear-gradient(90deg, #F59E0B, #FBBF24); }
.mc2-info { font-size: 0.75rem; display: flex; align-items: center; gap: 0.375rem; }
.mc2-info-purple { color: #8B5CF6; }
.mc2-info-orange { color: #F97316; }
.mc2-info-muted  { color: var(--text-muted); }
.meta-card.extra { border: 2px solid var(--accent-purple); }
.meta-card.extra.locked { border-color: var(--border-subtle); }
.meta-number {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 1.125rem;
}
/* Metas bloqueadas por revisão — overlay */
.metas-grid-blocked {
    filter: blur(2px); pointer-events: none; user-select: none;
}
.metas-overlay {
    position: absolute; inset: 0; z-index: 10;
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 4rem;
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius-md);
    backdrop-filter: blur(2px);
}
.metas-overlay-content {
    text-align: center; padding: 2rem; max-width: 360px;
}
.metas-overlay-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(245, 158, 11, 0.15); color: var(--accent-yellow);
    animation: overlayPulse 2s ease-in-out infinite;
}
@keyframes overlayPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
    50% { box-shadow: 0 0 0 12px rgba(245,158,11,0); }
}
.metas-overlay-content h3 {
    font-size: 1.125rem; font-weight: 700; color: white; margin-bottom: 0.5rem;
}
.metas-overlay-content p {
    font-size: 0.8125rem; color: rgba(255,255,255,0.7); line-height: 1.5; margin-bottom: 1.25rem;
}
.metas-overlay-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.625rem 1.25rem; border-radius: var(--radius-sm);
    background: var(--accent-yellow); color: #1a1a1a;
    font-size: 0.8125rem; font-weight: 700; border: none; cursor: pointer;
    transition: all 0.15s;
}
.metas-overlay-btn:hover { background: #eab308; transform: scale(1.03); }

.meta-current-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.625rem; border-radius: 20px;
    font-size: 0.625rem; font-weight: 800; letter-spacing: 0.05em;
    background: var(--accent-green); color: white;
    animation: metaBadgePulse 1.5s ease-in-out infinite;
}
@keyframes metaBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
/* Meta cards inside netflix carousel */
.nfx-carousel .meta-card {
    width: 310px; min-height: 180px; flex-shrink: 0;
    scroll-snap-align: start; margin: 0;
}
.nfx-card-wrap .meta-card { width: 100%; max-width: 100%; }
/* min-width:0 + max-width travam o wrapper em 310px mesmo com texto nowrap dentro */
.nfx-carousel .nfx-card-wrap {
    flex: 0 0 310px;
    width: 310px;
    min-width: 0;
    max-width: 310px;
    overflow: hidden;
}

/* Meta cards v2 (.mc2) dentro do carrossel Netflix — largura travada */
.nfx-carousel .mc2 {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}
/* min-width:0 nos containers internos para que ellipsis funcione e o card não cresça por causa do texto */
.nfx-carousel .mc2 .mc2-titles,
.nfx-carousel .mc2 .mc2-header,
.nfx-card-wrap .mc2 .mc2-titles,
.nfx-card-wrap .mc2 .mc2-header { min-width: 0; max-width: 100%; }
.nfx-card-wrap .mc2 { width: 100%; max-width: 100%; }

#meta-view-netflix .nfx-row:first-child .meta-card.current {
    width: 100%; max-width: 380px;
}

/* Meta filters */
.meta-filter {
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.3rem 0.75rem; border-radius: 20px;
    background: var(--bg-secondary); border: 1px solid var(--border-subtle);
    color: var(--text-muted); font-size: 0.6875rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.meta-filter:hover { border-color: var(--text-muted); color: var(--text-primary); }
.meta-filter-active { background: var(--bg-tertiary); border-color: var(--text-secondary); color: var(--text-primary); }
.meta-filter-green { border-color: var(--accent-green) !important; color: var(--accent-green) !important; background: color-mix(in srgb, var(--accent-green) 10%, var(--bg-secondary)) !important; }

/* minmax(0, 1fr) impede que conteúdo longo (subtitle, etc) faça a coluna crescer.
   Sem isso, "1fr" usa min-content e cards com texto grande ficam mais largos que os demais. */
.metas-grid { display: grid; gap: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .metas-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .metas-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ============================================================
   FLASHCARD VIEWER — clean white style
   ============================================================ */
.fc-wrap {
    border: 1px solid #e2e8f0; border-radius: var(--radius-md);
    overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.fc-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.625rem 1rem; background: #f8fafc;
}
.fc-header-left {
    display: flex; align-items: center; gap: 0.375rem;
    font-size: 0.75rem; font-weight: 600; color: #64748b;
}
.fc-header-right { font-size: 0.75rem; }
.fc-counter { font-weight: 700; color: #94a3b8; }
.fc-counter-done { color: #10B981; }
.fc-bar { height: 3px; background: #e2e8f0; }
.fc-bar-fill { height: 100%; background: #8B5CF6; transition: width 0.3s; }

/* Flip stage */
.fc-stage {
    padding: 1.5rem 1rem; perspective: 800px;
}
.fc-flipper {
    position: relative; width: 100%; min-height: 240px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d; cursor: pointer;
}
.fc-flipped { transform: rotateY(180deg); }
.fc-side {
    position: absolute; top: 0; left: 0; width: 100%; min-height: 240px;
    backface-visibility: hidden; -webkit-backface-visibility: hidden;
    border-radius: 16px; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.fc-side-front { background: #fff; border: 2px solid #e2e8f0; z-index: 2; }
.fc-side-back { background: #fff; border: 2px solid #a7f3d0; transform: rotateY(180deg); }

/* Glow effect */
.fc-side-glow {
    position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(139,92,246,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.fc-side-glow-green {
    background: radial-gradient(circle at 70% 30%, rgba(16,185,129,0.08) 0%, transparent 60%);
}

.fc-side-content {
    position: relative; z-index: 1; padding: 2rem 1.5rem;
    display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%;
}
.fc-side-badge {
    display: inline-flex; align-items: center; gap: 0.375rem;
    font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: #8B5CF6;
    background: rgba(139,92,246,0.08); padding: 0.25rem 0.75rem;
    border-radius: 20px; margin-bottom: 1.5rem;
}
.fc-side-badge-ok { color: #059669; background: rgba(5,150,105,0.08); }
.fc-side-text {
    font-size: 1.25rem; font-weight: 600; color: #1e293b; line-height: 1.6;
    max-width: 420px; word-break: break-word;
}
.fc-side-back .fc-side-text { color: #065f46; }
.fc-side-action {
    display: flex; align-items: center; gap: 0.375rem;
    margin-top: 2rem; font-size: 0.6875rem; color: #94a3b8;
    animation: fcPulse 2s ease-in-out infinite;
}
.fc-side-action-back { animation: none; }
@keyframes fcPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.fc-tap-icon { display: flex; }

/* Feedback buttons (Errei / Sabia) */
.fc-actions {
    display: flex; gap: 0.75rem; padding: 0 1rem 1rem; justify-content: center;
}
.fc-action-btn {
    display: flex; align-items: center; gap: 0.375rem;
    padding: 0.625rem 1.5rem; border-radius: 10px;
    font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    border: 2px solid; transition: all 0.15s;
}
.fc-action-hard {
    background: #fff; border-color: #fca5a5; color: #dc2626;
}
.fc-action-hard:hover { background: #fef2f2; }
.fc-action-ok {
    background: #fff; border-color: #86efac; color: #059669;
}
.fc-action-ok:hover { background: #ecfdf5; }

.fc-face-badge {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.5625rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: #8B5CF6;
    background: rgba(139,92,246,0.1); padding: 0.2rem 0.625rem;
    border-radius: 20px; margin-bottom: 1.25rem;
}
.fc-face-badge-answer { color: #059669; background: rgba(5,150,105,0.1); }
.fc-face-text {
    font-size: 1.125rem; font-weight: 600; color: #1e293b; line-height: 1.6;
    max-width: 400px;
}
.fc-back .fc-face-text { color: #065f46; }
.fc-face-hint {
    display: flex; align-items: center; gap: 0.375rem;
    margin-top: 1.5rem; font-size: 0.6875rem; color: #94a3b8;
}

.fc-footer {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.75rem 1rem; border-top: 1px solid #e2e8f0; background: #f8fafc;
}
.fc-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1.5px solid #e2e8f0; color: #64748b;
    cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.fc-btn:hover:not(:disabled) { border-color: #8B5CF6; color: #8B5CF6; }
.fc-btn:disabled { opacity: 0.3; cursor: default; }
.fc-btn-next { background: #8B5CF6; border-color: #8B5CF6; color: white; }
.fc-btn-next:hover { background: #7c3aed; }
.fc-btn-done { background: #10B981; border-color: #10B981; color: white; }
.fc-btn-done:hover { background: #059669; }

.fc-dots { display: flex; gap: 0.375rem; justify-content: center; flex: 1; flex-wrap: wrap; }
.fc-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: #e2e8f0; border: none; cursor: pointer;
    transition: all 0.15s; padding: 0;
}
.fc-dot:hover { background: #94a3b8; transform: scale(1.3); }
.fc-dot-active { background: #8B5CF6; width: 20px; border-radius: 4px; }
.fc-dot-ok { background: #10B981; }
.fc-dot-hard { background: #ef4444; }

.fc-complete {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 1.25rem; background: #ecfdf5; color: #059669;
    font-size: 0.875rem; font-weight: 600; border-top: 1px solid #a7f3d0; text-align: center;
}
.fc-complete-icon { margin-bottom: 0.25rem; }
.fc-complete-stats { display: flex; gap: 1rem; margin-top: 0.5rem; font-size: 0.75rem; }
.fc-stat-ok { display: flex; align-items: center; gap: 0.25rem; color: #059669; }
.fc-stat-hard { display: flex; align-items: center; gap: 0.25rem; color: #dc2626; }

/* ============================================================
   EDITAL — Status Icons
   ============================================================ */
/* ============================================================
   EDITAL ALUNO — Visual documento oficial
   ============================================================ */
.edital-progress-card {
    display: flex; align-items: center; gap: 1.25rem;
    padding: 1.25rem; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
}
.edital-progress-chart { position: relative; flex-shrink: 0; }
.edital-progress-pct {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
    font-size: 1.25rem; font-weight: 800; color: var(--accent-green);
}
.edital-progress-info { flex: 1; }
.edital-progress-title { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.edital-progress-nums { display: flex; gap: 1rem; font-size: 0.75rem; }
.edital-stat-done { color: var(--accent-green); display: flex; align-items: center; gap: 0.25rem; }
.edital-stat-total { color: var(--text-muted); }

/* Documento */
.edital-doc {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); overflow: hidden;
}
.edital-doc-header {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 1rem 1.25rem; background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-subtle);
}
.edital-doc-logo {
    width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-green); color: white;
}
.edital-doc-title { font-size: 0.875rem; font-weight: 800; letter-spacing: 0.04em; color: var(--text-primary); }
.edital-doc-sub { font-size: 0.6875rem; color: var(--text-muted); }

/* Disciplina */
.edital-disc { border-bottom: 1px solid var(--border-subtle); }
.edital-disc:last-child { border-bottom: none; }
.edital-disc-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.875rem 1.25rem; cursor: pointer; transition: background 0.1s;
}
.edital-disc-header:hover { background: var(--bg-tertiary); }
.edital-disc-left { display: flex; align-items: center; gap: 0.75rem; }
.edital-disc-num {
    width: 28px; height: 28px; border-radius: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.8125rem;
    background: var(--bg-tertiary); color: var(--text-muted);
}
.edital-disc-title { font-size: 0.9375rem; font-weight: 700; color: var(--text-primary); }
.edital-disc-pct { font-size: 0.75rem; font-weight: 700; color: var(--text-muted); }
.edital-disc-pct-done { color: var(--accent-green); }
.edital-disc-bar { height: 2px; background: var(--bg-tertiary); }
.edital-disc-bar-fill { height: 100%; background: var(--accent-green); transition: width 0.3s; }

/* Assunto */
.edital-assunto {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 1.25rem 0.5rem 3.5rem;
    border-top: 1px solid color-mix(in srgb, var(--border-subtle) 50%, transparent);
}
.edital-assunto-left { display: flex; align-items: center; gap: 0.625rem; }
.edital-bullet {
    width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
    border: 2px solid var(--border-subtle); display: flex;
    align-items: center; justify-content: center;
}
.edital-bullet-done { border-color: var(--accent-green); background: var(--accent-green); color: white; }
.edital-bullet-current { border-color: var(--accent-yellow); background: var(--accent-yellow); }
.edital-assunto-title { font-size: 0.8125rem; color: var(--text-secondary); }

/* Subassunto */
.edital-sub {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.375rem 1.25rem 0.375rem 5rem;
    border-top: 1px solid color-mix(in srgb, var(--border-subtle) 30%, transparent);
}
.edital-sub-bullet {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    border: 1.5px solid var(--border-subtle); display: flex;
    align-items: center; justify-content: center;
}
.edital-sub-bullet-done { border-color: var(--accent-green); background: var(--accent-green); color: white; }
.edital-sub-title { font-size: 0.75rem; color: var(--text-muted); }

/* Estados */
.edital-done { text-decoration: line-through; opacity: 0.6; }
.edital-check { color: var(--accent-green); }
.edital-current { color: var(--accent-yellow); }

/* Meta links */
.edital-meta-link {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.5625rem; font-weight: 600; padding: 0.1rem 0.375rem;
    border-radius: 8px; margin-left: 0.375rem;
}
.edital-meta-done { background: color-mix(in srgb, var(--accent-green) 12%, transparent); color: var(--accent-green); }
.edital-meta-current { background: color-mix(in srgb, var(--accent-yellow) 12%, transparent); color: var(--accent-yellow); }
.edital-meta-locked { background: var(--bg-tertiary); color: var(--text-muted); }
.edital-meta-link-sm {
    font-size: 0.5625rem; font-weight: 600; color: var(--accent-blue);
    text-decoration: none; margin-left: 0.375rem;
}
.edital-meta-link-sm:hover { text-decoration: underline; }
.edital-meta-link-sm.edital-meta-locked { color: var(--text-muted); }

@media (max-width: 640px) {
    .edital-progress-card { flex-direction: column; text-align: center; }
    .edital-assunto { padding-left: 2.5rem; }
    .edital-sub { padding-left: 3.5rem; }
}

.edital-status-icon {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.edital-completed { background: color-mix(in srgb, var(--accent-green) 15%, transparent); color: var(--accent-green); }
.edital-current { background: color-mix(in srgb, var(--accent-yellow) 15%, transparent); color: var(--accent-yellow); }
.edital-locked { background: var(--bg-tertiary); color: var(--text-muted); }
.edital-not_covered { background: var(--bg-tertiary); color: var(--text-muted); }

/* ============================================================
   EDITAL TREE — Checkbox tree for meta form
   ============================================================ */
.edital-tree {
    max-height: 400px; overflow-y: auto;
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    background: var(--bg-secondary);
}
.edital-tree-disc { border-bottom: 1px solid var(--border-subtle); }
.edital-tree-disc:last-child { border-bottom: none; }
.edital-tree-row {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.625rem 0.875rem; cursor: pointer; transition: background 0.1s;
}
.edital-tree-row:hover { background: var(--bg-tertiary); }
.edital-tree-row-disc { font-weight: 600; font-size: 0.875rem; color: var(--accent-blue); }
.edital-tree-row-ass { padding-left: 2.25rem; font-size: 0.8125rem; color: var(--text-primary); border-top: 1px solid var(--border-subtle); }
.edital-tree-row-sub { padding-left: 4rem; font-size: 0.75rem; color: var(--text-muted); border-top: 1px solid var(--border-subtle); background: var(--bg-primary); }
.edital-tree-label {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer; flex: 1; min-width: 0;
}
.edital-tree-label input[type="checkbox"] {
    flex-shrink: 0; accent-color: var(--accent-green);
    width: 16px; height: 16px;
}
.edital-tree-label input[type="checkbox"]:disabled { opacity: 0.6; cursor: not-allowed; }
.edital-tree-label span { overflow: hidden; text-overflow: ellipsis; }
.edital-tree-children { }
.edital-tree-count {
    font-size: 0.5625rem; font-weight: 700; color: var(--accent-green);
    background: color-mix(in srgb, var(--accent-green) 12%, transparent);
    padding: 0.1rem 0.375rem; border-radius: 8px; flex-shrink: 0;
}
.edital-tree-taken {
    font-size: 0.5625rem; font-weight: 600; color: var(--accent-yellow);
    background: color-mix(in srgb, var(--accent-yellow) 12%, transparent);
    padding: 0.1rem 0.375rem; border-radius: 8px; flex-shrink: 0; white-space: nowrap;
}

/* ============================================================
   REVIEW INTERVALS — Admin meta form
   ============================================================ */
.review-intervals-card {
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    overflow: hidden; background: var(--bg-secondary);
}
.review-intervals-header {
    padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-card);
}
.review-intervals-body { padding: 0.75rem 1rem; }
.review-intervals-list { display: flex; flex-direction: column; gap: 0.5rem; }
.review-interval-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.5rem 0.75rem; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
}
.review-interval-number {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: color-mix(in srgb, var(--accent-yellow) 15%, transparent);
    color: var(--accent-yellow); font-size: 0.6875rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.review-interval-input {
    display: flex; align-items: center; gap: 0.5rem; flex: 1;
}
.review-interval-input input {
    width: 64px; padding: 0.375rem 0.5rem; text-align: center;
    background: var(--bg-primary); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); color: var(--text-primary);
    font-size: 0.875rem; font-weight: 600;
}
.review-interval-input input:focus { outline: none; border-color: var(--accent-green); }
.review-interval-input span { font-size: 0.75rem; color: var(--text-muted); }
.review-interval-remove {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    padding: 0.25rem; border-radius: var(--radius-sm); transition: color 0.15s;
}
.review-interval-remove:hover { color: var(--accent-red); }
.review-interval-add {
    display: flex; align-items: center; justify-content: center; gap: 0.375rem;
    width: 100%; padding: 0.5rem; margin-top: 0.5rem;
    background: none; border: 1px dashed var(--border-subtle);
    border-radius: var(--radius-sm); color: var(--text-muted);
    font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.review-interval-add:hover { border-color: var(--accent-green); color: var(--accent-green); }
.review-intervals-preview {
    display: flex; align-items: center; gap: 0.375rem;
    margin-top: 0.75rem; padding: 0.5rem 0.75rem;
    background: color-mix(in srgb, var(--accent-green) 8%, transparent);
    border-radius: var(--radius-sm); font-size: 0.6875rem; color: var(--text-muted);
}
.review-intervals-preview strong { color: var(--accent-green); }

/* ============================================================
   META QUIZ — 1 questão por vez
   ============================================================ */
.mq-wrap {
    border: 1px solid #e5e7eb; border-radius: 12px;
    overflow: hidden; background: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}
.mq-progress { padding: 0.75rem 1rem; background: #f8fafc; border-bottom: 1px solid #e5e7eb; border-radius: 12px; }
.mq-progress-bar {
    height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem;
}
.mq-progress-fill { height: 100%; background: #10B981; border-radius: 3px; transition: width 0.3s; }
.mq-progress-text { display: flex; justify-content: space-between; align-items: center; }
.mq-progress-count { font-size: 0.75rem; font-weight: 600; color: #64748b; }
.mq-score { font-size: 0.75rem; font-weight: 600; }

.mq-card { padding: 1.25rem; background: #fff; border-radius: 12px; }
.mq-card-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 0.75rem; font-size: 0.6875rem; color: #94a3b8; font-weight: 600;
}
.mq-card-source { font-weight: 400; }
.mq-card-statement {
    font-size: 0.875rem; line-height: 1.7; color: #1e293b; margin-bottom: 1rem;
}
.mq-card-options { display: flex; flex-direction: column; gap: 0.5rem; }
.mq-opt {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.75rem; border-radius: 10px;
    background: #f8fafc; border: 1.5px solid #e5e7eb; color: #1e293b;
    color: #334155; cursor: pointer; text-align: left;
    transition: all 0.15s; font-size: 0.8125rem; line-height: 1.5;
}
.mq-opt:hover:not(.mq-opt-disabled) { border-color: #10B981; background: #f0fdf4; }
.mq-opt-selected { border-color: #3b82f6; background: #eff6ff; }
.mq-opt-correct { border-color: #10B981 !important; background: #ecfdf5 !important; }
.mq-opt-wrong { border-color: #ef4444 !important; background: #fef2f2 !important; }
.mq-opt-disabled { cursor: default; opacity: 0.85; }
.mq-opt-letter {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem;
    background: #e2e8f0; color: #64748b;
}
.mq-opt-selected .mq-opt-letter { background: #3b82f6; color: white; }
.mq-opt-correct .mq-opt-letter { background: #10B981; color: white; }
.mq-opt-wrong .mq-opt-letter { background: #ef4444; color: white; }
.mq-opt-text { flex: 1; }

.mq-confirm { margin-top: 1rem; }
.mq-feedback {
    margin-top: 0.75rem; padding: 0.625rem 0.875rem; border-radius: 10px;
    font-size: 0.8125rem; font-weight: 600; text-align: center;
}
.mq-feedback-correct { background: #ecfdf5; color: #059669; }
.mq-feedback-wrong { background: #fef2f2; color: #dc2626; }

.mq-nav {
    display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
    padding: 0.75rem 1rem; border-top: 1px solid #e5e7eb; background: #f8fafc; border-radius: 12px; margin-top: 10px;
}
.mq-dots { display: flex; gap: 0.25rem; flex-wrap: wrap; justify-content: center; flex: 1; }
.mq-dot {
    width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #e2e8f0;
    background: #fff; color: #94a3b8; font-size: 0.625rem; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s;
}
.mq-dot:hover { border-color: #94a3b8; }
.mq-dot-current { border-color: #3b82f6; color: #3b82f6; background: #eff6ff; }
.mq-dot-correct { border-color: #10B981; background: #10B981; color: white; }
.mq-dot-wrong { border-color: #ef4444; background: #ef4444; color: white; }

/* ============================================================
   REVISÕES PROGRAMADAS — Seção colapsável com carousel
   ============================================================ */
.rv-section { }
.rv-section-alert { animation: rvSectionPulse 3s ease-in-out infinite; }
@keyframes rvSectionPulse {
    0%, 100% { }
    50% { filter: brightness(1.05); }
}
@keyframes rvPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}
.rv-header-bar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.875rem 1rem; cursor: pointer;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); transition: all 0.15s;
}
.rv-header-bar:hover { border-color: var(--accent-yellow); }
.rv-header-alert {
    border-color: rgba(245,158,11,0.4) !important;
    background: linear-gradient(135deg, rgba(245,158,11,0.06) 0%, var(--bg-card) 100%);
    box-shadow: 0 0 0 3px rgba(245,158,11,0.08), 0 4px 15px rgba(245,158,11,0.1);
}
.rv-alert-badge {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.05em;
    padding: 0.18rem 0.55rem; border-radius: 99px; margin-left: 0.5rem;
    background: #DC2626; color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(220,38,38,0.4);
    animation: rvPulse 2s ease-in-out infinite;
}
.rv-header-left { display: flex; align-items: center; gap: 0.75rem; }
.rv-header-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-tertiary); color: var(--text-muted); transition: all 0.15s;
}
.rv-header-icon-active {
    background: var(--accent-yellow); color: #1a1a1a;
    animation: rvIconPulse 2s ease-in-out infinite;
}
@keyframes rvIconPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245,158,11,0.3); }
    50% { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
}
.rv-header-title { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); }
.rv-header-sub { display: flex; gap: 0.5rem; margin-top: 0.125rem; }
.rv-badge-pending {
    font-size: 0.625rem; font-weight: 700; color: var(--accent-yellow);
    background: color-mix(in srgb, var(--accent-yellow) 12%, transparent);
    padding: 0.1rem 0.5rem; border-radius: 10px;
}
.rv-badge-future {
    font-size: 0.625rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.1rem 0.5rem; border-radius: 10px;
}

.rv-group { padding: 0.75rem 1rem 0.5rem; }
.rv-group-label {
    font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--text-muted);
    display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.5rem;
}
.rv-group-label-now {
    color: #1a1a1a !important; background: var(--accent-yellow);
    width: fit-content; font-size: 0.7rem; padding: 0.28rem 0.65rem;
    border-radius: 99px; letter-spacing: 0.04em;
    box-shadow: 0 3px 12px rgba(245,158,11,0.35);
}
.rv-group-label-done { color: var(--accent-green) !important; }
.rv-now-pin { display: inline-flex; animation: rvPulse 1.4s ease-in-out infinite; }

/* Banner explicativo "faça agora" */
.rv-now-callout {
    display: flex; align-items: flex-start; gap: 0.55rem;
    margin-bottom: 0.85rem; padding: 0.7rem 0.85rem; border-radius: 10px;
    background: color-mix(in srgb, var(--accent-yellow) 11%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--accent-yellow) 38%, transparent);
    font-size: 0.78rem; line-height: 1.45; color: var(--text-secondary);
}
.rv-now-callout > svg { color: var(--accent-yellow); flex-shrink: 0; margin-top: 1px; }
.rv-now-callout strong { color: var(--text-primary); }

/* Banner explicativo "já concluídas" */
.rv-done-callout {
    display: flex; align-items: flex-start; gap: 0.55rem;
    margin-bottom: 0.85rem; padding: 0.65rem 0.85rem; border-radius: 10px;
    background: color-mix(in srgb, var(--accent-green) 8%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--accent-green) 28%, transparent);
    font-size: 0.78rem; line-height: 1.45; color: var(--text-secondary);
}
.rv-done-callout > svg { color: var(--accent-green); flex-shrink: 0; margin-top: 1px; }
.rv-done-callout strong { color: var(--accent-green); }

/* Carousel horizontal com setas */
.rv-carousel-wrap {
    position: relative; display: flex; align-items: center; gap: 0.5rem;
}
.rv-arrow {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
    color: var(--text-muted); cursor: pointer; transition: all 0.15s;
}
.rv-arrow:hover { background: var(--bg-card); border-color: var(--accent-green); color: var(--accent-green); }
.rv-carousel {
    display: flex; gap: 0.75rem; overflow-x: auto; flex: 1;
    padding-bottom: 0.5rem; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rv-carousel::-webkit-scrollbar { display: none; }

.rv-card {
    flex: 0 0 200px; scroll-snap-align: start;
    padding: 0.875rem; border-radius: 12px;
    display: flex; flex-direction: column; gap: 0.75rem;
    transition: all 0.15s; text-decoration: none; color: var(--text-primary);
}
.rv-card-now {
    background: linear-gradient(155deg, color-mix(in srgb, var(--accent-yellow) 18%, var(--bg-card)), var(--bg-card) 72%);
    border: 2px solid var(--accent-yellow);
    box-shadow: 0 4px 16px rgba(245,158,11,0.18);
    cursor: pointer;
}
.rv-card-now:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(245,158,11,0.3); }
.rv-card-now-tag {
    display: inline-flex; align-items: center; gap: 3px; width: fit-content;
    font-size: 0.55rem; font-weight: 800; letter-spacing: 0.06em;
    padding: 0.14rem 0.5rem; border-radius: 99px;
    background: var(--accent-yellow); color: #1a1a1a;
    animation: rvIconPulse 2s ease-in-out infinite;
}
.rv-card-now .rv-card-action {
    background: var(--accent-yellow); color: #1a1a1a;
    justify-content: center; padding: 0.42rem 0.5rem; border-radius: 8px;
    font-size: 0.72rem; font-weight: 800;
}
.rv-card-now .rv-card-action svg { transition: transform 0.18s; }
.rv-card-now:hover .rv-card-action svg { transform: translateX(3px); }
.rv-card-future {
    background: var(--bg-secondary);
    border: 1.5px solid var(--border-subtle);
    opacity: 0.6;
}

.rv-card-top { display: flex; align-items: center; gap: 0.625rem; }
.rv-card-number {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.875rem;
    background: var(--accent-yellow); color: #1a1a1a;
}
.rv-card-number-future { background: var(--bg-tertiary); color: var(--text-muted); }
.rv-card-info { min-width: 0; }
.rv-card-title { font-size: 0.75rem; font-weight: 700; }
.rv-card-meta { font-size: 0.625rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rv-card-action {
    display: flex; align-items: center; gap: 0.25rem;
    font-size: 0.6875rem; font-weight: 700; color: var(--accent-yellow);
}
.rv-card-date {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.625rem; color: var(--text-muted);
}
.rv-card-days {
    font-weight: 700; color: var(--text-muted);
    background: var(--bg-tertiary); padding: 0.1rem 0.375rem; border-radius: 6px;
}

/* Revisão concluída — card inteiro verde (já feita, não precisa refazer) */
.rv-card-done {
    background: linear-gradient(135deg, #10B981 0%, #059669 60%, #047857 100%) !important;
    border: 2px solid #047857;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
    opacity: 1;
}
.rv-card-done:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(16,185,129,0.45);
    filter: brightness(1.05);
}
.rv-card-done .rv-card-title { color: #FFFFFF !important; font-weight: 800; text-shadow: 0 1px 2px rgba(0,0,0,0.18); }
.rv-card-done .rv-card-meta { color: rgba(255,255,255,0.9) !important; }
.rv-card-done-badge {
    display: inline-flex; align-items: center; gap: 0.3rem; width: fit-content;
    font-size: 0.62rem; font-weight: 800; color: #047857;
    background: #FFFFFF;
    padding: 0.2rem 0.55rem; border-radius: 99px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.rv-card-done-link {
    display: flex; align-items: center; gap: 0.25rem;
    font-size: 0.6rem; color: rgba(255,255,255,0.9);
    border-top: 1px dashed rgba(255,255,255,0.35);
    padding-top: 0.4rem;
}
.rv-card-number-done {
    width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #FFFFFF; color: #047857;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.rv-badge-done {
    display: inline-flex; align-items: center; gap: 0.25rem;
    font-size: 0.625rem; font-weight: 600; color: var(--accent-green);
    background: color-mix(in srgb, var(--accent-green) 12%, transparent);
    padding: 0.1rem 0.5rem; border-radius: 10px;
}

/* ============================================================
   SIMULADO — Visibility selector cards
   ============================================================ */
.sim-vis-card {
    position: relative; text-align: center; padding: 1.25rem 0.75rem;
    border: 2px solid var(--border-subtle); border-radius: var(--radius-md);
    cursor: pointer; transition: all 0.2s; background: var(--bg-secondary);
}
.sim-vis-card:hover { border-color: var(--text-muted); background: var(--bg-tertiary); }
.sim-vis-active { border-color: var(--accent-green) !important; background: color-mix(in srgb, var(--accent-green) 5%, var(--bg-card)) !important; }
.sim-vis-active-blue { border-color: var(--accent-blue) !important; background: color-mix(in srgb, var(--accent-blue) 5%, var(--bg-card)) !important; }
.sim-vis-icon {
    width: 48px; height: 48px; border-radius: 12px; margin: 0 auto 0.75rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-tertiary); color: var(--text-muted); transition: all 0.2s;
}
.sim-vis-icon-green { background: var(--accent-green); color: white; }
.sim-vis-icon-blue { background: var(--accent-blue); color: white; }
.sim-vis-title { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.sim-vis-desc { font-size: 0.6875rem; color: var(--text-muted); line-height: 1.4; }
.sim-vis-check {
    position: absolute; top: 0.5rem; right: 0.5rem;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent-green); color: white;
    display: flex; align-items: center; justify-content: center;
}
.sim-vis-active-blue .sim-vis-check { background: var(--accent-blue); }

/* ============================================================
   SIMULADO PLAYER — Layout + Gabarito lateral
   ============================================================ */
.sim-layout { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 1024px) {
    .sim-layout { flex-direction: row; align-items: flex-start; gap: 1.25rem; }
    .sim-main { flex: 1; min-width: 0; }
    .sim-gabarito { width: 220px; flex-shrink: 0; }
}

.sim-gabarito-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 4px;
}
.sim-gab-item {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 2px; border-radius: var(--radius-sm); cursor: pointer;
    transition: background 0.1s; border: 1px solid transparent;
}
.sim-gab-item:hover { background: var(--bg-tertiary); }
.sim-gab-current { border-color: var(--accent-blue); background: color-mix(in srgb, var(--accent-blue) 8%, transparent); }
.sim-gab-num { font-size: 0.5625rem; font-weight: 700; color: var(--text-muted); }
.sim-gab-answer {
    width: 28px; height: 28px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    background: var(--bg-tertiary); color: var(--text-muted);
    transition: all 0.15s;
}
.sim-gab-filled { background: var(--accent-green); color: white; }
.sim-gab-blank { background: var(--accent-yellow); color: #1a1a1a; }

.sim-gab-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sim-gab-dot-filled { background: var(--accent-green); }
.sim-gab-dot-blank { background: var(--accent-yellow); }
.sim-gab-dot-empty { background: var(--bg-tertiary); border: 1px solid var(--border-subtle); }

/* ============================================================
   CSV IMPORT — Progress animation
   ============================================================ */
.import-progress-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem; background: var(--bg-secondary);
    border-radius: var(--radius-md);
}
.import-progress-spinner {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    border: 3px solid var(--bg-tertiary);
    border-top-color: var(--accent-green);
    animation: importSpin 0.8s linear infinite;
}
@keyframes importSpin {
    to { transform: rotate(360deg); }
}
.import-progress-info { flex: 1; }

/* Simulado library modal items */
.sim-lib-item {
    display: flex; align-items: center; gap: 0.75rem; width: 100%;
    padding: 0.75rem; margin-bottom: 0.375rem; border-radius: var(--radius-sm);
    background: var(--bg-secondary); border: 1px solid var(--border-subtle);
    cursor: pointer; transition: all 0.15s; text-decoration: none; color: var(--text-primary);
}
.sim-lib-item:hover { border-color: var(--accent-green); background: var(--bg-tertiary); }
.sim-lib-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-tertiary); color: var(--text-muted);
}

/* Simulado section headers */
.sim-section-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.5rem 0.75rem; margin-top: 0.5rem;
    background: color-mix(in srgb, var(--accent-blue) 8%, var(--bg-card));
    border: 1px solid color-mix(in srgb, var(--accent-blue) 20%, transparent);
    border-radius: var(--radius-sm);
}
.sim-section-title {
    display: flex; align-items: center; gap: 0.375rem;
    font-size: 0.8125rem; font-weight: 700; color: var(--accent-blue);
}
.sim-section-count { font-size: 0.625rem; color: var(--text-muted); }

/* ============================================================
   QUIZ — Setup Cards (Iniciar Sessão)
   ============================================================ */
.bq-opt-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem; margin-bottom: 0;
}
.bq-opt {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.25rem; padding: 0.625rem 0.5rem; cursor: pointer;
    background: var(--bg-secondary); border: 2px solid var(--border);
    border-radius: var(--radius-sm); transition: all 0.15s; text-align: center;
    user-select: none;
}
.bq-opt:hover { border-color: var(--text-muted); }
.bq-opt-active { border-color: var(--accent-green) !important; background: color-mix(in srgb, var(--accent-green) 8%, var(--bg-secondary)); }
.bq-opt-blue.bq-opt-active { border-color: var(--accent-blue) !important; background: color-mix(in srgb, var(--accent-blue) 8%, var(--bg-secondary)); }
.bq-opt-red.bq-opt-active { border-color: var(--accent-red) !important; background: color-mix(in srgb, var(--accent-red) 8%, var(--bg-secondary)); }
.bq-opt-yellow.bq-opt-active { border-color: var(--accent-yellow) !important; background: color-mix(in srgb, var(--accent-yellow) 8%, var(--bg-secondary)); }
.bq-opt-icon { line-height: 1; }

.bq-qty-group {
    display: flex; gap: 0.375rem; flex-wrap: wrap;
}
.bq-qty {
    padding: 0.25rem 0.625rem; cursor: pointer;
    background: var(--bg-secondary); border: 2px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.8125rem; font-weight: 700;
    color: var(--text-muted); transition: all 0.15s; user-select: none;
}
.bq-qty:hover { border-color: var(--text-muted); color: var(--text-primary); }
.bq-qty-active { border-color: var(--accent-green); color: var(--accent-green); background: color-mix(in srgb, var(--accent-green) 8%, var(--bg-secondary)); }

/* ============================================================
   QUIZ — History button + My Comments
   ============================================================ */
.qz-history-btn {
    display: flex; align-items: center; gap: 0.25rem;
    padding: 0.25rem 0.5rem; background: color-mix(in srgb, var(--accent-yellow) 10%, var(--bg-secondary));
    border: 1px solid color-mix(in srgb, var(--accent-yellow) 25%, transparent);
    border-radius: var(--radius-sm); color: var(--accent-yellow);
    font-size: 0.6875rem; font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.qz-history-btn:hover { background: color-mix(in srgb, var(--accent-yellow) 18%, var(--bg-secondary)); }

.bq-mycomment-item {
    padding: 0.625rem 0.75rem; background: var(--bg-secondary);
    border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
}
.bq-mycomment-disc { margin-bottom: 0.25rem; }
.bq-mycomment-statement {
    font-size: 0.8125rem; color: var(--text-primary); font-weight: 600;
    margin-bottom: 0.375rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bq-mycomment-content {
    font-size: 0.75rem; color: var(--text-muted);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* ============================================================
   QUIZ — Stats + Comments
   ============================================================ */
.qz-stats {
    padding: 0.625rem 0.75rem; background: var(--bg-secondary);
    border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
}
.qz-stats-bar { height: 6px; background: var(--accent-red); border-radius: 3px; overflow: hidden; margin-bottom: 0.375rem; }
.qz-stats-correct { height: 100%; background: var(--accent-green); border-radius: 3px; transition: width 0.5s; }
.qz-stats-text { font-size: 0.6875rem; color: var(--text-muted); display: flex; gap: 0.375rem; }

/* Barra de ações da questão (Reportar + Comentários) */
.qz-action-bar {
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.625rem;
    margin-top: 0.25rem;
}
.qz-action-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    background: var(--bg-secondary); cursor: pointer;
    font-size: 0.8rem; font-weight: 600; padding: 0.375rem 0.75rem;
    transition: all 0.15s; color: var(--text-secondary);
}
.qz-action-btn:hover { border-color: var(--border); color: var(--text-primary); }
.qz-action-report:hover  { border-color: var(--accent-red);   color: var(--accent-red);   background: color-mix(in srgb, var(--accent-red)   8%, var(--bg-secondary)); }
.qz-action-comments:hover { border-color: var(--accent-green); color: var(--accent-green); background: color-mix(in srgb, var(--accent-green) 8%, var(--bg-secondary)); }
.qz-comments-body { margin-top: 0.5rem; }

/* Botões interativos modernos (Comentar + Reportar) */
.qz-interact-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem;
}
@media (max-width: 500px) { .qz-interact-grid { grid-template-columns: 1fr; } }
.qz-interact-btn {
    display: flex; align-items: center; gap: 0.625rem; width: 100%;
    padding: 0.75rem 0.875rem; border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle); background: var(--bg-card);
    cursor: pointer; transition: all 0.2s; text-align: left;
}
.qz-interact-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.qz-interact-icon {
    width: 40px; height: 40px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: transform 0.2s;
}
.qz-interact-btn:hover .qz-interact-icon { transform: scale(1.1); }
.qz-interact-icon-green { background: rgba(16,185,129,0.12); color: #10b981; }
.qz-interact-icon-red { background: rgba(239,68,68,0.1); color: #ef4444; }
.qz-interact-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.qz-interact-text strong { font-size: 0.8rem; color: var(--text-primary); }
.qz-interact-text small { font-size: 0.65rem; color: var(--text-muted); line-height: 1.3; }
.qz-interact-arrow { color: var(--text-muted); flex-shrink: 0; opacity: 0.4; transition: all 0.2s; }
.qz-interact-btn:hover .qz-interact-arrow { opacity: 1; transform: translateX(2px); }
.qz-interact-comments:hover { border-color: rgba(16,185,129,0.35); background: rgba(16,185,129,0.04); }
.qz-interact-comments:hover .qz-interact-arrow { color: #10b981; }
.qz-interact-report:hover { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.03); }
.qz-interact-report:hover .qz-interact-arrow { color: #ef4444; }

/* Tabs unificadas (BandQuiz feedback) */
.qz-tabs { border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); }
.qz-tabs-nav {
    display: flex; border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary); overflow-x: auto;
    scrollbar-width: none; -ms-overflow-style: none;
}
.qz-tabs-nav::-webkit-scrollbar { display: none; }
.qz-tab-btn {
    display: flex; align-items: center; gap: 0.375rem; white-space: nowrap;
    padding: 0.625rem 0.875rem; border: none; background: none;
    color: var(--text-muted); font-size: 0.75rem; font-weight: 600;
    cursor: pointer; transition: all 0.15s; position: relative;
    border-bottom: 2px solid transparent;
}
.qz-tab-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.03); }
.qz-tab-active { color: var(--text-primary); border-bottom-color: var(--accent-green); }
.qz-tab-count {
    font-size: 0.6rem; font-weight: 800; min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-green); color: #fff; border-radius: 99px; padding: 0 4px;
}
.qz-tabs-content { padding: 0.75rem; }
@media (max-width: 500px) {
    .qz-tab-btn { padding: 0.5rem 0.625rem; font-size: 0.65rem; }
    .qz-tab-btn span:not(.qz-tab-count) { display: none; }
}

/* Sort buttons */
.qz-sort-btn { background: none; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 0.2rem 0.5rem; cursor: pointer; color: var(--text-muted); transition: all 0.15s; }
.qz-sort-btn:hover { color: var(--text-primary); }
.qz-sort-active { color: var(--accent-green) !important; border-color: var(--accent-green) !important; background: color-mix(in srgb, var(--accent-green) 8%, transparent); }

/* Paginação — ellipsis */
.quiz-nav-ellipsis { font-size: 0.8125rem; color: var(--text-muted); padding: 0 2px; line-height: 1; align-self: flex-end; padding-bottom: 2px; }
.quiz-nav-ellipsis-btn { font-size: 0.8125rem; color: var(--text-muted); padding: 0 2px; line-height: 1; background: none; border: none; cursor: default; }

/* Legado (manter compatibilidade) */
.qz-comments-toggle {
    display: flex; align-items: center; gap: 0.375rem;
    background: none; border: none; color: var(--text-muted);
    font-size: 0.75rem; cursor: pointer; padding: 0.25rem 0;
    transition: color 0.15s;
}
.qz-comments-toggle:hover { color: var(--accent-green); }

.qz-comments-body { margin-top: 0.5rem; }

.qz-comment-form {
    display: flex; gap: 0.375rem; margin-bottom: 0.75rem;
}
.qz-comment-form .form-input { flex: 1; }

.qz-comment-list { display: flex; flex-direction: column; gap: 0.5rem; }
.qz-comment {
    padding: 0.5rem 0.625rem; background: var(--bg-secondary);
    border-radius: var(--radius-sm); border: 1px solid var(--border-subtle);
}
.qz-comment-reply { margin-left: 1.5rem; background: var(--bg-primary); }
.qz-comment-replies { margin-top: 0.375rem; display: flex; flex-direction: column; gap: 0.375rem; }
.qz-comment-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.25rem; }
.qz-comment-author { font-size: 0.75rem; font-weight: 700; color: var(--text-primary); }
.qz-comment-time { font-size: 0.5625rem; color: var(--text-muted); }
.qz-comment-content { font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.5; }
.qz-comment-actions { display: flex; gap: 0.75rem; margin-top: 0.375rem; }
.qz-comment-like, .qz-comment-reply-btn, .qz-comment-delete {
    display: flex; align-items: center; gap: 0.25rem;
    background: none; border: none; font-size: 0.625rem; color: var(--text-muted);
    cursor: pointer; padding: 0; transition: color 0.15s;
}
.qz-comment-like:hover { color: var(--accent-red); }
.qz-comment-like.liked { color: var(--accent-red); }
.qz-comment-reply-btn:hover { color: var(--accent-blue); }
.qz-comment-delete:hover { color: var(--accent-red); }

/* Inline quiz — clean notebook style */
.lp-iq-section { margin-top: 1.5rem; max-width: 900px; margin-left: auto; margin-right: auto; }
.lp-iq-wrap { border-radius: var(--radius-md); overflow: hidden; background: #f8f9fa; border: 1px solid #e2e8f0; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.lp-iq-toggle-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.875rem 1.25rem; background: #fff; border-bottom: 1px solid #e2e8f0;
}
.lp-iq-toggle-header .text-md { color: #1e293b; }
.lp-iq-badge {
    font-size: 0.625rem; font-weight: 700; padding: 0.125rem 0.5rem;
    border-radius: var(--radius-full); background: #fef3c7; color: #92400e;
}
.lp-iq-body { }
.lp-iq-card {
    padding: 1.25rem 1.5rem; border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.lp-iq-card:last-child { border-bottom: none; }
.lp-iq-card:nth-child(even) { background: #f8fafc; }
.lp-iq-card-header {
    display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.75rem;
    font-size: 0.6875rem; color: #94a3b8;
}
.lp-iq-status {
    font-size: 0.625rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.2rem;
    padding: 0.125rem 0.5rem; border-radius: var(--radius-full); margin-left: auto;
}
.lp-iq-status.correct { background: #d1fae5; color: #065f46; }
.lp-iq-status.wrong { background: #fee2e2; color: #991b1b; }
.lp-iq-card-statement { font-size: 0.875rem; line-height: 1.8; color: #1e293b; margin-bottom: 0.875rem; }
.lp-iq-card-options { display: flex; flex-direction: column; gap: 0.5rem; }

/* Quiz option — clean notebook */
.lp-iq-opt {
    display: flex; align-items: center; gap: 0.75rem; width: 100%;
    padding: 0.625rem 0.875rem; text-align: left;
    background: #fff; border: 1.5px solid #e2e8f0; border-radius: 8px;
    color: #334155; font-size: 0.8125rem; cursor: pointer; transition: all 0.15s;
}
.lp-iq-opt:hover:not(:disabled) { border-color: #3b82f6; background: #eff6ff; }
.lp-iq-opt:disabled { cursor: default; }
.lp-iq-opt.correct { border-color: #10b981; background: #ecfdf5; }
.lp-iq-opt.wrong { border-color: #ef4444; background: #fef2f2; }
.lp-iq-opt-letter {
    width: 26px; height: 26px; border-radius: 50%; background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.75rem; color: #64748b; flex-shrink: 0;
    border: 1.5px solid #e2e8f0;
}
.lp-iq-opt:hover:not(:disabled) .lp-iq-opt-letter { background: #dbeafe; border-color: #3b82f6; color: #1d4ed8; }
.lp-iq-opt.correct .lp-iq-opt-letter { background: #10b981; border-color: #10b981; color: white; }
.lp-iq-opt.wrong .lp-iq-opt-letter { background: #ef4444; border-color: #ef4444; color: white; }
.lp-iq-opt-text { flex: 1; }

.lp-iq-explain {
    margin-top: 0.75rem; padding: 0.75rem 1rem;
    background: #eff6ff; border-radius: 8px; border-left: 3px solid #3b82f6;
    font-size: 0.8125rem; line-height: 1.6; color: #475569;
    display: flex; align-items: flex-start; gap: 0.375rem;
}

.quiz-option-input input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ============================================================
   SIMULADO
   ============================================================ */
.simulado-card {
    transition: border-color 0.2s ease;
}

.simulado-card:hover {
    border-color: var(--accent-blue);
}

.simulado-topbar {
    background: var(--bg-card) !important;
    border-bottom: 2px solid var(--border-subtle);
}

.simulado-timer {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.timer-warning {
    color: var(--accent-yellow) !important;
    background: rgba(245, 158, 11, 0.15) !important;
}

.timer-danger {
    color: var(--accent-red) !important;
    background: rgba(239, 68, 68, 0.15) !important;
    animation: pulse-timer 1s ease infinite;
}

@keyframes pulse-timer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Simulado results */
.quiz-results {
    text-align: center;
}

/* ============================================================
   NOTEBOOK / CADERNO
   ============================================================ */
.notebook-card {
    transition: border-color 0.2s ease;
}

.notebook-card:hover {
    border-color: var(--accent-purple);
}

.notebook-editor {
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    min-height: 300px;
    resize: vertical;
}

/* Notebook Tabs */
.nb-tabs {
    display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.nb-tab {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.625rem 0.875rem; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-muted); font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    transition: all 0.15s; white-space: nowrap;
}
.nb-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.nb-tab.active { color: var(--accent-green); border-bottom-color: var(--accent-green); }
.nb-tab-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 9px; font-size: 0.625rem; font-weight: 700;
    background: var(--bg-tertiary); color: var(--text-muted);
}
.nb-tab.active .nb-tab-count { background: color-mix(in srgb, var(--accent-green) 15%, transparent); color: var(--accent-green); }

/* Notebook Item Cards (favorites + notes list) */
.nb-item-card {
    display: flex; align-items: flex-start; gap: 0.75rem;
    padding: 0.875rem 1rem; background: var(--bg-card);
    border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
    transition: border-color 0.15s;
}
.nb-item-card:hover { border-color: var(--accent-green); }
.nb-item-main { flex: 1; min-width: 0; }
.nb-item-title {
    display: inline-flex; align-items: center; gap: 0.375rem;
    font-size: 0.9375rem; font-weight: 600; color: var(--text-primary);
    text-decoration: none; line-height: 1.3;
}
.nb-item-title:hover { color: var(--accent-green); }
.nb-item-meta {
    display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.25rem;
    font-size: 0.6875rem; color: var(--text-muted);
}
.nb-item-meta span { display: inline-flex; align-items: center; gap: 0.25rem; }
.nb-item-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.375rem; }
.nb-item-actions { display: flex; flex-direction: column; gap: 0.375rem; flex-shrink: 0; }
.nb-note-preview {
    margin-top: 0.5rem; padding: 0.5rem 0.625rem;
    background: var(--bg-secondary); border-radius: var(--radius-sm); border-left: 3px solid var(--accent-yellow);
    font-size: 0.8125rem; color: var(--text-secondary); line-height: 1.6;
    white-space: pre-wrap; word-break: break-word;
    max-height: 80px; overflow: hidden;
}

/* Avatar */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent-green);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.avatar-sm {
    width: 28px;
    height: 28px;
    font-size: 0.7rem;
}

/* ============================================================
   UTILITY ADDITIONS
   ============================================================ */
.text-2xl {
    font-size: 1.5rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-blue {
    color: var(--accent-blue);
}

.text-purple {
    color: var(--accent-purple);
}

.btn-yellow {
    background: var(--accent-yellow);
    color: #000;
}

.btn-yellow:hover {
    background: #d97706;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   RANKING
   ============================================================ */
.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.875rem;
}

.ranking-table th {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ranking-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.ranking-highlight {
    background: rgba(16, 185, 129, 0.08) !important;
    border-left: 3px solid var(--accent-green);
}

.ranking-podium {
    padding: 1.5rem 1rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.ml-2 {
    margin-left: 0.5rem;
}

.text-orange {
    color: var(--accent-orange);
}

/* ============================================================
   BADGES / CONQUISTAS
   ============================================================ */
.badge-card {
    text-align: center;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.badge-earned {
    border: 1px solid var(--accent-yellow);
}

.badge-earned:hover {
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}

.badge-locked {
    opacity: 0.6;
}

.badge-locked:hover {
    opacity: 0.8;
}

.badge-icon-container {
    margin: 0 auto;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-icon-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.badge-icon-default {
    font-size: 2.5rem;
}

.badge-icon-glow {
    filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.badge-icon-locked {
    filter: grayscale(100%);
    opacity: 0.5;
}

.badge-icon-locked-default {
    color: var(--text-muted);
}

.opacity-60 {
    opacity: 0.6;
}

/* ============================================================
   MISSIONS
   ============================================================ */
.mission-card {
    transition: all 0.2s ease;
}

.mission-card:hover {
    border-color: var(--accent-green);
}

.mission-complete {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.05);
}

.mission-weekly {
    background: rgba(139, 92, 246, 0.05);
}

/* ============================================================
   STREAK CALENDAR
   ============================================================ */
.streak-calendar {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 4px;
}

@media (min-width: 640px) {
    .streak-calendar {
        grid-template-columns: repeat(15, 1fr);
    }
}

.streak-day {
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    color: var(--text-muted);
    position: relative;
}

.streak-day-num {
    font-weight: 600;
}

.streak-level-0 {
    background: var(--bg-tertiary);
}

.streak-level-1 {
    background: rgba(16, 185, 129, 0.25);
    color: var(--accent-green);
}

.streak-level-2 {
    background: rgba(16, 185, 129, 0.5);
    color: white;
}

.streak-level-3 {
    background: var(--accent-green);
    color: white;
}

.streak-today {
    outline: 2px solid var(--accent-blue);
    outline-offset: 1px;
}

.streak-legend {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* ============================================================
   PROGRESS BAR ADDITIONS
   ============================================================ */
.progress-bar-purple {
    background: linear-gradient(135deg, var(--accent-purple) 0%, #7c3aed 100%);
}

.progress-bar-yellow {
    background: linear-gradient(135deg, var(--accent-yellow) 0%, #d97706 100%);
}


.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-payment-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkout-payment-option:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.checkout-payment-option.selected {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.08);
}

.checkout-payment-option input[type="radio"] {
    display: none;
}

.badge-orange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
}

.justify-end {
    justify-content: flex-end;
}

/* ============================================================
   DRAG & DROP (SortableJS)
   ============================================================ */
.drag-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 1rem;
    padding: 0.25rem;
    user-select: none;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.drag-handle:hover {
    color: var(--accent-green);
}

.drag-handle:active {
    cursor: grabbing;
}

.sortable-ghost {
    opacity: 0.3;
    background: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
}

.sortable-chosen {
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
    border-color: var(--accent-green) !important;
}

.sortable-drag {
    opacity: 0.9;
}

/* ============================================================
   COURSES PAGE — Header, Grid, Netflix
   ============================================================ */
.courses-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.courses-header-left { display: flex; align-items: baseline; gap: 0.75rem; }
/* Desktop: .metas-header-top é apenas um wrapper flex inline */
.metas-header-top { display: contents; }
.courses-title { font-size: 1.5rem; font-weight: 800; }
.courses-count { font-size: 0.8125rem; color: var(--text-muted); }
.courses-toggle { display: flex; gap: 0.25rem; background: var(--bg-tertiary); border-radius: var(--radius-sm); padding: 3px; }
.courses-toggle-btn { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border: none; border-radius: 4px; background: none; color: var(--text-muted); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.courses-toggle-btn:hover { color: var(--text-primary); }
.courses-toggle-btn.active { background: var(--bg-card); color: var(--accent-green); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

/* Grid */
/* Grid — poster vertical 3:4 */
.courses-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
@media (min-width: 640px) { .courses-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .courses-grid { grid-template-columns: repeat(5, 1fr); } }

.course-card { display: block; text-decoration: none; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); border: 1px solid var(--border-subtle); transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.course-card:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 20px 50px rgba(0,0,0,0.45); border-color: var(--accent-green); }
.course-card-cover { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, #1a1a2e) 0%, #0d1117 100%); }
.course-card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.course-card:hover .course-card-cover img { transform: scale(1.08); }
.course-card-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3.5rem; opacity: 0.25; }
.course-card-body { padding: 0.75rem 0.875rem; }
.course-card-name { font-size: 0.875rem; font-weight: 700; color: var(--text-primary); line-height: 1.35; margin-bottom: 0.25rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-card-cat { font-size: 0.6875rem; color: var(--text-muted); }

.course-card-progress { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.375rem; }
.course-card-pct { font-size: 0.625rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }
.course-card-pct.complete { color: var(--accent-green); }

.course-card-wrap { position: relative; }
.course-fav-btn {
    position: absolute; top: 0.5rem; right: 0.5rem; z-index: 5;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    border: none; color: var(--text-muted); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; opacity: 0;
}
.course-card-wrap:hover .course-fav-btn { opacity: 1; }
.course-fav-btn.active { opacity: 1; color: var(--accent-yellow); }
.course-fav-btn:hover { color: var(--accent-yellow); transform: scale(1.15); }

/* Color presets */
.color-preset {
    width: 24px; height: 24px; border-radius: 50%; border: 2px solid transparent;
    cursor: pointer; transition: all 0.15s;
}
.color-preset:hover { transform: scale(1.2); border-color: white; }

/* ============================================================
   NETFLIX CAROUSEL
   ============================================================ */
.nfx-row { margin-bottom: 2rem; }
.nfx-row-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.75rem; padding-left: 0.25rem; color: var(--text-primary); position: relative; z-index: 9999; }

.nfx-carousel-wrapper { position: relative; overflow: visible; }
.nfx-carousel { display: flex; gap: 1rem; overflow-x: auto; overflow-y: visible; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 1.5rem 0.5rem 2rem; margin: -1.5rem -0.5rem -2rem; scrollbar-width: none; }
.nfx-carousel::-webkit-scrollbar { display: none; }

/* Gradient fade on edges */
.nfx-carousel-wrapper::before,
.nfx-carousel-wrapper::after {
    content: ''; position: absolute; top: 0; bottom: 0; width: 50px;
    z-index: 3; pointer-events: none;
}
.nfx-carousel-wrapper::before {
    left: 0; margin-left: -8px;
    background: linear-gradient(to right, var(--bg-primary) 20%, transparent 100%);
}
.nfx-carousel-wrapper::after {
    right: 0; margin-right: -8px;
    background: linear-gradient(to left, var(--bg-primary) 20%, transparent 100%);
}

.nfx-arrow { position: absolute; top: 50%; transform: translateY(-60%); z-index: 5; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border-subtle); background: var(--bg-card); color: var(--text-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; opacity: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.nfx-carousel-wrapper:hover .nfx-arrow { opacity: 1; }
.nfx-arrow:hover { background: var(--accent-green); color: white; border-color: var(--accent-green); transform: translateY(-60%) scale(1.1); }
.nfx-arrow-left { left: 4px; }
.nfx-arrow-right { right: 4px; }

/* Netflix cards — poster vertical 3:4 */
.nfx-card-wrap { position: relative; flex: 0 0 calc(42% - 0.25rem); scroll-snap-align: start; overflow: visible; }
@media (min-width: 640px) { .nfx-card-wrap { flex: 0 0 calc(22% - 0.33rem); } }
@media (min-width: 1024px) { .nfx-card-wrap { flex: 0 0 calc(12.5% - 0.44rem); } }
.nfx-card-img .course-fav-btn { top: 0.375rem; right: 0.375rem; width: 24px; height: 24px; z-index: 6; }
.nfx-card:hover .course-fav-btn { opacity: 1; }
.nfx-card { width: 100%; border-radius: var(--radius-md); overflow: hidden; text-decoration: none; background: var(--bg-card); border: 1px solid var(--border-subtle); transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease; display: block; }
.nfx-card:hover { transform: scale(1.08) translateY(-6px); box-shadow: 0 20px 50px rgba(0,0,0,0.55); border-color: var(--accent-green); z-index: 10; }

.nfx-card-img { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 20%, #1a1a2e) 0%, #0d1117 100%); }
.nfx-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.nfx-card:hover .nfx-card-img img { transform: scale(1.1); }
.nfx-card-icon { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; opacity: 0.3; }

.nfx-card-hover { position: absolute; inset: 0; background: color-mix(in srgb, var(--accent-green) 85%, transparent); display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; backdrop-filter: blur(2px); }
.nfx-card:hover .nfx-card-hover { opacity: 1; }

.nfx-card-info { padding: 0.5rem 0.625rem; }
.nfx-card-title { font-size: 0.75rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

@media (min-width: 640px) { .nfx-card { width: 100%; } }
@media (min-width: 1024px) { .nfx-card { width: 100%; } }

/* Remove old netflix/course classes - legacy compat */
.netflix-row-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-left: 0.25rem;
}

.netflix-scroll {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.netflix-scroll::-webkit-scrollbar {
    height: 4px;
}

.netflix-scroll::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
    border-radius: 2px;
}

.netflix-scroll::-webkit-scrollbar-thumb {
    background: var(--accent-green);
    border-radius: 2px;
}

.netflix-card {
    flex-shrink: 0;
    width: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start;
    border: 1px solid var(--border-subtle);
}

.netflix-card:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
    border-color: var(--card-color, var(--accent-green));
}

.netflix-card-bg {
    height: 130px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.netflix-card-icon {
    font-size: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.netflix-card-info {
    padding: 0.75rem;
    background: var(--bg-card);
}

.netflix-card-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    line-height: 1.3;
}

.netflix-card-meta {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.netflix-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(16, 185, 129, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.netflix-card:hover .netflix-card-overlay {
    opacity: 1;
}

.netflix-play {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .netflix-card {
        width: 240px;
    }
    .netflix-card-bg {
        height: 150px;
    }
}

/* ============================================================
   COURSE CARD GRID (normal view)
   ============================================================ */
.course-card-grid {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.course-icon-box {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

/* ============================================================
   PLANNER
   ============================================================ */
.planner-today {
    border-left: 3px solid var(--accent-green);
    background: rgba(16, 185, 129, 0.05);
}

.planner-activity {
    transition: border-color 0.2s ease;
}

.planner-activity:hover {
    border-color: var(--accent-green) !important;
}

/* ============================================================
   FILE UPLOAD
   ============================================================ */
.file-upload-wrapper {
    flex-shrink: 0;
}

.file-upload-label {
    transition: color 0.2s ease;
}

/* ============================================================
   COURSE COVER CARDS
   ============================================================ */
.course-cover-card {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.course-cover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-green);
}

.course-cover-img {
    width: 100%;
    height: 160px;
    position: relative;
    overflow: hidden;
}

.course-cover-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-cover-card:hover .course-cover-img img {
    transform: scale(1.05);
}

.course-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-cover-icon {
    font-size: 3.5rem;
    opacity: 0.5;
}

.course-cover-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
}

.course-cover-info {
    padding: 0.875rem 1rem;
}

.course-cover-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

@media (min-width: 640px) {
    .course-cover-img {
        height: 180px;
    }
}

/* ============================================================
   LESSON PAGE — Professional redesign
   ============================================================ */

/* Top bar */
.lp-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}
.lp-topbar-left { display: flex; align-items: center; gap: 0.5rem; flex: 1; min-width: 0; }
.lp-topbar-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.lp-topbar-info { min-width: 0; }
.lp-topbar-title { font-size: 1rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.lp-topbar-sub { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.125rem; }
.lp-topbar-prof { font-size: 0.6875rem; color: var(--text-muted); font-weight: 500; }
.lp-topbar-desc { font-size: 0.6875rem; color: var(--text-muted); }
.lp-topbar-sub .lp-professor-avatar { width: 18px; height: 18px; }
.lp-topbar-prof-link {
    display: inline-flex; align-items: center; gap: 0.375rem;
    text-decoration: none; cursor: pointer; border-radius: var(--radius-sm);
    padding: 0.125rem 0.25rem; margin: -0.125rem -0.25rem;
    transition: background 0.15s;
}
.lp-topbar-prof-link:hover { background: var(--bg-tertiary); }

.lp-back {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: color 0.15s;
}
.lp-back:hover { color: var(--text-primary); }

.lp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
}
.lp-badge-ok { background: color-mix(in srgb, var(--accent-green) 15%, transparent); color: var(--accent-green); }
.lp-badge-warn { background: rgba(245,158,11,0.15); color: var(--accent-yellow); }

.lp-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
}
.lp-icon-btn:hover, .lp-icon-btn.active { border-color: var(--accent-green); color: var(--accent-green); background: color-mix(in srgb, var(--accent-green) 10%, transparent); }

.lp-fav { color: var(--text-muted); }
.lp-fav-on { color: var(--accent-yellow) !important; border-color: var(--accent-yellow) !important; background: rgba(245,158,11,0.1) !important; }

/* Progress */
.lp-progress { margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--border-subtle); }
.lp-progress-info { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.375rem; }
.lp-progress-bar { height: 3px; background: var(--bg-tertiary); border-radius: 2px; overflow: hidden; margin-bottom: 0.5rem; }
.lp-progress-fill { height: 100%; background: var(--accent-green); border-radius: 2px; transition: width 0.3s; }
.lp-progress-dots { display: flex; gap: 3px; }
.lp-dot { width: 18px; height: 4px; border-radius: 2px; background: var(--bg-tertiary); display: block; transition: all 0.15s; flex-shrink: 0; }
.lp-dot:hover { background: var(--accent-blue); transform: scaleY(2); }
.lp-dot.done { background: var(--accent-green); }
.lp-dot.current { background: var(--accent-blue); width: 26px; transform: scaleY(2); }

/* Title */
.lp-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.25rem; }
.lp-description { font-size: 0.875rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* Layout */
.lp-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .lp-layout { flex-direction: row; align-items: flex-start; gap: 0; }
    .lp-main { flex: 1; min-width: 0; }
    .lp-sidebar { width: 380px; flex-shrink: 0; position: sticky; top: 0.5rem; height: calc(100vh - 1rem); display: flex; flex-direction: column; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-card); }
}

.lp-theater .lp-main { width: 100% !important; flex: 1 !important; }

/* Video */
.lp-video { border-radius: var(--radius-md); overflow: hidden; background: #000; }
.lp-video-frame { position: relative; padding-bottom: 56.25%; height: 0; }
.lp-video-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.lp-video-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 280px; background: var(--bg-tertiary); color: var(--text-muted); font-size: 0.875rem; }

/* Meta */
.lp-meta { display: flex; gap: 1rem; padding: 0.625rem 0; }
.lp-meta-item { display: inline-flex; align-items: center; gap: 0.25rem; font-size: 0.75rem; color: var(--text-muted); }

/* Timestamps */
.lp-timestamps { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-bottom: 0.75rem; }
.lp-ts { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.25rem 0.625rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); text-decoration: none; font-size: 0.75rem; transition: all 0.15s; }
.lp-ts:hover { border-color: var(--accent-blue); background: rgba(59,130,246,0.1); }
.lp-ts-time { font-weight: 700; color: var(--accent-blue); font-variant-numeric: tabular-nums; }
.lp-ts-label { color: var(--text-secondary); }
.lp-ts:hover .lp-ts-label { color: var(--text-primary); }

/* Notes indicator on topbar button */
.lp-has-note { position: relative; }
.lp-has-note::after {
    content: ''; position: absolute; top: 3px; right: 3px;
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--accent-yellow); border: 1px solid var(--bg-primary);
}

/* Notes Drawer (slide-in from right) */
.lp-drawer-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 900;
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.lp-drawer-overlay.open { opacity: 1; pointer-events: auto; }

.lp-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 90vw;
    background: var(--bg-card); border-left: 1px solid var(--border-subtle);
    z-index: 901; display: flex; flex-direction: column;
    transform: translateX(100%); transition: transform 0.25s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.3);
}
.lp-drawer.open { transform: translateX(0); }

.lp-drawer-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.875rem 1rem; border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0; background: var(--bg-secondary);
}
.lp-drawer-body { flex: 1; padding: 1rem; display: flex; flex-direction: column; overflow: hidden; }
.lp-drawer-body .lp-notes-input {
    width: 100%; flex: 1; min-height: 200px; resize: none;
    background: var(--bg-primary); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm);
    padding: 0.75rem; color: var(--text-primary); font-family: 'Inter',sans-serif; font-size: 0.875rem; line-height: 1.7;
}
.lp-drawer-body .lp-notes-input:focus { outline: none; border-color: var(--accent-green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent-green) 10%, transparent); }
.lp-drawer-body .lp-notes-input::placeholder { color: var(--text-muted); }
.lp-drawer-footer {
    padding: 0.75rem 1rem; border-top: 1px solid var(--border-subtle);
    flex-shrink: 0; background: var(--bg-secondary);
}
.lp-notes-status { color: var(--accent-green); }

/* Lessons Modal (centered overlay) */
.lp-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 900;
    opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.lp-modal-overlay.open { opacity: 1; pointer-events: auto; }

.lp-modal {
    position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 560px; max-width: 95vw; max-height: 85vh;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg); z-index: 901;
    display: flex; flex-direction: column;
    opacity: 0; pointer-events: none; transition: all 0.25s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
.lp-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }

.lp-modal-sm { width: 360px; }

.lp-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.875rem 1rem; border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0; background: var(--bg-secondary); border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.lp-modal-body { flex: 1; overflow-y: auto; padding: 0; }

/* Professor modal avatar */
.lp-prof-modal-avatar {
    width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
    margin: 0 auto; display: block; border: 3px solid var(--border-subtle);
}
.lp-prof-modal-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-tertiary); color: var(--text-muted);
    font-size: 1.5rem; font-weight: 700;
}

/* Professor info on lesson page */
.lp-professor {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.75rem;
}
.lp-professor-avatar {
    width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.lp-professor-avatar-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-tertiary); color: var(--text-muted);
    font-size: 0.5625rem; font-weight: 700;
}
.lp-professor-name { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); line-height: 1.2; }

/* Content block */
.lp-content-block { margin-top: 1rem; padding: 1rem; background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }

/* Navigation */
.lp-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border-subtle); }
.lp-nav-right { display: flex; align-items: center; gap: 0.5rem; }
.lp-nav-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 0.875rem; border-radius: var(--radius-sm);
    font-size: 0.8125rem; font-weight: 500; text-decoration: none;
    color: var(--text-secondary); background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
    transition: all 0.15s;
}
.lp-nav-btn:hover { color: var(--text-primary); border-color: var(--accent-green); }
.lp-nav-next { background: var(--accent-green); color: white; border-color: var(--accent-green); }
.lp-nav-next:hover { background: var(--accent-green-dark); color: white; }

.lp-complete-btn {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 1rem; border-radius: var(--radius-sm);
    background: var(--accent-green); color: white; border: none;
    font-size: 0.8125rem; font-weight: 600; cursor: pointer;
    transition: all 0.15s;
}
.lp-complete-btn:hover { background: var(--accent-green-dark); }
.lp-complete-btn:disabled { opacity: 0.5; cursor: wait; }

/* Resizer */
.lp-resizer { display: none; }
@media (min-width: 1024px) {
    .lp-resizer { display: flex; align-items: center; justify-content: center; width: 16px; cursor: col-resize; flex-shrink: 0; z-index: 5; user-select: none; }
    .lp-resizer-grip { display: flex; align-items: center; justify-content: center; width: 12px; height: 48px; border-radius: 6px; background: var(--bg-tertiary); color: var(--text-muted); transition: all 0.2s; }
    .lp-resizer:hover .lp-resizer-grip, .lp-resizer.active .lp-resizer-grip { background: var(--accent-green); color: white; box-shadow: 0 0 10px color-mix(in srgb, var(--accent-green) 40%, transparent); width: 14px; }
}

/* Sidebar tabs */
.lp-sidebar-tabs { display: flex; background: var(--bg-secondary); border-bottom: 1px solid var(--border-subtle); }
.lp-stab {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
    padding: 0.625rem 0.5rem; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-muted); font-size: 0.75rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.lp-stab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.lp-stab.active { color: var(--accent-green); border-bottom-color: var(--accent-green); }

/* Doc tabs (PDF / Map toggle) */
.lp-doc-tabs { display: flex; border-bottom: 1px solid var(--border-subtle); }
.lp-dtab {
    flex: 1; padding: 0.5rem; background: none; border: none; border-bottom: 2px solid transparent;
    color: var(--text-muted); font-size: 0.6875rem; font-weight: 600; cursor: pointer; text-transform: uppercase; letter-spacing: 0.03em;
}
.lp-dtab:hover { color: var(--text-primary); }
.lp-dtab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); }

/* Material content */
.lp-material-wrap { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.lp-doc-content { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
.lp-doc-frame-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
.lp-doc-frame { width: 100%; border: none; min-height: 800px; flex: 1; }
@media (min-width: 1024px) {
    .lp-doc-frame { min-height: 0; height: 100%; }
    .lp-material-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
    .lp-doc-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
    .lp-doc-frame-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-height: 0; }
}
.lp-doc-img { width: 100%; display: block; }
.lp-doc-open {
    display: inline-flex; align-items: center; gap: 0.375rem;
    padding: 0.5rem 0.75rem; margin: 0.5rem; border-radius: var(--radius-sm);
    font-size: 0.75rem; color: var(--text-secondary); text-decoration: none;
    background: var(--bg-tertiary); transition: color 0.15s;
    flex-shrink: 0;
}
.lp-doc-open:hover { color: var(--accent-blue); }

/* Playlist */
.lp-playlist-wrap { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.lp-playlist-head { padding: 0.5rem 0.75rem; font-size: 0.6875rem; color: var(--text-muted); border-bottom: 1px solid var(--border-subtle); flex-shrink: 0; }
.lp-playlist { overflow-y: auto; flex: 1; }
.lp-pl-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem; text-decoration: none; color: var(--text-secondary);
    font-size: 0.8125rem; border-left: 3px solid transparent; transition: all 0.1s;
}
.lp-pl-item:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.lp-pl-item.current { background: rgba(59,130,246,0.08); border-left-color: var(--accent-blue); color: var(--text-primary); font-weight: 600; }
.lp-pl-item.done { border-left: 2px solid var(--accent-green); }
.lp-pl-item.done .lp-pl-title { color: var(--text-muted); }
.lp-pl-item.done .lp-pl-num { color: var(--accent-green); }
.lp-pl-num { width: 20px; text-align: center; flex-shrink: 0; font-size: 0.75rem; color: var(--text-muted); font-weight: 700; }
.lp-pl-info { flex: 1; min-width: 0; }
.lp-pl-title { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }
.lp-pl-dur { font-size: 0.6875rem; color: var(--text-muted); }

.lp-pl-module-sep {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.625rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em; color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}
.lp-pl-module-sep:first-child { border-top: none; }

/* Professor block in playlist */
.lp-pl-prof {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.625rem 0.75rem; cursor: pointer;
    background: var(--bg-card); border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
}
.lp-pl-prof:hover { background: var(--bg-tertiary); }
.lp-pl-prof-img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lp-pl-prof-name { font-size: 0.75rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.lp-pl-prof-disc { font-size: 0.625rem; color: var(--text-muted); }

/* ============================================================
   LESSON PAGE — Legacy compat (remove old classes)
   ============================================================ */
.lesson-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .lesson-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 0;
    }

    .lesson-main {
        flex: 1;
        min-width: 0;
    }

    .lesson-sidebar {
        width: 380px;
        flex-shrink: 0;
        position: sticky;
        top: 1rem;
        max-height: calc(100vh - 2rem);
        display: flex;
        flex-direction: column;
    }
}

/* Resizer handle */
.lesson-resizer {
    display: none;
}

@media (min-width: 1024px) {
    .lesson-resizer {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 16px;
        cursor: col-resize;
        flex-shrink: 0;
        position: relative;
        z-index: 5;
        user-select: none;
        -webkit-user-select: none;
    }

    .lesson-resizer:hover .lesson-resizer-line,
    .lesson-resizer-active .lesson-resizer-line {
        background: var(--accent-green);
        width: 4px;
        box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
    }

    .lesson-resizer-line {
        width: 2px;
        height: 60px;
        background: var(--border-subtle);
        border-radius: 4px;
        transition: all 0.2s ease;
    }

    .lesson-resizer-active {
        cursor: col-resize;
    }
}

.lesson-page-title {
    font-size: 1.25rem;
}

/* Video container */
.lesson-video-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

.lesson-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.lesson-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.lesson-video-info {
    padding: 0.75rem 0;
}

/* Material sidebar */
.lesson-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.lesson-sidebar-header {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}

.lesson-material-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
}

.lesson-tab {
    flex: 1;
    padding: 0.625rem 0.75rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
}

.lesson-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.lesson-tab-active {
    color: var(--accent-green) !important;
    border-bottom-color: var(--accent-green) !important;
    background: rgba(16, 185, 129, 0.05) !important;
}

.lesson-material-content {
    padding: 0.75rem;
    overflow-y: auto;
    flex: 1;
}

.lesson-pdf-viewer {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    height: 500px;
}

.lesson-pdf-viewer iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.lesson-mindmap-viewer {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.lesson-mindmap-viewer img {
    width: 100%;
    display: block;
    cursor: zoom-in;
}

@media (min-width: 1024px) {
    .lesson-pdf-viewer {
        height: calc(100vh - 200px);
        max-height: 700px;
    }
}

/* Lesson content HTML styling */
.lesson-content {
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.lesson-content h1,
.lesson-content h2,
.lesson-content h3 {
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem;
}

.lesson-content p {
    margin-bottom: 1rem;
}

.lesson-content ul,
.lesson-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.lesson-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
}

/* No-video placeholder */
.lesson-no-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

/* ============================================================
   LESSON — Module Progress Bar (dots)
   ============================================================ */
.lesson-module-progress {
    margin-bottom: 1rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.lesson-progress-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.lesson-dot {
    width: 20px;
    height: 6px;
    border-radius: 3px;
    background: var(--bg-tertiary);
    transition: all 0.2s ease;
    display: block;
    flex-shrink: 0;
}

.lesson-dot:hover {
    background: var(--accent-blue);
    transform: scaleY(1.5);
}

.lesson-dot-done {
    background: var(--accent-green);
}

.lesson-dot-current {
    background: var(--accent-blue);
    transform: scaleY(1.8);
    width: 28px;
}

/* ============================================================
   LESSON — Favorite Button
   ============================================================ */
.lesson-fav-btn {
    background: none;
    border: none;
    font-size: 1.375rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    padding: 0.125rem 0.25rem;
    line-height: 1;
}

.lesson-fav-btn:hover {
    color: var(--accent-yellow);
    transform: scale(1.2);
}

.lesson-fav-active {
    color: var(--accent-yellow) !important;
}

/* ============================================================
   LESSON — Theater Mode
   ============================================================ */
.lesson-layout-theater .lesson-main {
    width: 100% !important;
    flex: 1 !important;
}

/* ============================================================
   LESSON — Timestamps
   ============================================================ */
.lesson-timestamps {
    padding: 0.75rem !important;
}

.lesson-timestamps-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.lesson-timestamp-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

.lesson-timestamp-item:hover {
    background: var(--accent-blue);
    color: white;
}

.lesson-timestamp-time {
    font-weight: 700;
    color: var(--accent-blue);
    font-variant-numeric: tabular-nums;
}

.lesson-timestamp-item:hover .lesson-timestamp-time {
    color: white;
}

.lesson-timestamp-label {
    color: var(--text-secondary);
}

.lesson-timestamp-item:hover .lesson-timestamp-label {
    color: white;
}

/* ============================================================
   LESSON — Quick Notes
   ============================================================ */
.lesson-notes {
    padding: 0.75rem !important;
}

.lesson-notes-input {
    width: 100%;
    min-height: 80px;
    max-height: 200px;
    resize: vertical;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.625rem;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8125rem;
    line-height: 1.6;
    transition: border-color 0.2s ease;
}

.lesson-notes-input:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15);
}

.lesson-notes-input::placeholder {
    color: var(--text-muted);
}

/* ============================================================
   LESSON — Sidebar Tabs (Materials + Playlist)
   ============================================================ */
.lesson-sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}

.lesson-sidebar-tab {
    flex: 1;
    padding: 0.625rem 0.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.lesson-sidebar-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.lesson-sidebar-tab-active {
    color: var(--accent-green) !important;
    border-bottom-color: var(--accent-green) !important;
}

/* ============================================================
   LESSON — Playlist (YouTube-style)
   ============================================================ */
.lesson-playlist {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.lesson-playlist-header {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.lesson-playlist-items {
    overflow-y: auto;
    flex: 1;
}

.lesson-playlist-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

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

.lesson-playlist-current {
    background: rgba(59, 130, 246, 0.1) !important;
    border-left-color: var(--accent-blue) !important;
    color: var(--text-primary) !important;
    font-weight: 600;
}

.lesson-playlist-done {
    color: var(--text-muted);
}

.lesson-playlist-done .lesson-playlist-title {
    text-decoration: line-through;
    opacity: 0.7;
}

.lesson-playlist-index {
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.lesson-playlist-info {
    flex: 1;
    min-width: 0;
}

.lesson-playlist-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.lesson-playlist-duration {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

/* Solo layout (no sidebar) */
.lesson-layout-solo .lesson-main {
    max-width: 900px;
}

/* ============================================================
   COURSE FORM — layout com preview
   ============================================================ */
.course-form-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .course-form-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .course-form-main {
        flex: 1;
        min-width: 0;
    }

    .course-form-preview {
        width: 240px;
        flex-shrink: 0;
        position: sticky;
        top: 1rem;
    }
}

/* Cover upload dropzone */
.course-cover-dropzone {
    border: 2px dashed var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.course-cover-dropzone:hover {
    border-color: var(--accent-green);
    background: rgba(16, 185, 129, 0.03);
}

.course-cover-preview-img {
    width: 100%;
    max-width: 280px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.course-cover-remove {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.75rem;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--accent-red);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--accent-red);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
}

.course-cover-remove:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================================
   PROFESSOR CHIPS & SELECT
   ============================================================ */
.prof-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.prof-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem 0.25rem 0.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.prof-chip-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent-green);
    color: white;
    font-size: 0.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.prof-chip-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Professor select (pills compactos) */
.prof-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.prof-option { cursor: pointer; }
.prof-option input[type="checkbox"] { display: none; }

.prof-option-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem 0.25rem 0.25rem;
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-full);
    transition: all 0.15s;
    background: var(--bg-tertiary);
}

.prof-option-inner:hover { border-color: var(--accent-blue); }
.prof-option input:checked + .prof-option-inner { border-color: var(--accent-green); background: color-mix(in srgb, var(--accent-green) 12%, transparent); }

.prof-avatar-sm {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--accent-blue); color: white;
    font-size: 0.5rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.prof-avatar-sm img { width: 100%; height: 100%; object-fit: cover; }
.prof-name { font-size: 0.75rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; }

/* Professor avatar large */
.prof-avatar-lg {
    width: 48px; height: 48px; border-radius: 50%;
    background: var(--accent-blue); color: white;
    font-size: 0.875rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.prof-avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* Toggle Switch */
.toggle-switch { position: relative; width: 36px; height: 20px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: var(--bg-tertiary); border-radius: 20px; border: 1px solid var(--border-subtle);
    transition: all 0.2s;
}
.toggle-slider::before {
    content: ''; position: absolute; height: 14px; width: 14px;
    left: 2px; bottom: 2px; background: var(--text-muted);
    border-radius: 50%; transition: all 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-green); border-color: var(--accent-green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(16px); background: white; }

/* ============================================================
   STUDENT COURSE MODULES (accordion style)
   ============================================================ */
.course-module-card { padding: 0 !important; overflow: hidden; }

.course-module-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1rem; cursor: pointer; transition: background 0.15s;
    gap: 1rem;
}
.course-module-header:hover { background: var(--bg-tertiary); }

.course-module-num {
    width: 32px; height: 32px; border-radius: 50%;
    border: 2px solid var(--border-subtle); color: var(--text-muted);
    font-size: 0.8125rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.course-module-num.complete {
    background: var(--accent-green); border-color: var(--accent-green); color: white;
}

.course-module-title { font-size: 0.9375rem; font-weight: 600; color: var(--text-primary); }

.course-prof-thumb {
    width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
}

.course-module-progress { display: flex; align-items: center; gap: 0.5rem; }

.course-module-chevron {
    color: var(--text-muted); transition: transform 0.2s; display: flex;
}
.course-module-chevron.rotate { transform: rotate(90deg); }

.course-module-body {
    border-top: 1px solid var(--border-subtle);
}

.course-lesson-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.75rem 1rem; text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.1s;
}
.course-lesson-item:last-child { border-bottom: none; }
.course-lesson-item:hover { background: var(--bg-tertiary); }
.course-lesson-item.completed { opacity: 0.6; }

.course-lesson-status {
    width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: var(--text-muted);
    border: 2px solid var(--border-subtle);
}
.course-lesson-item.completed .course-lesson-status {
    background: var(--accent-green); border-color: var(--accent-green); color: white;
}

.course-lesson-info { flex: 1; min-width: 0; }
.course-lesson-title {
    font-size: 0.875rem; color: var(--text-primary); display: block;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.course-lesson-item.completed .course-lesson-title { text-decoration: line-through; opacity: 0.7; }

.course-lesson-meta {
    display: flex; gap: 0.5rem; margin-top: 0.25rem;
    font-size: 0.6875rem; color: var(--text-muted);
}
.course-lesson-meta span { display: inline-flex; align-items: center; gap: 0.25rem; }

.course-lesson-badge {
    color: var(--accent-green); flex-shrink: 0;
}

/* ============================================================
   COURSE SHOW — Hierarchy: Professor > Module > Lesson
   ============================================================ */
.cs-mod-header {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.625rem 1rem; cursor: pointer;
    border-top: 1px solid var(--border-subtle);
    transition: background 0.15s;
}
.cs-mod-header:hover { background: rgba(59,130,246,0.04); }
.cs-mod-open { background: rgba(59,130,246,0.06) !important; }

.cs-mod-indicator {
    width: 24px; height: 24px; border-radius: 50%;
    border: 2px solid var(--border-subtle); color: var(--text-muted);
    font-size: 0.6875rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cs-mod-indicator.complete {
    background: var(--accent-green); border-color: var(--accent-green); color: white;
}
.cs-mod-title { font-size: 0.8125rem; font-weight: 600; color: var(--text-primary); }
.cs-mod-count { font-size: 0.6875rem; color: var(--text-muted); margin-left: 0.375rem; }
.cs-mod-pct { font-size: 0.6875rem; font-weight: 700; color: var(--text-muted); flex-shrink: 0; }

.cs-lessons {
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-subtle);
}
.cs-lesson {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1rem 0.5rem 2.75rem; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.1s;
}
.cs-lesson:last-child { border-bottom: none; }
.cs-lesson:hover { background: rgba(255,255,255,0.05); }

/* Aula concluída — visual positivo sem riscar */
.cs-lesson.done {
    background: color-mix(in srgb, var(--accent-green) 4%, transparent);
    border-left: 2px solid var(--accent-green);
}
.cs-lesson.done:hover { background: color-mix(in srgb, var(--accent-green) 8%, transparent); }

.cs-lesson-dot {
    width: 20px; height: 20px; border-radius: 50%;
    border: 2px solid var(--border-subtle); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.cs-lesson:not(.done) .cs-lesson-dot {
    color: var(--text-muted);
}
.cs-lesson:not(.done):hover .cs-lesson-dot {
    border-color: var(--accent-blue); color: var(--accent-blue);
}
.cs-lesson.done .cs-lesson-dot {
    background: var(--accent-green); border-color: var(--accent-green); color: white;
    box-shadow: 0 0 6px color-mix(in srgb, var(--accent-green) 30%, transparent);
}

.cs-lesson-body { flex: 1; min-width: 0; }
.cs-lesson-name {
    font-size: 0.6875rem; color: var(--text-primary); display: block;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    line-height: 1.3; transition: color 0.15s;
}
/* Concluída: cor mais suave, sem riscar */
.cs-lesson.done .cs-lesson-name { color: var(--text-secondary); }

.cs-lesson-tags { display: flex; gap: 0.375rem; margin-top: 0.1875rem; flex-wrap: wrap; }
.cs-tag {
    display: inline-flex; align-items: center; gap: 0.2rem;
    font-size: 0.5625rem; color: var(--text-muted);
    padding: 0.125rem 0.375rem;
    background: rgba(255,255,255,0.04); border-radius: 3px;
}
.cs-tag-xp { color: var(--accent-yellow); }

.cs-lesson-check { color: var(--accent-green); flex-shrink: 0; }

/* Current lesson (playing now) */
.cs-lesson-current {
    background: rgba(59,130,246,0.08) !important;
    border-left: 2px solid var(--accent-blue) !important;
}
.cs-lesson-current .cs-lesson-dot {
    background: var(--accent-blue); border-color: var(--accent-blue); color: white;
    box-shadow: 0 0 6px rgba(59,130,246,0.4);
}
.cs-lesson-current .cs-lesson-name { color: var(--text-primary); font-weight: 600; }

/* ============================================================
   IMPORT LAYOUT (split: curso left, biblioteca right)
   ============================================================ */
.import-layout { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 1024px) {
    .import-layout { flex-direction: row; align-items: flex-start; gap: 1.25rem; }
    .import-left { flex: 1; min-width: 0; position: sticky; top: 0.5rem; }
    .import-right { flex: 1.2; min-width: 0; }
}

.import-left, .import-right {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); overflow: hidden;
}

.import-panel-header {
    padding: 0.75rem 1rem; background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center; gap: 0.5rem;
}

.import-list { max-height: 600px; overflow-y: auto; }

.import-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.625rem 0.75rem; border-bottom: 1px solid var(--border-subtle);
    gap: 0.5rem;
}
.import-item:last-child { border-bottom: none; }

.import-empty { padding: 2rem; text-align: center; }

/* Filter pills */
.import-filter {
    display: flex; flex-wrap: wrap; gap: 0.25rem;
    padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-subtle);
}
.import-filter-btn {
    padding: 0.25rem 0.625rem; border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full); background: none; color: var(--text-muted);
    font-size: 0.6875rem; cursor: pointer; transition: all 0.15s;
}
.import-filter-btn:hover { border-color: var(--accent-blue); color: var(--text-primary); }
.import-filter-btn.active { background: var(--accent-green); border-color: var(--accent-green); color: white; }

/* Professor section */
.import-professor { border-bottom: 1px solid var(--border-subtle); }
.import-professor:last-child { border-bottom: none; }
.import-prof-header {
    padding: 0.625rem 0.75rem; background: var(--bg-tertiary);
}

.import-module-row {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border-top: 1px solid var(--border-subtle);
}

.import-custom-input {
    width: 120px; padding: 0.25rem 0.5rem; font-size: 0.6875rem;
    background: var(--bg-tertiary); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); color: var(--text-primary);
}
.import-custom-input:focus { border-color: var(--accent-green); outline: none; }
.import-custom-input::placeholder { color: var(--text-muted); }

.import-add-btn {
    width: 28px; height: 28px; border-radius: 50%;
    border: 1px solid var(--accent-green); background: none;
    color: var(--accent-green); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s; flex-shrink: 0;
}
.import-add-btn:hover { background: var(--accent-green); color: white; }

/* Already imported indicator */
.import-already {
    background: rgba(16, 185, 129, 0.05);
    color: var(--accent-green);
}
.import-already .text-xs { color: var(--accent-green); }

/* Professor block in course */
.import-prof-block { border-bottom: 1px solid var(--border-subtle); }
.import-prof-block:last-child { border-bottom: none; }

.import-modules-detail { border-top: 1px solid var(--border-subtle); }

.import-mod-item {
    padding: 0.5rem 0.75rem 0.5rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: opacity 0.2s;
}
.import-mod-item:last-child { border-bottom: none; }

.import-lessons-list { background: var(--bg-tertiary); border-top: 1px solid var(--border-subtle); }

.import-lesson-item {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.375rem 0.75rem 0.375rem 2.5rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: opacity 0.2s;
}
.import-lesson-item:last-child { border-bottom: none; }

/* Draggable visual */
.import-draggable { cursor: default; }
.import-draggable .drag-handle { cursor: grab; }
.import-draggable.sortable-ghost { opacity: 0.3; background: var(--accent-green); }

/* ============================================================
   MODAL OVERLAY (quiz history + outros modais)
   ============================================================ */
.qz-modal-overlay {
    position: fixed; inset: 0; z-index: 9000;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
}
.qz-modal-backdrop {
    position: absolute; inset: 0; background: rgba(0,0,0,0.65);
}
.qz-modal-box {
    position: relative; z-index: 9001;
    width: 100%; max-width: 440px; max-height: 85vh;
    overflow-y: auto;
}

/* ============================================================
   BandQuiz Launcher (Iniciar Sessão redesenhado)
   ============================================================ */
.bqs-launcher {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.bqs-launcher-header {
    padding: 1rem 1.25rem 0.875rem;
    background: linear-gradient(135deg, color-mix(in srgb,var(--accent-green) 12%,var(--bg-card)), var(--bg-card));
    border-bottom: 1px solid var(--border-subtle);
}
.bqs-launcher-title {
    font-size: 1.125rem; font-weight: 700;
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.125rem;
}
.bqs-launcher-subtitle { font-size: 0.75rem; color: var(--text-muted); }

.bqs-launcher-body {
    display: grid; grid-template-columns: 1fr 260px;
    gap: 0; 
}
@media (max-width: 700px) {
    .bqs-launcher-body { grid-template-columns: 1fr; }
}

.bqs-filters {
    padding: 1rem 1.25rem;
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; gap: 0.875rem;
}
.bqs-sidebar {
    padding: 1rem 1.25rem;
    display: flex; flex-direction: column; gap: 0.875rem;
    background: var(--bg-secondary);
}

.bqs-section-label {
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 0.375rem;
}

/* Pills de filtro */
.bqs-pill-row { display: flex; flex-wrap: wrap; gap: 0.375rem; }
.bqs-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.3rem 0.7rem; border-radius: 100px;
    font-size: 0.75rem; font-weight: 500; cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--bg-secondary); color: var(--text-muted);
    transition: all 0.15s; user-select: none; white-space: nowrap;
}
.bqs-pill:hover { border-color: var(--accent-green); color: var(--text-primary); }
.bqs-pill-active { background: var(--accent-green) !important; border-color: var(--accent-green) !important; color: #fff !important; }
.bqs-pill-blue.bqs-pill-active  { background: var(--accent-blue)   !important; border-color: var(--accent-blue)   !important; }
.bqs-pill-red.bqs-pill-active   { background: var(--accent-red)    !important; border-color: var(--accent-red)    !important; }
.bqs-pill-yellow.bqs-pill-active{ background: var(--accent-yellow) !important; border-color: var(--accent-yellow) !important; color: #0f172a !important; }
.bqs-pill-count { font-size: 0.65rem; opacity: 0.85; }

/* Row de 2 selects */
.bqs-row-2 { display: flex; gap: 0.625rem; }

/* Cards de quantidade */
.bqs-qty-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.375rem; }
.bqs-qty-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0.5rem 0.25rem; border-radius: var(--radius-sm);
    border: 1.5px solid var(--border); background: var(--bg-card);
    cursor: pointer; transition: all 0.15s; user-select: none;
}
.bqs-qty-card:hover { border-color: var(--accent-green); }
.bqs-qty-active { border-color: var(--accent-green) !important; background: color-mix(in srgb,var(--accent-green) 12%,var(--bg-card)) !important; }
.bqs-qty-num { font-size: 1.0625rem; font-weight: 800; line-height: 1; }
.bqs-qty-lbl { font-size: 0.5625rem; color: var(--text-muted); margin-top: 0.125rem; }

/* Mini stats na sidebar */
.bqs-mini-stats { display: flex; justify-content: space-between; gap: 0.5rem; }
.bqs-mini-stat { display: flex; flex-direction: column; align-items: center; gap: 0.125rem; }
.bqs-mini-stat span:first-child { font-size: 1rem; font-weight: 700; }

/* Botão iniciar */
.bqs-start-btn {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    width: 100%; padding: 0.875rem; border: none; border-radius: var(--radius-sm);
    background: var(--accent-green); color: #fff;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    transition: opacity 0.15s; margin-top: auto;
}
.bqs-start-btn:hover { opacity: 0.9; }

/* ============================================================
   SOCIAL — Perfil Público
   ============================================================ */
.profile-hero {
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 1rem;
}
.profile-hero-inner {
    display: flex; align-items: flex-start; gap: 1.25rem; flex-wrap: wrap;
}
.profile-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-avatar {
    width: 80px; height: 80px; border-radius: 50%;
    object-fit: cover; display: block;
}
.profile-avatar-fallback {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.75rem; font-weight: 700; color: #fff;
}
.profile-badge-level {
    position: absolute; bottom: -2px; right: -2px;
    width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent-yellow); color: #000;
    font-size: 0.6875rem; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-card);
}
.profile-info { flex: 1; min-width: 0; }
.profile-name { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); }
.profile-username { font-size: 0.875rem; color: var(--accent-green); margin-top: 0.125rem; }
.profile-bio { font-size: 0.875rem; color: var(--text-secondary); margin: 0.5rem 0; }
.profile-meta-row {
    display: flex; flex-wrap: wrap; gap: 0.75rem;
    font-size: 0.75rem; color: var(--text-muted); margin-top: 0.5rem;
}
.profile-meta-row span { display: flex; align-items: center; gap: 0.25rem; }
.profile-level-bar { margin-top: 0.75rem; }
.profile-level-info {
    display: flex; align-items: center; gap: 0.375rem; margin-bottom: 0.375rem; font-size: 0.8125rem;
}
.profile-actions {
    display: flex; align-items: flex-start; gap: 0.625rem; flex-wrap: wrap;
    margin-left: auto; flex-shrink: 0;
}
@media (max-width: 640px) {
    .profile-hero-inner { flex-direction: column; }
    .profile-actions { margin-left: 0; width: 100%; }
}

/* Tabs */
.profile-tabs {
    display: flex; gap: 0.25rem; border-bottom: 1px solid var(--border-subtle); margin-bottom: 1rem;
}
.profile-tab {
    padding: 0.625rem 1rem; font-size: 0.875rem; font-weight: 500;
    color: var(--text-muted); text-decoration: none; border-bottom: 2px solid transparent;
    margin-bottom: -1px; transition: color 0.15s, border-color 0.15s;
}
.profile-tab:hover { color: var(--text-primary); }
.profile-tab-active { color: var(--accent-green); border-bottom-color: var(--accent-green); font-weight: 600; }

/* ============================================================
   SOCIAL — Chat
   ============================================================ */
/* Chat styles moved inline to views/student/social/chat.php */

/* ============================================================
   QUIZ — Rich text comment editor + author avatars + report
   ============================================================ */

/* Editor de comentário moderno */
.qz-editor {
    border: 1px solid var(--border-subtle); border-radius: var(--radius-lg);
    background: var(--bg-card); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s;
}
.qz-editor:focus-within { border-color: var(--accent-green); box-shadow: 0 0 0 3px rgba(16,185,129,0.08); }
.qz-editor-body { display: flex; gap: 0.625rem; padding: 0.75rem; align-items: flex-start; }
.qz-editor-avatar {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent-green), var(--accent-blue));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: #fff; overflow: hidden;
}
.qz-editor-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.qz-editor-input-wrap { flex: 1; min-width: 0; }
.qz-editor-input {
    min-height: 2rem; max-height: 8rem; overflow-y: auto;
    font-size: 0.85rem; line-height: 1.55; color: var(--text-primary);
    outline: none; word-break: break-word; padding: 0.25rem 0;
}
.qz-editor-input:empty::before {
    content: attr(data-placeholder); color: var(--text-muted); pointer-events: none; font-size: 0.8rem;
}
.qz-editor-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.375rem 0.75rem; border-top: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}
.qz-editor-tools { display: flex; align-items: center; gap: 0.125rem; }
.qz-editor-tool {
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    font-size: 0.75rem; padding: 0.3rem 0.4rem; border-radius: var(--radius-sm);
    transition: all 0.12s; line-height: 1; display: flex; align-items: center;
}
.qz-editor-tool:hover { background: var(--bg-tertiary); color: var(--text-primary); }
.qz-editor-sep { width: 1px; height: 14px; background: var(--border-subtle); margin: 0 0.25rem; }
.qz-editor-actions { display: flex; align-items: center; gap: 0.5rem; }
.qz-editor-hint { font-size: 0.6rem; color: var(--text-muted); }
.qz-editor-send {
    display: flex; align-items: center; gap: 0.375rem;
    padding: 0.35rem 0.875rem; border-radius: 99px; border: none;
    background: var(--gradient-green); color: #fff; font-size: 0.75rem;
    font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.qz-editor-send:hover { opacity: 0.9; transform: scale(1.02); }
.qz-editor-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Image resize dentro do editor */
.qz-editor-input img, .qz-rte-input img, [contenteditable] img {
    max-width: 100%; cursor: pointer; border-radius: 4px; margin: 4px 0;
    transition: outline 0.15s;
}
[contenteditable] img.img-selected {
    outline: 2px solid #3B82F6; outline-offset: 2px;
}
.img-resize-wrap {
    position: relative; display: inline-block; max-width: 100%;
}
.img-resize-handle {
    position: absolute; width: 10px; height: 10px;
    background: #3B82F6; border: 2px solid #fff; border-radius: 2px;
    cursor: nwse-resize; z-index: 5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.img-resize-handle-br { bottom: -4px; right: -4px; }
.img-resize-handle-bl { bottom: -4px; left: -4px; cursor: nesw-resize; }
.img-resize-handle-tr { top: -4px; right: -4px; cursor: nesw-resize; }
.img-resize-handle-tl { top: -4px; left: -4px; cursor: nwse-resize; }
.img-resize-info {
    position: absolute; bottom: -22px; left: 50%; transform: translateX(-50%);
    background: rgba(0,0,0,0.75); color: #fff; font-size: 0.6rem;
    padding: 1px 6px; border-radius: 3px; white-space: nowrap;
    pointer-events: none;
}

/* Rich-text editor wrapper (legacy) */
.qz-rte-wrap {
    border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-secondary); overflow: hidden;
}
.qz-rte-toolbar {
    display: flex; align-items: center; gap: 0.125rem;
    padding: 0.25rem 0.375rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-tertiary);
}
.qz-rte-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-secondary); font-size: 0.75rem;
    padding: 0.25rem 0.375rem; border-radius: 4px;
    transition: background 0.1s, color 0.1s; line-height: 1;
}
.qz-rte-btn:hover { background: var(--border-subtle); color: var(--text-primary); }
.qz-rte-sep { width: 1px; height: 14px; background: var(--border); margin: 0 0.25rem; }
.qz-rte-body {
    display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.5rem;
}
.qz-rte-input {
    flex: 1; min-height: 2.25rem; max-height: 6rem; overflow-y: auto;
    font-size: 0.8125rem; line-height: 1.5; color: var(--text-primary);
    outline: none; word-break: break-word;
}
.qz-rte-input:empty::before {
    content: attr(data-placeholder); color: var(--text-muted); pointer-events: none;
}
.qz-rte-send {
    flex-shrink: 0; align-self: flex-end;
}

/* Comment row with avatar */
.qz-comment-row {
    display: flex; gap: 0.5rem; align-items: flex-start;
}
.qz-comment-avt-link { flex-shrink: 0; text-decoration: none; }
.qz-comment-avt {
    width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
}
.qz-comment-avt-init {
    width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
    background: var(--accent-green); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6875rem; font-weight: 700;
}
.qz-comment-author {
    font-weight: 600; color: var(--text-primary); text-decoration: none; font-size: 0.8125rem;
}
a.qz-comment-author:hover { color: var(--accent-green); text-decoration: underline; }

/* Report button */
.qz-report-btn {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 0.6875rem;
    display: inline-flex; align-items: center; gap: 0.25rem;
    padding: 0.125rem 0.375rem; border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.qz-report-btn:hover { color: var(--accent-red); background: color-mix(in srgb, var(--accent-red) 8%, transparent); }
.qz-report-form {
    background: var(--bg-secondary); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm); padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

/* ============================================================
   UTILIDADES AUSENTES — Adicionadas para compatibilidade total
   ============================================================ */

/* .text-bold — usado em +200 lugares mas faltava no CSS */
.text-bold { font-weight: 700; }

/* .grid-1 — grade de coluna única */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }

/* Tabela responsiva com scroll horizontal */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Variante flex sem quebra de linha forçada */
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; min-width: 0; }

/* Padding lateral seguro (safe-area para notch/ilha) */
.safe-x {
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

/* Ocultar em mobile / mostrar em mobile */
.hide-mobile { display: initial; }
.show-mobile { display: none; }

/* ============================================================
   PREVENÇÃO DE OVERFLOW HORIZONTAL GLOBAL
   ============================================================ */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Garantir que nenhuma imagem estoure */
img, video, iframe {
    max-width: 100%;
}

/* ============================================================
   TOUCH TARGETS — iOS HIG: mínimo 44×44px para elementos clicáveis
   ============================================================ */
.btn, .mobile-nav-item, .sidebar-nav-item {
    min-height: 44px;
}

/* Remover delay de 300ms de tap em todo o app */
a, button, [role="button"], input, label, select, textarea,
.sidebar-nav-item, .mobile-nav-item, .btn, .quiz-option,
.meta-card, .course-card, .nb-item-card {
    touch-action: manipulation;
}

/* ============================================================
   FOCUS VISÍVEL — Acessibilidade / teclado
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}
button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================================
   NOTIFICAÇÃO DROPDOWN — Ajustes mobile
   ============================================================ */
@media (max-width: 480px) {
    .notif-dropdown {
        position: fixed;
        top: 64px;
        left: 0.5rem;
        right: 0.5rem;
        width: auto;
        max-width: none;
        max-height: 70vh;
    }
}

/* ============================================================
   TOAST — Melhorias mobile
   ============================================================ */
@media (max-width: 640px) {
    .toast-container {
        top: auto;
        bottom: 5.5rem; /* acima da mobile-nav */
        left: 1rem;
        right: 1rem;
        width: auto;
    }
    .toast {
        font-size: 0.8125rem;
    }
}

/* ============================================================
   TELA MUITO PEQUENA (≤ 480px) — Correções específicas
   ============================================================ */
@media (max-width: 480px) {
    /* Padding geral reduzido */
    .main-content {
        padding: 0.75rem;
        padding-bottom: 5rem;
    }

    /* Topbar mais compacta */
    .topbar-right {
        gap: 0.5rem;
    }

    /* Avatar um pouco menor */
    .topbar-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    /* Cabeçalhos compactos */
    h1 { font-size: 1.25rem; }
    h2 { font-size: 1.125rem; }
    h3 { font-size: 1rem; }

    /* Card paddings menores */
    .card { padding: 0.875rem; }

    /* Card value ainda menor */
    .card-value { font-size: 1.25rem; }

    /* BandQuiz launcher: selects em coluna em telas muito estreitas */
    .bqs-row-2 { flex-direction: column; }

    /* Botões ocupam toda a largura em telas pequenas quando empilhados */
    .modal-footer .btn { width: 100%; }

    /* Grid utilitários em mobile pequeno */
    .grid-2 { grid-template-columns: 1fr; }

    /* Badge menor */
    .badge { font-size: 0.625rem; }

    /* Ranking table — garantir scroll horizontal */
    .ranking-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .ranking-table tbody tr {
        white-space: normal;
    }

    /* Avatar da topbar e menu overlay — posição mais segura */
    .topbar-right > div > div[x-show] {
        right: 0;
        left: auto;
    }

    /* Lançador de quiz: sidebar em baixo no mobile */
    .bqs-filters { padding: 0.875rem 1rem; }
    .bqs-sidebar { padding: 0.875rem 1rem; }
}

/* ============================================================
   TABLET (769px – 1024px) — Ajustes intermediários
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .main-content {
        padding: 1.25rem;
        margin-left: var(--sidebar-width);
    }

    /* Sidebar toggle visível e funcional em tablet */
    .sidebar-toggle {
        display: flex !important;
    }

    /* Grid 3 colunas em 2 no tablet */
    .grid-3 { grid-template-columns: repeat(2, 1fr); }

    /* Topbar badge rank pode ser ocultado para dar espaço */
    .topbar-badge.rank {
        max-width: 160px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* ============================================================
   MOBILE — Refinamentos adicionais (max-width: 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Garantir scroll suave na lista de conversas e notificações */
    .cht-conv-list,
    .notif-dropdown-body,
    .lp-playlist,
    .nb-tabs {
        -webkit-overflow-scrolling: touch;
    }

    /* Ranking/admin tables: scroll horizontal em mobile */
    .ranking-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Settings nav: items não encolhem */
    .stg-nav-item {
        flex-shrink: 0;
    }

    /* Lp-nav (navegação de aulas) em mobile */
    .lp-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .lp-nav .lp-nav-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    /* Profile tabs overflow scroll */
    .profile-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }
    .profile-tab {
        flex-shrink: 0;
    }

    /* Topbar: o menu de usuário nunca sai pela esquerda */
    .topbar-right > div:last-child > div[x-show] {
        right: 0 !important;
        left: auto !important;
        min-width: 180px;
    }

    /* Cards de hero e status com wrap */
    .stg-hero-stats { gap: 0.5rem; }
    .stg-hero-stat { padding: 0.375rem 0.625rem; }

    /* Modal: sem margem lateral em mobile */
    .modal-overlay { padding: 0.5rem; }
    .modal { border-radius: var(--radius-md); }

    /* Alertas com mais padding vertical em mobile */
    .alert { flex-wrap: wrap; }

    /* Zerar margem mesmo se sidebar-expanded estiver no app-wrapper */
    .sidebar-expanded .main-content {
        margin-left: 0 !important;
    }

    /* Quiz question card padding reduzido */
    .quiz-question-card { padding: 0.875rem !important; }

    /* Metas grid: 1 coluna em mobile */
    .metas-grid { grid-template-columns: 1fr !important; }

    /* Streak calendar mais compacto */
    .streak-calendar { grid-template-columns: repeat(10, 1fr); gap: 3px; }

    /* Botões de simulado ocupam mais espaço */
    .sim-vis-card { padding: 1rem 0.5rem; }

    /* Dropdown do topbar — sombra reforçada */
    .topbar-right div[x-show] {
        box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    }

    /* hide-mobile / show-mobile — inversão em mobile */
    .hide-mobile { display: none !important; }
    .show-mobile { display: initial !important; }

    /* Scrollbar fina em telas touch */
    ::-webkit-scrollbar { width: 3px; height: 3px; }

    /* ── LESSON PLAYER — Responsividade mobile ─────────────── */

    /* Breadcrumb: scroll horizontal, não quebra em múltiplas linhas */
    .lp-breadcrumb {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .lp-breadcrumb::-webkit-scrollbar { display: none; }
    .lp-breadcrumb span, .lp-breadcrumb a { white-space: nowrap; flex-shrink: 0; }

    /* Topbar: título em linha própria, ações embaixo */
    .lp-topbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .lp-topbar-left {
        width: 100%;
        flex: 0 0 100%;
    }
    .lp-topbar-title {
        white-space: normal;
        font-size: 0.9375rem;
    }
    .lp-topbar-sub {
        flex-wrap: wrap;
    }
    .lp-topbar-right {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        gap: 0.375rem;
        padding-bottom: 2px;
    }
    .lp-topbar-right::-webkit-scrollbar { display: none; }

    /* Esconder label de texto nos botões de ação */
    .lp-btn-label { display: none; }
    /* Botões de ação: viram icon-only */
    .lp-action-share, .lp-action-lessons {
        width: 36px !important;
        height: 36px !important;
        padding: 0 !important;
        justify-content: center !important;
    }

    /* Quiz alert: empilha verticalmente */
    .lp-quiz-alert {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    .lp-quiz-alert-btn { align-self: flex-end; }

    /* Navegação de aulas (prev/next + concluir): ocupa tudo */
    .lp-nav {
        flex-direction: column;
        gap: 0.625rem;
    }
    .lp-nav > div, .lp-nav .lp-nav-right {
        width: 100%;
        display: flex;
        gap: 0.5rem;
    }
    .lp-nav .lp-nav-btn {
        flex: 1;
        justify-content: center;
        min-width: 0;
    }
    .lp-complete-btn {
        flex: 1;
        justify-content: center;
        width: 100%;
    }

    /* Sidebar de materiais (PDF/Mapa): altura fixa e rolável */
    .lp-sidebar {
        height: 60vw;
        min-height: 260px;
        max-height: 380px;
        display: flex;
        flex-direction: column;
    }
    .lp-material-wrap { flex: 1; overflow: hidden; }
    .lp-doc-content { height: 100%; }
    .lp-doc-frame-wrap { height: 100%; }
    .lp-doc-frame { height: 100%; }

    /* Modais: largura quase total em mobile, mantém centralização */
    .lp-modal {
        width: calc(100vw - 1.5rem) !important;
        max-width: none !important;
        max-height: 85vh;
    }

    /* Drawer de anotações: largura total em mobile (desliza da direita) */
    .lp-drawer {
        width: 100% !important;
        max-width: none !important;
    }
}

/* ============================================================
   FULL-HEIGHT LAYOUT — Chat e páginas que precisam ocupar a viewport
   ============================================================ */
.main-content--full-height {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    padding-bottom: 0 !important;
}

/* Em mobile, subtrair a altura da nav inferior */
@media (max-width: 768px) {
    .main-content--full-height {
        height: calc(100vh - 64px);
        height: calc(100dvh - 64px);
    }
}

/* ============================================================
   HAMBÚRGUER + SIDEBAR DRAWER MOBILE
   ============================================================ */

/* Botão hambúrguer na topbar — oculto em desktop */
.topbar-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
}
.topbar-hamburger:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Backdrop que escurece o fundo quando o drawer está aberto */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: calc(var(--z-sidebar) - 1);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    /* Mostrar hambúrguer em mobile */
    .topbar-hamburger {
        display: flex;
    }

    /* Ativar backdrop quando sidebar está aberta */
    .sidebar-backdrop.active {
        display: block;
    }

    /* Sidebar em modo drawer: aparece sobre o conteúdo */
    .sidebar.sidebar--open {
        display: flex !important;
        width: var(--sidebar-expanded);
        z-index: var(--z-sidebar);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
    }

    /* Mostrar logo grande quando o drawer está aberto */
    .sidebar.sidebar--open .sidebar-logo-img {
        width: 130px;
        height: 60px;
    }

    .sidebar.sidebar--open .nav-label {
        opacity: 1;
    }
}

/* ============================================================
   METAS / CURSOS — Responsividade mobile
   ============================================================ */
@media (max-width: 768px) {
    /* ── Header ─────────────────────────────────────────────── */
    .courses-header { gap: 0.5rem; }
    .metas-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0.5rem;
    }
    .courses-header-left { gap: 0.25rem; }
    .courses-title { font-size: 1.2rem; }
    .metas-edital-btn { align-self: flex-start; }

    /* Toggle grade/netflix compacto */
    .courses-toggle-btn { padding: 0.3rem 0.5rem; font-size: 0.6875rem; gap: 0.25rem; }

    /* ── Filtros ─────────────────────────────────────────────── */
    .meta-filter { padding: 0.25rem 0.625rem; font-size: 0.75rem; }

    /* ── Revisões — carousel ─────────────────────────────────── */
    /* Setas menores mas SEMPRE visíveis (touch não tem hover) */
    .rv-arrow {
        width: 24px;
        height: 24px;
        opacity: 1;
        flex-shrink: 0;
    }
    .rv-carousel { gap: 0.5rem; }
    .rv-card { flex: 0 0 165px; padding: 0.75rem; }
    .rv-group { padding: 0.625rem 0.75rem 0.375rem; }

    /* ── Netflix carousel ────────────────────────────────────── */
    /* Gradientes laterais: menores para não tapar os cards */
    .nfx-carousel-wrapper::before,
    .nfx-carousel-wrapper::after { width: 24px; }

    /* Setas sempre visíveis em mobile (sem hover) */
    .nfx-arrow {
        opacity: 1;
        width: 32px;
        height: 32px;
    }
    .nfx-arrow-left { left: -2px; }
    .nfx-arrow-right { right: -2px; }

    /* Cards: ~80% da tela para mostrar que tem mais */
    .nfx-carousel .nfx-card-wrap { flex: 0 0 78vw; max-width: 260px; }
    .nfx-carousel .meta-card { width: 100%; }

    /* Meta atual no Netflix: largura total */
    #meta-view-netflix .nfx-row:first-child > div { max-width: 100%; }
    #meta-view-netflix .nfx-row:first-child .meta-card.current { max-width: 100%; }

    /* Títulos das rows do Netflix menores */
    .nfx-row-title { font-size: 0.9375rem; }
}

@media (max-width: 480px) {
    .courses-title { font-size: 1.125rem; }
    .courses-toggle-btn { gap: 0; }
    .courses-toggle-btn svg { display: none; } /* só texto em tela muito pequena */
    .rv-card { flex: 0 0 148px; }
    .rv-header-sub { flex-wrap: wrap; gap: 0.25rem; }
    .nfx-carousel .nfx-card-wrap { flex: 0 0 82vw; }
}

/* ============================================================
   PRINT — Ocultar navegação ao imprimir
   ============================================================ */
@media print {
    .sidebar, .sidebar-toggle, .mobile-nav, .topbar,
    .toast-container, .notif-wrapper, .sidebar-backdrop,
    .topbar-hamburger { display: none !important; }
    .main-content { margin: 0; padding: 0; }
    body { background: white; color: black; }
    .card { border: 1px solid #ccc; box-shadow: none; }
}

