/* ==========================================================================
   --- GLOBAL & GENERAL STYLES ---
   ========================================================================== */
   /* --- Top Utility Menu (History / Logout) --- */
#navcontainer {
    margin: auto 0;
    width: 900px;
    text-align: center;
}

#navcontainer ul
 {
    padding: 0;
    margin: auto 0;
    background: url(../../images/menuBackground.gif) repeat-x left top;
    float: left;
    width: 100%;
}	

#navcontainer ul li a {
    color: #626161;
    text-decoration: none;
    float: left;
    border-right: 1px solid #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 14px 10px;
}

#navlist {
    list-style: none;
    margin: 0;
    padding: 0;
}
#navlist li {
    list-style: none;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    padding: 10px;
}

.container {
    max-width: 900px;
    /*margin: 0 auto;*/
    background-color: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
    border-radius: 5px;
}

main h1, main h2, main h3 {
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

main h1.page-title {
    font-size: 1.8em;
    margin-top: 0;
}

.info-banner {
    background-color: #e7f3fe;
    border-left: 6px solid #2196F3;
    padding: 15px;
    margin-bottom: 20px;
    color: #333;
}

.info-box-highlight {
    background-color: #e7f3fe;
    border: 1px solid #bde0fe;
    border-left: 5px solid #007bff;
    border-radius: 5px;
    padding: 15px 15px 15px 20px;
    margin: 20px 0;
}

.info-box-highlight ul {
    padding-left: 20px;
    margin: 0;
    color: #333;
}

.info-box-highlight ul li {
    margin-bottom: 10px;
}

.info-box-highlight ul li:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   --- HEADER & NAVIGATION (TAB STYLES) ---
   ========================================================================== */
header {
    border-bottom: 2px solid #ddd;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
}

.header-info > * {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.header-info #header-total-fees {
    color: #0056b3;
    font-size: 18px;
    font-weight: 700;
    background-color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #dee2e6;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: space-around;
    background-color: #f8f9fa; /* Light background for bar */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav ul li {
    flex: 1;
    text-align: center;
}

/* --- DEFAULT TAB STATE (INACTIVE) --- */
nav ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 10px;
    color: #6c757d;       /* Gray text */
    background-color: #e9ecef; /* Light Gray background */
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
}

nav ul li:last-child a {
    border-right: none;
}

nav ul li a:hover {
    background-color: #dee2e6;
    color: #495057;
}

/* --- ACTIVE STATE (CURRENT STEP) --- */
nav ul li.active a {
    background-color: #007bff; /* Blue */
    color: #fff;
    font-weight: 700;
}

nav ul li.active a:hover {
    background-color: #0069d9;
}

/* --- COMPLETED STATE (PAST STEPS) --- */
nav ul li.completed a {
    background-color: #007bff; /* Green */
    color: #fff;
}

nav ul li.completed a:hover {
    background-color: #0069d9;
}

nav ul li.completed a::before {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Solid";
    content: "\f00c";
    font-weight: 900;
    color: #fff;
    margin-right: 8px;
    font-size: 14px;
}

/* ==========================================================================
   --- FORMS: GENERAL STYLES & LAYOUT ---
   ========================================================================== */
form {
    margin-top: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1/-1;
}

.form-group-hidden {
    display: none !important;
}

.form-group label {
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #444;
}

