/* assets/css/style.css - ARQUIVO COMPLETO CORRIGIDO */

/* ==================== VARIÁVEIS DE TEMA ==================== */
:root {
    /* Tema Escuro (padrão) - AGORA EM TONS DE PRETO */
    --bg-primary: #000000;
    --bg-secondary: #121212;
    --bg-tertiary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #717171;
    --accent-primary: #1e3a8a; /* Azul Escuro */
    --accent-secondary: #1e40af;
    --accent-cyan: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;
    --accent-orange: #f97316;
    --border-color: #2a2a2a;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.6);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
    --card-bg: #121212;
    --input-bg: #000000;
}

/* Tema Claro - BRANCO, AZUL ESCURO E CINZA */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6; /* Cinza claro */
    --bg-tertiary: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --accent-primary: #1e3a8a; /* Azul Escuro */
    --accent-secondary: #1e40af;
    --accent-cyan: #2563eb;
    --border-color: #d1d5db;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --card-bg: #ffffff;
    --input-bg: #f9fafb;
}

/* ==================== RESET E BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

/* ==================== LAYOUT ==================== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ==================== SIDEBAR CORRIGIDA ==================== */
.sidebar {
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 20px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-header small {
    color: var(--text-muted);
    font-size: 12px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-primary) var(--bg-tertiary);
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: var(--bg-primary);
    color: var(--accent-cyan);
}

.sidebar-nav a .icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-bottom {
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* ==================== BOTÃO DE TEMA CORRIGIDO ==================== */
.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px 20px;
    background: var(--bg-primary);
    border: none;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-size: 14px;
    font-family: inherit;
}

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

.theme-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.theme-label {
    font-weight: 500;
}

/* ==================== SIDEBAR USER ==================== */
.sidebar-user {
    padding: 16px 20px;
}

.sidebar-user .user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sidebar-user .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: white;
    flex-shrink: 0;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.sidebar-user .user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 32px;
    min-height: 100vh;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

[data-theme="light"] .login-container {
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 50%, #e0e7ff 100%);
}

