/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.header h1 i {
    color: #667eea;
    margin-right: 15px;
}

.header p {
    color: #718096;
    font-size: 1.1rem;
    font-weight: 400;
}

/* Dashboard Styles */
.dashboard {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
}

.dashboard-header h2 {
    color: #2d3748;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dashboard-header p {
    color: #718096;
    font-size: 1.1rem;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.9;
}

.action-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.action-card p {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Statistics Section */
.stats-section h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.stat-content h4 {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-number {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 700;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    margin: 20px auto;
    padding: 0;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-header h2 i {
    margin-right: 10px;
}

.close {
    color: white;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
    padding: 5px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.teacher-form,
.student-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: #f7fafc;
    min-height: 50px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input[type="number"] {
    -moz-appearance: textfield;
}

.form-group input[type="number"]::-webkit-outer-spin-button,
.form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 50px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

/* Success Modal */
.success-modal {
    text-align: center;
    padding: 40px 30px;
}

.success-icon {
    font-size: 4rem;
    color: #48bb78;
    margin-bottom: 20px;
}

.success-modal h2 {
    color: #2d3748;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.success-modal p {
    color: #718096;
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .header p {
        font-size: 1rem;
    }
    
    .dashboard {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .dashboard-header h2 {
        font-size: 1.6rem;
    }
    
    .dashboard-header p {
        font-size: 1rem;
    }
    
    /* Mobile: 2 cards per row */
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .action-card {
        padding: 20px 15px;
        min-height: 140px;
    }
    
    .action-icon {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .action-card h3 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    
    .action-card p {
        font-size: 0.85rem;
        line-height: 1.4;
    }
    
    /* Mobile: 2 stats per row */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px 15px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        margin-right: 12px;
    }
    
    .stat-content h4 {
        font-size: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        margin: 10px auto;
        border-radius: 15px;
        max-height: calc(100vh - 20px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 20px;
        border-radius: 15px 15px 0 0;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .close {
        font-size: 1.8rem;
        min-width: 35px;
        height: 35px;
    }
    
    .teacher-form,
    .student-form {
        padding: 20px;
        overflow-y: auto;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
        font-size: 0.9rem;
        min-height: 40px;
        border-radius: 8px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 10px 15px;
        min-height: 40px;
        font-size: 0.9rem;
    }
    
    .success-modal {
        padding: 30px 20px;
    }
    
    .success-icon {
        font-size: 3rem;
    }
    
    .success-modal h2 {
        font-size: 1.5rem;
    }
    
    .success-modal p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .dashboard {
        padding: 20px 15px;
    }
    
    .dashboard-header h2 {
        font-size: 1.4rem;
    }
    
    /* Single column for very small screens */
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .action-card {
        min-height: 120px;
        padding: 18px 15px;
    }
    
    .action-icon {
        font-size: 1.8rem;
    }
    
    .action-card h3 {
        font-size: 1rem;
    }
    
    .action-card p {
        font-size: 0.8rem;
    }
    
    /* Single column stats for very small screens */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        padding: 18px 15px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        margin-right: 10px;
    }
    
    .stat-content h4 {
        font-size: 0.75rem;
    }
    
    .stat-number {
        font-size: 1.3rem;
    }
    
    .modal {
        padding: 5px;
    }
    
    .modal-content {
        margin: 5px auto;
        border-radius: 12px;
        max-height: calc(100vh - 10px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 15px;
        border-radius: 12px 12px 0 0;
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .close {
        font-size: 1.5rem;
        min-width: 30px;
        height: 30px;
    }
    
    .teacher-form,
    .student-form {
        padding: 15px;
        overflow-y: auto;
    }
    
    .form-group {
        margin-bottom: 12px;
    }
    
    .form-group label {
        font-size: 0.8rem;
        margin-bottom: 3px;
    }
    
    .form-group input,
    .form-group select {
        padding: 8px 10px;
        min-height: 36px;
        font-size: 0.85rem;
        border-radius: 6px;
    }
    
    .form-actions {
        gap: 6px;
        margin-top: 15px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 8px 12px;
        min-height: 36px;
        font-size: 0.85rem;
    }
    
    .success-modal {
        padding: 20px 15px;
    }
    
    .success-icon {
        font-size: 2.5rem;
    }
    
    .success-modal h2 {
        font-size: 1.3rem;
    }
    
    .success-modal p {
        font-size: 0.9rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 360px) {
    .modal {
        padding: 2px;
    }
    
    .modal-content {
        margin: 2px auto;
        border-radius: 8px;
        max-height: calc(100vh - 4px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 12px;
        border-radius: 8px 8px 0 0;
    }
    
    .modal-header h2 {
        font-size: 1rem;
    }
    
    .close {
        font-size: 1.3rem;
        min-width: 28px;
        height: 28px;
    }
    
    .teacher-form,
    .student-form {
        padding: 12px;
        overflow-y: auto;
    }
    
    .form-group {
        margin-bottom: 10px;
    }
    
    .form-group label {
        font-size: 0.75rem;
        margin-bottom: 2px;
    }
    
    .form-group input,
    .form-group select {
        padding: 6px 8px;
        min-height: 32px;
        font-size: 0.8rem;
        border-radius: 4px;
    }
    
    .form-actions {
        gap: 5px;
        margin-top: 12px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 6px 10px;
        min-height: 32px;
        font-size: 0.8rem;
    }
    
    .success-modal {
        padding: 15px 12px;
    }
    
    .success-icon {
        font-size: 2rem;
    }
    
    .success-modal h2 {
        font-size: 1.1rem;
    }
    
    .success-modal p {
        font-size: 0.8rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .action-card:hover {
        transform: none;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .btn-primary:hover,
    .btn-secondary:hover {
        transform: none;
    }
    
    /* Larger touch targets */
    .action-card {
        min-height: 160px;
    }
    
    .btn-primary,
    .btn-secondary {
        min-height: 44px;
    }
    
    .form-group input,
    .form-group select {
        min-height: 44px;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .modal {
        padding: 2px;
    }
    
    .modal-content {
        margin: 2px auto;
        max-height: calc(100vh - 4px);
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 10px 15px;
    }
    
    .teacher-form,
    .student-form {
        padding: 10px 15px;
        overflow-y: auto;
    }
    
    .form-group {
        margin-bottom: 8px;
    }
    
    .form-group label {
        margin-bottom: 2px;
        font-size: 0.75rem;
    }
    
    .form-group input,
    .form-group select {
        min-height: 32px;
        padding: 6px 8px;
        font-size: 0.8rem;
    }
    
    .form-actions {
        margin-top: 10px;
        gap: 5px;
    }
    
    .btn-primary,
    .btn-secondary {
        min-height: 32px;
        padding: 6px 10px;
        font-size: 0.8rem;
    }
} 