.form-section-card {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-section-card h2,
.form-section-card h3 {
    margin-top: 0;
    border-bottom: none;
    color: #0056b3;
    font-size: 1.3em;
}

.form-navigation {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.form-navigation .back-button {
    margin-right: auto;
}

/* Validation & Errors */
.required-asterisk {
    color: #D93025;
}

.required-field-note {
    color: #D93025;
    font-size: 14px;
}

.help-text, .help-text-red {
    font-size: 13px;
    color: #6c757d;
    margin-top: 5px;
}

.help-text-red {
    color: #dc3545;
}

.error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.invalid-field {
    border-color: #dc3545 !important;
}

.form-group.invalid-field input, 
.form-group.invalid-field select {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

.form-section-card.invalid-section {
    border: 1px solid #dc3545;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.2);
}
/* ==========================================================================
   --- PAGE: TERMS & CONDITIONS ---
   ========================================================================== */
.terms-box {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 1px 20px 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.terms-box ul, .guidelines ul {
    padding-left: 20px;
}

.terms-box li, .guidelines li {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 1rem;
}

.agreement-box {
    margin-top: 25px;
    padding: 15px;
    background-color: #f0f8ff;
    border: 1px solid #bde0fe;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.agreement-box input {
    margin-right: 10px;
}

/* --- JQUERY VALIDATION PLUGIN STYLES --- */

/* The Label Error Message */
label.error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 4px;
    display: block;
    font-weight: 500;
}

/* The Input Border when Invalid */
input.error, select.error, textarea.error {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

/* Fix for Select2 Border when Invalid */
/* The plugin puts the .error class on the HIDDEN select, so we target the sibling */
select.error + .select2-container .select2-selection {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

.form-section-card.invalid-section {
    border: 1px solid #dc3545;
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.2);
}

/* ==========================================================================
   --- MODERN INPUTS & MODERN SELECT2 STYLING (SMALLER & BLACK TEXT) ---
   ========================================================================== */

/* 1. Base Inputs */
.form-group input[type=text], 
.form-group input[type=email], 
.form-group input[type=tel], 
.form-group input[type=password],
.form-group input[type=number],
.form-group select {
    padding: 0 12px; 
    height: 36px;    /* Smaller height */
    border: 1px solid #ced4da;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    color: #000;      /* Black text */
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    line-height: 34px; 
}

.form-group input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
    color: #000; 
}

/* 2. Select2 Container */
.select2-container {
    width: 100% !important;
    margin: 0;
}

.select2-container .select2-selection--single {
    height: 36px !important; 
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    background-color: #fff;
    outline: none;
    display: flex;
    align-items: center;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

/* Focus State */
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #80bdff !important;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* The Text inside the dropdown */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important; 
    padding-left: 12px !important;
    padding-right: 30px !important;
    color: #000 !important; 
    font-size: 14px;
}

/* The Placeholder Text */
.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d; 
}

/* The Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important; 
    width: 30px !important;
    right: 1px !important;
    top: 1px !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #333 transparent transparent transparent; 
    border-width: 5px 4px 0 4px;
    margin-top: -2px;
}

.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-color: transparent transparent #333 transparent;
    border-width: 0 4px 5px 4px;
}

/* 3. Select2 Dropdown Menu */
.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-top: 4px;
    z-index: 9999;
}

.select2-search--dropdown {
    padding: 8px;
}

.select2-search__field {
    border: 1px solid #ced4da !important;
    border-radius: 4px !important;
    padding: 6px 10px !important;
    outline: none;
    color: #000 !important;
}

.select2-results__option {
    padding: 8px 12px;
    font-size: 14px;
    color: #000; 
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #007bff;
    color: white;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #e9ecef;
    color: #000;
    font-weight: 600;
}

/* ==========================================================================
   --- PERSONAL DATA PAGE SPECIFICS ---
   ========================================================================== */

/* Grid Layouts */
.grid-3-col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

/* Date of Birth / Country Grid - 50/50 Split */
.grid-dob-country {
    display: grid;
    grid-template-columns: 1fr 1fr; /* UPDATED: Equal split 50% each */
    gap: 15px;
    margin-bottom: 15px;
}

.dob-inputs {
    display: flex;
    gap: 10px;
    width: 100%;
}
.dob-wrap-day { flex: 0.8; }
.dob-wrap-month { flex: 1.5; }
.dob-wrap-year { flex: 1; }


/* --- PHONE FIELDS --- */
/* --- PHONE FIELDS (Updated to be global) --- */
.phone-input-group {
    display: flex;
    gap: 6px; 
    align-items: stretch; 
}

.phone-input-group .select2-container {
    flex: 0 0 110px !important; 
    width: 110px !important;
}

.phone-input-group input {
    flex: 1; 
}


/* --- NEW: Gender Row Layout --- */
.gender-row-layout {
    display: flex;
    flex-direction: row; /* Forces Label and Buttons onto one line */
    align-items: center;
    gap: 20px;
}
.gender-row-layout label {
    margin-bottom: 0; /* Remove bottom margin for side-by-side */
    white-space: nowrap;
}

.gender-group {
    display: flex;
    gap: 10px;
    align-items: center;
}
.gender-option {
    margin-bottom: 0;
}
.gender-option span {
    display: inline-block;
    padding: 6px 25px; 
    height: 36px;
    line-height: 22px; 
    box-sizing: border-box;
    border: 1px solid #ced4da;
    border-radius: 6px;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.2s;
    font-weight: 500;
    color: #000; 
}
.gender-option input:checked + span {
    background-color: #007bff;
    color: white;
    border-color: #0056b3;
}
.gender-option input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
    margin: 0;
}

/* --- Buttons --- */
.next-button, .back-button, .browse-files-button, .add-button, .save-button, .cancel-button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 25px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 700;
    transition: background-color 0.2s;
}

.back-button, .cancel-button {
    background-color: #6c757d;
}

.browse-files-button {
    background-color: #fff;
    color: #333;
    border: 1px solid #ced4da;
    padding: 8px 20px;
    font-size: 0.9em;
    font-weight: 600;
}

/* --- File Upload Styles --- */
.upload-section {
    border: none;
    padding: 25px;
    margin-bottom: 25px;
}

.file-requirements-box {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.file-requirements-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #007bff;
}
.file-requirements-header h5 {
    margin: 0;
    font-size: 1.1em;
}
.file-requirements-box ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9em;
    color: #555;
}
.photo-examples-horizontal {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}
.photo-example img {
    width: 100%;
    max-width: 200px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.drag-drop-area-new {
    border: 2px dashed #ced4da;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.2s;
}
.drag-drop-area-new:hover {
    background-color: #f1f8ff;
    border-color: #007bff;
}
.drag-drop-area-new.drag-over {
    border-color: #007bff;
    background-color: #e7f3fe;
}

.upload-icon-circle {
    width: 40px;
    height: 40px;
    background-color: #e7f3fe;
    color: #007bff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}
.upload-icon-circle svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.file-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f8ff;
    border: 1px solid #bde0fe;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 8px;
    font-size: 0.9em;
}

/* ==========================================================================
   --- RESPONSIVENESS ---
   ========================================================================== */
@media (max-width: 768px) {
    .grid-3-col, .grid-2-col, .grid-dob-country {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .gender-row-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .photo-examples-horizontal {
        flex-direction: column;
        align-items: center;
    }
}
/* ==========================================================================
   --- PAGE: DOCUMENTS ---
   ========================================================================== */
   /* --- New styles for institution info cards --- */
        .institution-content-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 15px;
        }

        .institution-info-card {
            /* --- UPDATED STYLES --- */
            border: 2px solid #ccc;     /* Match the unselected card border */
            background: #fff;           /* Match the unselected card background */
            /* --- END UPDATED STYLES --- */
            
            border-radius: 8px;
            padding: 20px;
            height: 100%;
            box-sizing: border-box;
        }

        .info-card-header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
        }

        .info-card-header i {
            font-size: 1.5rem;
            color: #0056b3; /* Match icon color to others */
        }

        .info-card-header h5 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 600;
        }
        
        .institution-info-card p {
            margin-bottom: 10px;
            line-height: 1.5; /* Improve readability */
        }
        .institution-info-card p:last-child {
            margin-bottom: 0;
        }

        /* Responsive adjustment */
        @media (max-width: 768px) {
            .institution-content-grid {
                grid-template-columns: 1fr;
            }
        }
        /* --- End of new styles --- */
   .institution-content-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 column by default */
    gap: 20px;
    padding-top: 10px; 
}

