/* ============================================
   IELTS Admin Panel - Masterpiece UI Styles
   ============================================ */

/* === GLOBAL RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --blue-light: #81b2de;
    --blue-dark: #368cd9;
    --purple-dark: #012d75;
    --gray-text: #5b5b5c;
    --white: #ffffff;
    --background: #f5f7fa;
    --card-bg: #ffffff;
    --error: #e74c3c;
    --success: #27ae60;
    --border: #e1e8ed;
    --shadow-sm: 0 2px 8px rgba(1, 45, 117, 0.08);
    --shadow-md: 0 4px 16px rgba(1, 45, 117, 0.12);
    --shadow-lg: 0 8px 32px rgba(1, 45, 117, 0.16);
    --shadow-xl: 0 12px 48px rgba(1, 45, 117, 0.2);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.4s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    color: var(--gray-text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* === CONTAINER & CARD (For Login Screen) === */
.container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(129, 178, 222, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 20s infinite ease-in-out;
}

.container::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(54, 140, 217, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: float 15s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.05); }
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: var(--shadow-xl);
    padding: 48px;
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

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

/* === SPLASH SCREEN === */
.splash-screen {
    text-align: center;
    padding: 80px 48px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-dark) 100%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    font-weight: 800;
    color: var(--white);
    box-shadow: var(--shadow-lg);
    animation: rotateLogo 3s infinite ease-in-out;
}

@keyframes rotateLogo {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(5deg); }
}

.splash-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 12px;
}

.splash-subtitle {
    font-size: 16px;
    color: var(--gray-text);
}

/* === LOGO === */
.logo-small {
    width: 60px; /* Standard size for login/reset pages */
    height: 60px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-small img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Prevents stretching */
}

.logo-small:hover {
    transform: scale(1.05) rotate(5deg);
}

/* === TYPOGRAPHY === */
h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--purple-dark);
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subtitle {
    text-align: center;
    color: var(--gray-text);
    font-size: 15px;
    margin-bottom: 32px;
    font-weight: 400;
}

/* === FORM ELEMENTS (Modernized Inputs & Text Fields) === */
.form-group {
    margin-bottom: 24px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--purple-dark);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.2px;
}

/* General Input Styling for Text, Email, Password, Select, and Textarea */
.form-group input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 18px; 
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px;
    color: var(--purple-dark);
    background: var(--white);
    transition: all var(--transition-normal);
    font-family: inherit;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
    line-height: 1.5;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--blue-dark);
    box-shadow: 0 0 0 4px rgba(54, 140, 217, 0.1);
    transform: none;
}

/* Textarea styling */
.form-group textarea {
    min-height: 150px;
    resize: vertical;
}


input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="text"]::placeholder {
    color: #a0aec0;
}

/* === CUSTOM FILE PICKER (Fix for "Browse File" Button) === */

/* Hide default file input */
.file-upload-wrapper input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.custom-file-upload {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 18px;
    border: 2px dashed var(--border); /* Dashed border for file drop feel */
    border-radius: 12px;
    background-color: #fcfcfc;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.custom-file-upload:hover {
    border-color: var(--blue-light);
    background-color: #f9f9ff;
}

.custom-file-upload-text {
    color: var(--gray-text);
    font-size: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    flex-grow: 1;
    margin-right: 15px;
    font-style: italic;
}

/* File Upload Button Style */
.file-upload-btn {
    flex-shrink: 0;
    padding: 8px 15px;
    background: var(--white); /* White background */
    color: var(--blue-dark); /* Blue text */
    border: 1px solid var(--blue-dark); /* Blue border */
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

.file-upload-btn:hover {
    background: var(--blue-dark); /* Solid blue on hover */
    color: var(--white); /* White text on hover */
    box-shadow: 0 4px 8px rgba(54, 140, 217, 0.3);
    transform: translateY(-1px);
}


/* === PASSWORD TOGGLE === */
.password-toggle {
    position: absolute;
    right: 16px;
    /* Adjust top position to align with larger new input padding */
    top: 40px; 
    cursor: pointer;
    width: 24px;
    height: 24px;
    color: var(--gray-text);
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--blue-dark);
}

.password-toggle svg {
    width: 22px;
    height: 22px;
}

/* === ERROR & SUCCESS MESSAGES === */
.error-message {
    display: none;
    color: var(--error);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
}

.form-group.error .error-message {
    display: block;
    animation: shake 0.4s ease;
}

.form-group.error input {
    border-color: var(--error);
    background: rgba(231, 76, 60, 0.05);
}

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

.success-message {
    display: none;
    background: linear-gradient(135deg, rgba(39, 174, 96, 0.1) 0%, rgba(39, 174, 96, 0.05) 100%);
    color: var(--success);
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid rgba(39, 174, 96, 0.2);
    animation: slideDown 0.4s ease;
}

