/* ============================================
   Campus Virtual - Residencia de Enfermería
   Diseño Materno-Infantil
   ============================================ */

/* === VARIABLES === */
:root {
    --primary: #E91E63;
    --primary-light: #F48FB1;
    --primary-dark: #C2185B;
    --primary-gradient: linear-gradient(135deg, #E91E63, #EC407A, #F06292);
    --secondary: #00ACC1;
    --secondary-light: #4DD0E1;
    --secondary-dark: #00838F;
    --secondary-gradient: linear-gradient(135deg, #00ACC1, #26C6DA);
    --teal: #009688;
    --teal-light: #4DB6AC;
    --accent: #7C4DFF;
    --success: #4CAF50;
    --warning: #FF9800;
    --danger: #F44336;
    --info: #2196F3;

    --bg-main: #F8F0F4;
    --bg-card: #FFFFFF;
    --bg-sidebar: #FFFFFF;
    --bg-header: var(--primary-gradient);

    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-white: #FFFFFF;

    --border: #E8E0E4;
    --border-light: #F0E8EC;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-card: 0 3px 15px rgba(233,30,99,0.1);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --radius-full: 50px;

    --sidebar-width: 260px;
    --header-height: 65px;

    --font: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === RESET === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* === HEADER === */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(233,30,99,0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sidebar-toggle {
    color: white;
    font-size: 20px;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.3s;
    display: none;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.9;
}

.header-badge {
    background: rgba(255,255,255,0.25);
    color: white;
    padding: 4px 14px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    border: 1px solid rgba(255,255,255,0.3);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-welcome {
    color: white;
    font-size: 13px;
    font-weight: 400;
}

/* Notificaciones */
.header-notifications {
    position: relative;
}

.notif-btn {
    color: white;
    font-size: 18px;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.3s;
    position: relative;
}

.notif-btn:hover {
    background: rgba(255,255,255,0.2);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--warning);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    overflow: hidden;
    margin-top: 10px;
}

.notif-dropdown.show {
    display: block;
}

.notif-header {
    padding: 12px 16px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

.notif-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.notif-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.notif-item:hover {
    background: var(--bg-main);
}

.notif-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.notif-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Perfil */
.header-profile {
    position: relative;
}

.profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    padding: 4px;
    border-radius: var(--radius-full);
    transition: background 0.3s;
}

.profile-btn:hover {
    background: rgba(255,255,255,0.2);
}

.profile-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.5);
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 200px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    overflow: hidden;
    margin-top: 10px;
}

.profile-dropdown.show {
    display: block;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-primary);
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.profile-dropdown a i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

/* === SIDEBAR === */
.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    z-index: 900;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0,0,0,0.03);
}

.sidebar-nav {
    flex: 1;
    padding: 0 10px;
}

.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 15px 15px 8px;
    margin-top: 5px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s;
    margin-bottom: 2px;
}

.sidebar-link:hover {
    background: var(--bg-main);
    color: var(--primary);
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(233,30,99,0.1), rgba(233,30,99,0.05));
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 15px;
}

.sidebar-link.active i {
    color: var(--primary);
}

.sidebar-link.sidebar-anio.anio-1 i { color: var(--primary); }
.sidebar-link.sidebar-anio.anio-2 i { color: var(--secondary); }
.sidebar-link.sidebar-anio.anio-3 i { color: var(--teal); }

/* Progress bar en sidebar */
.sidebar-progress {
    padding: 15px 20px;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    padding: 25px;
    min-height: calc(100vh - var(--header-height));
}

/* === DASHBOARD === */
.dashboard-welcome {
    margin-bottom: 25px;
}

.dashboard-welcome h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.dashboard-welcome p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Tarjetas de año */
.year-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.year-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    text-decoration: none;
}

.year-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Year card bloqueada para alumnos sin acceso */
.year-card-locked {
    position: relative;
    cursor: not-allowed;
    filter: grayscale(100%);
    opacity: 0.5;
    pointer-events: none;
}

.year-card-locked .year-card-img,
.year-card-locked .year-card-body {
    opacity: 0.6;
}

.year-card-lock {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    gap: 8px;
    border-radius: 15px;
    z-index: 2;
}

.year-card-lock i {
    font-size: 18px;
}