.institution-content-child {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px; 
    background-color: #fafafa;
}

.institution-content-child h4 {
    margin-top: 0; 
}

/* On screens wider than 768px, switch to 2 columns */
@media (min-width: 768px) {
    .institution-content-grid {
        grid-template-columns: 1fr 1fr; /* 2 equal columns [cite: 6] */
    }
}

/* --- Makes all required asterisks red --- */
.required-asterisk {
    color: #D93025;
}

/* ======================================== */
/* --- Zite-Style Stepper Progress Bar --- */
/* ======================================== */

.stepper-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* Align to top for label */
    position: relative;
    width: 90%;
    margin: 0 auto 30px auto;
}

.stepper-progress-line {
    position: absolute;
    top: 12px; /* Centers on the circle */
    left: 0;
    transform: translateY(-50%);
    height: 3px;
    width: 100%;
    background-color: #e0e0e0;
    z-index: 1;
}

.stepper-progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* JS updates this */
    background-color: #0056b3;
    z-index: 2;
    transition: width 0.3s ease;
}

.stepper-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 3;
    flex: 1; /* Distribute space */
    text-align: center;
}

.stepper-progress-step .step-circle {
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background-color: #fff;
    border: 3px solid #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    font-size: 0.9rem; /* For checkmark */
    font-weight: 700;
    color: #aaa;
}

.stepper-progress-step .step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #aaa;
    margin-top: 8px;
    transition: all 0.3s ease;
}

/* --- Active State --- */
.stepper-progress-step.active .step-circle {
    border-color: #0056b3;
    background-color: #fff;
    color: #0056b3;
}
.stepper-progress-step.active .step-label {
    color: #0056b3;
}

/* --- Completed State --- */
.stepper-progress-step.completed .step-circle {
    border-color: #28a745;
    background-color: #28a745;
    color: #fff;
}
.stepper-progress-step.completed .step-label {
    color: #333;
}
/* This is the default dot for non-completed, non-active steps */
.stepper-progress-step .step-dot {
    width: 8px;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 50%;
}
.stepper-progress-step.active .step-dot {
    background-color: #0056b3;
}

/* ======================================== */
/* --- Document Stepper Layout --- */
/* ======================================== */

/* --- Stepper Content --- */
.method-stepper-container {
    /* This is intentionally left blank */
    /* This removes the "extra box" */
}
.method-step {
    /* This is the MAIN container box */
    display: none;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    background: #fff; /* Changed from #fafafa */
}
.method-step.active {
    display: block;
}
.method-step h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 5px;
}
.method-step h5 .step-optional-text {
    font-weight: 400;
    font-size: 0.9rem;
    color: #555;
    margin-left: 8px;
}
.method-step .form-helper-text {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 0.9rem;
}
.method-step-error {
    color: #D93025;
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 10px;
    display: none; /* Hidden by default */
}

/* --- Method Cards (Upload, Mail, Email) --- */
.method-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px; /* NEW: Add space for content */
}
.method-card {
    border: 2px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    text-align: center;
}
.method-card:hover {
    border-color: #0056b3;
    background: #f4f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}
.method-card.selected {
    border-color: #0056b3;
    background: #f4f8ff;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.15);
}
.method-card-icon {
    font-size: 1.8rem;
    color: #0056b3;
    margin-bottom: 15px;
}
.method-card h5 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}
.method-card p {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
    line-height: 1.4;
}

/* --- Stepper Navigation (Zite Style) --- */
.method-stepper-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px; 
}
/* Re-style nav buttons to match Zite */
.method-stepper-nav .back-button,
.method-stepper-nav .next-button {
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
}
.method-stepper-nav .back-button {
    background-color: #f1f3f5; /* Light grey */
    color: #333;
    border: 1px solid #dee2e6;
}
.method-stepper-nav .back-button:hover {
    background-color: #e9ecef;
}
.method-stepper-nav .next-button {
    background-color: #007bff; /* Theme blue */
    color: #fff;
    border: 1px solid #007bff;
}
.method-stepper-nav .next-button:hover {
    background-color: #0056b3; /* Darker blue on hover */
}


/* --- Method Content (Upload, Mail, Email Details) --- */
.method-content {
    /* REMOVED: border, padding, margin */
    /* Content now appears seamlessly inside the step box */
    background-color: transparent;
    border: none;
    padding: 0;
    margin: 0;
}
.method-content h4, .method-content h5 {
    margin-top: 0;
    color: #0056b3;
}
#upload-content h4 {
    border-bottom: none;
    margin-bottom: 5px;
}
.upload-subtitle {
    margin-top: 0;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 0.9em;
}
.mailing-address {
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    padding: 15px;
    line-height: 1.7;
}