.success-message.show {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === VERIFICATION INPUT === */
.verification-input {
    display: none;
    animation: fadeIn 0.4s ease;
}

.verification-input.show {
    display: block;
}

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

.timer {
    margin-top: 8px;
    font-size: 13px;
    color: var(--blue-dark);
    font-weight: 600;
}

/* === BUTTONS === */
.btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 16px rgba(54, 140, 217, 0.3);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
}

.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.5s ease;
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(54, 140, 217, 0.4);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(54, 140, 217, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === REMEMBER ME & FORGOT PASSWORD === */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--blue-dark);
}

.remember-me label {
    margin: 0;
    color: var(--gray-text);
    font-weight: 500;
    cursor: pointer;
}

.forgot-link {
    color: var(--blue-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.forgot-link:hover {
    color: var(--blue-light);
    text-decoration: underline;
}

/* === BACK LINK === */
.back-link {
    text-align: center;
    margin-top: 24px;
}

.back-link a {
    color: var(--gray-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.back-link a:hover {
    color: var(--blue-dark);
}

/* === DASHBOARD LAYOUT === */
.body-dashboard {
    background: var(--background);
    min-height: 100vh;
    position: relative;
}

.body-dashboard::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(129, 178, 222, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(54, 140, 217, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.container-dashboard {
    min-height: 100vh;
    padding: 32px;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* === HEADER === */
.header {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    padding: 28px 36px;
    border-radius: 24px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: none;
}

.logo-header {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.logo-header .logo-small img {
    margin: 0;
    width: 56px;
    height: 56px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1));
}

.header-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--purple-dark);
    letter-spacing: -0.5px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--purple-dark);
    background-clip: unset;
}

.header-subtitle {
    font-size: 14px;
    color: var(--gray-text);
    margin-top: 4px;
    font-weight: 400;
}

.logout-btn-header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 1) 0%, rgba(220, 38, 38, 1) 100%);
    backdrop-filter: blur(0px);
    border: none;
    color: var(--white);
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    z-index: 1;
    width: auto;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.logout-btn-header:hover {
    background: linear-gradient(135deg, rgba(255, 99, 99, 1) 0%, rgba(239, 68, 68, 1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.5);
}

.logout-btn-header:active {
    transform: translateY(0);
}

/* === DASHBOARD GRID === */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
    margin-top: 40px;
}

.dashboard-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 36px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    /* Set a light blue hover overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(54, 140, 217, 0.05);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.dashboard-card::after {
    content: none;
}

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

.dashboard-card:hover::after {
    transform: none;
}

.dashboard-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 16px 48px rgba(54, 140, 217, 0.15);
    border-color: var(--blue-dark);
}

.dashboard-card-icon {
    font-size: 56px;
    margin-bottom: 24px;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    position: relative;
    z-index: 1;
}

.dashboard-card:hover .dashboard-card-icon {
    transform: scale(1.1) rotate(-2deg);
    filter: drop-shadow(0 8px 16px rgba(54, 140, 217, 0.4));
}

.dashboard-card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    letter-spacing: -0.3px;
}

.dashboard-card-desc {
    font-size: 14px;
    color: var(--gray-text);
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* === MODAL (Kept for completeness, though not used now) === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    animation: fadeInModal 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

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

.modal-content {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 28px;
    padding: 48px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    position: relative;
    animation: slideUpModal 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 32px;
    font-weight: 300;
    color: var(--gray-text);
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all var(--transition-normal);
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-close:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.9) 0%, rgba(220, 38, 38, 0.9) 100%);
    color: var(--white);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-header {
    margin-bottom: 36px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(129, 178, 222, 0.2);
}

.modal-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--purple-dark) 0%, var(--blue-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-subtitle {
    font-size: 15px;
    color: var(--gray-text);
    font-weight: 500;
}

/* === MODULE GRID === */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.module-btn {
    background: linear-gradient(135deg, rgba(129, 178, 222, 0.05) 0%, rgba(54, 140, 217, 0.03) 100%);
    border: 2px solid rgba(129, 178, 222, 0.3);
    border-radius: 20px;
    padding: 32px 28px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.module-btn::before {
    /* Set a light blue hover overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.module-btn:hover::before {
    opacity: 0;
}

.module-btn:hover {
    border-color: var(--blue-dark);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 32px rgba(54, 140, 217, 0.3);
    background: linear-gradient(135deg, rgba(129, 178, 222, 0.1) 0%, rgba(54, 140, 217, 0.05) 100%);
}

.module-btn:hover .module-btn-title,
.module-btn:hover .module-btn-desc {
    color: var(--purple-dark);
}

.module-btn-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.module-btn:hover .module-btn-icon {
    transform: scale(1.2) rotate(-10deg);
    filter: drop-shadow(0 4px 8px rgba(54, 140, 217, 0.3));
}

.module-btn-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 8px;
    transition: color var(--transition-normal);
    position: relative;
    z-index: 1;
}

.module-btn-desc {
    font-size: 13px;
    color: var(--gray-text);
    transition: color var(--transition-normal);
    position: relative;
    z-index: 1;
    line-height: 1.5;
}

.single-action-btn {
    background: var(--card-bg); /* White background */
    border: 2px solid var(--border);
    color: var(--purple-dark);
    padding: 22px 28px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px; /* Adjusted from 18px to 24px for better vertical padding/margin */
    text-align: left;
    position: relative;
    overflow: hidden;
}

.single-action-btn::before {
    /* Subtle blue slide-in effect */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(129, 178, 222, 0.1) 0%, rgba(54, 140, 217, 0.05) 100%);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.single-action-btn::after {
    content: '→';
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    color: var(--purple-dark);
}

.single-action-btn:hover::before {
    transform: translateX(0);
}

.single-action-btn:hover {
    border-color: var(--blue-dark);
    color: var(--purple-dark);
    transform: translateX(4px);
    box-shadow: 0 8px 24px rgba(54, 140, 217, 0.1);
}

.single-action-btn:hover::after {
    transform: translateY(-50%) translateX(6px) scale(1.2);
}

.single-action-btn:last-child {
    margin-bottom: 0;
}

.single-action-btn span {
    position: relative;
    z-index: 1;
}


/* ===================================================
  INNER SCREEN & FORM LAYOUT (RESPONSIVE & PADDED)
=================================================== 
*/

.content-wrapper {
    padding: 32px 0;
}

.module-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--gray-text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-fast);
}

