/* ============================================
   ESTILOS GLOBALES - SISTEMA DE EVALUACIÓN
   Colores: Gris Oscuro (#2c3e50) y Amarillo (#f39c12)
   ============================================ */

:root {
    --primary: #2c3e50;
    --secondary: #f39c12;
    --light-gray: #ecf0f1;
    --dark-gray: #34495e;
    --text-dark: #2c3e50;
    --border-color: #bdc3c7;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    --white: #fff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-dark);
    line-height: 1.6;
}

/* ============================================
   LAYOUT GENERAL
   ============================================ */

body {
    margin: 0;
    min-height: 100vh;
}

body:not(.auth-body) {
    display: flex;
}

.sidebar {
    width: 280px;
    background: linear-gradient(135deg, var(--primary) 0%, #34495e 100%);
    color: white;
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.sidebar-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-bottom: 3px solid var(--secondary);
}

.sidebar-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
}

.menu-title {
    padding: 15px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--secondary);
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover {
    background-color: rgba(243, 156, 18, 0.1);
    border-left-color: var(--secondary);
    padding-left: 25px;
    color: var(--secondary);
}

.logout-link {
    color: #e74c3c !important;
}

.logout-link:hover {
    background-color: rgba(231, 76, 60, 0.1) !important;
    border-left-color: #e74c3c !important;
}

.content {
    margin-left: 280px;
    flex: 1;
    padding: 30px;
    background-color: #f5f5f5;
}

/* ============================================
   HEADER Y FOOTER
   ============================================ */

.header {
    background: white;
    padding: 20px 30px;
    border-bottom: 3px solid var(--secondary);
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: var(--primary);
    font-size: 28px;
    margin-bottom: 5px;
}

.header .user-info {
    font-size: 14px;
    color: var(--dark-gray);
}

.footer {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
    border-top: 1px solid var(--border-color);
    margin-top: 50px;
    font-size: 13px;
}

/* ============================================
   TÍTULOS Y ENCABEZADOS
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 600;
}

h1 {
    font-size: 28px;
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 10px;
}

h2 {
    font-size: 24px;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 10px;
}

h3 {
    font-size: 20px;
}

/* ============================================
   FORMULARIOS
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="date"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 8px rgba(243, 156, 18, 0.2);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   BOTONES
   ============================================ */

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.3);
}

.btn-secondary {
    background-color: var(--primary);
    color: white;
}

.btn-secondary:hover {
    background-color: #1a252f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.3);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #229954;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-info {
    background-color: var(--info);
    color: white;
}

.btn-info:hover {
    background-color: #2980b9;
}

.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-group .btn {
    flex: 1;
}

/* ============================================
   TABLAS
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

thead {
    background: linear-gradient(135deg, var(--primary) 0%, #34495e 100%);
    color: white;
}

thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--secondary);
}

tbody tr {
    border-bottom: 1px solid var(--light-gray);
    transition: background-color 0.3s ease;
}

tbody tr:hover {
    background-color: rgba(243, 156, 18, 0.05);
}

tbody td {
    padding: 15px;
}

tbody tr:last-child {
    border-bottom: none;
}

/* ============================================
   TARJETAS
   ============================================ */

.card {
    background: white;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--secondary);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.card-header h3 {
    margin: 0;
}

/* ============================================
   ALERTAS
   ============================================ */

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(39, 174, 96, 0.1);
    color: #27ae60;
    border-left: 4px solid #27ae60;
}

.alert-danger {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border-left: 4px solid #e74c3c;
}

.alert-warning {
    background: rgba(243, 156, 18, 0.1);
    color: #e67e22;
    border-left: 4px solid #e67e22;
}

.alert-info {
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border-left: 4px solid #3498db;
}

/* ============================================
   BADGES Y ESTADOS
   ============================================ */

.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background-color: rgba(243, 156, 18, 0.2);
    color: var(--secondary);
}

.badge-success {
    background-color: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.badge-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.badge-warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: #e67e22;
}

/* ============================================
   UTILIDADES
   ============================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-3 {
    margin-top: 30px;
}

.mb-3 {
    margin-bottom: 30px;
}

.p-3 {
    padding: 30px;
}

.gap-2 {
    gap: 20px;
}

.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.actions {
    display: flex;
    gap: 8px;
}

.actions a {
    padding: 6px 12px;
    border-radius: 3px;
    font-size: 12px;
    text-decoration: none;
}

.action-edit {
    background-color: var(--info);
    color: white;
}

.action-delete {
    background-color: var(--danger);
    color: white;
}

.action-view {
    background-color: var(--secondary);
    color: white;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        width: 250px;
    }

    .content {
        margin-left: 250px;
        padding: 20px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    table {
        font-size: 13px;
    }

    thead th,
    tbody td {
        padding: 10px;
    }

    .btn-group {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .sidebar {
        position: absolute;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 15px;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="date"],
    input[type="number"],
    select,
    textarea {
        padding: 10px;
    }

    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }

    table {
        font-size: 12px;
    }
}

.search-container input {
    border: 2px solid var(--border-color);
    padding-left: 40px;
    /* Espacio para el emoji o icono */
    background-color: white;
}

.search-container input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.1);
}