/* --- Scanned File Upload Area --- */
.file-requirements-box {
    background-color: #f8f9fa; /* Light background */
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}
.file-requirements-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}
.file-requirements-header i {
    color: #007bff;
}
.file-requirements-header h5 {
    margin: 0;
    font-size: 1.1em;
    color: #007bff;
}
.file-requirements-box ul {
    list-style-position: inside;
    padding-left: 5px;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.6;
    color: #495057;
}
.drag-drop-area-new {
    border: 2px dashed #adb5bd;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    background-color: #fff;
    transition: background-color 0.2s, border-color 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.drag-drop-area-new.drag-over {
    border-color: #007bff;
    background-color: #f0f8ff;
}
.upload-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e7f3fe;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    margin-bottom: 15px;
}
.drag-drop-main-text {
    font-size: 1.1em;
    color: #343a40;
    margin: 0 0 5px 0;
}
.drag-drop-sub-text {
    font-size: 0.9em;
    color: #6c757d;
    margin: 0 0 15px 0;
}
.uploaded-files-container {
    margin-bottom: 20px;
}
.uploaded-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 8px;
}
.uploaded-file-item a {
    color: #0056b3;
    text-decoration: none;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
}
.uploaded-file-item a:hover {
    text-decoration: underline;
}
.uploaded-file-item .remove-file-button {
    background-color: transparent !important;
    color: #e54d4d !important;
    padding: 0 !important;
    font-weight: 300 !important;
    min-width: unset !important;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 26px;
    line-height: 28px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}
.uploaded-file-item .remove-file-button:hover {
    background-color: #fbebee !important;
    color: #dc3545 !important;
}

/* --- Document Table --- */
.table-container {
    overflow-x: auto;
}
.document-table {
    width: 100%;
    border-collapse: collapse;
}
.document-table th, .document-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}
#doc-placeholder-text {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 20px 0;
}
.document-table .actions-cell {
    text-align: center;
    width: 120px;
    vertical-align: middle;
}
.document-table .edit-button,
.document-table .delete-button {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0 5px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    line-height: 36px;
    text-align: center;
    transition: all 0.2s ease-in-out;
    font-weight: normal;
}
.document-table .edit-button {
    color: #007bff;
}
.document-table .delete-button {
    color: #dc3545;
}
.document-table .edit-button:hover {
    background-color: #e7f3fe;
    color: #0056b3;
}
.document-table .delete-button:hover {
    background-color: #fdf0f1;
    color: #a71d2a;
}
.document-table tbody tr.editing-row {
    background-color: #e6f7ff !important;
    border-left: 3px solid #007bff;
    border-right: 3px solid #007bff;
}

/* --- Document Form Layout --- */
#doc-form-title {
    margin-top: 0;
    margin-bottom: 20px; 
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}
.documents-page .form-group {
    margin-bottom: 1.25rem;
}
.form-grid-document {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}
.form-grid-document .full-width-doc {
    grid-column: 1 / -1;
}
.form-grid-document > .form-group {
    margin-bottom: 0;
}
.form-grid-document + .form-group {
    margin-top: 20px;
}
.form-group .form-helper-text {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin-top: 4px;
}

/* --- "Dates of Attendance" Styling --- */
.date-fields {
    display: flex;
    gap: 10px;
    align-items: center;
}
.attendance-dates-grid {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    margin-top: 5px;
}
.date-fields-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.date-group-label {
    font-weight: 500;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 5px;
}

/* --- Radio Button Styling ("Graduated?") --- */
.graduated-button-group {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}
.graduated-option {
    flex: 1;
    position: relative; 
}
.graduated-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.graduated-option span {
    display: block;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fff;
    transition: all 0.2s ease-in-out;
    text-align: center;
    font-size: 0.95rem; 
    color: #333; 
}
.graduated-option input[type="radio"]:checked + span {
    background-color: #007bff;
    color: #fff;
    border-color: #0056b3;
    font-weight: normal;
}
.graduated-option span:hover {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}
.form-group.invalid-field .graduated-option span {
    border-color: red;
}
.form-group.invalid-field .graduated-option input[type="radio"]:checked + span {
    border-color: #0056b3;
}
#certificate-details-section:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 24px;
}

/* --- Language Multi-select --- */
.language-input-group {
    display: flex;
    align-items: center;
    gap: 8px; 
}
.language-input-group .custom-select-container {
    flex-grow: 1; 
    width: 0;
}
.language-input-group .add-button {
    flex-shrink: 0; 
}
#language-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}
.language-pill {
    background-color: #e0eafc;
    color: #335dcc;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}
.remove-lang-btn {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
}
#language-form-group.invalid-field .error-message {
    display: block;
}
/* --- END ADDED --- */
/* ==========================================================================
   --- PAGE: SERVICES & EVALUATION COPIES ---
   ========================================================================== */ 

/* --- Purpose Selection Cards (Services Page) --- */
.purpose-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.purpose-card-label {
    position: relative;
    cursor: pointer;
}

.purpose-card-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.purpose-card {
    background-color: #fff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 10px;
    height: 100%;
    min-height: 110px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease-in-out;
}

.purpose-card-label:hover .purpose-card {
    border-color: #007bff;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.purpose-card-label input[type="checkbox"]:checked + .purpose-card {
    border-color: #0056b3;
    background-color: #e7f3fe;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.25);
}

.purpose-icon {
    font-size: 2em;
    color: #007bff;
    margin-bottom: 10px;
    transition: color 0.2s;
}

.purpose-card-label input[type="checkbox"]:checked + .purpose-card .purpose-icon {
    color: #0056b3;
}

.purpose-card span {
    font-weight: 600;
    color: #343a40;
    line-height: 1.3;
}

/* --- Service & Delivery Option Cards --- */
.service-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 0;
    margin-bottom: 0;
}

.service-card-label {
    display: flex;
    position: relative;
    cursor: pointer;
}

.service-card-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-card-label:hover .service-card {
    border-color: #007bff;
}

.service-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