.tab-btn.active {
    color: var(--blue-dark);
    border-bottom: 3px solid var(--blue-dark);
}

.tab-btn:hover:not(.active) {
    color: var(--purple-dark);
    background-color: rgba(54, 140, 217, 0.05);
    border-radius: 8px 8px 0 0;
}

/* 💡 FIX: Increased padding and added margin-bottom for better module spacing */
.module-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px; 
    box-shadow: var(--shadow-sm);
    margin-bottom: 40px; 
}

.module-content.hidden {
    display: none;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--purple-dark);
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

/* 💡 FIX: Increased gap between form elements */
.content-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 40px; 
}

/* Make full-width column for descriptions and submit button */
.content-form .form-group:nth-last-child(2),
.content-form .form-group:has(textarea) {
    grid-column: 1 / -1;
}

.content-form .btn.submit-btn {
    grid-column: 1 / -1;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-dark) 100%) !important;
}

.content-form .btn.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(54, 140, 217, 0.4);
}


/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    .card {
        padding: 32px 24px;
        border-radius: 20px;
    }

    h1 {
        font-size: 26px;
    }

    /* Ensure the main dashboard container has mobile padding */
    .container-dashboard {
        padding: 20px;
    }

    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 24px;
    }

    .logo-header {
        flex-direction: column;
        gap: 16px;
    }

    .header-title {
        font-size: 22px;
    }

    .logout-btn-header {
        width: 100%;
    }

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

    .dashboard-card {
        padding: 28px;
    }

    .modal-content {
        padding: 32px 24px;
        width: 95%;
        border-radius: 24px;
    }

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

    .modal-title {
        font-size: 26px;
    }

    .modal-close {
        width: 40px;
        height: 40px;
        right: 16px;
        top: 16px;
    }
    
    /* Stack form fields in a single column on mobile for inner pages */
    .content-form {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Ensure all form elements are single column on mobile */
    .content-form .form-group:nth-last-child(2),
    .content-form .form-group:has(textarea),
    .content-form .btn.submit-btn {
        grid-column: 1 / -1;
    }

    /* Reduce inner screen padding on mobile */
    .module-content {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    /* Full-width submit button on mobile */
    .content-form .btn.submit-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 24px 20px;
    }

    h1 {
        font-size: 24px;
    }

.splash-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
}

    .container-dashboard {
        padding: 16px;
    }

    .header {
        padding: 20px;
        border-radius: 20px;
    }

    .logo-header .logo-small {
        width: 48px;
        height: 48px;
        font-size: 24px;
    }

    .header-title {
        font-size: 20px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .dashboard-grid {
        gap: 16px;
    }

    .dashboard-card {
        padding: 24px;
        border-radius: 20px;
    }

    .dashboard-card-icon {
        font-size: 48px;
    }

    .dashboard-card-title {
        font-size: 20px;
    }

    .modal-content {
        padding: 28px 20px;
    }

    .modal-title {
        font-size: 24px;
    }

    .module-btn {
        padding: 24px 20px;
    }

    .module-btn-icon {
        font-size: 40px;
    }

    .single-action-btn {
        padding: 18px 24px;
        font-size: 16px;
    }
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--blue-light) 0%, var(--blue-dark) 100%);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--blue-dark) 0%, var(--blue-light) 100%);
}

/* === LOADING ANIMATION === */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* === ACCESSIBILITY === */
.btn:focus-visible,
input:focus-visible,
.module-btn:focus-visible,
.single-action-btn:focus-visible {
    outline: 3px solid var(--blue-light);
    outline-offset: 2px;
}

/* === PRINT STYLES === */
@media print {
    .btn, .modal, .logout-btn-header {
        display: none;
    }
}