/* Sidebar links bloqueados para alumnos */
.sidebar-link-locked {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
    filter: grayscale(100%);
}

.year-card-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.year-card.anio-1 .year-card-img {
    background: linear-gradient(135deg, #FCE4EC, #F8BBD0);
}

.year-card.anio-2 .year-card-img {
    background: linear-gradient(135deg, #E0F7FA, #B2EBF2);
}

.year-card.anio-3 .year-card-img {
    background: linear-gradient(135deg, #E0F2F1, #B2DFDB);
}

.year-card-icon {
    font-size: 70px;
    opacity: 0.8;
}

.year-card-body {
    padding: 15px 20px;
    text-align: center;
}

.year-card-number {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    display: block;
}

.year-card.anio-2 .year-card-number { color: var(--secondary); }
.year-card.anio-3 .year-card-number { color: var(--teal); }

.year-card-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Módulos de aprendizaje */
.modules-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.module-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.module-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.module-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
}

.module-card-icon.bg-pink { background: var(--primary-gradient); }
.module-card-icon.bg-teal { background: var(--secondary-gradient); }
.module-card-icon.bg-green { background: linear-gradient(135deg, #4CAF50, #66BB6A); }
.module-card-icon.bg-orange { background: linear-gradient(135deg, #FF9800, #FFB74D); }
.module-card-icon.bg-purple { background: linear-gradient(135deg, #7C4DFF, #B388FF); }
.module-card-icon.bg-blue { background: linear-gradient(135deg, #2196F3, #64B5F6); }

.module-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

/* Próximas actividades */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 15px 20px;
}

.activity-list {
    list-style: none;
}

.activity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    margin-right: 10px;
    font-size: 16px;
}

.activity-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
}

.activity-date {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
}

/* Foro panel */
.forum-preview {
    padding: 0;
}

.forum-preview-item {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s;
}

.forum-preview-item:hover {
    background: var(--bg-main);
}

.forum-preview-item h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.forum-preview-item p {
    font-size: 11px;
    color: var(--text-muted);
}

/* Barra de progreso grande */
.progress-section {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 15px 20px;
    box-shadow: var(--shadow);
}

.progress-section .progress-icon {
    font-size: 30px;
}

.progress-section .progress-bar {
    flex: 1;
    height: 12px;
}

.progress-section .progress-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
}

/* === MÓDULO PAGES === */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    color: var(--border);
}

/* Content cards estilo módulo */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.content-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
}

.content-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.content-card-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.content-card-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.content-card-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.content-card-info p {
    font-size: 12px;
    color: var(--text-muted);
}

.content-card-body {
    padding: 0 20px 20px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* === FORMULARIOS === */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(233,30,99,0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    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='%23999' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    accent-color: var(--primary);
}

.form-text {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* === BOTONES === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(233,30,99,0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-secondary:hover {
    box-shadow: 0 4px 15px rgba(0,172,193,0.4);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #F44336, #EF5350);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(233,30,99,0.05);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 30px;
    font-size: 15px;
}

.btn-block {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* === ALERTAS === */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: #E8F5E9;
    color: #2E7D32;
    border-left: 4px solid #4CAF50;
}

.alert-danger, .alert-error {
    background: #FFEBEE;
    color: #C62828;
    border-left: 4px solid #F44336;
}

.alert-warning {
    background: #FFF3E0;
    color: #E65100;
    border-left: 4px solid #FF9800;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border-left: 4px solid #2196F3;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    line-height: 1;
}

.alert-close:hover {
    opacity: 1;
}

/* === TABLAS === */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
}

table th {
    background: linear-gradient(135deg, #FAFAFA, #F5F5F5);
    padding: 12px 15px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 2px solid var(--border);
}

table td {
    padding: 12px 15px;
    font-size: 13px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

table tr:hover td {
    background: rgba(233,30,99,0.02);
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
}

.badge-admin { background: #F3E5F5; color: #7B1FA2; }
.badge-docente { background: #E3F2FD; color: #1565C0; }
.badge-alumno { background: #E8F5E9; color: #2E7D32; }
.badge-pendiente { background: #FFF3E0; color: #E65100; }
.badge-entregado { background: #E8F5E9; color: #2E7D32; }
.badge-calificado { background: #E3F2FD; color: #1565C0; }

/* === PÁGINAS PÚBLICAS (LOGIN/REGISTRO) === */
.public-header {
    background: var(--bg-header);
    padding: 15px 0;
    box-shadow: 0 2px 15px rgba(233,30,99,0.3);
}

.public-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.public-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    min-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
}

.auth-card-header {
    background: var(--primary-gradient);
    padding: 30px;
    text-align: center;
    color: white;
}

.auth-card-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
}

.auth-card-header p {
    font-size: 13px;
    opacity: 0.9;
}

.auth-card-body {
    padding: 30px;
}

.auth-links {
    text-align: center;
    margin-top: 15px;
    font-size: 13px;
}

.auth-links a {
    color: var(--primary);
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* === FOOTER === */
.main-footer {
    margin-left: var(--sidebar-width);
    padding: 15px 25px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-light);
}

.public-footer {
    border-top: 1px solid var(--border);
    padding: 20px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

/* === PAGINACIÓN === */
.paginacion ul {
    display: flex;
    list-style: none;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.paginacion li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.paginacion li a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.paginacion li.activa a {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
}

/* === FORO === */
.forum-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.forum-thread {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 15px 20px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s;
}

.forum-thread:hover {
    box-shadow: var(--shadow-lg);
    transform: translateX(3px);
}

.forum-thread-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.forum-thread-info {
    flex: 1;
}

.forum-thread-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.forum-thread-meta {
    font-size: 11px;
    color: var(--text-muted);
}

.forum-thread-stats {
    text-align: right;
    font-size: 12px;
    color: var(--text-muted);
}

/* Post del foro */
.forum-post {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: var(--shadow);
}

.forum-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.forum-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.forum-post-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.forum-post-date {
    font-size: 11px;
    color: var(--text-muted);
}

.forum-post-content {
    font-size: 14px;
    line-height: 1.7;
    color: var(--text-primary);
}

/* === CALENDARIO === */
.calendar-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--primary-gradient);
    color: white;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.calendar-nav button {
    color: white;
    background: rgba(255,255,255,0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.calendar-nav button:hover {
    background: rgba(255,255,255,0.35);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-day-name {
    padding: 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    background: #FAFAFA;
}

.calendar-day {
    padding: 8px;
    min-height: 80px;
    border: 1px solid var(--border-light);
    font-size: 12px;
    transition: background 0.2s;
}

.calendar-day:hover {
    background: rgba(233,30,99,0.03);
}

.calendar-day.today {
    background: rgba(233,30,99,0.08);
}

.calendar-day.other-month {
    opacity: 0.3;
}

.calendar-day-number {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 13px;
}

.calendar-event {
    background: var(--primary-light);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-bottom: 2px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-event.tipo-evaluacion { background: #EF5350; }
.calendar-event.tipo-taller { background: #42A5F5; }
.calendar-event.tipo-entrega { background: #66BB6A; }
.calendar-event.tipo-guardia { background: #FF9800; }
.calendar-event.tipo-rotacion { background: #AB47BC; }

/* === PORTAFOLIO === */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.portfolio-card h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.portfolio-card .type-badge {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: var(--bg-main);
    color: var(--primary);
    font-weight: 600;
    display: inline-block;
    margin-bottom: 8px;
}

.portfolio-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* === ENTREGAS === */
.entrega-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 15px;
}

.entrega-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.entrega-header h3 {
    font-size: 15px;
    font-weight: 600;
}

.entrega-fecha {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.entrega-consigna {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
}

/* === TABS === */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
    gap: 5px;
}

.tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    cursor: pointer;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* === MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background: white;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--bg-main);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === UTILIDADES === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 30px; }
.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 20px; }
.mb-4 { margin-bottom: 30px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 5px; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }

.w-100 { width: 100%; }

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .year-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }

    .main-footer {
        margin-left: 0;
    }

    .year-cards {
        grid-template-columns: 1fr;
    }

    .module-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .header-welcome {
        display: none;
    }

    .header-badge {
        display: none;
    }

    .logo-title {
        font-size: 14px;
    }

    .logo-subtitle {
        display: none;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .module-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .auth-card {
        margin: 10px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
