/* CSS Genérico - Agenda2 */

/* Variables de colores */
:root {
    --primary-color: #00a8cc;
    --secondary-color: #0077be;
    --admin-color: #006994;
    --admin-dark: #005577;
    --profesor-color: #00acc1;
    --profesor-dark: #0097a7;
    --padre-color: #26c6da;
    --padre-dark: #00acc1;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e1e5e9;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 5px 15px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header común para todos los paneles */
.header {
    padding: 20px;
    box-shadow: var(--shadow);
    color: white;
    position: relative;
    z-index: 1100;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.header-info h1 {
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.header-info p {
    margin: 5px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info .welcome-text {
    display: block;
    font-size: 14px;
}

.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.user-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.user-dropdown-toggle::before {
    content: 'person';
    font-family: 'Material Icons';
    font-size: 20px;
    color: var(--white);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    min-width: 180px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 10px;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
}

.user-dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--text-dark);
}

.user-dropdown-menu a i {
    margin-right: 8px;
    font-size: 16px;
}

/* Colores por tipo de usuario */
.header.admin {
    background: linear-gradient(135deg, var(--admin-color) 0%, var(--admin-dark) 100%);
}

.header.profesor {
    background: linear-gradient(135deg, var(--profesor-color) 0%, var(--profesor-dark) 100%);
}

.header.padre {
    background: linear-gradient(135deg, var(--padre-color) 0%, var(--padre-dark) 100%);
}

/* Navegación */
.nav {
    background: var(--white);
    padding: 15px 20px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1000;
}

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

.nav-links {
    display: flex;
    align-items: center;
}

.nav a {
    margin-right: 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav a:hover,
.nav a.active {
    color: var(--white);
    transform: translateY(-1px);
}

.nav a:hover.admin,
.nav a.active.admin {
    background: var(--admin-color);
}

.nav a:hover.profesor,
.nav a.active.profesor {
    background: var(--profesor-color);
}

.nav a:hover.padre,
.nav a.active.padre {
    background: var(--padre-color);
}

/* Menú móvil */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    width: 30px;
    height: 24px;
}

.mobile-menu-toggle-text {
    display: none;
    font-weight: bold;
    color: var(--text-dark);
    font-size: 14px;
    white-space: nowrap;
}

.mobile-menu-toggle-icon {
    position: relative;
    width: 30px;
    height: 24px;
}

.mobile-menu-toggle-icon span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s ease;
}

.mobile-menu-toggle-icon span:nth-child(1) {
    top: 0;
}

.mobile-menu-toggle-icon span:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-toggle-icon span:nth-child(3) {
    bottom: 0;
}

.mobile-menu-toggle.active .mobile-menu-toggle-icon span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-toggle.active .mobile-menu-toggle-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .mobile-menu-toggle-icon span:nth-child(3) {
    bottom: 50%;
    transform: translateY(50%) rotate(-45deg);
}

/* Dropdown del menú móvil */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    z-index: 1001;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-hover);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    display: block;
    max-height: 500px;
}

.mobile-menu a {
    display: block;
    padding: 15px 20px;
    margin: 0;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    transition: all 0.3s ease;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    color: var(--white);
    transform: none;
}

.mobile-menu a:hover.admin,
.mobile-menu a.active.admin {
    background: var(--admin-color);
}

.mobile-menu a:hover.profesor,
.mobile-menu a.active.profesor {
    background: var(--profesor-color);
}

.mobile-menu a:hover.padre,
.mobile-menu a.active.padre {
    background: var(--padre-color);
}

/* Contenido principal */
.content {
    max-width: 2000px;
    margin: 20px auto;
    padding: 20px;
}
@media (min-width: 1024px) {
    .content {
        padding: 20px 32px;
    }
}

/* Hint scroll horizontal tabla */
.scroll-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #e53935;
    border-radius: 20px;
    padding: 5px 14px;
    width: fit-content;
    margin: 0 auto 8px;
}
@media (max-width: 768px) {
    .scroll-hint { display: flex; }
}

/* Welcome section */
.welcome {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    margin-bottom: 30px;
}

.welcome h2 {
    color: var(--text-dark);
    margin: 0 0 10px 0;
    font-size: 28px;
}

.welcome p {
    color: var(--text-light);
    margin: 0 0 10px 0;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn.admin {
    background: var(--admin-color);
}

.btn.admin:hover {
    background: var(--admin-dark);
    box-shadow: 0 10px 25px rgba(220, 53, 69, 0.3);
}

.btn.profesor {
    background: var(--profesor-color);
}

.btn.profesor:hover {
    background: var(--profesor-dark);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

.btn.padre {
    background: var(--padre-color);
}

.btn.padre:hover {
    background: var(--padre-dark);
    box-shadow: 0 10px 25px rgba(0, 123, 255, 0.3);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-hover);
    transition: transform 0.3s ease;
    overflow: clip;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: var(--text-dark);
    margin: 0 0 15px 0;
    font-size: 20px;
}

.card p {
    color: var(--text-light);
    margin: 0 0 15px 0;
}

.card .number {
    font-size: 36px;
    font-weight: bold;
    margin: 10px 0;
}

.card .number.admin {
    color: var(--admin-color);
}

.card .number.profesor {
    color: var(--profesor-color);
}

.card .number.padre {
    color: var(--padre-color);
}

/* Responsive */
@media (max-width: 1055px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .user-info {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .user-dropdown-toggle {
        width: 35px;
        height: 35px;
    }
    
    .user-dropdown-toggle::before {
        font-size: 18px;
    }
    
    .nav-content {
        justify-content: space-between;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        gap: 10px;
        width: auto;
    }
    
    .mobile-menu-toggle-text {
        display: block;
    }
    
    .nav a {
        margin: 0;
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .content {
        padding: 10px;
    }
    
    .welcome {
        padding: 20px;
    }
    
    .welcome h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 15px;
    }
    
    .header-logo img {
        height: 40px;
    }
    
    .header-info h1 {
        font-size: 20px;
    }
    
    .header-info p {
        font-size: 12px;
    }
    
    .nav {
        padding: 10px 15px;
    }
    
    .mobile-menu-toggle {
        padding: 6px;
        gap: 8px;
    }
    
    .mobile-menu-toggle-text {
        font-size: 12px;
    }
    
    .mobile-menu-toggle-icon {
        width: 25px;
        height: 20px;
    }
    
    .mobile-menu-toggle-icon span {
        height: 2px;
    }
    
    .mobile-menu a {
        padding: 12px 15px;
        font-size: 14px;
    }
}
