/* Professional & Fast LIS Portal Design - Light Theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #1B5E20;
    --primary-light: #2E7D32;
    --primary-dark: #0D3D13;
    --accent: #FFD700;
    --accent-dark: #FFC107;

    --blue: #0284c7;
    --green: #16a34a;
    --purple: #9333ea;
    --orange: #ea580c;
    --red: #dc2626;

    /* Light Theme Variables */
    --bg-dark: #f1f5f9;
    /* Light gray background for dashboard */
    --bg-card: rgba(255, 255, 255, 0.95);
    /* White glass */
    --text-light: #1e293b;
    /* Dark slate text */
    --text-gray: #64748b;
    /* Slate text */
    --border-color: #e2e8f0;
    --input-bg: #f8fafc;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Common Classes */
.glass-effect {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(27, 94, 32, 0.2);
}

.hover-lift {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(27, 94, 32, 0.3);
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-gray);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    color: var(--text-light);
    border-color: #cbd5e1;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Professional Background with Gradient Overlay */
    background: linear-gradient(135deg, rgba(13, 61, 19, 0.85), rgba(27, 94, 32, 0.75)), url('images/ddrmehi-mural.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient overlay */
.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.1) 0%, transparent 70%);
    animation: rotateGradient 20s linear infinite;
    pointer-events: none;
}

@keyframes rotateGradient {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.login-container-horizontal {
    display: flex;
    flex-direction: row;
    max-width: 750px;
    width: 100%;
    max-height: 90vh;
    min-height: 500px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    transform: translateY(0);
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}

/* Glow effect on hover */
.login-container-horizontal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.3), rgba(255, 255, 255, 0.1));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.login-container-horizontal:hover::before {
    opacity: 1;
}

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

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

.school-info-section {
    flex: 1;
    padding: 40px 30px;
    background: linear-gradient(135deg,
            rgba(13, 61, 19, 0.5) 0%,
            rgba(27, 94, 32, 0.3) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

/* Decorative animated circles */
.school-info-section::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15) 0%, transparent 70%);
    top: -30px;
    right: -30px;
    border-radius: 50%;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.school-logo-3d {
    width: 85px;
    height: auto;
    margin-bottom: 14px;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.4));
    z-index: 2;
    animation: floatLogo 6s ease-in-out infinite, logoGlow 3s ease-in-out infinite;
    transition: transform 0.3s;
}

@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.6)) drop-shadow(0 0 40px rgba(255, 255, 255, 0.4));
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(255, 215, 0, 0.8)) drop-shadow(0 0 50px rgba(255, 255, 255, 0.6));
    }
}

.school-logo-3d:hover {
    transform: scale(1.05);
}

@keyframes floatLogo {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.school-name-gradient {
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.25;
    background: linear-gradient(135deg, #ffffff 0%, #ffd700 50%, #ffffff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    z-index: 2;
    animation: shimmer 3s linear infinite;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
}

/* School Tagline */
.school-tagline {
    font-size: 12px;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 14px;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    animation: taglineGlow 2s ease-in-out infinite;
    backdrop-filter: blur(5px);
}

.school-tagline i {
    font-size: 10px;
    animation: starTwinkle 1.5s ease-in-out infinite;
}

@keyframes taglineGlow {

    0%,
    100% {
        box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
}

@keyframes starTwinkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

@keyframes shimmer {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 200% center;
    }
}

.system-badge {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 255, 255, 0.15));
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    border: 1px solid rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(8px);
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.location-fancy {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
    padding: 6px 10px;
    border-radius: 8px;
    transition: all 0.3s;
}

.location-fancy:hover {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
    transform: translateY(-2px);
}

.school-footer {
    margin-top: 12px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    gap: 12px;
    z-index: 2;
}

.security-badge,
.year-badge {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Login Form Section */
.login-form-section {
    flex: 1;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
}

.form-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #ffffff 0%, #e8f5e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.1);
}

.form-subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    font-size: 14px;
}

