:root {
    --primary-color: #1b5e20;    /* أخضر غامق */
    --primary-light: #4c8c4a;
    --primary-dark: #003300;
    --secondary-color: #e8f5e9;
    --text-color: #2c3e50;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --font-family: 'Tajawal', sans-serif;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e9 50%, #f1f8e9 100%);
    background-attachment: fixed;
    color: var(--text-color);
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(27, 94, 32, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(76, 140, 74, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(27, 94, 32, 0.03) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
}

.top-header {
    background-color: var(--primary-color);
    padding: 20px 0;
    color: white;
    box-shadow: var(--shadow);
}

.school-info {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.school-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.school-details h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.school-details p {
    margin: 5px 0 0 0;
    opacity: 0.9;
}

.language-switcher {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

.lang-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* School Header Section */
.school-header-section {
    text-align: center;
    margin-bottom: 80px;
    padding: 60px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    border-radius: 30px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.school-header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(27, 94, 32, 0.03), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.school-logo-container {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.main-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.main-logo:hover {
    transform: scale(1.05);
}

.school-info-container {
    position: relative;
    z-index: 1;
}

.school-name {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.system-title {
    color: #FF9800;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.system-description {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* School Center Section */
.school-center-section {
    text-align: center;
    margin-bottom: 50px;
    padding: 30px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(248, 249, 250, 0.9));
    border-radius: 20px;
    box-shadow: 
        0 10px 25px rgba(0, 0, 0, 0.08),
        0 1px 6px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.school-center-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(27, 94, 32, 0.02), transparent);
    animation: shimmer 4s infinite;
}

.school-logo-center {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.center-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.center-logo:hover {
    transform: scale(1.05);
}

.school-name-center {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

/* Hierarchical Grid Layout */
.hierarchical-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* Main Admin Card - Center */
.main-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff3e0 100%);
    border-radius: 20px;
    box-shadow: 
        0 10px 25px rgba(255, 152, 0, 0.15),
        0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 35px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 152, 0, 0.3);
    min-width: 350px;
    max-width: 450px;
}

.main-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-card:hover {
    transform: translateY(-20px) scale(1.05);
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
    box-shadow: 
        0 25px 50px rgba(27, 94, 32, 0.2),
        0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: rgba(27, 94, 32, 0.4);
}

.main-card:hover::before {
    transform: scaleX(1);
    background: linear-gradient(90deg, #1b5e20, #4c8c4a, #1b5e20);
}

/* Sub Cards Container */
.sub-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 800px;
    position: relative;
}

.sub-cards::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 30px;
    background: linear-gradient(to bottom, rgba(27, 94, 32, 0.3), transparent);
}

/* Sub Cards */
.sub-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff3e0 100%);
    border-radius: 15px;
    box-shadow: 
        0 8px 20px rgba(255, 152, 0, 0.1),
        0 1px 6px rgba(0, 0, 0, 0.05);
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 152, 0, 0.2);
    transform: translateY(15px);
    opacity: 0.8;
}

.sub-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.sub-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
    box-shadow: 
        0 20px 40px rgba(27, 94, 32, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(27, 94, 32, 0.2);
    opacity: 1;
}

.sub-card:hover::before {
    transform: scaleX(1);
    background: linear-gradient(90deg, #1b5e20, #4c8c4a, #1b5e20);
}

/* Connection Lines */
.sub-card::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 15px;
    background: linear-gradient(to bottom, rgba(27, 94, 32, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sub-card:hover::after {
    opacity: 1;
}

.portal-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.1),
        0 1px 8px rgba(0, 0, 0, 0.05);
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(27, 94, 32, 0.1);
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1b5e20, #4c8c4a, #1b5e20);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.portal-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(27, 94, 32, 0.15),
        0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(27, 94, 32, 0.2);
}

.portal-card:hover::before {
    transform: scaleX(1);
}

/* Main Card Icon */
.main-card .card-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    position: relative;
}

.main-card .card-icon::before {
    content: '';
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.15), rgba(76, 140, 74, 0.15));
    border-radius: 50%;
    z-index: -1;
    transition: all 0.3s ease;
}

.main-card .card-icon svg {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 6px 12px rgba(255, 152, 0, 0.3));
    z-index: 1;
}