/* --- THIS IS THE BLUE "SELECTED" RULE --- */
/* --- MODIFIED: Removed :not(.recommended) --- */
.service-card-label input[type="radio"]:checked + .service-card {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.25);
    background-color: #e7f3fe;
}

.service-title-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 15px;
}

.service-card h5 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1em;
    font-weight: bold;
    padding-top: 0; /* <-- ADD THIS LINE */
    transition: padding-top 0.2s ease; /* <-- AND ADD THIS LINE */
}

.service-price {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1em;
    white-space: nowrap;
}

.service-card .service-text {
    flex-grow: 1;
}

.service-card p {
    margin-bottom: 0;
}

.features-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
    margin-bottom: 0;
    text-align: left;
    font-size: 0.9em;
    color: #555;
}

.features-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.features-list li:last-child {
    margin-bottom: 0;
}

.features-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    top: 2px;
    color: #28a745;
    font-weight: bold;
}
/* 1. Hide the "Recommended" text tag by default */
.recommend-tag {
    display: none;
    position: absolute;
    top: 0;
    left: 0; /* <-- This was changed from 'right: 0' */
    background-color: #5cb85c; /* Green */
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 0 0 6px 0; /* <-- This was changed for the top-left corner */
    z-index: 2;
}

/* 2. This rule was modified to apply to all selected cards */
/* (See .service-card-label input[type="radio"]:checked + .service-card) */


/* 3. This rule now ONLY handles the tag and title padding */
/* --- MODIFIED: Removed all background/border styles --- */
.service-card.recommended {
    /* Styles removed */
}

/* 4. This shows the "Recommended" tag ONLY on the card with the .recommended class */
.service-card.recommended .recommend-tag {
    display: block !important;
}
/* 5. This pushes the title down ONLY on the card with the .recommended class */
.service-card.recommended h5 {
    padding-top: 25px; /* This creates the space */
}
/* --- Additional Services (Services Page) --- */
.additional-services-container {
    background-color: transparent;
    border: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-option {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 0;
}

.service-option:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.service-option-title {
    display: flex;
    align-items: flex-start;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 0;
}

.service-option-title input[type="checkbox"] {
    margin-right: 12px;
    flex-shrink: 0;
    margin-top: 4px;
}

.service-option-details {
    padding-left: 30px;
    padding-top: 10px;
    font-size: 0.9em;
    color: #555;
}

.service-option-details ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-top: 0;
    margin-bottom: 15px;
}
.service-option-details ul li {
    margin-bottom: 5px;
}

.inline-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.inline-input-group label {
    font-weight: 600;
    margin-bottom: 0;
    flex-shrink: 0;
}

/* --- Fee Summary Box (Services & Evaluation Copies Pages) --- */
.services-summary {
    background-color: #e7f3fe;
    border: 1px solid #bde0fe;
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    font-weight: bold;
    font-size: 1.2em;
}

#selected-services-summary {
    font-size: 0.8em;
    font-weight: normal;
    padding-bottom: 10px;
    border-bottom: 1px dashed #bde0fe;
    margin-bottom: 10px;
}

#selected-services-summary p {
    margin: 0;
    display: none;
}

#selected-services-summary ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#selected-services-summary li {
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
}

.total-fees-display-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    font-size: 1.2em;
}

.total-fees-label {
    font-weight: bold;
    margin-right: 10px;
}

.total-fees-display {
    color: #007bff;
    font-weight: bold;
}


/* --- Evaluation Copies Page Specifics --- */
.client-copy-section, 
.institution-copy-section, 
.additional-copies-section {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    border-radius: 5px;
}

.delivery-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.delivery-option-label {
    background-color: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.delivery-option-label:hover {
    border-color: #007bff;
    transform: translateY(-2px);
}

.delivery-option-label.selected,
.delivery-option-label.static-card.active {
    border-color: #0056b3;
    background-color: #f8faff;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.1);
}

.delivery-option-label.static-card {
    cursor: pointer;
    background-color: #fff;
}

.institution-copy-section .delivery-option-label.option-disabled {
    opacity: 0.6;
    background-color: #f8f9fa;
    cursor: pointer;
}

.institution-copy-section .delivery-option-label.option-disabled:hover {
    transform: none;
    border-color: #e0e0e0;
    box-shadow: none;
}

.delivery-option-label input[type="radio"],
.delivery-option-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.delivery-card {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start; 
    gap: 20px; 
}

.delivery-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e7f3fe;
    color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    transition: background-color 0.2s, color 0.2s;
}

.delivery-option-label.selected .delivery-icon,
.delivery-option-label.static-card.active .delivery-icon {
    background-color: #007bff;
    color: #fff;
}

.delivery-text-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.delivery-card h5,
.delivery-card p {
    margin: 0;
    text-align: left;
}
.delivery-card h5 {
    font-size: 1.05em;
    color: #333;
    margin-bottom: 2px;
}

.delivery-card p {
    font-size: 0.9em;
    color: #666;
    margin-top: 4px;
}

.delivery-price {
    font-size: 1.1em;
    white-space: nowrap;
    flex-shrink: 0;
    font-weight: bold;
    color: #007bff;
    margin-left: auto; 
    padding-left: 15px; 
}

.address-manager-container {
    background-color: #f0f8ff;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #bde0fe;
}

.address-summary-card {
    background-color: #e7f3fe;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #bde0fe;
}

.address-summary-card p {
    margin: 0 0 5px 0;
    color: #333;
    line-height: 1.5;
}

.recipient-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    background-color: #fff;
    font-size: 0.9em;
}

