/* 
    Maitén Montenegro Dashboard Design System (v7 Mobile UX)
    Colors: #E91E63 (Magenta), #FCE4EC (Soft Pink), #FFFFFF (White)
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root {
    --primary-color: #E91E63;
    --primary-dark: #C2185B;
    --secondary-color: #F8BBD0;
    --bg-soft: #FCE4EC;
    --text-dark: #2D3436;
    --text-muted: #636E72;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --border-radius: 16px;
    --shadow: 0 8px 30px rgba(233, 30, 99, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    background: radial-gradient(circle at top left, #FFF5F7, #FCE4EC);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- Login Section --- */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-card img {
    max-width: 180px;
    margin-bottom: 20px;
}

.login-card h2 {
    font-size: 1.2rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #F1F2F6;
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* --- Layout Main --- */
.dashboard-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--glass-bg);
    border-right: 1px solid rgba(233, 30, 99, 0.1);
    padding: 30px 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    margin-bottom: 10px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
}

.nav-link i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.nav-link:hover, .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.main-content {
    padding: 40px;
    padding-bottom: 100px;
}

/* --- Mobile Header Bar --- */
#mobile-header {
    display: none;
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    z-index: 900;
    border-bottom: 1px solid rgba(233, 30, 99, 0.1);
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.mobile-clock-container {
    text-align: right;
}

#mobile-time {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    display: block;
}

#mobile-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* --- Components --- */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(233, 30, 99, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
    padding: 24px;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* --- Tables & Attendance --- */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--bg-soft);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--bg-soft);
}

.student-row:hover {
    background: var(--bg-soft);
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    min-width: 100px;
    transition: var(--transition);
}

.status-present { background: #E8F5E9; color: #2E7D32; }
.status-absent { background: #FFEBEE; color: #C62828; }

/* --- Evaluation Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-content h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.modal-textarea {
    width: 100%;
    height: 200px;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 20px;
    resize: none;
}

.modal-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-actions {
    display: flex;
    gap: 10px;
}

/* --- Mobile Nav --- */
#mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    padding: 10px 0;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(233, 30, 99, 0.1);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
}

.mobile-nav-item i {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

/* --- Responsive Layout --- */
@media (max-width: 991px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .sidebar {
        display: none;
    }
    #mobile-header {
        display: flex;
    }
    #mobile-bottom-nav {
        display: flex;
    }
    .main-content {
        padding: 20px;
        padding-bottom: 90px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    th, td {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    .status-badge {
        padding: 6px 12px;
        font-size: 0.75rem;
        min-width: 80px;
    }
}