.main-card .card-icon svg * {
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.main-card:hover .card-icon::before {
    transform: scale(1.3);
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.25), rgba(76, 140, 74, 0.25));
}

.main-card:hover .card-icon svg {
    transform: scale(1.2) rotate(8deg);
    filter: drop-shadow(0 12px 24px rgba(27, 94, 32, 0.4));
}

.main-card:hover .card-icon svg * {
    fill: #1b5e20 !important;
    stroke: #1b5e20 !important;
}

/* Sub Card Icon */
.sub-card .card-icon {
    font-size: 2rem;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px;
    position: relative;
}

.sub-card .card-icon::before {
    content: '';
    position: absolute;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.1), rgba(76, 140, 74, 0.1));
    border-radius: 50%;
    z-index: -1;
    transition: all 0.3s ease;
}

.sub-card .card-icon svg {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 3px 6px rgba(255, 152, 0, 0.2));
    z-index: 1;
}

.sub-card .card-icon svg * {
    transition: fill 0.3s ease, stroke 0.3s ease;
}

.sub-card:hover .card-icon::before {
    transform: scale(1.2);
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.2), rgba(76, 140, 74, 0.2));
}

.sub-card:hover .card-icon svg {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 6px 12px rgba(27, 94, 32, 0.3));
}

.sub-card:hover .card-icon svg * {
    fill: #1b5e20 !important;
    stroke: #1b5e20 !important;
}

/* Main Card Text */
.main-card h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.main-card:hover h3 {
    color: #0d4a0d;
}

.main-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.main-card:hover p {
    color: #555;
}

/* Sub Card Text */
.sub-card h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.sub-card:hover h3 {
    color: #0d4a0d;
}

.sub-card p {
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.sub-card:hover p {
    color: #555;
}

/* Main Card Arrow */
.main-card .card-arrow {
    position: absolute;
    bottom: 25px;
    right: 25px;
    font-size: 1.3rem;
    color: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.15), rgba(76, 140, 74, 0.15));
    border-radius: 50%;
    border: 2px solid rgba(27, 94, 32, 0.3);
}

.main-card .card-arrow svg {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.main-card:hover .card-arrow {
    transform: translateX(10px) scale(1.15);
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.25), rgba(76, 140, 74, 0.25));
    border-color: rgba(27, 94, 32, 0.5);
    box-shadow: 0 6px 16px rgba(27, 94, 32, 0.3);
}

.main-card:hover .card-arrow svg {
    transform: translateX(4px) scale(1.15);
}

/* Sub Card Arrow */
.sub-card .card-arrow {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 1rem;
    color: var(--primary-color);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.1), rgba(76, 140, 74, 0.1));
    border-radius: 50%;
    border: 2px solid rgba(27, 94, 32, 0.2);
}

.sub-card .card-arrow svg {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sub-card:hover .card-arrow {
    transform: translateX(6px) scale(1.1);
    background: linear-gradient(135deg, rgba(27, 94, 32, 0.2), rgba(76, 140, 74, 0.2));
    border-color: rgba(27, 94, 32, 0.4);
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.2);
}

.sub-card:hover .card-arrow svg {
    transform: translateX(2px) scale(1.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-danger:hover {
    background-color: #c82333;
}

.btn-warning {
    background-color: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background-color: #e0a800;
}

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

.btn-success:hover {
    background-color: #218838;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.form-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 40px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.table-container {
    overflow-x: auto;
    margin: 25px 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
}

th, td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: var(--secondary-color);
}

tr:hover {
    background-color: rgba(76, 140, 74, 0.1);
}

.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
    border: 1px solid transparent;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    border-left: 4px solid #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* تم نقل تصميم sidebar إلى admin-layout */

.footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.student-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.student-card h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

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

.grade-section {
    background: var(--secondary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-color);
    font-weight: 500;
}

.recall-buttons {
    display: flex;
    gap: 10px;
}

.recall-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

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

.status-delivered {
    background: #d4edda;
    color: #155724;
    font-weight: 700;
    letter-spacing: 1px;
}

.bus-window {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    padding: 30px;
    z-index: 1000;
    max-width: 500px;
    width: 90%;
}

.bus-window h3 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

.bus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Admin Dashboard Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background-color: #f8f9fa;
    position: relative;
    overflow-x: hidden;
}