.input-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.input-wrapper label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.input-wrapper input {
    width: 100%;
    padding: 12px 15px 12px 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    color: #ffffff;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.input-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.input-wrapper input:focus {
    outline: none;
    border-color: rgba(255, 215, 0, 0.6);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15),
        0 4px 12px rgba(255, 215, 0, 0.2);
    transform: translateY(-1px);
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 40px;
    color: rgba(255, 255, 255, 0.6);
    transition: all 0.3s;
}

.input-wrapper input:focus+.input-icon {
    color: #ffd700;
    transform: scale(1.1);
}

.login-error {
    background: #fee2e2;
    color: var(--red);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #fecaca;
    text-align: center;
    font-weight: 500;
}

.login-error.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.btn-login-premium {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #1B5E20 0%, #0D3D13 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(27, 94, 32, 0.4),
        0 0 0 1px rgba(255, 215, 0, 0.2) inset;
    position: relative;
    overflow: hidden;
}

.btn-login-premium::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.5s;
}

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

.btn-login-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 94, 32, 0.5),
        0 0 0 2px rgba(255, 215, 0, 0.3) inset;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}

.btn-login-premium:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(27, 94, 32, 0.4);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

.login-footer a {
    color: rgba(255, 215, 0, 0.9);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.login-footer a:hover {
    color: #ffd700;
    text-decoration: underline;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Sidebar & Navigation - Light Theme Update */
.sidebar {
    width: 260px;
    height: 100vh;
    background: white;
    border-right: 1px solid #e2e8f0;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.05);
    position: fixed;
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 100;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
    margin-bottom: 20px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
}

.sidebar-title h3 {
    font-size: 16px;
    color: var(--primary-dark);
    font-weight: 700;
}

.sidebar-title p {
    font-size: 12px;
    color: var(--text-gray);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background-color 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: #f0fdf4;
    /* Light green bg */
    color: var(--primary-dark);
}

.nav-item.active {
    background: #dcfce7;
    color: var(--primary-dark);
    border-left: 4px solid var(--primary);
}

.nav-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-group-header:hover {
    background: #f8fafc;
    color: var(--text-light);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 15px;
}

.nav-submenu.open {
    max-height: 500px;
    transition: max-height 0.5s ease-in;
}

.nav-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    border-left: 1px solid #e2e8f0;
}

.nav-subitem:hover {
    color: var(--primary);
    border-left-color: var(--primary);
    background: #f8fafc;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-weight: 600;
}

.user-info .user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.user-info .user-role {
    font-size: 12px;
    color: var(--text-gray);
}

.btn-logout {
    background: transparent;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    font-size: 18px;
}

.btn-logout:hover {
    color: var(--red);
}

/* Main Content - Light Theme */
.main-content {
    margin-left: 260px;
    padding: 30px 30px 100px 30px;
    width: calc(100% - 260px);
    max-width: calc(100vw - 260px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

html {
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.search-bar {
    position: relative;
    width: 400px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.search-bar input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-light);
}

.search-bar input:focus {
    background: white;
    border-color: var(--primary);
    outline: none;
}

.top-actions {
    display: flex;
    gap: 15px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
}

.icon-btn:hover {
    background: #f8fafc;
    color: var(--primary);
}

.icon-btn .badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--red);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-sm);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue {
    background: #e0f2fe;
    color: var(--blue);
}

.stat-icon.green {
    background: #dcfce7;
    color: var(--green);
}

.stat-icon.purple {
    background: #f3e8ff;
    color: var(--purple);
}

.stat-icon.orange {
    background: #ffedd5;
    color: var(--orange);
}

.stat-details h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
}

.stat-details p {
    color: var(--text-gray);
    font-size: 14px;
}

.stat-change {
    font-size: 12px;
    display: block;
    margin-top: 5px;
    color: var(--text-gray);
}

.stat-change.positive {
    color: var(--green);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    max-width: 100%;
    box-sizing: border-box;
}

.chart-card,
.quick-actions,
.table-card,
.form-card,
.dashboard-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    box-sizing: border-box;
}

