﻿.btn-whatsapp-small {
    background: #25d366;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-left: 4px;
    display: inline-flex;
    align-items: center;
    transition: background 0.2s;
    text-decoration: none;
}

.btn-whatsapp-small:hover {
    background: #128c7e;
    color: #fff;
}

.student-classes-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0;
    margin-top: 0;
    width: 100%;
}

.classes-summary-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
    width: 100%;
}

.student-name-badge-left {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.classes-summary-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 6px;
}

.student-name-badge {
    display: inline-block;
    background: #1976d2;
    color: #fff;
    padding: 6px 16px;
    border-radius: 18px;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
    letter-spacing: 0.2px;
}

.summary-label {
    font-size: 13px;
    color: var(--text-secondary, #888);
    font-weight: 400;
    margin-left: 2px;
    margin-bottom: 2px;
}

/* Form Actions Split Layout for Payment Form */
.form-actions-split {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel-half {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel-half:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
}

.btn-save-half {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-save-half:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.3);
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-purple) 100%);
}

/* Modern Light Mode Palette */
:root {
    /* Core Colors */
    --primary-blue: #4285f4;
    --primary-purple: #6c5ce7;
    --dark-blue: #2563eb;
    --light-blue: #3b82f6;

    /* Light Background System */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-light: #f1f5f9;
    --bg-card: #ffffff;

    /* Neutral Colors */
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e2e8f0;
    --gray-dark: #64748b;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;

    /* Border Colors */
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --border-dark: #94a3b8;

    /* Gradients */
    --primary-gradient: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    --light-gradient: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-form {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid var(--border-light);
}

.logo {
    margin-bottom: 30px;
}

.logo i {
    font-size: 48px;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.logo h1 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 32px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Form Styles */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-group i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px 12px;
    margin-bottom: 0;
    align-items: center;
}

.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    min-height: 80px;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-purple) 100%);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-light);
    border: 2px solid var(--bg-card);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary-blue);
}

