:root {
    --primary-color: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --success-bg: #d1fae5;
    --danger-color: #ef4444;
    --danger-bg: #fee2e2;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #f3f4f6;
    --card-bg: rgba(255, 255, 255, 0.9);
    --sidebar-bg: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    min-height: 100vh;
    color: var(--text-color);
    display: flex;
}

.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.school-logo {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px dashed #e5e7eb;
}

.school-logo i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.school-logo h2 {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text-color);
}

.nav-links {
    list-style: none;
}

.nav-links li {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-links li i {
    font-size: 1.2rem;
}

.nav-links li:hover {
    background: #f3f4f6;
    color: var(--primary-color);
    transform: translateX(-5px);
}

.nav-links li.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* Main Content Styles */
.main-content {
    flex: 1;
    padding: 3rem 4rem;
    overflow-y: auto;
    height: 100vh;
}

.tab-section {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-section.active {
    display: block;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Individual Card */
.person-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.person-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: var(--transition);
}

.person-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.person-card:hover::before {
    opacity: 1;
}

.avatar-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    padding: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
}

.person-name {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.person-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.person-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.badge {
    background: #f3f4f6;
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.gender-male {
    background: #dbeafe;
    color: #2563eb;
}

.badge.gender-female {
    background: #fce7f3;
    color: #db2777;
}

/* Existing Result Search Box Styles - Adapted */
.search-box {
    display: flex;
    gap: 15px;
    margin-bottom: 2rem;
    max-width: 700px;
}

.search-box input {
    flex: 1;
    padding: 1.2rem 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    font-size: 1.1rem;
    transition: var(--transition);
    outline: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
}

.search-box input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-box button {
    padding: 1.2rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
}

.result-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    max-width: 700px;
    border: 2px solid transparent;
}

.result-card.success {
    border-color: var(--success-color);
    background: linear-gradient(to bottom, #ffffff, #f0fdf4);
}

.result-card.fail {
    border-color: var(--danger-color);
    background: linear-gradient(to bottom, #ffffff, #fef2f2);
}

.student-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: var(--text-color);
    text-align: center;
}

.stats {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    flex: 1;
    min-width: 150px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid #f3f4f6;
}

.stat-label {
    display: block;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
}

.grade-pass {
    color: var(--success-color);
}

.grade-fail {
    color: var(--danger-color);
}

.error-msg {
    color: var(--danger-color);
    background: var(--danger-bg);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid #fecaca;
    font-size: 1.2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 700px;
}

.hidden {
    display: none !important;
}

.filter-bar {
    margin-bottom: 2rem;
    display: flex;
    gap: 15px;
}

.filter-bar select {
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    outline: none;
    cursor: pointer;
    color: var(--text-color);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 1.5rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .school-logo {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: right;
    }

    .school-logo i {
        font-size: 2rem;
        margin-bottom: 0;
    }

    .school-logo h2 {
        font-size: 1.2rem;
    }

    .nav-links {
        display: flex;
        gap: 10px;
    }

    .nav-links li {
        margin-bottom: 0;
        padding: 0.8rem 1rem;
    }

    .main-content {
        padding: 2rem;
        height: auto;
    }
}

@media (max-width: 650px) {
    .sidebar {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .stats {
        flex-direction: column;
    }

    .search-box {
        flex-direction: column;
    }
}

/* Footer Styles */
.app-footer {
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
    border-top: 2px dashed #e5e7eb;
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 600;
}

.supervisor-name {
    color: var(--primary-color);
    font-weight: 800;
    padding: 0 5px;
}