<style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #4FC3F7 0%, #0288D1 100%);
            min-height: 100vh;
            padding: 20px;
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            background: white;
            border-radius: 20px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
        }

        header {
            background: linear-gradient(135deg, #4FC3F7 0%, #0288D1 100%);
            color: white;
            padding: 30px;
            position: relative;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-content {
            flex: 1;
        }

        header h1 {
            font-size: 2.2em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }

        header p {
            font-size: 1.1em;
            opacity: 0.9;
        }

        .user-info {
            display: flex;
            align-items: center;
            gap: 15px;
            background: rgba(255,255,255,0.2);
            padding: 10px 20px;
            border-radius: 25px;
        }

        .user-badge {
            background: #FF8F00;
            color: white;
            padding: 5px 15px;
            border-radius: 15px;
            font-size: 0.8em;
            font-weight: bold;
            text-transform: uppercase;
        }

        .btn-logout {
            background: #ff5252;
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 20px;
            cursor: pointer;
            text-decoration: none;
            font-size: 0.9em;
            transition: all 0.3s ease;
        }

        .btn-logout:hover {
            background: #d32f2f;
            transform: scale(1.05);
        }

        .logo-container {
            width: 100px;
            height: 100px;
            background: white;
            border-radius: 50%;
            padding: 10px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-left: 30px;
        }

        .logo-container img {
            max-width: 100%;
            max-height: 100%;
            object-fit: contain;
        }

        /* Login Styles */
        .login-container {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 500px;
            padding: 40px;
        }

        .login-box {
            background: #f8f9fa;
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
            width: 100%;
            max-width: 400px;
            text-align: center;
        }

        .login-box h2 {
            color: #01579B;
            margin-bottom: 10px;
            font-size: 1.8em;
        }

        .login-box p {
            color: #666;
            margin-bottom: 30px;
        }

        .form-group {
            margin-bottom: 20px;
            text-align: left;
        }

        .form-group label {
            display: block;
            margin-bottom: 8px;
            color: #555;
            font-weight: 600;
        }

        .form-group input {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 1em;
            transition: all 0.3s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: #0288D1;
            box-shadow: 0 0 0 3px rgba(2, 136, 209, 0.1);
        }

        .btn-login {
            width: 100%;
            background: linear-gradient(135deg, #0288D1 0%, #01579B 100%);
            color: white;
            border: none;
            padding: 15px;
            border-radius: 10px;
            font-size: 1.1em;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-login:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(2, 136, 209, 0.4);
        }

        .error-message {
            background: #ffebee;
            color: #c62828;
            padding: 12px;
            border-radius: 8px;
            margin-bottom: 20px;
            border-left: 4px solid #c62828;
        }

        .tabs-container {
            background: #f8f9fa;
            border-bottom: 3px solid #e9ecef;
        }

        .tabs {
            display: flex;
            overflow-x: auto;
            padding: 0 20px;
        }

        .tab {
            padding: 20px 30px;
            cursor: pointer;
            border: none;
            background: transparent;
            font-size: 1.1em;
            font-weight: 600;
            color: #546e7a;
            transition: all 0.3s ease;
            position: relative;
            white-space: nowrap;
        }

        .tab:hover {
            color: #FF8F00;
            background: rgba(255, 143, 0, 0.1);
        }

        .tab.active {
            color: #0288D1;
            background: white;
        }

        .tab.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: #FF8F00;
        }

        .tab-content {
            display: none;
            padding: 30px;
            animation: fadeIn 0.5s ease;
        }

        .tab-content.active {
            display: block;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .compact-header {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-bottom: 25px;
        }

        .left-panel {
            background: #E1F5FE;
            padding: 20px;
            border-radius: 15px;
            border-left: 5px solid #0288D1;
        }

        .right-panel {
            background: #E3F2FD;
            padding: 20px;
            border-radius: 15px;
            border-left: 5px solid #1976D2;
        }

        .panel-title {
            font-size: 0.9em;
            color: #01579B;
            font-weight: 700;
            text-transform: uppercase;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .teacher-label {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }

        .teacher-display {
            font-size: 1.3em;
            color: #01579B;
            font-weight: 600;
            padding: 8px 15px;
            background: white;
            border-radius: 8px;
            border: 2px solid #0288D1;
            flex: 1;
        }

        .teacher-edit {
            display: none;
            width: 100%;
            padding: 10px;
            font-size: 1.1em;
            border: 2px solid #0288D1;
            border-radius: 8px;
            font-family: inherit;
        }

        .btn-icon {
            background: #0288D1;
            color: white;
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.2em;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-icon:hover {
            background: #01579B;
            transform: scale(1.1);
        }

        .date-control {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .date-control label {
            font-weight: 600;
            color: #01579B;
        }

        .date-control input[type="date"] {
            padding: 8px 12px;
            border: 2px solid #0288D1;
            border-radius: 8px;
            font-size: 1em;
            font-family: inherit;
        }

        .date-info {
            background: white;
            padding: 8px 15px;
            border-radius: 20px;
            color: #E65100;
            font-weight: 600;
            font-size: 0.9em;
            border: 2px solid #FF8F00;
        }

        .schedule-compact {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
        }

        .schedule-tag {
            background: white;
            padding: 8px 15px;
            border-radius: 20px;
            border: 2px solid #1976D2;
            color: #1565C0;
            font-size: 0.9em;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .schedule-tag button {
            background: #ff5252;
            color: white;
            border: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            cursor: pointer;
            font-size: 0.7em;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-add-small {
            background: #4CAF50;
            color: white;
            border: none;
            padding: 8px 15px;
            border-radius: 20px;
            cursor: pointer;
            font-size: 0.9em;
            font-weight: 600;
            margin-top: 10px;
            transition: all 0.3s ease;
        }

        .btn-add-small:hover {
            background: #45a049;
            transform: translateY(-2px);
        }

        .schedule-editor-compact {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
            gap: 10px;
            margin-top: 10px;
        }

        .schedule-editor-item {
            background: white;
            padding: 10px;
            border-radius: 8px;
            border: 1px solid #90CAF9;
        }

        .schedule-editor-item select,
        .schedule-editor-item input {
            width: 100%;
            padding: 5px;
            margin-top: 5px;
            border: 1px solid #90CAF9;
            border-radius: 5px;
        }

        .form-section {
            background: #FFF8E1;
            padding: 25px;
            border-radius: 15px;
            margin-bottom: 30px;
            border-left: 5px solid #FF8F00;
        }

        .form-section h2 {
            color: #E65100;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 1.4em;
        }

        .viewer-banner {
            background: #E8F5E9;
            border: 2px solid #4CAF50;
            color: #2E7D32;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
        }

        .class-entry {
            background: white;
            padding: 20px;
            border-radius: 12px;
            margin-bottom: 15px;
            border: 2px solid #FFE0B2;
            position: relative;
            transition: all 0.3s ease;
        }

        .class-entry:hover {
            box-shadow: 0 5px 15px rgba(255, 143, 0, 0.2);
            border-color: #FF8F00;
        }

        .class-entry-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 1px solid #FFE0B2;
        }

        .class-number-badge {
            background: #FF8F00;
            color: white;
            padding: 5px 15px;
            border-radius: 20px;
            font-weight: bold;
            font-size: 0.9em;
        }

        .remove-class-btn {
            background: #ff5252;
            color: white;
            border: none;
            padding: 5px 15px;
            border-radius: 15px;
            cursor: pointer;
            font-size: 0.85em;
            transition: all 0.3s ease;
        }

        .remove-class-btn:hover {
            background: #d32f2f;
            transform: scale(1.05);
        }

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 15px;
        }

        .form-entry-group {
            display: flex;
            flex-direction: column;
        }

        .form-entry-group label {
            font-weight: 600;
            color: #555;
            margin-bottom: 6px;
            font-size: 0.9em;
        }

        .form-entry-group input,
        .form-entry-group select,
        .form-entry-group textarea {
            padding: 10px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 0.95em;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .form-entry-group input:focus,
        .form-entry-group select:focus,
        .form-entry-group textarea:focus {
            outline: none;
            border-color: #FF8F00;
            box-shadow: 0 0 0 3px rgba(255, 143, 0, 0.1);
        }

        .form-entry-group textarea {
            resize: vertical;
            min-height: 60px;
        }

        .add-class-btn {
            background: white;
            border: 3px dashed #FF8F00;
            color: #FF8F00;
            padding: 15px;
            width: 100%;
            border-radius: 12px;
            cursor: pointer;
            font-size: 1.1em;
            font-weight: 600;
            transition: all 0.3s ease;
            margin-top: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .add-class-btn:hover {
            background: #FFF3E0;
            border-style: solid;
            transform: translateY(-2px);
        }

        .btn-save {
            background: linear-gradient(135deg, #0288D1 0%, #01579B 100%);
            color: white;
            border: none;
            padding: 18px 50px;
            font-size: 1.2em;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            margin-top: 25px;
            box-shadow: 0 4px 15px rgba(2, 136, 209, 0.4);
            display: block;
            margin-left: auto;
            margin-right: auto;
        }

        .btn-save:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(2, 136, 209, 0.6);
        }

        .btn-cancel {
            background: #757575;
            color: white;
            border: none;
            padding: 18px 50px;
            font-size: 1.2em;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            margin-top: 25px;
            margin-left: 10px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        .btn-cancel:hover {
            background: #616161;
            transform: translateY(-2px);
        }

        .edit-mode-banner {
            background: #E3F2FD;
            border: 2px solid #1976D2;
            color: #1565C0;
            padding: 15px;
            border-radius: 10px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
        }

        .table-container {
            overflow-x: auto;
            margin-top: 20px;
            border-radius: 15px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }

        table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            font-size: 0.9em;
        }

        thead {
            background: linear-gradient(135deg, #0288D1 0%, #01579B 100%);
            color: white;
        }

        th {
            padding: 15px;
            text-align: left;
            font-weight: 600;
            text-transform: uppercase;
            font-size: 0.8em;
            letter-spacing: 0.5px;
        }

        td {
            padding: 12px;
            border-bottom: 1px solid #e0e0e0;
            color: #555;
        }

        tbody tr {
            transition: all 0.3s ease;
        }

        tbody tr:hover {
            background: #E1F5FE;
            transform: scale(1.01);
            box-shadow: 0 5px 15px rgba(0,0,0,0.1);
        }

        .badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 0.8em;
            font-weight: 600;
            text-transform: uppercase;
        }

        .badge-indagacion { background: #E3F2FD; color: #1565C0; }
        .badge-expositiva { background: #FFF3E0; color: #E65100; }
        .badge-experimental { background: #E8F5E9; color: #2E7D32; }
        .badge-evaluacion { background: #FCE4EC; color: #C2185B; }
        .badge-practica { background: #F3E5F5; color: #6A1B9A; }
        .badge-otra { background: #ECEFF1; color: #455A64; }

        .action-btns {
            display: flex;
            gap: 5px;
        }

        .edit-btn {
            background: #1976D2;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 15px;
            cursor: pointer;
            font-size: 0.8em;
            transition: all 0.3s ease;
        }

        .edit-btn:hover {
            background: #1565C0;
            transform: scale(1.05);
        }

        .delete-btn {
            background: #ff5252;
            color: white;
            border: none;
            padding: 6px 12px;
            border-radius: 15px;
            cursor: pointer;
            font-size: 0.8em;
            transition: all 0.3s ease;
        }

        .delete-btn:hover {
            background: #d32f2f;
            transform: scale(1.05);
        }

        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }

        .empty-state svg {
            width: 100px;
            height: 100px;
            margin-bottom: 20px;
            opacity: 0.3;
        }

        .notification {
            position: fixed;
            top: 20px;
            right: 20px;
            background: #4caf50;
            color: white;
            padding: 15px 25px;
            border-radius: 10px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.2);
            display: none;
            animation: slideIn 0.3s ease;
            z-index: 1000;
        }

        @keyframes slideIn {
            from { transform: translateX(400px); }
            to { transform: translateX(0); }
        }

        .copy-class-btn {
            background: #1976D2;
            color: white;
            border: none;
            padding: 4px 8px;
            border-radius: 8px;
            font-size: 0.75em;
            cursor: pointer;
            margin-left: 8px;
        }

        .copy-class-btn:hover {
            opacity: 0.85;
        }

        /* NUEVO: Estilo para el badge del docente */
        .teacher-badge {
            display: inline-block;
            padding: 4px 10px;
            border-radius: 15px;
            font-size: 0.85em;
            font-weight: 600;
            background: #E1F5FE;
            color: #01579B;
            border: 1px solid #0288D1;
        }

        @media (max-width: 768px) {
            header {
                flex-direction: column;
                text-align: center;
            }
            
            .logo-container {
                margin: 20px 0 0 0;
            }
            
            .compact-header {
                grid-template-columns: 1fr;
            }
            
            .form-grid {
                grid-template-columns: 1fr;
            }
            
            .tabs {
                flex-wrap: nowrap;
                overflow-x: scroll;
            }
            
            table {
                font-size: 0.8em;
            }
            
            th, td {
                padding: 8px;
            }
            
            .user-info {
                margin-top: 15px;
                flex-wrap: wrap;
                justify-content: center;
            }

            .btn-cancel {
                margin-left: 0;
                margin-top: 10px;
            }
        }
		
		/* ============================================
   NAVEGACIÓN DE AÑOS - Libro de Temas
   ============================================ */

.year-nav-container {
    background: #E1F5FE;
    padding: 15px 20px;
    border-bottom: 2px solid #B3E5FC;
}

.year-nav-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.year-nav-label {
    color: #01579B;
    font-weight: 600;
    font-size: 0.9em;
}

.year-nav-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.year-nav-btn {
    background: white;
    color: #0288D1;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9em;
    border: 2px solid #0288D1;
    transition: all 0.3s ease;
    min-width: 40px;
    text-align: center;
    display: inline-block;
}

.year-nav-btn:hover {
    background: #0288D1;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(2, 136, 209, 0.3);
}

.year-nav-btn.active {
    background: #0288D1;
    color: white;
    box-shadow: 0 4px 10px rgba(2, 136, 209, 0.3);
    cursor: default;
}
		
    </style>