.btn-logout {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.btn-logout:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

/* German Gold Button */
.btn-gold {
    background: var(--gold-gradient);
    color: var(--german-black);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-gold:hover {
    background: linear-gradient(135deg, var(--gold-soft) 0%, var(--german-gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 206, 0, 0.3);
}

/* Filter Select Styles */
.filter-select {
    background: var(--bg-card);
    color: var(--text-light);
    border: 2px solid var(--bg-light);
    padding: 15px 50px 15px 35px;
    /* top right bottom left - mÃ¡s padding izquierdo para compensar la flecha */
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    width: 100%;
    max-width: 400px;
    min-width: 300px;
    margin: 0 auto;
    display: block;
    text-align: center;
}

.filter-select:hover {
    border-color: var(--primary-blue);
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
}

.filter-select:focus {
    border-color: var(--primary-blue);
    background: var(--bg-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.filter-select option {
    background: var(--bg-card);
    color: var(--text-light);
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    text-align: left;
    /* Las opciones se ven mejor alineadas a la izquierda */
}

.filter-select option:hover {
    background: var(--bg-light);
    color: var(--primary-blue);
}

.filter-select option:checked {
    background: var(--primary-blue);
    color: white;
}

/* Main Filter Container */
.main-filter-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
    /* Adjust for navbar height */
    padding: 40px 20px;
    background: var(--dark-gradient);
    transition: all 0.3s ease;
}

/* Compact filter container when student is selected */
.main-filter-container.compact {
    min-height: auto;
    padding: 20px;
    background: var(--bg-medium);
    border-bottom: 2px solid var(--primary-blue);
}

.filter-wrapper {
    text-align: center;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--bg-light);
    transition: all 0.3s ease;
}

/* Compact filter wrapper when student is selected */
.filter-wrapper.compact {
    padding: 15px 20px;
    border-radius: 10px;
    background: var(--bg-card);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.filter-wrapper.compact .filter-icon {
    font-size: 24px;
    margin-bottom: 0;
    margin-right: 0;
}

.filter-wrapper.compact .filter-select {
    flex: 1;
    margin: 0;
    max-width: none;
    min-width: 200px;
}

.filter-wrapper.compact .filter-actions {
    margin-top: 0 !important;
    flex-shrink: 0;
}

.filter-icon {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.filter-icon i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filter-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 30px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

/* Student Details Container */
.student-details-container {
    padding: 30px;
    background: var(--bg-dark);
    display: none;
}

.student-profile {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.student-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-light);
}

.student-avatar-large {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: bold;
}

.student-basic-info h2 {
    color: var(--text-light);
    font-size: 32px;
    margin-bottom: 5px;
}

.student-basic-info .student-level-badge {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

.student-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.info-section {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
}

.info-section h3 {
    color: var(--primary-blue);
    font-size: 18px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: var(--text-medium);
}

.info-item i {
    color: var(--primary-blue);
    width: 20px;
}

.info-item strong {
    color: var(--text-light);
}

/* Payments Section */
.payments-section {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.payment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--bg-medium);
}

.payment-item:last-child {
    border-bottom: none;
}

.payment-info {
    flex: 1;
}

.payment-amount {
    font-weight: 600;
    color: var(--primary-blue);
    margin-right: 10px;
}

.payment-actions {
    display: flex;
    gap: 5px;
}

.btn-edit-small,
.btn-delete-small {
    background: none;
    border: none;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit-small {
    background: #fff3cd;
    color: #856404;
}

.btn-edit-small:hover {
    background: #ffeaa7;
    transform: scale(1.1);
}

.btn-delete-small {
    background: #f8d7da;
    color: #721c24;
}

.btn-delete-small:hover {
    background: #f5c6cb;
    transform: scale(1.1);
}

/* Classes Summary Section */
.classes-summary {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 20px;
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 22px;
    max-width: 540px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.stat-item {
    text-align: center;
    padding: 10px 4px;
    border-radius: 12px;
    min-width: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    margin: 0;
    overflow: hidden;
    word-break: break-word;
}

.summary-stats .stat-total {
    background: rgba(25, 118, 210, 0.25) !important;
    color: #1976d2 !important;
}

.summary-stats .stat-no-iniciada {
    background: rgba(148, 163, 184, 0.25) !important;
    color: #64748b !important;
}

.summary-stats .stat-tomada {
    background: rgba(34, 197, 94, 0.25) !important;
    color: #22c55e !important;
}

.summary-stats .stat-reprogramada {
    background: rgba(245, 158, 11, 0.25) !important;
    color: #d97706 !important;
}

.summary-stats .stat-recuperada {
    background: rgba(139, 92, 246, 0.25) !important;
    color: #7c3aed !important;
}

.summary-stats .stat-ausente {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #dc2626 !important;
}

.stat-number {
    font-size: 20px;
    /* Reducido de 24px */
    font-weight: bold;
    color: var(--primary-blue);
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: var(--text-medium);
    text-transform: uppercase;
    margin-top: 3px;
    display: block;
    word-break: break-word;
    white-space: normal;
}

/* Selected Student Display */
.selected-student {
    background: var(--bg-light);
    border: 2px solid var(--primary-blue);

    .stat-item {
        text-align: center;
        padding: 8px 4px;
        border-radius: 10px;
        min-width: 90px;
        flex: 0 0 auto;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
        margin: 0;
    }

    font-size: 24px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-student .student-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.selected-student .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-medium);
}

.selected-student .info-item i {
    color: var(--primary-blue);
    width: 20px;
}

.selected-student .student-level {
    display: inline-block;
    background: var(--primary-gradient);
    color: white;
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
}

/* Error Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid #f5c6cb;
}

/* Main App Layout */
#mainApp {
    min-height: 100vh;
    background: var(--bg-dark);
}

/* Navigation */
.navbar {
    background: var(--bg-card);
    padding: 12px 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-light);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: bold;
    color: var(--text-primary);
}

.nav-brand i {
    font-size: 26px;
    color: var(--primary-blue);
}

.nav-menu {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.nav-btn:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.nav-btn.active {
    background: var(--primary-gradient);
    color: var(--white);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Main Content */
.main-content {
    padding: 20px 25px;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 600px !important;
    height: auto !important;
    width: 100%;
    display: block !important;
    visibility: visible !important;
}

/* Specific styles for classes section */
#classes {
    min-height: 600px !important;
    height: auto !important;
    display: block !important;
    visibility: visible !important;
}

/* Remove padding for students section only */
#students {
    margin: -20px -25px;
    /* Negative margin to counteract main-content padding */
}

.section {
    display: none;
    min-height: 400px;
    width: 100%;
    padding: 0;
}

.section.active {
    display: block;
    min-height: 400px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    .summary-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 24px 18px;
        max-width: 700px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
}

.section-header h2 i {
    color: var(--primary-blue);
}

/* Students List */
.students-list {
    display: grid;
    gap: 20px;
}

.student-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.student-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--border-medium);
}

.student-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.student-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.student-details h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.student-details p {
    color: var(--text-secondary);
    font-size: 14px;
}

.student-level {
    background: rgba(66, 133, 244, 0.1);
    color: var(--primary-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.student-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #fff3cd;
    color: #856404;
}

.btn-edit:hover {
    background: #ffeaa7;
}

.btn-delete {
    background: #f8d7da;
    color: #721c24;
}

.btn-delete:hover {
    background: #f5c6cb;
}

/* Level Slider Styles */
.level-slider-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.level-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-left: 10px;
}

.slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: #e0e7ff;
    outline: none;
    transition: all 0.3s ease;
    border: 1px solid var(--border-medium);
    position: relative;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    border-color: var(--dark-blue);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    border: 3px solid var(--primary-blue);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Progress bar effect */
.level-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-left: 10px;
    position: relative;
}