.chart-card h3,
.quick-actions h3,
.form-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.chart-placeholder {
    height: 250px;
    background: #f8fafc;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    border: 2px dashed #e2e8f0;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    background: #f8fafc;
    border-color: var(--primary);
    transform: translateX(5px);
}

.action-btn i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

/* Tables */
.table-card {
    overflow: hidden;
    margin-top: 20px;
}

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

.modern-table th,
.modern-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.modern-table th {
    background: #f8fafc;
    color: var(--text-gray);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.modern-table td {
    color: var(--text-light);
}

.modern-table tr:hover {
    background: #f8fafc;
}

.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    background: #f1f5f9;
    color: var(--text-gray);
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.form-field {
    margin-bottom: 15px;
}

.form-field.full-width {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-gray);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
}

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

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

.btn-submit {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-reset {
    background-color: white;
    border: 1px solid #e2e8f0;
    color: var(--text-gray);
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Filters */
.filters-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    flex: 1;
    position: relative;
}

.filter-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.filter-group input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-light);
}

.filter-select {
    padding: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-light);
    min-width: 150px;
}

.btn-filter {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Utilities */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: -1;
}

.modal-content {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 15px;
    width: 500px;
    max-width: 90%;
    position: relative;
    padding: 30px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    z-index: 1001;
    margin: auto;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 20px;
    cursor: pointer;
}

.modal-title {
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-light);
}

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

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

.page.active {
    animation: fadeIn 0.4s ease-out;
}

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

    .sidebar {
        width: 0;
        padding: 0;
        overflow: hidden;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

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

/* Content visibility fix */
.content-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

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

/* Document Generation Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px;
}

.doc-card {
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    background: white;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.doc-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(27, 94, 32, 0.1);
}

.doc-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text-light);
    font-weight: 700;
}

.doc-card p {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.btn-doc {
    padding: 10px 20px;
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
}

.btn-doc:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.2);
}

/* Reports Grid */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    padding: 10px;
}

.report-card {
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    background: white;
}

.report-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--blue);
}

.report-card i {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--blue);
    box-shadow: 0 4px 10px rgba(2, 132, 199, 0.1);
}

.report-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-light);
    font-weight: 700;
}

.btn-report {
    padding: 10px 20px;
    border: 1px solid var(--blue);
    color: var(--blue);
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
}

.btn-report:hover {
    background: var(--blue);
    color: white;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
}

/* Enrollment Tabs */
.enrollment-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #eee;
    border-radius: 5px;
    margin-top: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--success);
    transition: width 0.3s;
}

/* Grading Interface */
.grade-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    transition: all 0.2s;
}

.grade-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
    outline: none;
}

.grade-input:not(:placeholder-shown) {
    background: #f8f9fa;
}

/* Class Record Modal */
.large-modal {
    width: 900px;
    max-width: 95%;
}

.class-record-body {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 10px;
}

