/* 
  ===========================================
  A3B INGENIERÍA - AULA VIRTUAL STYLES
  ===========================================
*/
:root {
    /* Colores Corporativos A3B */
    --primary: #163f62;
    --primary-dark: #0d2a42;
    --primary-light: #1e5580;
    --accent: #aac32f;
    --accent-hover: #8fa028;
    
    /* Neutros Premium */
    --bg-main: #f0f2f5;
    --surface: #ffffff;
    --text-main: #1a2a3a;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    
    /* Sombras y Radios */
    --shadow-sm: 0 2px 8px rgba(10, 34, 64, 0.04);
    --shadow-md: 0 8px 30px rgba(10, 34, 64, 0.08);
    --shadow-lg: 0 20px 60px rgba(10, 34, 64, 0.12);
    --radius-md: 12px;
    --radius-sm: 8px;
    
    /* Tipografías */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* UI Examen y Estados */
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #fee2e2;
    --error-text: #dc2626;
    --warning-bg: #fef3c7;
    --warning-text: #b45309;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Tipografía global */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
}

/* 
  ------------------------------
  COMPONENTES COMUNES 
  ------------------------------
*/

.card {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 25px;
    border: 1px solid rgba(0,0,0,0.03);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-heading);
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(22, 63, 98, 0.2);
}

.btn:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(22, 63, 98, 0.3);
}

.btn.small {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-accent {
    background: var(--accent);
    color: var(--primary-dark);
    box-shadow: 0 4px 15px rgba(170, 195, 47, 0.3);
}

.btn-accent:hover {
    background: var(--accent-hover);
    color: white;
    box-shadow: 0 6px 20px rgba(170, 195, 47, 0.4);
}

.btn-logout {
    background: var(--error-bg);
    color: var(--error-text);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s;
}
.btn-logout:hover {
    background: #fca5a5;
    color: #991b1b;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.2s;
    background: #f9fafb;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(22, 63, 98, 0.1);
}

/* Alertas */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 25px;
    font-weight: 500;
    border-left: 4px solid;
}
.alert.success { background: var(--success-bg); color: var(--success-text); border-color: #22c55e; }
.alert.error { background: var(--error-bg); color: var(--error-text); border-color: #ef4444; }

/* Tablas */
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* 
  ------------------------------
  LAYOUTS ESPECÍFICOS
  ------------------------------
*/

/* --- Login --- */
.login-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
}

.login-box {
    background: var(--surface);
    padding: 50px 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-logo {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}
.login-logo span { color: var(--accent); }
.login-subtitle { color: var(--text-muted); margin-bottom: 30px; font-size: 15px; }

/* --- Admin Panel --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--primary-dark);
    color: white;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 40px;
    color: white;
    letter-spacing: 0.05em;
}
.sidebar-brand span { color: var(--accent); }

.nav-link {
    display: block;
    padding: 16px 25px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    border-left: 4px solid transparent;
    font-weight: 500;
    transition: 0.2s;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left-color: var(--accent);
}

.admin-content {
    flex-grow: 1;
    padding: 40px 50px;
    overflow-y: auto;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.admin-header h1 {
    font-size: 28px;
    letter-spacing: -0.02em;
}

/* --- Dashboard Estudiante --- */
.dashboard-header {
    background: var(--surface);
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.dashboard-brand {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 22px;
    color: var(--primary);
}
.dashboard-brand span { color: var(--accent); }

.dashboard-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.student-welcome {
    margin-bottom: 40px;
}
.student-welcome h1 { font-size: 32px; margin-bottom: 5px; }
.student-welcome p { color: var(--text-muted); font-size: 16px; }

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.course-card.done {
    opacity: 0.7;
}
.course-card.done:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
    border-color: rgba(0,0,0,0.05);
    cursor: default;
}

.course-img-placeholder {
    height: 160px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}
.course-card.done .course-img-placeholder {
    background: #e5e7eb;
}

.course-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-title-card {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: auto;
    align-self: flex-start;
}
.badge.active { background: #e0f2fe; color: #0284c7; }
.badge.done { background: #d1fae5; color: #059669; }

/* --- Vista Curso --- */
.course-view-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.course-content-box {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 30px;
}

.course-content-box h1 {
    font-size: 32px;
    margin-bottom: 25px;
    letter-spacing: -0.01em;
}

.course-text {
    font-size: 16px;
    line-height: 1.8;
    color: #4b5563;
}

.materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.material-item {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 15px;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
}

.material-item:hover {
    border-color: var(--primary);
    background: #f0f4f8;
    box-shadow: var(--shadow-sm);
}

.btn-exam-massive {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 20px;
    font-size: 20px;
    font-weight: 800;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(170, 195, 47, 0.3);
}

.btn-exam-massive:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(170, 195, 47, 0.5);
    background: var(--accent-hover);
    color: white;
}

.btn-exam-massive.disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-exam-massive.disabled:hover { transform: none; box-shadow: none; }

/* --- Examen --- */
.exam-info-bar {
    background: #e0e7ff;
    color: #3730a3;
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.exam-question {
    margin-bottom: 35px;
}

.exam-question h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.exam-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 500;
}

.exam-option:hover {
    background: #f9fafb;
    border-color: var(--primary-light);
}

.exam-option input[type="radio"] {
    margin-right: 15px;
    transform: scale(1.2);
}