.level-slider::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 0;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--primary-purple) 100%);
    border-radius: 5px;
    transition: width 0.3s ease;
    z-index: 1;
    width: var(--progress-width, 0%);
    pointer-events: none;
}

.slider {
    position: relative;
    z-index: 2;
}

.level-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 5px;
}

.current-level {
    font-weight: 600;
    color: var(--primary-blue);
    font-size: 14px;
    text-align: center;
    margin-top: 5px;
}

/* Enhanced Button Styles */
.btn-add-small {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.btn-add-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-purple) 100%);
}

.btn-add-small i {
    font-size: 12px;
}

/* Corner positioned buttons */
.btn-edit-corner {
    position: absolute;
    top: 12px;
    right: 15px;
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.2);
}

.btn-edit-corner:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.3);
}

.btn-delete-corner {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.2);
}

.btn-delete-corner:hover {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.btn-add-corner {
    position: absolute;
    top: 12px;
    right: 15px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(66, 133, 244, 0.2);
}

.btn-add-corner:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.3);
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-purple) 100%);
}

/* Form Actions Split Layout */
.form-actions-split {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel-half {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-cancel-half:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
}

.btn-save-half {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-save-half:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.3);
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-purple) 100%);
}

/* Inline Add Student Form */
.add-student-form-inline {
    background: var(--bg-card);
    border: 2px solid var(--primary-blue);
    border-radius: 12px;
    margin-top: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(66, 133, 244, 0.1);
    animation: slideDown 0.3s ease-out;
    transition: all 0.3s ease;
}

.add-student-form-inline.hiding {
    animation: slideUp 0.3s ease-out forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }

    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 500px;
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

.form-header h3 {
    color: var(--primary-blue);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-close:hover {
    color: var(--text-primary);
    background: var(--bg-light);
}

.form-grid-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.form-actions-inline {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn-cancel-inline {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-cancel-inline:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(108, 117, 125, 0.3);
}

.btn-save-inline {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.btn-save-inline:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(66, 133, 244, 0.3);
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-purple) 100%);
}

.btn-generate-password {
    background: var(--secondary-blue);
    color: white;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
}

.btn-generate-password:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
}

/* Responsive adjustments for inline form */
@media (max-width: 768px) {
    .form-grid-inline {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .form-actions-inline {
        flex-direction: column;
    }

    .btn-cancel-inline,
    .btn-save-inline {
        width: 100%;
        justify-content: center;
    }
}

/* Personal Info Header */
.personal-info-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    padding-right: 80px;
    /* Space for corner button */
    border-bottom: 2px solid var(--border-light);
}

