/* Reset and Base Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Login Page Styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #02052d 0%, #2c3e94 50%, #3f2a63 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.login-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    min-height: 500px;
}

/* Left Side - Login Form */
.login-left {
    flex: 1;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.login-logo i {
    font-size: 36px;
    color: #3498db;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    color: #fff;
}

.logo-text span {
    font-size: 14px;
    color: #7f8c8d;
}

.login-form h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-size: 24px;
    font-weight: 600;
}

.login-subtitle {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    font-size: 14px;
}

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

.login-form .form-group label {
    display: block;
    color: #495057;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
    box-sizing: border-box;
}

.input-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 16px;
    pointer-events: none;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.input-wrapper input:focus + i {
    color: #3498db;
}

.btn-login {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.login-links {
    text-align: center;
    margin-top: 20px;
}

.forgot-password {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #2980b9;
}

/* Right Side - Promotional Content */
.login-right {
    flex: 1;
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 40px;
    position: relative;
    overflow: hidden;
}

.promo-content {
    text-align: center;
    color: white;
    z-index: 2;
    position: relative;
}

.promo-content h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.promo-content p {
    font-size: 16px;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 300px;
}

.promo-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.floating-icon {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    backdrop-filter: blur(10px);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-icon:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Error Message Override for Login */
.login-form .error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
    text-align: center;
}

/* Login Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        flex-direction: column;
        min-height: auto;
        border-radius: 12px;
    }
    
    .login-left {
        padding: 30px 20px;
    }
    
    .login-right {
        padding: 30px 20px;
        min-height: 150px;
    }
    
    .promo-content h2 {
        font-size: 20px;
    }
    
    .promo-content p {
        font-size: 14px;
    }
    
    .login-logo i {
        font-size: 28px;
    }
    
    .logo-text h1 {
        font-size: 20px;
    }
    
    .login-form h2 {
        font-size: 20px;
    }
    
    .floating-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    //width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.3s ease;
    z-index: 1000;
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.sidebar-header .logo i {
    font-size: 32px;
    color: #3498db;
    min-width: 32px;
}

.logo-text {
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .logo-text {
    opacity: 0;
    pointer-events: none;
}

.logo-text h1 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
}

.logo-text span {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    padding: 0 20px 10px;
    font-size: 11px;
    text-transform: uppercase;
    color: #95a5a6;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: #3498db;
}

.nav-item.active {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
    color: #3498db;
}

.nav-item i {
    width: 20px;
    text-align: center;
    min-width: 20px;
}

.nav-item span {
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar.collapsed .nav-item span,
.sidebar.collapsed .nav-section-title {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 20px;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
}

.sidebar-user {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    position: relative;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.3s ease;
    position: relative;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    min-width: 40px;
}

.user-details {
    flex: 1;
    transition: opacity 0.3s ease;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    pointer-events: none;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.user-email {
    font-size: 12px;
    opacity: 0.7;
    white-space: nowrap;
}

.user-dropdown-arrow {
    transition: transform 0.3s ease, opacity 0.3s ease;
    font-size: 12px;
}

.sidebar.collapsed .user-dropdown-arrow {
    opacity: 0;
}

.user-profile.active .user-dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    bottom: 100%;
    left: 20px;
    right: 20px;
    background: #34495e;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

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

.sidebar.collapsed .user-dropdown {
    left: 80px;
    bottom: 20px;
    width: 200px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #ecf0f1;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.3s ease;
    border-radius: 4px;
    margin: 4px;
}

.user-dropdown-item:hover {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.user-dropdown-item i {
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 16px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    background: #f8f9fa;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
    margin-left: 70px;
}

.main-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.header-content p {
    color: #6c757d;
    font-size: 14px;
}

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

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #6c757d;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    width: 250px;
    font-size: 14px;
}

.notification-icon {
    position: relative;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Content */
.dashboard-content {
    padding: 30px;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.stat-label {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin: 5px 0;
}

.stat-description {
    font-size: 13px;
    color: #6c757d;
}

.welcome-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.welcome-header i {
    font-size: 28px;
    color: #3498db;
}

.welcome-header h2 {
    color: #2c3e50;
    font-size: 24px;
}

.welcome-section > p {
    color: #6c757d;
    margin-bottom: 25px;
    font-size: 16px;
}

.features-box {
    background: #fff3cd;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #ffc107;
}

.features-box h3 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 16px;
}

.features-box ul {
    list-style: none;
    color: #856404;
}

.features-box li {
    margin-bottom: 8px;
    font-size: 14px;
}

/* Form Styles */
.form-content {
    padding: 30px;
}

.form-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-header {
    background: #f8f9fa;
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header i {
    font-size: 24px;
    color: #3498db;
}

.section-header h2 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.section-header p {
    color: #6c757d;
    font-size: 14px;
}

.student-form {
    padding: 30px;
}

.form-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: #3498db;
}

.card-header h3 {
    color: #2c3e50;
    font-size: 16px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input::placeholder {
    color: #adb5bd;
}

.guardian-section {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.guardian-section:first-child {
    border-top: none;
}

.guardian-type {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.primary {
    background: #3498db;
    color: white;
}

.badge.secondary {
    background: #95a5a6;
    color: white;
}

.guardian-type h4 {
    color: #2c3e50;
    font-size: 16px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 25px 30px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* Button Styles */
.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Students List */
.students-content {
    padding: 30px;
}

.filters-section {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 20px;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    font-size: 14px;
}

.filter-item select,
.filter-item input {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    min-width: 150px;
}

.students-list {
    display: grid;
    gap: 15px;
}

.student-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

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

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

.student-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.student-details h3 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.student-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #6c757d;
}

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

.btn-icon {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #3498db;
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128c7e;
}

.btn-delete {
    background: #e74c3c;
    color: white;
}

.btn-delete:hover {
    background: #c0392b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.empty-state i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 25px;
}

/* Attendance Styles */
.attendance-content {
    padding: 30px;
}

.attendance-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.date-input {
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
}

.attendance-list {
    display: grid;
    gap: 15px;
}

.attendance-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: between;
}

.attendance-student {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.attendance-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-present {
    background: #d4edda;
    color: #155724;
}

.status-absent {
    background: #f8d7da;
    color: #721c24;
}

.status-late {
    background: #fff3cd;
    color: #856404;
}

.attendance-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-present {
    background: #28a745;
    color: white;
}

.btn-absent {
    background: #dc3545;
    color: white;
}

.btn-late {
    background: #ffc107;
    color: #212529;
}

/* Messages Styles */
.messages-content {
    padding: 30px;
}

.message-filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 20px;
    align-items: end;
}

.messages-list {
    display: grid;
    gap: 15px;
}

.message-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3498db;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.message-info h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.message-meta {
    font-size: 13px;
    color: #6c757d;
}

.message-content {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 1.6;
}

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

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
    padding: 0;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Error Message */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filters-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-item {
        width: 100%;
    }
    
    .message-filters {
        flex-direction: column;
        gap: 15px;
    }
    
    .attendance-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Sidebar Mobile Behavior */
    .sidebar {
        position: fixed;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        width: 250px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
        width: 250px;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar.collapsed + .main-content {
        margin-left: 0;
    }
    
    /* Mobile Header */
    .main-header {
        padding: 15px 20px;
        position: relative;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-content h1 {
        font-size: 24px;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box input {
        width: 100%;
    }
    
    /* Mobile Button */
    .mobile-menu-btn {
        display: block;
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        background: #3498db;
        color: white;
        border: none;
        padding: 12px;
        border-radius: 8px;
        font-size: 18px;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Stats Grid Mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
    
    /* Form Mobile */
    .form-content {
        padding: 20px 15px;
    }
    
    .student-form {
        padding: 20px 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    /* Students List Mobile */
    .students-content {
        padding: 20px 15px;
    }
    
    .student-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .student-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Messages Mobile */
    .messages-content {
        padding: 20px 15px;
    }
    
    .message-card {
        padding: 15px;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .message-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .message-actions button {
        width: 100%;
    }
    
    /* Attendance Mobile */
    .attendance-content {
        padding: 20px 15px;
    }
    
    .attendance-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .attendance-controls {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .attendance-buttons {
        display: flex;
        gap: 8px;
        width: 100%;
    }
    
    .attendance-btn {
        flex: 1;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
    }
    
    .modal-content.large {
        max-width: 95%;
    }
    
    /* Welcome Section Mobile */
    .welcome-section {
        padding: 20px;
    }
    
    .features-box {
        padding: 15px;
    }
    
    .features-box li {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    /* Extra Small Mobile */
    .login-container {
        padding: 5px;
    }
    
    .login-left {
        padding: 20px 15px;
    }
    
    .main-header {
        padding: 10px 15px;
    }
    
    .header-content h1 {
        font-size: 20px;
    }
    
    .stat-card {
        padding: 15px;
        text-align: center;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0 auto 15px;
    }
    
    .stat-number {
        font-size: 20px;
    }
    
    .student-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }
    
    .btn-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

@media (max-width: 768px) {
    .mobile-overlay.show {
        display: block;
    }
}

@media (max-width: 480px) {
    .dashboard-content,
    .form-content,
    .students-content,
    .attendance-content,
    .messages-content {
        padding: 15px;
    }
    
    .main-header {
        padding: 15px 20px;
    }
    
    .student-card {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .student-actions {
        align-self: flex-end;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
        padding: 10px;
        margin-top: 90px;
    }
}


/* Tabela */
<style>
.table-container {
  width: 100%;
  overflow-x: auto; /* Permite scroll horizontal em telas menores */
}

table {
  width: 100%;
  border-collapse: collapse; /* Mescla as bordas da tabela */
}

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

th {
  background-color: #f2f2f2;
}

/* Media queries para diferentes tamanhos de tela */
@media screen and (max-width: 600px) {
  th, td {
    display: block; /* Exibe as células como blocos */
    width: 100%; /* Ocupa toda a largura */
    box-sizing: border-box; /* Inclui padding e borda na largura */
  }
  
  th {
    text-align: center; /* Centraliza o cabeçalho */
  }
  
  tr {
    margin-bottom: 10px; /* Adiciona espaço entre as linhas */
    display: block;
    border-bottom: 2px solid #ddd; /* Adiciona uma borda entre as linhas */
  }

  /* Oculta o cabeçalho em telas menores */
  thead {
    display: none;
  }

  /* Estiliza as células como "cabeçalhos" em telas menores */
  td:before {
    content: attr(data-label);
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
  }
}

/* Botão WhatsApp isolado */
/* From Uiverse.io by Gaurang7717 */ 
.Btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition-duration: 0.3s;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.199);
  background-color: #00d757;
}

.sign {
  width: 100%;
  transition-duration: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sign svg {
  width: 25px;
}

.sign svg path {
  fill: white;
}
.text {
  position: absolute;
  right: 0%;
  width: 0%;
  opacity: 0;
  color: white;
  font-size: 1.2em;
  font-weight: 600;
  transition-duration: 0.3s;
}

.Btn:hover {
  width: 150px;
  border-radius: 40px;
  transition-duration: 0.3s;
}

.Btn:hover .sign {
  width: 30%;
  transition-duration: 0.3s;
  padding-left: 10px;
}

.Btn:hover .text {
  opacity: 1;
  width: 70%;
  transition-duration: 0.3s;
  padding-right: 10px;
}
.Btn:active {
  transform: translate(2px, 2px);
}

/* ======= Estilo para tabela myTable ======= */
#myTable {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  margin-top: 20px;
  font-size: 14px;
}

#myTable thead {
  background: #f8f9fc;
  color: #4e73df;
  text-transform: uppercase;
  font-weight: bold;
  font-size: 13px;
}

#myTable th,
#myTable td {
  padding: 14px 16px;
  text-align: left;
}

#myTable tbody tr {
  border-bottom: 1px solid #f1f1f1;
  transition: background 0.2s ease;
}

#myTable tbody tr:hover {
  background: #f9f9f9;
}

/* Coluna Ações */
#myTable td.actions {
  text-align: center;
}

/* Ícones de ação */
#myTable .btn-icon {
  border: none;
  background: none;
  color: #4e73df;
  font-size: 16px;
  margin: 0 6px;
  cursor: pointer;
  transition: color 0.2s ease;
}

#myTable .btn-icon:hover {
  color: #2e59d9;
}

#myTable .btn-icon.edit {
  color: #f6c23e;
}

#myTable .btn-icon.edit:hover {
  color: #dda20a;
}

/* Avatar do aluno */
#myTable .student-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

#myTable .student-info .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4e73df;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 13px;
}

/* Responsividade */
@media (max-width: 768px) {
  #myTable thead {
    display: none; /* Oculta cabeçalho */
  }
  #myTable, #myTable tbody, #myTable tr, #myTable td {
    display: block;
    width: 100%;
  }
  #myTable tr {
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f1f1;
    padding-bottom: 10px;
  }
  #myTable td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }
  #myTable td::before {
    content: attr(data-label);
    position: absolute;
    left: 16px;
    width: 45%;
    font-weight: bold;
    text-align: left;
    color: #4e73df;
  }
}