.admin-layout .sidebar {
    width: 280px;
    background: linear-gradient(180deg, 
        rgba(27, 94, 32, 0.95) 0%, 
        rgba(0, 51, 0, 0.98) 50%, 
        rgba(27, 94, 32, 0.95) 100%);
    backdrop-filter: blur(20px);
    color: white;
    padding: 0;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 
        -5px 0 25px rgba(0, 0, 0, 0.15),
        inset -1px 0 0 rgba(255, 255, 255, 0.1);
    border-left: 2px solid rgba(255, 152, 0, 0.3);
    position: relative;
    box-sizing: border-box;
}

.admin-layout .sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255, 152, 0, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(76, 140, 74, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.admin-layout .sidebar-header {
    text-align: center;
    padding: 30px 20px 25px;
    background: linear-gradient(135deg, 
        rgba(255, 152, 0, 0.2) 0%, 
        rgba(27, 94, 32, 0.3) 100%);
    border-bottom: 2px solid rgba(255, 152, 0, 0.4);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.admin-layout .sidebar-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255, 152, 0, 0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(180deg); }
}

.admin-layout .sidebar-header h3 {
    margin: 0 0 10px 0;
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.admin-layout .sidebar-header p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.admin-layout .sidebar-menu {
    list-style: none;
    padding: 0 15px 20px;
    margin: 0;
}

.admin-layout .sidebar-item {
    margin: 8px 0;
    position: relative;
}

.admin-layout .sidebar-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #FF9800, #FFB74D);
    border-radius: 2px;
    transition: height 0.3s ease;
}

.admin-layout .sidebar-item:hover::before,
.admin-layout .sidebar-item.active::before {
    height: 60%;
}

.admin-layout .sidebar-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.admin-layout .sidebar-item a svg {
    flex-shrink: 0;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.admin-layout .sidebar-item a span {
    flex: 1;
    transition: all 0.3s ease;
}

.admin-layout .sidebar-item a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 152, 0, 0.1), 
        transparent);
    transition: left 0.6s ease;
}

.admin-layout .sidebar-item a:hover::before {
    left: 100%;
}

.admin-layout .sidebar-item a:hover,
.admin-layout .sidebar-item.active a {
    background: linear-gradient(135deg, 
        rgba(255, 152, 0, 0.2) 0%, 
        rgba(27, 94, 32, 0.3) 100%);
    color: white;
    transform: translateX(-8px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.admin-layout .sidebar-item a:hover {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.admin-layout .sidebar-item a:hover svg,
.admin-layout .sidebar-item.active a svg {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 4px 8px rgba(255, 152, 0, 0.4));
}

.admin-layout .sidebar-item a:hover span,
.admin-layout .sidebar-item.active a span {
    transform: translateX(2px);
    font-weight: 600;
}

.admin-layout .main-content {
    margin-right: 280px;
    padding: 25px;
    min-height: 100vh;
    width: calc(100% - 280px);
    box-sizing: border-box;
}

.admin-layout .content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
}

.admin-layout .content-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-size: 2rem;
}

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

.admin-layout .header-actions .language-switcher {
    display: flex;
    gap: 8px;
    margin: 0;
}

.admin-layout .header-actions .lang-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    border: 2px solid transparent;
}

.admin-layout .header-actions .lang-btn:hover,
.admin-layout .header-actions .lang-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* RTL Support for Admin Layout */
[dir="rtl"] .admin-layout .sidebar {
    right: auto;
    left: 0;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
    border-left: none;
    border-right: 2px solid rgba(255, 152, 0, 0.3);
}

[dir="rtl"] .admin-layout .main-content {
    margin-right: 0;
    margin-left: 280px;
    box-sizing: border-box;
}

[dir="rtl"] .admin-layout .sidebar-item::before {
    right: auto;
    left: 0;
}

[dir="rtl"] .admin-layout .sidebar-item a:hover,
[dir="rtl"] .admin-layout .sidebar-item.active a {
    transform: translateX(8px) scale(1.02);
}

/* Admin Dashboard Styles */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    border-radius: 15px;
    box-shadow: 
        0 8px 25px rgba(255, 152, 0, 0.3),
        0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 3px solid #FF9800;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    animation: card-shimmer 3s ease-in-out infinite;
}