.recipient-table th, 
.recipient-table td {
    border: 1px solid #dee2e6;
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.recipient-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.recipient-table .address-col-name { font-weight: bold; }
.recipient-table .address-col-inst { color: #555; }
.recipient-table .address-col-full { color: #555; line-height: 1.4; }
.recipient-table .actions-col { text-align: center; width: 100px; }

.recipient-table .actions-col .edit-button,
.recipient-table .actions-col .delete-button {
    color: #007bff;
    font-size: 1.1em;
    padding: 5px;
    margin: 0 5px;
    background: none;
    border: none;
}

.recipient-table .actions-col .delete-button {
    color: #dc3545;
}

.e-file-details {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #dee2e6;
}

.e-file-details ul {
    margin-top: 0;
    padding-left: 20px;
    font-size: 0.9em;
    color: #555;
}

.e-file-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

/* ==========================================================================
   --- PAGE: REVIEW & PAYMENT ---
   ========================================================================== */

/* --- Review Section Layout --- */
.review-page .review-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.review-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.review-section-header h2 {
    margin: 0;
    border-bottom: none;
    color: #0056b3;
}

.edit-link {
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    color: #007bff;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: color 0.2s;
}

.edit-link:hover {
    text-decoration: underline;
    color: #0056b3;
}

/* --- Review Content --- */
.review-page .review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px 25px;
}

.review-page .review-item {
    font-size: 1rem;
    align-self: start; 
}

.review-page .review-item strong {
    display: block;
    color: #495057;
    font-weight: 600;
    margin-bottom: 4px;
}

.review-page .review-list {
    font-size: 1rem;
}

.review-page .review-list .list-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}
.review-page .review-list .list-item:last-child {
    border-bottom: none;
}

.review-page .review-list .list-item .item-label,
.review-page .review-list .list-item .item-value {
    color: #212529;
}

.review-page .review-list .list-item .item-value {
    font-weight: bold;
}

.review-page .review-list .total-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    margin-top: 10px;
    border-top: 2px solid #adb5bd;
    font-weight: bold;
    font-size: 1.1em;
}

.review-page .document-table-container {
    overflow-x: auto;
}

.review-page .document-table {
    font-size: 0.9em;
}

/* --- Final Summary & Payment --- */
.review-page .final-summary-box {
    margin-top: 30px;
}

.review-page .non-refundable-note {
    background-color: #fff0f1;
    color: #dc3545;
    border: 1px solid #ffb6bc;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 25px;
}

.modal-content.payment-confirmation {
    max-width: 500px;
    text-align: center;
}

.modal-content.payment-confirmation h3 {
    color: #0056b3;
    margin-top: 0;
}

.modal-content.payment-confirmation p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 25px;
}

/* ==========================================================================
   --- RESPONSIVENESS & MEDIA QUERIES ---
   ========================================================================== */
@media (max-width: 768px) {
    .purpose-options {
        grid-template-columns: repeat(2, 1fr);
    }
    .e-file-inputs,
    .form-grid,
    .attendance-dates-grid {
        grid-template-columns: 1fr;
    }
    .label-and-options-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .photo-example {
        max-width: 200px;
    }
    .photo-example img {
        height: auto;
    }
    .gender-button-group {
        margin-left: 0;
    }
    
    body:not(.review-page) .document-table th:nth-child(4),
    body:not(.review-page) .document-table td:nth-child(4),
    body:not(.review-page) .document-table th:nth-child(5),
    body:not(.review-page) .document-table td:nth-child(5) {
        display: none;
    }

    .review-page .document-table th:nth-child(3),
    .review-page .document-table td:nth-child(3),
    .review-page .document-table th:nth-child(4),
    .review-page .document-table td:nth-child(4) {
        display: none;
    }

    .info-toggle-btn {
        display: inline-block;
    }
    .method-description {
        display: none;
        margin-top: 10px;
    }
    .method-card.description-visible .method-description {
        display: block;
    }

    .method-options {
        gap: 8px;
    }
    .method-card {
        padding: 15px 5px; 
    }

    .method-icon.fa-solid {
        font-size: 32px;
    }
    .method-card h5 {
        font-size: 1em; 
    }
    .method-title-wrapper {
        gap: 5px; 
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
    }

    .evaluation-copies-page #institution-address-manager .recipient-table th:nth-child(2), 
    .evaluation-copies-page #institution-address-manager .recipient-table td:nth-child(2),
    .evaluation-copies-page #institution-address-manager .recipient-table th:nth-child(3), 
    .evaluation-copies-page #institution-address-manager .recipient-table td:nth-child(3) {
        display: none;
    }

    .evaluation-copies-page #additional-efile-card .recipient-table th:nth-child(1),
    .evaluation-copies-page #additional-efile-card .recipient-table td:nth-child(1),
    .evaluation-copies-page #additional-efile-card .recipient-table th:nth-child(2),
    .evaluation-copies-page #additional-efile-card .recipient-table td:nth-child(2),
    .evaluation-copies-page #additional-paper-card .recipient-table th:nth-child(1),
    .evaluation-copies-page #additional-paper-card .recipient-table td:nth-child(1),
    .evaluation-copies-page #additional-paper-card .recipient-table th:nth-child(2),
    .evaluation-copies-page #additional-paper-card .recipient-table td:nth-child(2) {
        display: none;
    }
}

