* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #8b5cf6;
    --accent-color: #f472b6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #06b6d4;
    --bg-gradient-start: #f0f4f8;
    --bg-gradient-end: #e8ecf0;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 50%, var(--secondary-color) 100%);
    color: white;
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.role-badge {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.logout-btn {
    color: white;
    text-decoration: none;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.nav {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    overflow-x: auto;
    position: sticky;
    top: 72px;
    z-index: 90;
}

.nav-item {
    display: inline-block;
    padding: 16px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.04);
}

.nav-item:hover::before {
    width: 60%;
}

.nav-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.nav-item.active::before {
    width: 100%;
}

.main {
    flex: 1;
    max-width: 1600px;
    margin: 0 auto;
    padding: 24px;
    width: 100%;
}

.section {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 28px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}

.section-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.04);
    transform: translateY(-1px);
}

.alert {
    padding: 16px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    font-size: 14px;
    border: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: var(--card-bg);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tr {
    transition: all 0.2s ease;
}

.data-table tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-edit {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-delete {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--error-color), #dc2626);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    width: 100%;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-2px);
}

.card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

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

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    max-width: 550px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.course-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.course-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.course-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.course-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-placeholder {
    color: white;
    font-size: 16px;
    opacity: 0.8;
}

.course-info {
    padding: 20px;
}

.course-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.course-teacher {
    font-size: 14px;
    color: var(--text-secondary);
}

.notice-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(99, 102, 241, 0.04);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.notice-item:hover {
    background: rgba(99, 102, 241, 0.08);
    border-color: var(--border-color);
    transform: translateX(4px);
}

.notice-title {
    font-weight: 600;
    font-size: 15px;
}

.notice-date {
    font-size: 13px;
    color: var(--text-muted);
}

.empty-text {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 15px;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-link:hover {
    text-decoration: underline;
}

.type-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    color: white;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.type-badge.class {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.type-badge.one_to_one {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.type-badge.other {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.role-tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.role-tag.admin {
    background: linear-gradient(135deg, #667eea, #5b21b6);
}

.role-tag.principal {
    background: linear-gradient(135deg, #f093fb, #be185d);
}

.role-tag.teacher {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.role-tag.student {
    background: linear-gradient(135deg, #10b981, #059669);
}

.course-grid-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.course-card-advanced {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
}

.course-card-advanced:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.course-card-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.course-card-header h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.course-card-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 12px;
}

.course-card-body {
    padding: 20px;
}

.course-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.course-card-row:last-child {
    border-bottom: none;
}

.course-card-label {
    color: var(--text-muted);
    font-size: 14px;
}

.course-card-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.course-card-footer {
    padding: 16px 20px;
    background: var(--light-gray);
    display: flex;
    gap: 12px;
}

.schedule-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.schedule-card:hover {
    box-shadow: var(--shadow-lg);
}

.schedule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.schedule-course-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.schedule-day-badge {
    padding: 6px 16px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.schedule-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.schedule-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.schedule-info-icon {
    width: 36px;
    height: 36px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.schedule-info-text {
    display: flex;
    flex-direction: column;
}

.schedule-info-label {
    font-size: 12px;
    color: var(--text-muted);
}

.schedule-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.wallet-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--radius-xl);
    padding: 32px;
    color: white;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.wallet-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.wallet-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.wallet-balance-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.wallet-balance-value {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

.wallet-card-content {
    position: relative;
    z-index: 1;
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 16px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.transaction-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.transaction-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 20px;
}

.transaction-icon.income {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.transaction-icon.expense {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.transaction-time {
    font-size: 13px;
    color: var(--text-muted);
}

.transaction-amount {
    font-weight: 700;
    font-size: 18px;
}

.transaction-amount.income {
    color: var(--success-color);
}

.transaction-amount.expense {
    color: var(--error-color);
}

.homework-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.homework-card:hover {
    box-shadow: var(--shadow-lg);
}

.homework-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.homework-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.homework-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.homework-status.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.homework-status.submitted {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.homework-status.graded {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.homework-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.homework-content {
    padding: 16px;
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.homework-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.attendance-day {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px 8px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.attendance-day:hover {
    box-shadow: var(--shadow-md);
}

.attendance-date {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.attendance-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 8px;
    display: inline-block;
}

.attendance-status.present {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.attendance-status.absent {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.attendance-status.late {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.attendance-status.leave {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.grade-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

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

.grade-course {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.grade-score {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.grade-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.grade-detail-item {
    text-align: center;
    padding: 16px;
    background: var(--light-gray);
    border-radius: var(--radius-lg);
}

.grade-detail-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.grade-detail-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .header h1 {
        font-size: 18px;
    }

    .nav {
        padding: 0;
        top: 68px;
    }

    .nav-item {
        padding: 14px 16px;
        font-size: 13px;
    }

    .main {
        padding: 16px;
    }

    .section {
        padding: 20px;
    }

    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        padding: 14px;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-edit,
    .btn-delete {
        text-align: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-value {
        font-size: 28px;
    }

    .course-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-item {
        padding: 12px 12px;
        font-size: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        margin: 10px;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
}

:root {
    --light-gray: #f9fafb;
}

.form-card {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
}

.form-card-header {
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.form-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}

.form-card-subtitle {
    font-size: 14px;
    opacity: 0.9;
}

.form-advanced {
    padding: 28px;
}

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

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

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-label .required {
    color: var(--error-color);
    margin-left: 4px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    font-size: 16px;
    color: var(--text-muted);
}

.input-advanced {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--card-bg);
}

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

.input-advanced.input-disabled {
    background: var(--light-gray);
    cursor: not-allowed;
    opacity: 0.7;
}

.select-advanced {
    width: 100%;
    padding: 14px 16px 14px 48px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--card-bg);
    cursor: pointer;
}

.select-advanced:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.textarea-advanced {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--card-bg);
    resize: vertical;
    min-height: 120px;
}

.textarea-advanced:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-actions-advanced {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.btn-primary-advanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary-advanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
}

.btn-secondary-advanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--card-bg);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-advanced:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.04);
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 16px;
}

.card-advanced {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header-advanced {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.card-title-advanced {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.card-subtitle-advanced {
    font-size: 14px;
    color: var(--text-muted);
}

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

.stat-card-advanced {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card-advanced:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.stat-card-advanced.warning .stat-value { color: var(--warning-color); }
.stat-card-advanced.danger .stat-value { color: var(--error-color); }
.stat-card-advanced.success .stat-value { color: var(--success-color); }

.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon {
    font-size: 24px;
    color: white;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

.wallet-card-advanced {
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
}

.wallet-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.wallet-card-content {
    position: relative;
    z-index: 1;
    color: white;
}

.wallet-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.wallet-card-label {
    font-size: 14px;
    opacity: 0.9;
}

.wallet-card-badge {
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.wallet-card-balance {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 20px;
}

.currency-symbol {
    font-size: 24px;
    font-weight: 700;
}

.balance-value {
    font-size: 48px;
    font-weight: 800;
}

.wallet-card-footer {
    display: flex;
    gap: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.wallet-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
}

.transaction-list-advanced {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.transaction-item-advanced {
    display: flex;
    align-items: center;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.transaction-item-advanced:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateX(4px);
}

.transaction-icon-wrapper {
    margin-right: 16px;
}

.transaction-icon-advanced {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.transaction-icon-advanced.income {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
}

.transaction-icon-advanced.expense {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    color: #991b1b;
}

.transaction-content {
    flex: 1;
}

.transaction-title-advanced {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.transaction-time-advanced {
    font-size: 13px;
    color: var(--text-muted);
}

.transaction-amount-wrapper {
    text-align: right;
}

.transaction-amount-advanced {
    font-weight: 700;
    font-size: 18px;
}

.transaction-amount-advanced.income {
    color: var(--success-color);
}

.transaction-amount-advanced.expense {
    color: var(--error-color);
}

.empty-state-advanced {
    padding: 48px 24px;
    text-align: center;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 14px;
    color: var(--text-muted);
}

.today-courses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.today-course-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.today-course-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.course-time-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
}

.course-time-badge .time-range {
    display: block;
    font-size: 14px;
}

.course-details {
    flex: 1;
}

.course-details .course-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.course-meta {
    display: flex;
    gap: 16px;
}

.course-meta .meta-item {
    font-size: 13px;
    color: #6b7280;
}

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

.filter-form-inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.filter-select-advanced {
    padding: 10px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: all 0.3s ease;
}

.filter-select-advanced:focus {
    outline: none;
    border-color: var(--primary-color);
}

.inline-form {
    display: inline-flex;
}

.teacher-salary-section {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.teacher-salary-section:last-child {
    border-bottom: none;
}

.teacher-salary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.teacher-info {
    display: flex;
    flex-direction: column;
}

.teacher-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.teacher-hours {
    font-size: 14px;
    color: var(--text-muted);
}

.teacher-total {
    text-align: right;
}

.total-label {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 4px;
}

.total-amount {
    font-size: 28px;
    font-weight: 700;
    color: var(--error-color);
}

.salary-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.salary-detail-card {
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.salary-detail-header {
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.1);
}

.salary-detail-header h5 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.salary-detail-body {
    padding: 16px;
}

.salary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.salary-row:last-child {
    border-bottom: none;
}

.salary-row.total .salary-value {
    font-weight: 700;
    color: var(--error-color);
}

.salary-label {
    font-size: 13px;
    color: var(--text-muted);
}

.salary-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.order-list-advanced {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.order-item-advanced {
    background: var(--light-gray);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all 0.3s ease;
}

.order-item-advanced:hover {
    background: rgba(99, 102, 241, 0.08);
}

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

.order-number {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-primary);
}

.order-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.order-status.paid {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.order-status.unpaid {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.order-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.order-info {
    display: flex;
    flex-direction: column;
}

.order-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.order-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.order-amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.amount-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.amount-value {
    font-size: 24px;
    font-weight: 700;
}

.amount-value.paid {
    color: var(--success-color);
}

.amount-value.unpaid {
    color: var(--warning-color);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions-advanced {
        flex-direction: column;
    }

    .btn-primary-advanced,
    .btn-secondary-advanced {
        width: 100%;
        padding: 14px;
    }

    .wallet-card-footer {
        flex-direction: column;
        gap: 16px;
    }

    .teacher-salary-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .teacher-total {
        text-align: left;
    }

    .salary-detail-grid {
        grid-template-columns: 1fr;
    }
}

.filter-bar-advanced {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
}

.filter-form-advanced {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    width: 100%;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.btn-danger-advanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--error-color) 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-danger-advanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-success-advanced {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-success-advanced:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.role-badge-advanced {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.role-badge-advanced.role-admin {
    background: linear-gradient(135deg, #667eea, #5b21b6);
}

.role-badge-advanced.role-principal {
    background: linear-gradient(135deg, #f093fb, #be185d);
}

.role-badge-advanced.role-teacher {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.role-badge-advanced.role-student {
    background: linear-gradient(135deg, #10b981, #059669);
}

.user-avatar-wrapper,
.teacher-avatar-wrapper,
.order-icon-wrapper,
.notice-icon-wrapper,
.school-icon-wrapper,
.homework-icon-wrapper,
.course-icon-wrapper {
    margin-right: 12px;
}

.user-avatar,
.teacher-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.user-info-wrapper,
.teacher-info-wrapper,
.order-info-wrapper,
.notice-title-wrapper,
.school-info-wrapper,
.homework-title-wrapper,
.course-title-wrapper {
    flex: 1;
}

.user-info-wrapper h3,
.teacher-info-wrapper h3,
.order-info-wrapper h3,
.notice-title-wrapper h3,
.school-info-wrapper h3,
.homework-title-wrapper h3,
.course-title-wrapper h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
    color: white;
}

.salary-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.salary-status-badge.status-paid {
    background: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.salary-status-badge.status-unpaid {
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.order-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.order-status-badge.status-pending {
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.order-status-badge.status-paid {
    background: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.order-status-badge.status-cancelled {
    background: rgba(107, 114, 128, 0.2);
    color: #374151;
}

.order-status-badge.status-refunded {
    background: rgba(99, 102, 241, 0.2);
    color: #4338ca;
}

.notice-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.school-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.school-status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.school-status-badge.inactive {
    background: rgba(107, 114, 128, 0.2);
    color: #374151;
}

.course-type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.course-type-badge.class-type {
    background: rgba(6, 182, 212, 0.3);
}

.course-type-badge.one-to-one-type {
    background: rgba(245, 158, 11, 0.3);
}

.homework-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.homework-status-badge.pending {
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.homework-status-badge.submitted {
    background: rgba(16, 185, 129, 0.2);
    color: #065f46;
}

.homework-status-badge.published {
    background: rgba(99, 102, 241, 0.2);
    color: #4338ca;
}

.total-row {
    background: var(--light-gray);
    margin: 12px -20px -20px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.total-amount {
    font-size: 20px;
    font-weight: 700;
    color: var(--error-color);
}

.amount-paid {
    color: var(--success-color);
}

.amount-pending {
    color: var(--warning-color);
}

.content-preview {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
}

.deadline-value {
    color: var(--warning-color);
}

.notice-card .course-card-header,
.school-card .course-card-header,
.homework-card .course-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.schedule-card .course-card-header {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    gap: 16px;
}

.schedule-day-badge-large {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: 700;
    color: white;
}

.schedule-course-info {
    flex: 1;
}

.schedule-course-info h3 {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
}

.schedule-time-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 12px;
    color: white;
}

.message-list-advanced {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-item-advanced {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.message-item-advanced:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.message-item-advanced.unread {
    border-left: 4px solid var(--primary-color);
    background: rgba(99, 102, 241, 0.02);
}

.message-icon-wrapper {
    position: relative;
    margin-right: 16px;
}

.message-icon-advanced {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.message-icon-advanced.homework {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
}

.message-icon-advanced.attendance {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1), rgba(8, 145, 178, 0.1));
}

.message-icon-advanced.grade {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
}

.message-icon-advanced.notice {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
}

.unread-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: var(--error-color);
    border-radius: 50%;
    border: 2px solid var(--card-bg);
}

.message-content-advanced {
    flex: 1;
}

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

.message-title-advanced {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.message-time-advanced {
    font-size: 13px;
    color: var(--text-muted);
}

.message-body-advanced {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.message-action-advanced {
    margin-left: 16px;
}

.btn-read-advanced {
    padding: 8px 16px;
    background: var(--light-gray);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-read-advanced:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.notice-list-advanced {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.notice-item-advanced {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.notice-item-advanced:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.notice-item-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
}

.notice-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
}

.notice-item-icon span {
    font-size: 20px;
}

.notice-item-content {
    flex: 1;
}

.notice-item-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.notice-item-preview {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.notice-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.notice-item-date {
    font-size: 13px;
    color: var(--text-muted);
}

.notice-item-arrow {
    font-size: 18px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.notice-item-advanced:hover .notice-item-arrow {
    transform: translateX(4px);
}

.data-table-advanced {
    width: 100%;
    border-collapse: collapse;
}

.data-table-advanced th {
    background: var(--light-gray);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    border-bottom: 2px solid var(--border-color);
}

.data-table-advanced td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
}

.data-table-advanced tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

.student-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.status-badge-advanced {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-advanced.status-present {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.status-badge-advanced.status-absent {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.status-badge-advanced.status-late {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.status-badge-advanced.status-leave {
    background: rgba(99, 102, 241, 0.1);
    color: #4338ca;
}

.score-display {
    font-weight: 600;
}

.score-display.score-high {
    color: var(--success-color);
}

.score-display.score-medium {
    color: var(--warning-color);
}

.score-display.score-low {
    color: var(--error-color);
}

.attendance-table-wrapper {
    overflow-x: auto;
}

.student-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px;
}

.student-card {
    text-align: center;
    padding: 24px 16px;
    background: var(--light-gray);
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
}

.student-card:hover {
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-2px);
}

.student-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 16px;
    overflow: hidden;
}

.student-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.student-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.student-phone {
    font-size: 13px;
    color: var(--text-muted);
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 14px;
    color: var(--text-muted);
}

.info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-card-body {
    padding: 24px;
}

@media (max-width: 768px) {
    .course-grid-advanced {
        grid-template-columns: 1fr;
    }

    .filter-bar-advanced {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-form-advanced {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select-advanced {
        width: 100%;
    }

    .message-item-advanced {
        flex-direction: column;
    }

    .message-icon-wrapper {
        margin-bottom: 12px;
    }

    .message-action-advanced {
        margin-left: 0;
        margin-top: 12px;
        width: 100%;
    }

    .btn-read-advanced {
        width: 100%;
    }

    .notice-item-header {
        flex-direction: column;
    }

    .notice-item-icon {
        margin-bottom: 12px;
    }

    .student-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .data-table-advanced {
        font-size: 12px;
    }

    .data-table-advanced th,
    .data-table-advanced td {
        padding: 10px 8px;
    }
}

/* Personal center button styles */
.profile-actions-advanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 32px;
}

.profile-actions-advanced .action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 24px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.profile-actions-advanced .action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.profile-actions-advanced .action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.profile-actions-advanced .action-btn.primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
}

.profile-actions-advanced .action-btn.secondary {
    background: white;
    color: #1f2937;
    border: 2px solid #e5e7eb;
}

.profile-actions-advanced .action-btn.secondary:hover {
    border-color: #667eea;
    background: #faf5ff;
}

.profile-actions-advanced .action-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.profile-actions-advanced .action-btn.danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.profile-actions-advanced .action-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.profile-actions-advanced .action-btn.success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.profile-actions-advanced .action-btn-icon {
    font-size: 24px;
}

.profile-actions-advanced .action-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.profile-actions-advanced .action-btn-title {
    font-weight: 700;
    font-size: 15px;
}

.profile-actions-advanced .action-btn-subtitle {
    font-size: 12px;
    opacity: 0.9;
}

.profile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 32px 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 24px;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid rgba(255,255,255,0.3);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    flex: 1;
}

.profile-name h3 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
}

.profile-name .role-badge {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.profile-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 24px;
}

.info-card {
    background: var(--light-gray);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
}

.info-card:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

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

.info-content {
    flex: 1;
}

.info-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 4px;
}

.info-value {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

@media (max-width: 768px) {
    .profile-actions-advanced {
        grid-template-columns: 1fr;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-name h3 {
        font-size: 24px;
    }
}

