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

body {
    font-family: Georgia, 'Times New Roman', serif;
    background: #fafafa;
    color: #2b2b2b;
    line-height: 1.65;
}

.wrapper {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
}

/* Header */
.header {
    background: white;
    border-bottom: 2px solid #ddd;
    padding: 40px 50px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    width: 120px;
    height: 120px;
    border: 2px solid #e0e0e0;
    padding: 8px;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.site-title {
    font-size: 1.85rem;
    color: #1a1a1a;
    font-weight: 500;
    letter-spacing: 0.5px;
    flex: 1;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #555;
}

.user-info .user-name {
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

/* Main Layout */
.main {
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 180px;
    background: #fafafa;
    border-right: 1px solid #e5e5e5;
    padding: 25px 0;
}

.nav {
    list-style: none;
}

.nav li {
    margin: 0;
}

.nav a {
    display: block;
    padding: 11px 20px;
    color: #444;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.nav a:hover {
    background: #f0f0f0;
    border-left-color: #888;
    color: #1a1a1a;
}

/* Content */
.content {
    flex: 1;
    padding: 50px 60px;
}

h1 {
    font-size: 2rem;
    color: #1a1a1a;
    margin-bottom: 20px;
    font-weight: 400;
    line-height: 1.4;
}

h2 {
    font-size: 1.5rem;
    color: #2b2b2b;
    margin: 45px 0 25px 0;
    font-weight: 500;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 10px;
}

h2:first-of-type {
    margin-top: 0;
}

h3 {
    font-size: 1.2rem;
    color: #2b2b2b;
    margin: 30px 0 15px 0;
    font-weight: 500;
}

p {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.7;
}

/* Exercise statements */
.content > p > strong:first-child,
.content > p:has(> strong:first-child) {
    display: inline-block;
}

.content > p > strong:first-child {
    color: #2b2b2b;
    font-size: 1.05rem;
    margin-right: 8px;
}

.lead {
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 30px;
    font-style: italic;
}

ul {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #555;
    margin: 20px 0 20px 25px;
    line-height: 1.7;
}

ul li {
    margin-bottom: 10px;
}

strong, b {
    color: #2b2b2b;
    font-weight: 600;
}

em {
    font-style: italic;
}

/* Links */
a {
    color: #2b2b2b;
    text-decoration: underline;
}

a:hover {
    color: #555;
}

/* Navigation buttons (links with bold text for next/previous) */
.content a b,
.content a strong {
    display: inline-block;
    background: #f5f5f5;
    color: #2b2b2b;
    padding: 10px 20px;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.content a:hover b,
.content a:hover strong {
    background: #e8e8e8;
    border-color: #b0b0b0;
    text-decoration: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Tables */
table {
    border-collapse: collapse;
    margin: 25px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

table td, table th {
    border: 1px solid #d0d0d0;
    padding: 10px 15px;
    text-align: center;
}

table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #2b2b2b;
}

table td {
    color: #555;
}

/* Highlight boxes */
.highlight-box {
    background: #f8f8f8;
    border-left: 2px solid #666;
    padding: 25px 30px;
    margin: 35px 0;
}

.highlight-box h3 {
    font-size: 1.1rem;
    color: #2b2b2b;
    margin-bottom: 12px;
    font-weight: 500;
}

.highlight-box p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Notice */
.notice {
    background: #fffbf0;
    border: 1px solid #e8ddb5;
    padding: 20px 25px;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.92rem;
    color: #666;
}

/* Collapsible solutions */
details {
    margin: 12px 0 20px 0;
    border: none;
    background: transparent;
}

details summary {
    display: block;
    padding: 12px 16px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    color: #2b2b2b;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: all 0.15s;
    user-select: none;
    list-style: none;
    margin-left: 0;
    line-height: 1.5;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: '▸';
    display: inline-block;
    transition: transform 0.15s;
    margin-right: 10px;
    font-size: 0.75rem;
    color: #666;
}

details[open] summary::before {
    transform: rotate(90deg);
}

details summary:hover {
    color: #1a1a1a;
    border-color: #c0c0c0;
    background: #f0f1f2;
}

details[open] summary {
    margin-bottom: 15px;
    color: #1a1a1a;
    border-color: #c5c5c5;
    background: #f0f1f2;
}

details summary strong {
    color: #888;
    font-weight: 500;
    margin-right: 6px;
}

details .solution-content {
    padding: 15px 0 5px 0;
    border-left: 3px solid #e0e0e0;
    padding-left: 20px;
    margin-left: 10px;
}

details .solution-content p {
    margin: 10px 0;
    font-weight: 500;
    color: #2b2b2b;
}

/* Solution tables styling */
details .solution-content table {
    margin: 15px auto;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

details .solution-content table th {
    background: #f8f8f8;
}

/* Footer */
.footer {
    background: #f8f8f8;
    border-top: 1px solid #e5e5e5;
    padding: 25px 40px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 0.85rem;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 20px;
        flex-direction: column;
        text-align: center;
    }

    .logo {
        width: 90px;
        height: 90px;
    }

    .site-title {
        font-size: 1.3rem;
    }

    .main {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
        padding: 15px 0;
    }

    .nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav li {
        flex: 0 0 auto;
    }

    .nav a {
        padding: 10px 15px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .nav a:hover {
        border-left: none;
        border-bottom-color: #888;
    }

    .content {
        padding: 35px 25px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .footer {
        padding: 25px 20px;
    }
}

/* =========================================================================
   APROBADOR
   ========================================================================= */

.aprobador-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e5e5e5;
}

.aprobador-header h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.badge-beta {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.5em;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    vertical-align: middle;
}

.aprobador-intro {
    margin-bottom: 35px;
}

.aprobador-intro h2 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.aprobador-intro p {
    font-size: 1.05rem;
    color: #444;
    line-height: 1.75;
}

/* Status box */
.aprobador-status {
    margin-bottom: 40px;
}

.status-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(135deg, #fef3cd 0%, #fff8e1 100%);
    border: 1px solid #f0d78c;
    border-radius: 8px;
    padding: 25px;
}

.status-icon {
    flex-shrink: 0;
    color: #b8860b;
}

.status-content h3 {
    color: #8b6914;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.status-content p {
    color: #6d5a1a;
    margin: 0;
}

/* Status box variants */
.status-box.status-info {
    background: linear-gradient(135deg, #cce5ff 0%, #e7f3ff 100%);
    border-color: #9fc5e8;
}

.status-box.status-info .status-icon {
    color: #0066cc;
}

.status-box.status-info .status-content h3 {
    color: #004085;
}

.status-box.status-info .status-content p {
    color: #004085;
}

.status-box.status-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #fffbe6 100%);
    border-color: #ffc107;
}

.status-box.status-warning .status-icon {
    color: #856404;
}

.status-box.status-warning .status-content h3 {
    color: #856404;
}

.status-box.status-warning .status-content p,
.status-box.status-warning .universidad-nombre {
    color: #664d03;
    font-weight: 500;
}

.status-box.status-success {
    background: linear-gradient(135deg, #d4edda 0%, #e8f5e9 100%);
    border-color: #28a745;
}

.status-box.status-success .status-icon {
    color: #28a745;
}

.status-box.status-success .status-content h3 {
    color: #155724;
}

.status-box.status-success .status-content p,
.status-box.status-success .asignatura-info {
    color: #155724;
}

.status-box.status-success .asignatura-info strong {
    font-size: 1.1rem;
}

/* Formulario de universidad */
.aprobador-form-universidad {
    margin-bottom: 40px;
}

.form-universidad {
    max-width: 500px;
    margin-top: 25px;
}

.form-universidad .form-group {
    margin-bottom: 20px;
}

.form-universidad label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-universidad input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-universidad input[type="text"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Estado sin soporte */
.aprobador-sin-soporte {
    margin-bottom: 40px;
}

.cta-upload-section {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.cta-upload-section p {
    margin: 0;
    color: #555;
}

.alternativa-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.alternativa-section p {
    margin-bottom: 15px;
    color: #666;
}

/* Estado personalizado */
.aprobador-personalizado {
    margin-bottom: 40px;
}

.progreso-resumen {
    margin: 30px 0;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 8px;
}

.progreso-resumen h3 {
    margin-bottom: 20px;
    color: #333;
}

.progreso-stats {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.progreso-stats .stat {
    text-align: center;
}

.progreso-stats .stat-numero {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
}

.progreso-stats .stat-label {
    font-size: 0.9rem;
    color: #666;
}

.ultimo-atomo {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    color: #555;
}

/* Itinerario de átomos */
.itinerario-preview {
    margin: 30px 0;
}

.itinerario-preview h3 {
    margin-bottom: 20px;
}

.categoria-atomos {
    margin-bottom: 25px;
}

.categoria-atomos h4 {
    margin-bottom: 12px;
    color: #444;
    font-size: 1rem;
}

.categoria-progreso {
    color: #888;
    font-weight: normal;
    font-size: 0.9rem;
}

.atomos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.atomo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.atomo-bloqueado {
    background: #f0f0f0;
    color: #999;
}

.atomo-desbloqueado {
    background: #e7f3ff;
    color: #0066cc;
    cursor: pointer;
}

.atomo-desbloqueado:hover {
    background: #cce5ff;
}

.atomo-en_progreso {
    background: #fff3cd;
    color: #856404;
}

.atomo-completado {
    background: #d4edda;
    color: #155724;
}

.atomo-check {
    color: #28a745;
}

.atomo-lock {
    font-size: 0.8rem;
}

.atomo-progreso {
    font-size: 0.8rem;
    background: rgba(0,0,0,0.1);
    padding: 2px 6px;
    border-radius: 10px;
}

/* CTA empezar */
.cta-empezar {
    text-align: center;
    margin-top: 30px;
}

.button-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

/* Steps */
.aprobador-how {
    margin-bottom: 40px;
}

.aprobador-how h2 {
    margin-bottom: 25px;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.step-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
    position: relative;
}

.step-number {
    position: absolute;
    top: -12px;
    left: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.95rem;
}

.step-card h3 {
    margin-top: 8px;
    margin-bottom: 12px;
    font-size: 1rem;
    color: #1a1a1a;
}

.step-card p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    line-height: 1.6;
}

/* Benefits */
.aprobador-benefits {
    margin-bottom: 40px;
}

.aprobador-benefits h2 {
    margin-bottom: 20px;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1rem;
    color: #333;
}

.benefits-list li:last-child {
    border-bottom: none;
}

.benefit-icon {
    flex-shrink: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.1rem;
}

/* CTA */
.aprobador-cta {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 35px;
    text-align: center;
    margin-bottom: 30px;
}

.aprobador-cta h2 {
    margin-bottom: 15px;
    color: #1a1a1a;
}

.aprobador-cta p {
    margin-bottom: 20px;
    color: #555;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.button-primary {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
}

/* Upload section */
.aprobador-upload {
    margin-bottom: 40px;
}

.aprobador-upload h2 {
    margin-bottom: 15px;
}

.aprobador-upload > p {
    margin-bottom: 25px;
    color: #555;
}

.upload-form {
    max-width: 600px;
}

.upload-zone {
    border: 2px dashed #ccc;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: #667eea;
    background: #f0f4ff;
}

.upload-icon {
    color: #999;
    margin-bottom: 15px;
}

.upload-zone:hover .upload-icon,
.upload-zone.drag-over .upload-icon {
    color: #667eea;
}

.upload-text {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 8px;
}

.upload-or {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.upload-button {
    display: inline-block;
    background: white;
    border: 1px solid #667eea;
    color: #667eea;
    padding: 10px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.upload-button:hover {
    background: #667eea;
    color: white;
}

.upload-hint {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #888;
}

.upload-files {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.file-size {
    color: #888;
    font-size: 0.9rem;
}

.file-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

.file-remove:hover {
    color: #a71d2a;
}

.upload-contact {
    margin-top: 25px;
}

.upload-contact label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
}

.upload-contact input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: border-color 0.2s;
}

.upload-contact input:focus {
    outline: none;
    border-color: #667eea;
}

.button-large {
    width: 100%;
    padding: 16px 32px;
    font-size: 1.1rem;
    margin-top: 10px;
}

.button-large:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Login required box */
.login-required-box {
    text-align: center;
    padding: 50px 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.login-required-icon {
    color: #667eea;
    margin-bottom: 20px;
}

.login-required-box h2 {
    margin-bottom: 15px;
    color: #1a1a1a;
}

.login-required-box p {
    color: #555;
    max-width: 450px;
    margin: 0 auto 25px;
    line-height: 1.6;
}

.login-required-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-secondary {
    display: inline-block;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.button-secondary:hover {
    background: #667eea;
    color: white;
}

/* Upload success */
.upload-success {
    color: #28a745;
    padding: 20px;
}

.upload-success svg {
    margin-bottom: 15px;
}

.upload-success p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
}

/* Responsive aprobador */
@media (max-width: 600px) {
    .status-box {
        flex-direction: column;
        text-align: center;
    }

    .status-icon {
        margin: 0 auto;
    }

    .step-number {
        position: static;
        margin: 0 auto 15px;
    }

    .step-card {
        text-align: center;
    }

    .aprobador-cta {
        padding: 25px 20px;
    }

    .upload-zone {
        padding: 30px 15px;
    }
}

/* Nota de registro para ejercicios */
.nota-registro {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
}

.nota-registro a {
    color: #555;
    text-decoration: underline;
}

.nota-registro a:hover {
    color: #333;
}