.personal-info-header h3 {
    color: var(--text-primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-actions {
    display: flex;
    gap: 10px;
}

.student-actions .btn-edit,
.student-actions .btn-delete {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    min-width: auto;
}

/* Classes Grid */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Weekly Calendar Styles */
.weekly-calendar {
    background: white !important;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    border: 2px solid #667eea;
    width: 100% !important;
    overflow: visible !important;
    min-height: 400px !important;
    height: auto !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10 !important;
}

.calendar-summary {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.week-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 12px;
    padding: 15px;
    min-height: 300px !important;
    height: auto !important;
    background: #f8f9fa;
    visibility: visible !important;
    opacity: 1 !important;
}

.day-column {
    background: var(--bg-card) !important;
    border-radius: 12px;
    padding: 15px;
    min-height: 250px !important;
    height: auto !important;
    border: 2px solid var(--primary-blue);
    transition: all 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.day-column:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.day-header {
    margin: 0 0 15px 0;
    color: var(--primary-blue);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--bg-light);
    padding-bottom: 10px;
}

.day-header div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.day-classes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    /* Take remaining space */
    min-height: 150px;
    /* Force minimum height */
}

/* Mini Class Cards for Calendar */
.mini-class-card {
    background: #f8f9fa;
    border: 2px solid #667eea;
    /* More visible border */
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    margin-bottom: 8px;
}

.mini-class-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
    background: white;
}

.mini-class-student {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
    font-size: 12px;
}

.mini-class-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-blue);
    font-size: 11px;
    margin-bottom: 3px;
}

.mini-class-time i {
    font-size: 10px;
}

.mini-class-topic {
    color: #666;
    font-size: 10px;
    font-style: italic;
}

.mini-class-card {
    background: var(--bg-light);
    padding: 12px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--bg-medium);
}

.mini-class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.2);
    border-color: var(--primary-blue);
}

.mini-class-student {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 14px;
}

.mini-class-time {
    color: #667eea;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.mini-class-topic {
    color: #666;
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.8;
}

/* Student Classes View */
.student-classes-view {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.selected-student-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.student-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.student-details h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
}

.student-details p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.section-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.class-card {
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
}

.class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-color: var(--border-medium);
}

.class-header {
    padding: 20px;
    background: var(--primary-gradient);
    color: white;
}

.class-header h4 {
    margin-bottom: 5px;
}

.class-header p {
    opacity: 0.9;
    font-size: 14px;
}

.class-body {
    padding: 20px;
}

.class-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}


.class-date,
.class-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: var(--text-secondary);
}

.class-duration-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    margin-top: 2px;
    margin-right: 8px;
    letter-spacing: 0.5px;
}

.duration-badge-60 {
    background: #1976d2;
    color: #fff;
}

.duration-badge-90 {
    background: #ff9800;
    color: #fff;
}

.class-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-not-started {
    background: #f5f5f5;
    color: #757575;
}

.status-scheduled {
    background: #e3f2fd;
    color: #1976d2;
}