@keyframes card-shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.stat-card:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #4c8c4a 100%);
    border-color: #1b5e20;
    transform: translateY(-8px) scale(1.05);
    box-shadow: 
        0 15px 40px rgba(27, 94, 32, 0.3),
        0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card:hover::before {
    background: linear-gradient(90deg, #1b5e20, #4c8c4a, #1b5e20);
    animation-duration: 1.5s;
}

.stat-card.students {
    border-left: 5px solid #FF9800;
}

.stat-card.parents {
    border-left: 5px solid #FF9800;
}

.stat-card.sections {
    border-left: 5px solid #FF9800;
}

.stat-card.today-requests {
    border-left: 5px solid #FF9800;
}

.stat-card.pending {
    border-left: 5px solid #FF9800;
}

.stat-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.stat-card:hover .stat-icon {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.stat-icon svg {
    transition: all 0.3s ease;
    filter: 
        drop-shadow(0 2px 4px rgba(255, 255, 255, 0.8))
        drop-shadow(0 1px 2px rgba(255, 255, 255, 0.6))
        contrast(1.2) 
        brightness(0.9);
    stroke: #1a1a1a;
    stroke-width: 2.5;
}

.stat-card:hover .stat-icon svg {
    transform: scale(1.1);
    filter: 
        drop-shadow(0 3px 6px rgba(0, 0, 0, 0.8))
        drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6))
        contrast(1.3) 
        brightness(1.1);
    stroke: #FFFFFF;
    stroke-width: 3;
}

.stat-content {
    flex: 1;
    position: relative;
    z-index: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    color: #1a1a1a;
    text-shadow: 
        0 2px 4px rgba(255, 255, 255, 0.8),
        0 1px 2px rgba(255, 255, 255, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: -0.5px;
    line-height: 1.1;
    filter: contrast(1.2) brightness(0.9);
}

.stat-card:hover .stat-content h3 {
    transform: translateX(5px);
    color: #FFFFFF;
    text-shadow: 
        0 3px 6px rgba(0, 0, 0, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.4),
        0 0 0 2px rgba(0, 0, 0, 0.3);
    font-weight: 900;
    filter: contrast(1.3) brightness(1.1);
}

.stat-content p {
    margin: 8px 0 0 0;
    color: #2d2d2d;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 
        0 1px 3px rgba(255, 255, 255, 0.7),
        0 1px 2px rgba(255, 255, 255, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    letter-spacing: 0.3px;
    line-height: 1.3;
    filter: contrast(1.1) brightness(0.95);
}

.stat-card:hover .stat-content p {
    transform: translateX(5px);
    color: #FFFFFF;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.7),
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(0, 0, 0, 0.3);
    font-weight: 700;
    filter: contrast(1.2) brightness(1.05);
}

.quick-actions {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 30px;
}

.quick-actions h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.2rem;
}

.recent-activity {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
}

.recent-activity h3 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.activity-content small {
    color: #666;
    font-size: 0.8rem;
}

.activity-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

.status-delivered {
    background: #d4edda;
    color: #155724;
    font-weight: 700;
    letter-spacing: 1px;
}

.no-activity {
    text-align: center;
    padding: 40px;
    color: #666;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
}

.card-header h3 {
    margin: 0;
    color: var(--primary-color);
}

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

/* Settings Page Styles */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.setting-item {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.setting-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.setting-item label {
    display: block;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.setting-item .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.setting-item .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.settings-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--secondary-color);
}

.settings-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
}

.settings-section h4 {
    color: var(--primary-color);
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

.setting-description {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

/* Grades & Sections Styles */
.section-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin: 2px;
    font-weight: 500;
}

.student-count {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.grades-table td {
    vertical-align: top;
    padding: 15px;
}

.grades-table strong {
    color: var(--primary-color);
    font-size: 16px;
}

.grades-table small {
    color: #666;
    font-size: 12px;
}

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

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--secondary-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--secondary-color);
    color: var(--primary-color);
}

.modal-form {
    padding: 25px;
}

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

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

.modal-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.modal-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid var(--secondary-color);
}

.modal-actions .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
}

/* RTL Support for Modal */
[dir="rtl"] .modal-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .modal-actions {
    flex-direction: row-reverse;
}

/* CSV Upload Modal Styles */
.csv-upload-modal {
    max-width: 600px;
}