@media (min-width: 769px) {
    .personal-data-page #personal-info-section .form-grid .gender-field-container {
        margin-top: -25px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    .container {
        padding: 15px;
    }
    .purpose-options {
        grid-template-columns: 1fr;
    }
    .inline-input-group {
        flex-direction: column;
        align-items: flex-start;
    }
    .next-button, .back-button, .browse-files-button {
        padding: 10px 15px;
        font-size: 14px;
    }

   .review-item .review-item-price {
    float: right;
    font-weight: bold;
}

    .delivery-card {
        flex-wrap: wrap;
        justify-content: flex-start; 
    }
    .delivery-price {
        margin-left: auto; 
        padding-left: 15px; 
    }
}
/* ==========================================================================
   --- AUTHENTICATION PAGES (LOGIN / SIGNUP) ---
   ========================================================================== */
body.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    padding: 20px 0;
}

.auth-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 480px; 
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: #0056b3;
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 700;
}

.auth-header p {
    color: #6c757d;
    margin: 0;
    font-size: 15px;
}

/* --- UPDATED BUTTON COLOR TO BLUE --- */
.auth-btn {
    width: 100%;
    margin-top: 20px;
    height: 45px; 
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    background-color: #007bff !important; /* Force Blue */
    color: #fff !important;
    border: none;
}

.auth-btn:hover {
    background-color: #0056b3 !important; /* Darker Blue on Hover */
}

.auth-links {
    margin-top: 25px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.auth-links a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover {
    text-decoration: underline;
}

.alert-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #fee2e2;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
    line-height: 1.4;
}

/* Auth Specific Form Layouts */
.dob-row {
    display: flex;
    gap: 10px;
}
.modal-overlay {
            display: none;
            position: fixed;
            top: 0; 
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 1000;
            justify-content: center;
            align-items: center; 
        }
        .modal-overlay.show {
            display: flex;
        }
        .modal-content {
            background: #fff;
            padding: 30px; 
            border-radius: 8px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.3);
            width: 90%;
            max-width: 450px;
            text-align: center;
        }
        #gpa-modal .modal-content h3 {
            margin-top: 0;
            margin-bottom: 25px; 
            font-size: 1.3rem;
            color: #333 !important;
            display: block !important;
        }
        .modal-buttons {
            display: flex;
            justify-content: space-between; 
            gap: 15px;
        }
        .modal-buttons button {
            flex: 1;
            padding: 12px 20px; 
            border: none;
            border-radius: 6px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .modal-buttons .gpa-yes-btn {
            background-color: #0056b3;
            color: white; 
        }
        .modal-buttons .gpa-yes-btn:hover {
            background-color: #004494;
        }
        .modal-buttons .gpa-no-btn {
            background-color: #f1f1f1;
            color: #333; 
            border: 1px solid #ccc;
        }
        .modal-buttons .gpa-no-btn:hover {
            background-color: #e0e0e0;
        }
        
        #recommendation-note {
            display: none;
            background-color: #e6f7ec; 
            border: 1px solid #5cb85c;
            color: #225a22;
            padding: 15px;
            border-radius: 6px;
            margin-bottom: 20px;
            font-size: 0.95rem;
            line-height: 1.5;
        }
        #recommendation-note i {
            margin-right: 8px;
        }

        .add-begin-btn {
            background-color: #007bff;
            color: #ffffff;
            border: none;
            padding: 8px 16px; 
            border-radius: 4px;
            font-size: 14px; 
            font-weight: 600; 
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            transition: background-color 0.2s;
            font-family: 'Poppins', sans-serif;
            text-transform: uppercase; 
            letter-spacing: 0.5px;
        }
        .add-begin-btn:hover {
            background-color: #0056b3;
        }

        #services-options-container {
            display: block; 
        }

        /* --- Number Input Stepper Styles --- */
        .inline-input-group {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-top: 15px;
        }
        .inline-input-group label {
            margin-bottom: 0;
            font-weight: 600;
            color: #555;
        }

        .number-input-stepper {
            display: inline-flex;
            align-items: stretch;
            border: 1px solid #ced4da;
            border-radius: 6px;
            overflow: hidden;
            height: 38px;
            background-color: #fff;
            box-shadow: 0 1px 2px rgba(0,0,0,0.05);
        }
        
        .number-input-stepper .stepper-btn {
            background-color: #f8f9fa;
            border: none;
            border-right: 1px solid #ced4da;
            color: #495057;
            font-size: 1.25rem;
            font-weight: 700;
            width: 42px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s;
            padding: 0;
            line-height: 1;
        }
        
        .number-input-stepper .stepper-btn-plus {
            border-right: none;
            border-left: 1px solid #ced4da;
        }

        .number-input-stepper .stepper-btn:hover {
            background-color: #e2e6ea;
            color: #212529;
        }
        
        .number-input-stepper .stepper-btn:active {
            background-color: #dae0e5;
            box-shadow: inset 0 3px 5px rgba(0,0,0,0.125);
        }

        .number-input-stepper input[type="number"] {
            border: none;
            text-align: center;
            width: 60px;
            font-size: 1.1rem;
            font-weight: 600;
            color: #495057;
            -moz-appearance: textfield; 
            padding: 0 5px;
            height: 100%;
            outline: none;
            background-color: #fff;
        }
        
        .number-input-stepper input[type="number"]::-webkit-inner-spin-button, 
        .number-input-stepper input[type="number"]::-webkit-outer-spin-button { 
            -webkit-appearance: none; 
            margin: 0; 
        }
	
/* ==========================================================================
   --- PERSONAL DATA PAGE STYLES ---
   ========================================================================== */
