/* Student Dashboard Responsive Styles */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --secondary-color: #4b5563;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --transition: all 0.3s ease;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
}

body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    color: #374151;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-header h1 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.8rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.user-info span {
    font-weight: 500;
    color: var(--secondary-color);
}

.logout-btn {
    background: linear-gradient(145deg, var(--danger-color), #dc2626);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.logout-btn:hover {
    background: linear-gradient(145deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

/* Sidebar */
.sidebar {
    flex: 0 0 250px;
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    align-self: flex-start;
}

.sidebar h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: var(--dark-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--secondary-color);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 1rem;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    transform: translateX(3px);
}

.sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 300px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.page-header h2 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.6rem;
    font-weight: 700;
}

/* Buttons */
.btn {
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn:hover {
    background: linear-gradient(145deg, var(--primary-dark), #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: linear-gradient(145deg, var(--secondary-color), #374151);
    box-shadow: 0 2px 4px rgba(75, 85, 99, 0.2);
}

.btn-secondary:hover {
    background: linear-gradient(145deg, #374151, #1f2937);
    box-shadow: 0 4px 8px rgba(75, 85, 99, 0.3);
}

.btn-success {
    background: linear-gradient(145deg, var(--success-color), #059669);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: linear-gradient(145deg, #059669, #047857);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.welcome-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.welcome-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.stat-card h3 {
    margin: 0 0 10px 0;
    color: var(--secondary-color);
    font-size: 1rem;
    font-weight: 500;
}

.stat-card p {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* Actions Grid */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.action-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.action-card h4 {
    margin: 0 0 10px 0;
    color: var(--dark-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.action-card p {
    margin: 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Recent Activity */
.recent-activity {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.recent-activity h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--dark-color);
    font-size: 1.4rem;
    font-weight: 600;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item p {
    margin: 0;
    display: flex;
    align-items: center;
    color: var(--dark-color);
    flex: 1;
    min-width: 200px;
}

.activity-item p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.activity-item span {
    color: #999;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Tables */
.students-table, .assignments-table, .transactions-table {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    overflow-x: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: var(--dark-color);
}

tr:hover {
    background: #f8f9fa;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.view-btn {
    background: linear-gradient(145deg, var(--info-color), #2563eb);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.view-btn:hover {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.edit-btn {
    background: linear-gradient(145deg, var(--warning-color), #d97706);
    color: white;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.edit-btn:hover {
    background: linear-gradient(145deg, #d97706, #b45309);
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.delete-btn {
    background: linear-gradient(145deg, var(--danger-color), #dc2626);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

.delete-btn:hover {
    background: linear-gradient(145deg, #dc2626, #b91c1c);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 15px;
}

.card-header h2, .card-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.4rem;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: var(--transition);
    background: #f9fafb;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

/* Wallet Summary */
.wallet-summary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.wallet-summary h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.wallet-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 20px 0;
}

.wallet-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.add-funds-btn {
    background: linear-gradient(145deg, var(--success-color), #059669);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.add-funds-btn:hover {
    background: linear-gradient(145deg, #059669, #047857);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.transfer-btn {
    background: linear-gradient(145deg, var(--info-color), #2563eb);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.transfer-btn:hover {
    background: linear-gradient(145deg, #2563eb, #1d4ed8);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

/* Courses Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.course-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.course-image {
    height: 150px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.course-content {
    padding: 20px;
}

.course-content h3 {
    margin: 0 0 10px 0;
    color: var(--dark-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.course-content p {
    color: var(--secondary-color);
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
    flex-wrap: wrap;
    gap: 10px;
}

.course-meta span {
    background: #f8f9fa;
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 500;
}

.course-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Messages Container */
.messages-container {
    display: flex;
    gap: 20px;
    height: 600px;
    flex-wrap: wrap;
}

.message-list {
    flex: 0 0 300px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow-y: auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message-list-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.message-list-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.message-item {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.3s;
}

.message-item:hover, .message-item.active {
    background: rgba(37, 99, 235, 0.1);
}

.message-item h4 {
    margin: 0 0 5px 0;
    color: var(--dark-color);
    font-size: 1rem;
    font-weight: 600;
}

.message-item p {
    margin: 0 0 5px 0;
    color: var(--secondary-color);
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-item .meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
}

.message-content {
    flex: 1;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.message-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.message-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.message-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
}

.reply-box {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.send-btn {
    margin-top: 10px;
    padding: 8px 15px;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-submitted {
    background-color: #d1ecf1;
    color: #0c5460;
}

.status-graded {
    background-color: #d4edda;
    color: #155724;
}

.status-paid {
    background-color: #d4edda;
    color: #155724;
}

.status-overdue {
    background-color: #f8d7da;
    color: #721c24;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--secondary-color);
}

/* Search Box */
.search-box {
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Settings Section */
.settings-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--dark-color);
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--light-color);
    color: var(--primary-color);
    transition: var(--transition);
    text-decoration: none;
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* Login and Registration Forms */
.login-container, .register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.login-form, .register-form {
    width: 100%;
    max-width: 480px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 30px;
    text-align: center;
}

.form-header .logo-box {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
}

.form-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.form-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 1.1rem;
}

.form-content {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    font-size: 1rem;
}

.input-wrapper {
    position: relative;
}

.input-wrapper .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.1rem;
}

.input-wrapper input,
.input-wrapper select {
    width: 100%;
    padding: 14px 14px 14px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #f9fafb;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: white;
}

.input-wrapper .toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: pointer;
    font-size: 1.1rem;
}

.input-wrapper .toggle-password:hover {
    color: var(--primary-color);
}

.btn {
    background: linear-gradient(145deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: block;
    width: 100%;
    font-size: 1.1rem;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
    text-align: center;
}

.btn:hover {
    background: linear-gradient(145deg, var(--primary-dark), #1e40af);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(37, 99, 235, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.auth-footer p {
    margin: 12px 0;
    color: var(--secondary-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    background: linear-gradient(145deg, var(--success-color), #059669);
}

.notification.error {
    background: linear-gradient(145deg, var(--danger-color), #dc2626);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
    
    .dashboard-header {
        padding: 15px;
    }
    
    .dashboard-container {
        gap: 20px;
    }
    
    .sidebar {
        padding: 15px;
    }
    
    .main-content {
        padding: 0;
    }
    
    .stats-grid, .actions-grid, .courses-grid {
        gap: 15px;
    }
    
    .stat-card, .action-card, .course-card {
        padding: 20px;
    }
}

@media (max-width: 992px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        flex: 0 0 auto;
    }
    
    .sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .sidebar ul li {
        margin-bottom: 5px;
    }
    
    .sidebar ul li a {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .messages-container {
        flex-direction: column;
        height: auto;
    }
    
    .message-list {
        flex: 0 0 auto;
        height: 300px;
    }
    
    .wallet-actions {
        flex-direction: column;
    }
    
    .actions {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .user-info {
        justify-content: center;
    }
    
    .page-header {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid, .actions-grid, .courses-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .activity-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .activity-item p {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .wallet-amount {
        font-size: 2.5rem;
    }
    
    .form-group input, .form-group select, .form-group textarea {
        padding: 10px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .course-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
    
    .action-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .dashboard-header h1 {
        font-size: 1.5rem;
    }
    
    .welcome-card, .wallet-summary {
        padding: 20px;
    }
    
    .welcome-card h2, .wallet-summary h3 {
        font-size: 1.4rem;
    }
    
    .wallet-amount {
        font-size: 2rem;
    }
    
    .stats-grid, .actions-grid, .courses-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card, .action-card, .course-card {
        padding: 15px;
    }
    
    .stat-card p {
        font-size: 1.5rem;
    }
    
    .action-card h4 {
        font-size: 1.1rem;
    }
    
    .students-table, .assignments-table, .transactions-table {
        padding: 15px;
    }
    
    .card {
        padding: 20px 15px;
    }
    
    .settings-section {
        padding: 20px 15px;
    }
    
    .messages-container {
        gap: 15px;
    }
    
    .message-item {
        padding: 12px 15px;
    }
    
    .sidebar ul {
        flex-direction: column;
    }
    
    .sidebar ul li a {
        justify-content: center;
    }
    
    .logout-btn, .btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .activity-item {
        padding: 12px 0;
    }
    
    .activity-item span {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 5px;
    }
    
    .dashboard-header, .card, .settings-section {
        padding: 12px;
    }
    
    .sidebar {
        padding: 12px;
    }
    
    .stat-card, .action-card {
        padding: 12px;
    }
    
    .stat-card p {
        font-size: 1.3rem;
    }
    
    .actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive Design for Forms */
@media (max-width: 576px) {
    .login-container, .register-container {
        padding: 15px;
    }
    
    .login-form, .register-form {
        max-width: 100%;
    }
    
    .form-header {
        padding: 25px 20px;
    }
    
    .form-header h2 {
        font-size: 1.6rem;
    }
    
    .form-content {
        padding: 25px 20px;
    }
    
    .input-wrapper input,
    .input-wrapper select {
        padding: 12px 12px 12px 40px;
        font-size: 1rem;
    }
    
    .input-wrapper .input-icon {
        left: 12px;
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .form-header {
        padding: 20px 15px;
    }
    
    .form-header h2 {
        font-size: 1.4rem;
    }
    
    .form-content {
        padding: 20px 15px;
    }
    
    .form-group label {
        font-size: 0.95rem;
    }
}