.file-help {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-top: 10px;
    font-size: 14px;
}

.file-help p {
    margin: 5px 0;
}

.file-help code {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    display: block;
    margin-top: 5px;
}

.file-help strong {
    color: var(--primary-color);
}

.file-help code {
    background: #e9ecef;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    display: block;
    margin: 8px 0;
    border: 1px solid #dee2e6;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-x: auto;
    max-width: 100%;
}

.file-help p:last-child {
    margin-bottom: 0;
}

/* Sample Files Section */
.sample-files {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.sample-files p {
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
}

.sample-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.sample-buttons .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sample-buttons .btn-info {
    background: #17a2b8;
    color: white;
}

.sample-buttons .btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

.sample-buttons .btn-warning {
    background: #ffc107;
    color: #212529;
}

.sample-buttons .btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

.sample-buttons .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

/* RTL Support for Sample Files */
[dir="rtl"] .sample-buttons {
    flex-direction: row-reverse;
}

/* Responsive Sample Buttons */
@media (max-width: 768px) {
    .sample-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sample-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* Sample Preview Modal */
.sample-preview {
    background: white;
    border-radius: 8px;
    padding: 25px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.preview-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 20px;
    flex: 1;
}

.preview-header .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.preview-header .close-btn:hover {
    background: #f8f9fa;
    color: #dc3545;
}

.preview-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.preview-section h5 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 16px;
}

.preview-code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
}

.preview-code code {
    background: none;
    color: inherit;
    padding: 0;
    border: none;
    font-size: inherit;
    white-space: pre;
}

.preview-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.preview-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preview-actions .btn-primary {
    background: var(--primary-color);
    color: white;
}

.preview-actions .btn-primary:hover {
    background: #0a4128;
}

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

.preview-actions .btn-secondary:hover {
    background: #5a6268;
}