.login-card {
    background: var(--bg-secondary);
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.login-card .logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-card .logo h1 {
    font-size: 28px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-card .logo p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 14px;
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

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

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

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

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

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

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
}

.btn-primary:hover {
    color: white;
    opacity: 0.9;
}

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

.btn-success:hover {
    color: white;
    background: #16a34a;
}

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

.btn-danger:hover {
    color: white;
    background: #dc2626;
}

.btn-warning {
    background: var(--accent-yellow);
    color: #1e293b;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
}

/* ==================== CARDS ==================== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

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

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.1);
}

[data-theme="light"] .card-footer {
    background: rgba(0,0,0,0.02);
}

/* ==================== STAT CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

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

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.purple { background: rgba(99, 102, 241, 0.15); color: var(--accent-primary); }
.stat-icon.cyan { background: rgba(34, 211, 238, 0.15); color: var(--accent-cyan); }
.stat-icon.green { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.stat-icon.orange { background: rgba(249, 115, 22, 0.15); color: var(--accent-orange); }

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

/* ==================== GRID LAYOUTS ==================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* ==================== COURSE CARDS ==================== */
.course-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.course-thumb {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
}

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

.course-info {
    padding: 20px;
}

.course-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.course-info p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-meta {
    display: flex;
    gap: 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.course-actions {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

/* ==================== TABLE ==================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-secondary);
}

thead {
    background: var(--bg-primary);
}

th {
    padding: 14px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

td {
    padding: 14px 20px;
    border-top: 1px solid var(--border-color);
    font-size: 14px;
}

tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* ==================== BADGES ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-green);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.badge-warning {
    background: rgba(234, 179, 8, 0.15);
    color: var(--accent-yellow);
}

.badge-info {
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent-cyan);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--accent-green);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--accent-red);
}

.alert-warning {
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--accent-yellow);
}

.alert-info {
    background: rgba(34, 211, 238, 0.1);
    border: 1px solid rgba(34, 211, 238, 0.3);
    color: var(--accent-cyan);
}

/* ==================== VIDEO PLAYER ==================== */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
    margin-bottom: 24px;
}

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

/* ==================== LESSON LIST ==================== */
.lesson-sidebar {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.module-group {
    border-bottom: 1px solid var(--border-color);
}

.module-group:last-child {
    border-bottom: none;
}

.module-title {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 14px;
    color: var(--accent-cyan);
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

[data-theme="light"] .module-title {
    background: rgba(0,0,0,0.03);
}

.lesson-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.lesson-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.lesson-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
    border-left: 3px solid var(--accent-primary);
}

.lesson-item.completed .lesson-check {
    color: var(--accent-green);
}

.lesson-check {
    font-size: 16px;
    flex-shrink: 0;
}

.lesson-duration {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

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

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

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

.modal-header h3 {
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    margin-bottom: 24px;
}

/* ==================== CALENDÁRIO CORRIGIDO ==================== */
.calendar {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 30px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.calendar-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav button:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--bg-secondary);
}

.calendar-weekday {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.calendar-weekday:last-child {
    border-right: none;
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    transition: var(--transition);
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: rgba(99, 102, 241, 0.05);
}

.calendar-day.other-month {
    opacity: 0.3;
    background: var(--bg-primary);
}

.calendar-day.today {
    background: rgba(99, 102, 241, 0.1);
    border: 2px solid var(--accent-primary);
}

.calendar-day .day-number {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.calendar-day.today .day-number {
    color: var(--accent-primary);
}

.calendar-event {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin-bottom: 3px;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event:hover {
    transform: scale(1.02);
}

.calendar-event.scheduled {
    background: var(--accent-red);
    color: white;
}

.calendar-event.scheduled {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent-primary);
}

/* ==================== PROVA / QUIZ ==================== */
.prova-container {
    max-width: 820px;
    margin: 0 auto;
}

.questao-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    margin-bottom: 28px;
    overflow: hidden;
    transition: var(--transition);
}

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

.questao-header {
    padding: 16px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 14px;
}

.questao-numero {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.questao-titulo {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.questao-body {
    padding: 24px;
}

.questao-pergunta {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.7;
    color: var(--text-primary);
}

/* Lista de opções */
.opcoes-lista {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Label clicável de cada alternativa */
.opcao-resposta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    position: relative;
}

/* Esconder completamente o input radio nativo */
.opcao-resposta input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.opcao-resposta:hover {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.06);
}

/* Estado: selecionada via JavaScript */
.opcao-resposta.selecionada {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.opcao-resposta.selecionada .opcao-letra {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Compatibilidade com classes antigas */
.opcao-resposta.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.opcao-resposta.selected .opcao-letra {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

/* Estado: correta (gabarito) */
.opcao-resposta.correta,
.opcao-resposta.correct {
    border-color: var(--accent-green) !important;
    background: rgba(34, 197, 94, 0.1) !important;
}

.opcao-resposta.correta .opcao-letra,
.opcao-resposta.correct .opcao-letra {
    background: var(--accent-green) !important;
    border-color: var(--accent-green) !important;
    color: white !important;
}

/* Estado: errada (gabarito) */
.opcao-resposta.errada,
.opcao-resposta.incorrect {
    border-color: var(--accent-red) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.opcao-resposta.errada .opcao-letra,
.opcao-resposta.incorrect .opcao-letra {
    background: var(--accent-red) !important;
    border-color: var(--accent-red) !important;
    color: white !important;
}

.opcao-letra {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    transition: var(--transition);
    color: var(--text-secondary);
}

.opcao-texto {
    flex: 1;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
}

.opcao-resultado-icone {
    font-size: 18px;
    flex-shrink: 0;
}

/* ==================== VERIFICAÇÃO (CÂMERA) ==================== */
.camera-container {
    max-width: 640px;
    margin: 0 auto;
}

.camera-preview {
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    position: relative;
}

.camera-preview video,
.camera-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    background: rgba(0,0,0,0.5);
}

.camera-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-camera {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 4px solid white;
    background: var(--accent-red);
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-camera:hover {
    transform: scale(1.1);
}

/* ==================== TURMAS GRID (ALUNOS) ==================== */
.turmas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.turma-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.turma-checkbox:hover {
    background: var(--bg-tertiary);
}

.turma-checkbox.selected {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.turma-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.turma-checkbox .turma-info {
    flex: 1;
}

.turma-checkbox .turma-nome {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.turma-checkbox .turma-curso {
    font-size: 12px;
    color: var(--text-muted);
}

.turmas-lista {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* ==================== FOTO VERIFICAÇÃO ==================== */
.foto-verificacao {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.foto-verificacao:hover {
    transform: scale(1.1);
}

.foto-modal {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 12px;
}



/* ==================== FLUXO CONCLUSÃO AULA ==================== */
.fluxo-conclusao {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 24px;
    margin-bottom: 24px;
}

.fluxo-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.fluxo-steps::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 60px;
    right: 60px;
    height: 4px;
    background: var(--border-color);
    z-index: 0;
}

.fluxo-step {
    text-align: center;
    position: relative;
    z-index: 1;
    flex: 1;
}

.fluxo-step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 auto 12px;
    transition: all 0.3s;
}

.fluxo-step.completed .fluxo-step-icon {
    background: var(--accent-green);
    border-color: var(--accent-green);
}

.fluxo-step.active .fluxo-step-icon {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    animation: pulse 2s infinite;
}

.fluxo-step-label {
    font-size: 13px;
    color: var(--text-muted);
}

.fluxo-step.completed .fluxo-step-label,
.fluxo-step.active .fluxo-step-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* ==================== AULA LAYOUT ==================== */
.aula-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
}

.nav-aulas {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.nav-aulas .btn {
    flex: 1;
}

/* ==================== RESPONSIVE ==================== */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 1024px) {
    .aula-layout {
        grid-template-columns: 1fr;
    }
    
    .fluxo-steps {
        flex-direction: column;
        gap: 16px;
    }
    
    .fluxo-steps::before {
        display: none;
    }
    
    .fluxo-step {
        display: flex;
        align-items: center;
        gap: 16px;
        text-align: left;
    }
    
    .fluxo-step-icon {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
        padding-top: 70px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .login-card {
        padding: 32px 24px;
    }
    
    table {
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 12px;
    }
    
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }
    
    .calendar-event {
        font-size: 9px;
        padding: 2px 4px;
    }
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--accent-green); }
.text-danger { color: var(--accent-red); }
.text-cyan { color: var(--accent-cyan); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }

/* ==================== ANIMAÇÕES ==================== */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 4px solid rgba(255,255,255,0.1);
    border-top: 4px solid var(--accent-primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