.status-completed {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-cancelled {
    background: #ffebee;
    color: #c62828;
}

.status-rescheduled {
    background: #fff3e0;
    color: #ef6c00;
}

.status-absent {
    background: #fce4ec;
    color: #ad1457;
}

.class-actions {
    margin-top: 15px;
}

.status-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-status {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.btn-status:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-complete {
    background: #e8f5e8;
    color: #2e7d32;
    border: 2px solid transparent;
}

.btn-complete.active {
    background: #4caf50;
    color: white;
    border: 2px solid #2e7d32;
}

.btn-cancel {
    background: #ffebee;
    color: #c62828;
    border: 2px solid transparent;
}

.btn-cancel.active {
    background: #f44336;
    color: white;
    border: 2px solid #c62828;
}

.btn-reschedule {
    background: #fff3e0;
    color: #ef6c00;
    border: 2px solid transparent;
}

.btn-reschedule.active {
    background: #ff9800;
    color: white;
    border: 2px solid #ef6c00;
}

.btn-absent {
    background: #fce4ec;
    color: #ad1457;
    border: 2px solid transparent;
}

.btn-absent.active {
    background: #e91e63;
    color: white;
    border: 2px solid #ad1457;
}

.btn-not-started {
    background: #f5f5f5;
    color: #757575;
    border: 2px solid transparent;
}

.btn-not-started.active {
    background: #9e9e9e;
    color: white;
    border: 2px solid #757575;
}

.btn-scheduled {
    background: #e3f2fd;
    color: #1976d2;
    border: 2px solid transparent;
}

.btn-scheduled.active {
    background: #2196f3;
    color: white;
    border: 2px solid #1976d2;
}

.btn-reset {
    background: #fff3e0;
    color: #f57c00;
    border: 2px solid transparent;
}

.btn-reset:hover {
    background: #ffb74d;
    color: white;
}

.btn-delete {
    background: #f5f5f5;
    color: #757575;
    border: 2px solid transparent;
}

.btn-delete:hover {
    background: #ffebee;
    color: #c62828;
}

/* Payments List */
.payments-list {
    display: grid;
    gap: 15px;
}

.payment-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.payment-details h4 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.payment-details p {
    color: var(--text-secondary);
    font-size: 14px;
}

.payment-amount {
    font-size: 24px;
    font-weight: bold;
    color: #059669;
}

.payment-method {
    background: var(--bg-light);
    color: var(--text-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: capitalize;
}

/* Inline Forms Styles */
.edit-student-form,
.add-payment-form {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.edit-student-form.show,
.add-payment-form.show {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.form-header h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-header h3 i {
    color: var(--primary-blue);
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-primary);
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s ease;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Payment Calculation Styles */
.payment-calculation {
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    margin-top: 16px;
}

.calculation-result {
    color: var(--text-primary);
}

.calculation-result strong {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.calculation-result p {
    margin: 8px 0;
    font-size: 14px;
}

#totalClassesCalculated {
    font-weight: 600;
    color: var(--primary-purple);
}

/* Schedule Method Styles */
.schedule-method-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.schedule-method-toggle input[type="radio"] {
    margin-right: 4px;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-blue);
}

.schedule-method-toggle label {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.2s;
    margin-right: 8px;
}

.schedule-method-toggle label:hover {
    background-color: var(--bg-light);
}

.schedule-section {
    transition: all 0.3s ease;
}

/* Date Input Group */
.date-input-group {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 16px;
    position: relative;
    padding-top: 8px;
    width: 100%;
}

.date-input-group input {
    flex: 2;
    position: relative;
    z-index: 1;
    min-height: 44px;
}

.btn-add-date {
    background: var(--primary-blue);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

/* FontAwesome fallback and fixes */
.fas,
.fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
    display: inline-block;
}

.btn-add-date i {
    font-size: 14px;
    line-height: 1;
    display: inline-block;
}

.btn-add-date .plus-icon {
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    display: inline-block;
}

.btn-add-date:hover {
    background: var(--dark-blue);
    transform: translateY(-1px);
}

/* Selected Dates */
.selected-dates {
    max-height: none;
    overflow: visible;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    background: var(--bg-secondary);
    margin-top: 8px;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.selected-dates:empty {
    display: none;
}

.date-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin: 0;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    white-space: nowrap;
    gap: 10px;
    min-width: fit-content;
}

.date-item-text {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    margin-right: 6px;
}

.btn-remove-date {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-remove-date:hover {
    background: #c82333;
    transform: scale(1.05);
}

.btn-remove-date i {
    font-size: 12px;
    line-height: 1;
}

/* Mobile Responsive for Inline Forms */
@media (max-width: 768px) {

    .edit-student-form,
    .add-payment-form {
        margin: 20px 0;
        padding: 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
    }
}

/* Modal Overlay and Change Password Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid var(--border-light);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 15px 25px 25px;
    border-top: 1px solid var(--border-light);
}

.btn-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.btn-close:hover {
    background: var(--error-light);
    color: var(--error-color);
}

.btn-cancel {
    background: var(--border-color);
    color: var(--text-primary);
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-cancel:hover {
    background: var(--text-secondary);
    color: white;
}

/* Reschedule Modal */
.reschedule-modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
}

.reschedule-modal.show {
    display: flex !important;
    visibility: visible;
    opacity: 1;
}

.reschedule-modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.reschedule-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.reschedule-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.reschedule-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.reschedule-close:hover {
    background: var(--bg-light);
    color: var(--text-primary);
}

.reschedule-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.reschedule-form label {
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

/* General input styling */
input[type="date"] {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-medium);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-primary);
}

input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.reschedule-form input[type="date"] {
    padding: 12px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.reschedule-form input[type="date"]:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.reschedule-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-reschedule-confirm {
    flex: 1;
    padding: 12px;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reschedule-confirm:hover {
    background: var(--dark-blue);
}

.btn-reschedule-cancel {
    flex: 1;
    padding: 12px;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reschedule-cancel:hover {
    background: var(--bg-secondary);
    border-color: var(--border-dark);
}

/* Student Details Layout Redesign */
.student-info-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.student-content-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 20px;
    width: 100%;
}

.classes-section {
    width: 100%;
    order: 1;
}

.payments-section {
    width: 100%;
    order: 2;
}

.student-personal-info {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    position: relative;
}

.student-classes-summary {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    position: relative;
}

.classes-summary-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 120px;
    /* Space for corner button */
    position: relative;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    /* Consistente con el anterior */
    gap: 10px;
    /* Reducido de 15px a 10px */
    margin-bottom: 20px;
    max-width: 400px;
    /* Limitar el ancho total */
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 8px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-blue);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Classes Grid */
.classes-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
}

.classes-section {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
}

.classes-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.class-card {
    background: var(--bg-card);
    border-radius: 8px;
    border: 2px solid var(--border-light);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 120px;
    min-height: 80px;
}

.class-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.class-card.no-iniciada {
    border-color: #94a3b8;
}

.class-card.tomada {
    border-color: #22c55e;
}

.class-card.reprogramada {
    border-color: #f59e0b;
}

.class-card.recuperada {
    border-color: #8b5cf6;
}

.class-card.ausente {
    border-color: #ef4444;
}

.class-card-header {
    padding: 8px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: white;
}

.class-card.no-iniciada .class-card-header {
    background: #94a3b8;
    color: white;
}

.class-card.tomada .class-card-header {
    background: #22c55e;
    color: white;
}

.class-card.reprogramada .class-card-header {
    background: #f59e0b;
    color: white;
}

.class-card.recuperada .class-card-header {
    background: #8b5cf6;
    color: white;
}

.class-card.ausente .class-card-header {
    background: #ef4444;
    color: white;
}

/* Estilos para estados en inglés */
.class-card.scheduled .class-card-header {
    background: #94a3b8;
    color: white;
}

.class-card.completed .class-card-header {
    background: #22c55e;
    color: white;
}

.class-card.cancelled .class-card-header {
    background: #ef4444;
    color: white;
}

.class-card.rescheduled .class-card-header {
    background: #f59e0b;
    color: white;
}

.class-card.absent .class-card-header {
    background: #ef4444;
    color: white;
}

.class-card-body {
    padding: 8px;
    text-align: center;
}

.class-status {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
}

.class-card.no-iniciada .class-status {
    color: #64748b;
}

.class-card.tomada .class-status {
    color: #16a34a;
}

.class-card.reprogramada .class-status {
    color: #d97706;
}

.class-card.recuperada .class-status {
    color: #7c3aed;
}

.class-card.ausente .class-status {
    color: #dc2626;
}

.current-date {
    font-size: 10px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.class-card.reprogramada .current-date {
    color: #d97706;
    font-weight: 600;
}

.class-amount {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.class-card-footer {
    padding: 0 15px 15px;
}

.status-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-medium);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-select:hover {
    background: var(--bg-light);
    border-color: var(--primary-blue);
}

.status-select:focus {
    outline: none;
    background: var(--bg-card);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.rescheduled-date {
    font-size: 10px;
    color: var(--text-muted);
    margin: 5px 0;
    padding: 3px 6px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
    border-left: 2px solid #f59e0b;
}

.btn-change-status {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-medium);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-change-status:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Payments Section Redesign */
.payments-section {
    grid-column: 1 / -1;
    margin-top: 20px;
    position: relative;
}

.payments-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    position: relative;
}

.payments-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.latest-payment {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin-bottom: 15px;
}

.payment-history-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
}

.payment-history-summary {
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
}

.payment-history-content {
    padding: 20px;
    border-top: 1px solid var(--border-light);
}

/* Responsive Design */
@media (max-width: 768px) {
    .student-info-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .student-content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .classes-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }

    .summary-stats {
        grid-template-columns: repeat(4, 1fr);
        /* Mostrar las 4 cards en lÃ­nea en mÃ³viles tambiÃ©n */
        gap: 8px;
        /* Gap mÃ¡s pequeÃ±o en mÃ³viles */
    }

    .reschedule-modal-content {
        margin: 20px;
        width: calc(100% - 40px);
        max-width: none;
    }
}

/* Loading Spinner */
.spinner {
    border: 4px solid #f3f3f3;
    border-radius: 50%;
    border-top: 4px solid var(--primary-blue);
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}