/* RTL Support for Preview */
[dir="rtl"] .preview-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .preview-section {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

[dir="rtl"] .preview-actions {
    flex-direction: row-reverse;
}

/* Responsive Preview */
@media (max-width: 768px) {
    .sample-preview {
        padding: 15px;
        margin: 10px;
    }
    
    .preview-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .preview-actions .btn {
        width: 100%;
        text-align: center;
    }
}

/* Filters Section */
.filters-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.filters-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.filters-form {
    margin: 0;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

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

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

.filter-group .form-control {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-actions .btn {
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.filter-actions .btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.filter-actions .btn-primary:hover {
    background: #0a4128;
}

.filter-actions .btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
}

.filter-actions .btn-secondary:hover {
    background: #5a6268;
}

.filter-actions .btn-success {
    background: #28a745;
    color: white;
    border: none;
}

.filter-actions .btn-success:hover {
    background: #218838;
}

/* RTL Support for Filters */
[dir="rtl"] .filters-grid {
    direction: rtl;
}

[dir="rtl"] .filter-actions {
    flex-direction: row-reverse;
}

/* Responsive Filters */
@media (max-width: 768px) {
    .filters-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Results Info */
.results-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 15px;
    border-left: 4px solid var(--primary-color);
}

.results-count {
    margin: 0;
    font-weight: 500;
    color: #495057;
    font-size: 14px;
}

[dir="rtl"] .results-info {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* Parent Management Styles */
.phone-link, .email-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.phone-link:hover, .email-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.relationship-badge {
    background: var(--secondary-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

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

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

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

.text-muted {
    color: #6c757d;
    font-style: italic;
}

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

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

/* Student Management Styles */
.student-name {
    line-height: 1.4;
}

.grade-badge {
    background: var(--primary-color);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-right: 5px;
    display: inline-block;
}

.parent-info {
    line-height: 1.4;
}

.parent-info strong {
    color: var(--primary-color);
}

/* Enhanced table styles */
.table-container table td {
    vertical-align: middle;
    padding: 12px 8px;
}

.table-container table th {
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 15px 8px;
    border-bottom: 2px solid var(--primary-color);
}

/* Status badges for students */
.status-badge.enabled {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.disabled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
/* تم نقل تصميم sidebar المتجاوب إلى admin-layout */

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .school-info {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .language-switcher {
        margin-left: 0;
        justify-content: center;
    }

    .school-center-section {
        padding: 25px 15px;
        margin-bottom: 40px;
    }
    
    .center-logo {
        width: 70px;
        height: 70px;
    }
    
    .school-name-center {
        font-size: 1.5rem;
    }

    .hierarchical-grid {
        gap: 40px;
        padding: 60px 0;
    }
    
    .main-card {
        min-width: 350px;
        max-width: 400px;
        padding: 40px 30px;
    }
    
    .sub-cards {
        grid-template-columns: 1fr;
        gap: 25px;
        max-width: 400px;
    }
    
    .sub-card {
        padding: 30px 20px;
    }

    .form-container {
        margin: 20px;
        padding: 30px;
    }

    .table-container {
        font-size: 14px;
    }

    th, td {
        padding: 10px 8px;
    }

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

    .student-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

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

    .action-buttons {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-layout .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 0;
        box-shadow: none;
        border: none;
    }

    .admin-layout .sidebar-header {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .admin-layout .sidebar-menu {
        padding: 0 10px 15px;
    }

    .admin-layout .main-content {
        margin-right: 0;
        margin-left: 0;
        width: 100%;
        padding: 20px;
        box-sizing: border-box;
    }

    [dir="rtl"] .admin-layout .main-content {
        margin-right: 0;
        margin-left: 0;
        box-sizing: border-box;
    }

    .admin-layout .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .admin-layout .content-header h2 {
        font-size: 1.5rem;
    }

    .admin-layout .header-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .admin-layout .header-actions .language-switcher {
        order: 2;
    }

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

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

    .modal-overlay {
        padding: 10px;
    }

    .modal-content {
        max-width: 100%;
    }

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

    .modal-actions .btn {
        flex: none;
    }

    /* Responsive tables */
    .table-container {
        overflow-x: auto;
    }

    .table-container table {
        min-width: 800px;
    }

    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }

    .card-header .header-actions {
        flex-direction: column;
        gap: 5px;
    }

    .card-header .header-actions .btn {
        width: 100%;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .welcome-section {
        padding: 30px 0;
    }

    .school-center-section {
        padding: 20px 15px;
        margin-bottom: 30px;
    }
    
    .center-logo {
        width: 60px;
        height: 60px;
    }
    
    .school-name-center {
        font-size: 1.3rem;
    }

    .hierarchical-grid {
        gap: 30px;
        padding: 40px 0;
    }
    
    .main-card {
        min-width: 300px;
        max-width: 350px;
        padding: 35px 25px;
    }
    
    .main-card h3 {
        font-size: 1.6rem;
    }
    
    .main-card p {
        font-size: 1rem;
    }
    
    .sub-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 350px;
    }
    
    .sub-card {
        padding: 25px 20px;
    }
    
    .sub-card h3 {
        font-size: 1.2rem;
    }
    
    .sub-card p {
        font-size: 0.9rem;
    }

    .form-container {
        margin: 15px;
        padding: 25px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* RTL Support */
[dir="rtl"] .language-switcher {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .card-arrow {
    right: auto;
    left: 20px;
}

[dir="rtl"] .student-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* Reports Section */
.reports-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

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

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(27, 94, 32, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: rgba(27, 94, 32, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-content h4 {
    margin: 0 0 8px 0;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
}

.stat-number {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.recent-activity {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.recent-activity h4 {
    margin: 0 0 20px 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
}

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 35px;
    height: 35px;
    background: rgba(27, 94, 32, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content p {
    margin: 0 0 5px 0;
    color: #333;
    line-height: 1.5;
}

.activity-content small {
    color: #666;
    font-size: 0.85rem;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Reports Section Styles */
.filters-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

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

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

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

.reports-section .stat-item {
    text-align: center;
    padding: 20px;
    background: var(--secondary-color);
    border-radius: var(--border-radius);
}

.reports-section .stat-item h5 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.reports-section .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* Grades Management Styles */
.grades-management {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    border: 3px solid #FF9800;
    position: relative;
    overflow: hidden;
}

.grades-management::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    animation: shimmer-border 3s ease-in-out infinite;
}

@keyframes shimmer-border {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.grades-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 25px;
    border: 2px solid #FF9800;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 183, 77, 0.1));
    position: relative;
    overflow: hidden;
}

.grades-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(circle, rgba(255, 152, 0, 0.1) 0%, transparent 70%);
    animation: rotate-glow 4s linear infinite;
    pointer-events: none;
}

@keyframes rotate-glow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.grades-header h3 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.grades-header p {
    margin: 0;
    color: #666;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.quick-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #FF9800 0%, #FFB74D 100%);
    color: white;
    border: 3px solid #FF9800;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(255, 152, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent);
    transition: left 0.6s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #4c8c4a 100%);
    border-color: #1b5e20;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 
        0 8px 25px rgba(27, 94, 32, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.action-btn svg {
    transition: transform 0.3s ease;
}

.action-btn:hover svg {
    transform: scale(1.1);
}

.form-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    border: 3px solid #FF9800;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 152, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { opacity: 0.6; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.02); }
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    border: 2px solid #FF9800;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 183, 77, 0.1));
    position: relative;
    z-index: 1;
}

.form-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
}

.close-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #c82333;
    transform: scale(1.1);
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

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

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.form-control {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
}

.form-help {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.form-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.grades-overview {
    margin-top: 40px;
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 183, 77, 0.1));
    border-radius: 15px;
    border: 3px solid #FF9800;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 152, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.overview-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    animation: header-shimmer 3s ease-in-out infinite;
}

@keyframes header-shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.overview-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.overview-stats {
    display: flex;
    gap: 30px;
}

.overview-stats .stat-item {
    text-align: center;
    padding: 15px 20px;
    background: white;
    border: 2px solid #FF9800;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.overview-stats .stat-item:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.3);
    border-color: #FFB74D;
}

.overview-stats .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.overview-stats .stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.grades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.grade-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 3px solid #FF9800;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.05),
        0 0 0 1px rgba(255, 152, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.grade-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    animation: card-shimmer 3s ease-in-out infinite;
}

@keyframes card-shimmer {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.grade-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(0, 0, 0, 0.15),
        0 0 0 2px rgba(255, 152, 0, 0.3);
    border-color: #FF9800;
}

.grade-card:hover::before {
    animation-duration: 1s;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800, #FFB74D, #FF9800);
}

.grade-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #FF9800;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 183, 77, 0.1));
    position: relative;
    z-index: 1;
}

.grade-header h5 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
}

.grade-header p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
}

.grade-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.grade-stats .stat {
    text-align: center;
    padding: 15px 10px;
    background: var(--secondary-color);
    border-radius: 10px;
}

.grade-stats .stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.grade-stats .stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    margin-top: 5px;
}

.sections-list {
    margin-bottom: 20px;
}

.section-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 2px solid #FF9800;
    border-left: 5px solid #FF9800;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.section-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 152, 0, 0.1), 
        transparent);
    transition: left 0.5s ease;
}

.section-item:hover::before {
    left: 100%;
}

.section-item:hover {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.1), rgba(255, 183, 77, 0.1));
    border-color: #FFB74D;
    transform: translateX(5px);
}

.section-name {
    font-weight: 600;
    color: var(--primary-color);
}

.section-count {
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 2px solid #FF9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    transition: all 0.3s ease;
}

.section-count:hover {
    background: linear-gradient(135deg, #FFB74D, #FF9800);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4);
}

.grade-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.action-btn-small {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: linear-gradient(135deg, #FF9800, #FFB74D);
    color: white;
    border: 2px solid #FF9800;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.action-btn-small::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent);
    transition: left 0.4s ease;
}

.action-btn-small:hover::before {
    left: 100%;
}

.action-btn-small:hover {
    background: linear-gradient(135deg, #1b5e20, #4c8c4a);
    border-color: #1b5e20;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(27, 94, 32, 0.3);
}

@media (max-width: 768px) {
    [dir="rtl"] .admin-layout .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-actions {
        flex-direction: column;
    }
    
    .quick-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .overview-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .overview-stats {
        justify-content: center;
    }
    
    .grades-grid {
        grid-template-columns: 1fr;
    }
    
    .grade-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .grade-actions {
        flex-direction: column;
    }
    
    .action-btn-small {
        justify-content: center;
    }
    
    .stats-overview {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-card {
        padding: 20px;
        gap: 15px;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
    }
    
    .stat-content h3 {
        font-size: 2.2rem;
        font-weight: 800;
        color: #1a1a1a;
        text-shadow: 
            0 2px 4px rgba(255, 255, 255, 0.8),
            0 1px 2px rgba(255, 255, 255, 0.6),
            0 0 0 1px rgba(255, 255, 255, 0.4);
        filter: contrast(1.2) brightness(0.9);
    }
    
    .stat-content p {
        font-size: 1rem;
        font-weight: 600;
        color: #2d2d2d;
        text-shadow: 
            0 1px 3px rgba(255, 255, 255, 0.7),
            0 1px 2px rgba(255, 255, 255, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.3);
        filter: contrast(1.1) brightness(0.95);
    }
}

/* Success indicator styles */
.success-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    padding: 20px 30px;
    border-radius: 15px;
    font-size: 1.1rem;
    z-index: 2000;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    opacity: 0;
    scale: 0.8;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.success-indicator.show {
    opacity: 1;
    scale: 1;
}

.success-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.success-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    animation: checkmark 0.6s ease-in-out;
}

.success-message {
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

@keyframes checkmark {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

/* User Management Styles */
.users-list {
    margin-bottom: 30px;
}

.users-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

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

.users-table th {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 15px;
    text-align: right;
    font-weight: 600;
    border: none;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.users-table tr:hover {
    background: #f8f9fa;
}

.role-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    min-width: 60px;
}

.role-admin {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.role-teacher {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
    min-width: 60px;
}

.status-active {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
}

.status-inactive {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

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

.action-buttons .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-buttons .btn-warning {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.action-buttons .btn-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.action-buttons .btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.add-user-section {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(52, 152, 219, 0.1);
}

.user-form {
    margin-top: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.form-group input[type="checkbox"] {
    width: auto;
    margin-left: 10px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.form-actions .btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-actions .btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.form-actions .btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.form-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Two Cards Grid Layout */
.two-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Portal Grid Layout (for reference) */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.portal-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 12px 35px rgba(0, 0, 0, 0.1),
        0 6px 20px rgba(0, 0, 0, 0.08),
        0 3px 10px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 3px solid rgba(255, 152, 0, 0.15);
    position: relative;
    overflow: hidden;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF9800, #FFB74D, #FF9800);
    border-radius: 20px 20px 0 0;
}

.portal-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 
        0 20px 45px rgba(255, 152, 0, 0.2),
        0 12px 30px rgba(0, 0, 0, 0.12),
        0 6px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 152, 0, 0.4);
}

.portal-card .card-icon {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.portal-card:hover .card-icon {
    transform: scale(1.15) rotate(8deg);
}

.portal-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #2c3e50;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.portal-card:hover h3 {
    color: #FF9800;
    transform: translateY(-3px);
}

.portal-card p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portal-card .card-arrow {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #FF9800;
    transition: all 0.3s ease;
}

.portal-card:hover .card-arrow {
    transform: translateX(5px);
    color: #FFB74D;
}

/* Specific Card Styles */
.admin-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

.admin-card::before {
    background: linear-gradient(90deg, #3498db, #5dade2, #3498db);
}

.parent-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff0 100%);
}

.parent-card::before {
    background: linear-gradient(90deg, #27ae60, #58d68d, #27ae60);
}

.duty-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff8f0 100%);
}

.duty-card::before {
    background: linear-gradient(90deg, #e67e22, #f39c12, #e67e22);
}

.reports-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f0ff 100%);
}

.reports-card::before {
    background: linear-gradient(90deg, #9b59b6, #bb8fce, #9b59b6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .two-cards-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px 15px;
    }
    
    .portal-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }
    
    .portal-card {
        padding: 30px;
        min-height: 220px;
    }
    
    .portal-card h3 {
        font-size: 1.5rem;
    }
    
    .portal-card p {
        font-size: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
    }
    
    .users-table {
        overflow-x: auto;
    }
    
    .users-table table {
        min-width: 600px;
    }
}

@media (max-width: 480px) {
    .two-cards-grid {
        padding: 15px 10px;
        gap: 25px;
    }
    
    .portal-grid {
        padding: 10px;
    }
    
    .portal-card {
        padding: 25px;
        min-height: 200px;
    }
    
    .portal-card h3 {
        font-size: 1.3rem;
    }
    
    .portal-card p {
        font-size: 0.95rem;
    }
}

/* Notification animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
