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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Estilos para carpetas */
.section {
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.carpetas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.carpeta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.carpeta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.carpeta-icon {
    font-size: 48px;
}

.carpeta-info {
    flex: 1;
}

.carpeta-info h4 {
    margin-bottom: 5px;
    font-size: 1.1em;
}

.carpeta-info p {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 5px;
}

.carpeta-info small {
    font-size: 0.8em;
    opacity: 0.8;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.form-inline {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.form-inline .form-group {
    flex: 1;
    margin-bottom: 0;
}

.carpeta-header {
    display: flex;
    align-items: start;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.carpeta-titulo {
    flex: 1;
}

.carpeta-titulo h4 {
    margin-bottom: 5px;
}

.carpeta-stats {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 15px;
}

.carpeta-docentes {
    margin-top: 10px;
}

.docentes-list {
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.docentes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.docente-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #f7fafc;
    border-radius: 5px;
}

.upload-form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

details {
    cursor: pointer;
}

summary {
    padding: 5px;
    background: #f0f0f0;
    border-radius: 5px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .upload-form-inline {
        flex-direction: column;
    }
    
    .upload-form-inline input[type="file"] {
        width: 100%;
    }
    
    .form-inline {
        flex-direction: column;
    }
    
    .form-inline .form-group {
        margin-bottom: 10px;
    }
    
    .carpeta-header {
        flex-direction: column;
    }
    
    .carpeta-actions {
        width: 100%;
        display: flex;
        gap: 10px;
    }
    
    .carpeta-actions .btn-small {
        flex: 1;
        text-align: center;
    }
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Login */
.login-box {
    background: white;
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 10px;
}

.login-box h2 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

/* Navbar */
.navbar {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand {
    font-size: 1.5em;
    font-weight: bold;
    color: #667eea;
}

.nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-link:hover {
    background: #667eea;
    color: white;
}

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

label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-small {
    display: inline-block;
    padding: 5px 10px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 3px;
    font-size: 12px;
    transition: all 0.3s;
}

.btn-small:hover {
    background: #5a67d8;
}

.btn-danger {
    background: #e53e3e;
}

.btn-danger:hover {
    background: #c53030;
}

/* Dashboard */
.dashboard {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-top: 20px;
}

.upload-section {
    background: #f7fafc;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.upload-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.upload-form input[type="file"] {
    flex: 1;
    padding: 10px;
}

/* Grid de archivos */
.files-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.file-card {
    background: #f7fafc;
    border-radius: 10px;
    padding: 15px;
    display: flex;
    gap: 15px;
    transition: all 0.3s;
}

.file-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.file-icon {
    font-size: 40px;
}

.file-info {
    flex: 1;
}

.file-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.file-info p {
    font-size: 12px;
    color: #666;
    margin: 3px 0;
}

.file-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Tablas */
.stats-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #667eea;
    color: white;
}

tr:hover {
    background: #f7fafc;
}

/* Perfil */
.profile-container {
    background: white;
    max-width: 600px;
    margin: 50px auto;
    padding: 30px;
    border-radius: 10px;
}

.profile-form textarea {
    resize: vertical;
}

/* Mensajes */
.error, .success {
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
}

.error {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
    
    .dashboard {
        padding: 15px;
    }
    
    .files-grid {
        grid-template-columns: 1fr;
    }
    
    .file-card {
        flex-direction: column;
    }
    
    .file-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .upload-form {
        flex-direction: column;
    }
    
    .upload-form input[type="file"] {
        width: 100%;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
}