.gender-header {
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gender-header.male {
    color: #2196F3;
}

.gender-header.female {
    color: #E91E63;
}

.grading-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.grading-table th,
.grading-table td {
    padding: 10px;
    border: 1px solid #eee;
    text-align: center;
}

.grading-table th {
    background: #f8f9fa;
    color: #555;
    font-weight: 600;
    font-size: 13px;
}

.grading-table td.student-name {
    text-align: left;
    font-weight: 500;
    color: #333;
}

.grading-table input.grade-input {
    width: 100%;
    border: 1px solid transparent;
    text-align: center;
    background: transparent;
    font-weight: 600;
}

.grading-table input.grade-input:focus {
    border-bottom: 2px solid var(--primary);
    background: #f0f7ff;
}

.grading-table input.grade-input:hover {
    background: #fafafa;
}

.grading-table .final-grade {
    font-weight: bold;
    color: var(--primary);
    background: #fdfdfd;
}

.subject-info {
    font-size: 14px;
    font-weight: 500;
}

/* Fix for Missing Button */
.form-actions {
    width: 100%;
    min-height: 60px;
    /* Force height */
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    /* Center button vertically */
    clear: both;
    position: relative;
    /* Ensure z-index works */
    z-index: 10;
    background: transparent;
    /* Verify transparency */
}

/* Ensure button is visible */
.form-actions button {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.form-card {
    overflow: visible !important;
    padding-bottom: 20px;
}

/* Teacher Dashboard Enhancements */
.dashboard-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .dashboard-grid-3col {
        grid-template-columns: 1fr;
    }
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
}

.dashboard-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.dashboard-card .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard-card .card-header h3 i {
    color: var(--primary);
}

.count-badge {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

.date-badge {
    background: #f1f5f9;
    color: var(--text-gray);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

/* Student List Table */
.student-list-container {
    max-height: 200px;
    overflow-y: auto;
    border-radius: 8px;
}

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

.student-list-table thead {
    position: sticky;
    top: 0;
    background: #f8fafc;
    z-index: 1;
}

.student-list-table th {
    padding: 12px 8px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gray);
    text-transform: uppercase;
    border-bottom: 2px solid #e2e8f0;
}

.student-list-table td {
    padding: 12px 8px;
    font-size: 14px;
    color: var(--text-light);
    border-bottom: 1px solid #f1f5f9;
}

.student-list-table tr:hover {
    background: #f8fafc;
}

.student-list-table .loading {
    text-align: center;
    color: var(--text-gray);
    padding: 40px;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 140px;
    margin: 15px 0;
}

/* Attendance Summary */
.attendance-summary {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

.summary-item.present {
    color: #10b981;
}

.summary-item.absent {
    color: #ef4444;
}

.summary-item i {
    font-size: 18px;
}

/* Make student rows clickable */
.student-list-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

.student-list-table tbody tr:hover {
    background: #e0f2fe !important;
}

/* Enrollment Summary */
.enrollment-summary {
    display: flex;
    justify-content: space-around;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
}

.stat-item.active .stat-value {
    color: #3b82f6;
}

.stat-item.transferred .stat-value {
    color: #f59e0b;
}

.stat-item.dropped .stat-value {
    color: #ef4444;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-transferred {
    background: #fef3c7;
    color: #92400e;
}

.status-dropped {
    background: #fee2e2;
    color: #991b1b;
}

/* Teaching Assignments Styles */
.assignments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.assignment-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.assignment-header {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.assignment-header h3 {
    font-size: 16px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.assignment-subjects {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subject-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: background 0.2s;
}

.subject-item:hover {
    background: #e0f2fe;
}

.subject-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #334155;
}

.subject-info i {
    color: #3b82f6;
}

.subject-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    color: #64748b;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #e2e8f0;
    color: #3b82f6;
}

.btn-icon.btn-danger:hover {
    background: #fee2e2;
    color: #ef4444;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state p {
    margin: 8px 0;
    font-size: 16px;
}

/* Action Cards for Manage Teachers */
.action-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.action-icon i {
    font-size: 28px;
    color: white;
}

.action-content h3 {
    margin: 0 0 8px 0;
    color: #1e293b;
    font-size: 18px;
}

.action-content p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

/* Comparison Grid */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.role-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.feature-list li i {
    color: #10b981;
    font-size: 16px;
    flex-shrink: 0;
}

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

    .action-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Manual Final Rating */
.grade-input.manual-final {
    border: 1px dashed var(--primary) !important;
    background: #fdf6ff !important;
    color: var(--primary);
    border-radius: 4px;
    width: 60px;
    padding: 5px;
    font-weight: 700;
}

.grade-input.manual-final:focus {
    border-style: solid !important;
    background: white !important;
    outline: none;
}

.grade-input.manual-final::placeholder {
    color: #999;
    font-weight: 400;
    font-style: italic;
}

/* Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--primary);
}

input:checked+.slider:before {
    transform: translateX(26px);
}

/* Exam Management UI */
.badge-draft {
    background: #e2e8f0;
    color: #475569;
}

.badge-active {
    background: #dcfce7;
    color: #15803d;
}

.badge-closed {
    background: #fee2e2;
    color: #991b1b;
}

.q-card {
    background: #f8fafc;
    border-left: 4px solid var(--primary);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* ==================== EXAM RESULTS SECTION STYLES ==================== */

.filter-bar {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.filter-bar .form-field {
    flex: 1;
}

.filter-bar .form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.filter-select {
    width: 100%;
    padding: 10px 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-select:hover {
    border-color: var(--primary-light);
}

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

.filter-select:disabled {
    background: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.6;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.card-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-primary {
    background: #dcfce7;
    color: var(--primary-dark);
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-secondary {
    background: #f1f5f9;
    color: #475569;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

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

.btn-sm.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(27, 94, 32, 0.2);
}

.text-success {
    color: #16a34a !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-danger {
    color: #dc2626 !important;
}

.large-modal {
    max-width: 900px;
    width: 90%;
}

#examResultsPlaceholder {
    animation: fadeIn 0.3s ease-out;
}

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

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

/* Table enhancements for exam results */
.modern-table tbody tr:hover {
    background: #f8fafc;
    transform: scale(1.001);
}

.modern-table tbody tr {
    transition: all 0.2s;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-bar>div {
        flex-direction: column;
    }

    .filter-bar .form-field {
        min-width: 100% !important;
    }

    .large-modal {
        width: 95%;
        max-width: none;
    }
}

/* CLASS RECORD STYLES */
.class-record-table {
    font-size: 13px;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.class-record-table th,
.class-record-table td {
    padding: 4px;
    border: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
}

.class-record-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-light);
}

.cr-input {
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    text-align: center;
    width: 100%;
    outline: none;
    font-weight: 500;
    padding: 4px 0;
}

.cr-input:hover {
    background: #f1f5f9;
}

.cr-input:focus {
    background: #fff;
    border: 1px solid var(--primary);
    box-shadow: 0 0 0 2px rgba(27, 94, 32, 0.1);
}

.cr-input::-webkit-outer-spin-button,
.cr-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.big-text {
    font-size: 1.1em;
}


/* Print Styles for Signed Results (2x2 inch) */
@media print {
    @page {
        size: 2in 2in;
        margin: 0;
    }

    body * {
        visibility: hidden;
    }

    #printContainer,
    #printContainer * {
        visibility: visible;
    }

    #printContainer {
        position: fixed;
        left: 0;
        top: 0;
        width: 2in;
        height: 2in;
        background: white;
        padding: 2mm;
        /* reduced padding */
        box-sizing: border-box;
        overflow: hidden;
        color: black;
        font-family: 'Arial', sans-serif;
    }

    .print-slip {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
    }

    .slip-header {
        text-align: center;
        margin-bottom: 2px;
    }

    .item-row {
        display: flex;
        justify-content: space-between;
        line-height: 1.1;
    }

    .item-num {
        font-weight: bold;
    }

    /* Ensure minimal whitespace */
    p,
    h3 {
        margin: 0;
    }
}

/* Glass Filter Styles for Modals */
.filter-container-glass {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    max-width: 100%;
    box-sizing: border-box;
}

.filter-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-item label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item label i {
    color: var(--primary);
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    pointer-events: none;
    font-size: 0.8rem;
}

.modern-select {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.modern-select:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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


@media (max-width: 600px) {
    .filter-container-glass {
        flex-direction: column;
        gap: 15px;
    }
}

/* Specific fixes for Signed Results section to prevent overflow */
#signedResultsSection {
    max-width: 100%;
    overflow-x: hidden;
}

#signedResultsSection .section-header {
    max-width: 100%;
    overflow: hidden;
}

#signedResultsSection .table-card {
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
}

#signedResultsSection .modern-table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

#signedResultsSection .dashboard-grid {
    max-width: 100%;
}

/* Ensure section header flex doesn't cause overflow */
#signedResultsSection .section-header>div {
    max-width: 100%;
    flex-wrap: wrap;
    gap: 15px;
}

/* Make filter dropdowns responsive */
#signedResultsSection select {
    min-width: 120px;
    max-width: 200px;
}