.requirements-layout { 
    display: flex; 
    flex-direction: row; 
    gap: 30px; 
    align-items: flex-start; 
    justify-content: space-between; 
}
.requirements-text-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    gap: 25px; 
}
.requirements-list { 
    margin-top: 5px; 
    padding-left: 20px; 
}
.requirements-image-column { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    flex-shrink: 0; 
    margin-top: 45px; 
}
.photo-example img { 
    max-width: 220px; 
    border: 1px solid #ddd; 
    border-radius: 4px; 
    display: block; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
}
.drag-drop-area-new { 
    border: 2px dashed #007bff; 
    background-color: #f8faff; 
    border-radius: 8px; 
    padding: 25px; 
    text-align: center; 
    cursor: pointer; 
    transition: background-color 0.2s, border-color 0.2s; 
    width: 100%; 
    box-sizing: border-box; 
}
.drag-drop-area-new:hover { 
    background-color: #eaf2ff; 
    border-color: #0056b3; 
}
.upload-icon-circle { 
    background-color: #e6f0ff; 
    color: #007bff; 
    width: 45px; 
    height: 45px; 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 10px; 
}
.upload-icon-circle svg { 
    width: 22px; 
    height: 22px; 
}
.drag-drop-main-text { 
    font-size: 15px; 
    font-weight: 600; 
    color: #333; 
    margin-bottom: 4px; 
}
.drag-drop-sub-text { 
    font-size: 12px; 
    color: #666; 
    margin-bottom: 12px; 
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .requirements-layout { flex-direction: column; }
    .requirements-image-column { 
        flex-direction: row; 
        flex-wrap: wrap; 
        width: 100%; 
        justify-content: center; 
        gap: 10px; 
        margin-top: 0; 
        order: -1; 
    }
    .photo-example img { max-width: 45%; }
    .requirements-text-content { width: 100%; }
}

/* ==========================================================================
   --- MOVING FROM evaluation-copies.cfm ---
   ========================================================================== */

/* 1. GLOBAL COMPONENTS (Reusable Modals & Counters) */

/* --- Modal Styles --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center; 
}

.modal-overlay.show {
    display: flex;
}

/* CORRECTED MODAL STYLES */

.modal-content {
    background: #fff;
    padding: 30px; /* Increased padding for better spacing */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    text-align: left; /* FIX: Forces form content to align left */
}

.modal-content h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px; 
    text-align: center;
    //font-family: 'Inter', Arial, sans-serif; 
    font-weight: 700;
    color: #333;
    font-size: 1.3rem;
}

.modal-content p {
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.modal-close-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #555;
}

/* --- Modal Buttons --- */
.modal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px; 
    padding-top: 10px; 
    border-top: 1px solid #eee;
}

.modal-btn-small {
    padding: 8px 20px;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 0.5px;
    transition: all 0.2s;
    min-width: 80px;
    text-align: center;
}

.btn-cancel-small {
    background-color: #6c757d;
    color: white;
    border: 1px solid #6c757d;
    text-decoration: none;
}
.btn-cancel-small:hover { background-color: #5a6268; color: white; }

.btn-save-small {
    background-color: #003366;
    color: white;
    border: 1px solid #003366;
}
.btn-save-small:hover { background-color: #002244; }

.modal-bottom-note {
    color: #a00;
    font-size: 0.85rem;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-style: italic;
}

/* --- Sealed Copies Counters --- */
.sealed-copies-control {
    margin-top: 10px;
    display: flex;
    align-items: center;
}
.counter-wrapper {
    display: flex;
    align-items: center;
    gap: 0; 
}
.counter-btn {
    width: 34px; height: 34px;
    border: 1px solid #ccc;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.1rem;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.counter-btn:hover { background: #e2e6ea; }
.counter-btn.minus { border-radius: 4px 0 0 4px; border-right: none; }
.counter-btn.plus { border-radius: 0 4px 4px 0; border-left: none; }

.counter-input {
    width: 60px !important;
    height: 34px !important;
    text-align: center;
    border: 1px solid #ccc;
    margin: 0;
    border-radius: 0;
    font-weight: 600;
    color: #333;
}


/* 2. PAGE SPECIFIC (Locked to evaluation-copies-page) */


/* ==========================================================================
   --- CORRECTED EVALUATION COPIES PAGE STYLES ---
   ========================================================================== */

/* 1. Form Grids & Layout */
.evaluation-copies-page .form-grid-document {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 20px;
    row-gap: 15px; /* Added proper spacing between rows */
    align-items: start;
}

.evaluation-copies-page .form-grid-document .form-group {
    margin-bottom: 0; /* Remove double margin since we use row-gap */
}

.evaluation-copies-page .form-grid-document .full-width-doc {
    grid-column: span 2;
}

.evaluation-copies-page .form-grid-document label {
    font-weight: 600;
    font-size: 0.9rem; 
    margin-bottom: 6px;
    display: block;
    color: #333;
}

/* 2. Inputs & Select2 Fixes (Updated to Modern 36px Standard) */
.evaluation-copies-page .form-grid-document input {
    height: 36px !important; /* Force modern height */
    padding: 0 12px;
    font-size: 14px; 
    width: 100%;
    border: 1px solid #ced4da;
    border-radius: 6px;
    color: #000;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.evaluation-copies-page .form-grid-document input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Specific Select2 Override to ensure it matches the 36px inputs */
.evaluation-copies-page .select2-container .select2-selection--single {
    height: 36px !important; 
    padding: 0;
    border: 1px solid #ced4da !important;
    border-radius: 6px !important; 
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.evaluation-copies-page .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 34px !important;
    top: 1px !important;
    right: 5px;
}

.evaluation-copies-page .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px;
    color: #333;
    width: 100%;
}

/* 3. Error States */
.evaluation-copies-page .form-group.invalid-field input,
.evaluation-copies-page .form-group.invalid-field select,
.evaluation-copies-page .form-group.invalid-field .select2-selection {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

.evaluation-copies-page .error-message {
    color: #dc3545;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 4px;
    display: none; 
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}
