
/* ============================================
   APPLICATION PAGE - MODERN REDESIGN
   Inspired by program.php with enhanced UX
   Colors: Gold #D2AE6D, Navy Blue #004790
   Fonts: Toroka Wide (headings), Toroka Normal (body)
============================================ */

:root {
    --gold: #D2AE6D;
    --gold-light: #E3C893;
    --gold-dark: #B89756;
    --navy: #004790;
    --navy-dark: #003366;
    --navy-light: #2A6BB0;
    --navy-lightest: #E8F0F8;
    --white: #FFFFFF;
    --off-white: #F8F9FA;
    --light-gray: #E9ECEF;
    --medium-gray: #6C757D;
    --dark-gray: #343A40;
    --success: #10B981;
    --error: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;

    --heading-font: 'Toroka Wide', serif;
    --body-font: 'Toroka Normal', sans-serif;

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.2);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.25);
    --shadow-gold: 0 4px 20px rgba(210, 174, 109, 0.3);
    --shadow-navy: 0 4px 20px rgba(0, 71, 144, 0.2);

    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;

    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;
}

html,
body {
    /* `clip`, not `hidden` — an overflow box on <body> un-pins the fixed
       .site-header on mobile (see global.css). clip gives the same guard
       without a scroll container. */
    overflow-x: clip;
    width: 100%;
}
@supports not (overflow-x: clip) {
    html, body { overflow-x: hidden; }
}

/* Reset & Base */
.page-apply {
    font-family: var(--body-font);
    background: var(--off-white);
    min-height: 100vh;
}

/* Hero Section */
.apply-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
    color: var(--white);
    text-align: center;
}

.apply-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--navy-light), var(--gold));
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(210, 174, 109, 0.15);
    color: var(--gold);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-family: var(--body-font);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(210, 174, 109, 0.3);
}
.hero-badge svg {
    width: 20px;
    height: 20px;
}
.apply-hero h1 {
    font-family: var(--heading-font);
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--white), rgba(255, 255, 255, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Progress Stats */
.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 3rem auto;
    max-width: 1200px;
    padding: 0 1rem;
}

.progress-stat {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.progress-stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--gold);
}

.progress-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gold);
    opacity: 0;
    transition: var(--transition);
}

.progress-stat:hover::before {
    opacity: 1;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.stat-value {
    font-family: var(--heading-font);
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-description {
    color: var(--medium-gray);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Progress Indicator */
.progress-container {
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
    position: relative;
}

.progress-track {
    height: 4px;
    background: var(--light-gray);
    border-radius: 2px;
    position: absolute;
    top: 24px;
    left: 2rem;
    right: 2rem;
    z-index: 1;
}

.progress-fill {
    position: absolute;
    top: 24px;
    left: 2rem;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--navy));
    border-radius: 2px;
    z-index: 2;
    transition: width 0.6s ease;
    width: 0%;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 3;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.step-indicator {
    width: 48px;
    height: 48px;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--heading-font);
    font-weight: 600;
    color: var(--medium-gray);
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.step.active .step-indicator {
    background: var(--gold);
    color: var(--navy);
    border-color: var(--gold);
    transform: scale(1.1);
    box-shadow: var(--shadow-gold);
}

.step.completed .step-indicator {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.step.completed .step-indicator::after {
    content: '✓';
    font-weight: bold;
}

.step-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    max-width: 100px;
    line-height: 1.2;
}

.step.active .step-label {
    color: var(--navy);
}
@media (max-width: 768px) {

    .progress-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }

    .step-indicators {
        min-width: 700px;
        gap: 0.5rem;
    }

    .step {
        flex: 1;
        min-width: 80px;
    }

    .step-label {
        font-size: 0.65rem;
        max-width: 70px;
        word-break: break-word;
    }

    .progress-track,
    .progress-fill {
        left: 2rem;
        right: 2rem;
    }
}
/* Form Container */
.form-container {
    max-width: 1000px;
    margin: 0 auto 4rem;
    padding: 0 1rem;
}

.form-wrapper {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--light-gray);
}

/* Form Steps */
.form-step {
    display: none;
    animation: fadeIn 0.6s ease;
}

.form-step.active {
    display: block;
}

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

/* Section Header */
.section-header {
    padding: 3rem 3rem 2rem;
    border-bottom: 1px solid var(--light-gray);
    background: linear-gradient(135deg, rgba(0, 71, 144, 0.02) 0%, transparent 100%);
}

.section-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.section-icon svg {
    width: 24px;
    height: 24px;
}

.section-header h2 {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--medium-gray);
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Form Content */
.form-content {
    padding: 2rem 3rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group label.required::after {
    content: ' *';
    color: var(--error);
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: var(--body-font);
    color: var(--dark-gray);
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    line-height: 1.5;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(210, 174, 109, 0.1);
}

.form-control.error {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.02);
}

/* Option Groups */
.option-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.option-label {
    display: flex;
    align-items: flex-start; /* aligns text with radio properly */
    gap: 0.75rem;
    padding: 1rem;
    background: var(--off-white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    color: var(--dark-gray);
    user-select: none;
}

.option-label input[type="radio"] {
    width: 15px;
    height: 15px;
    accent-color: var(--gold);
    margin-top: 2px; /* aligns with text */
}

.option-label input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--gold);
    margin-top: 2px;
}

.option-label:hover {
    border-color: var(--gold);
    background: rgba(210, 174, 109, 0.05);
}

.option-label:has(input:checked) {
    background: rgba(210, 174, 109, 0.1);
    border-color: var(--gold);
    color: var(--navy);
    font-weight: 600;
}

.option-label:has(input:focus-visible) {
    outline: 2px solid var(--navy-light);
    outline-offset: 2px;
}


/* Textarea */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* File Upload */
.file-input-wrapper {
    position: relative;
    margin-top: 0.5rem;
}

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

.file-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
}

.file-custom:hover {
    border-color: var(--gold);
}

.file-name {
    color: var(--medium-gray);
    font-size: 0.875rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 1rem;
}

.file-button {
    background: var(--navy);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.file-button:hover {
    background: var(--navy-dark);
}

/* Conditional Fields */
.conditional-field {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--off-white);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--gold);
    animation: slideIn 0.3s ease;
}

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

/* Amount Container */
.amount-container {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 1rem;
}

.currency-select {
    position: relative;
}

.currency-select select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23004790' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 20px;
    padding-right: 3rem;
}

/* Character Counter */
.char-counter {
    text-align: right;
    font-size: 0.75rem;
    color: var(--medium-gray);
    margin-top: 0.25rem;
}

/* Validation Message */
.validation-message {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.validation-message.error {
    color: var(--error);
}
.validation-message svg {
    width: 12px;
    height: 12px;
    stroke-width: 1.5;
    flex-shrink: 0;
}

/* Tooltip */
.tooltip {
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
    cursor: help;
}

.tooltip svg {
    width: 16px;
    height: 16px;
    color: var(--medium-gray);
}

.tooltip-text {
    position: absolute;
    background: var(--navy);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    max-width: 200px;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    transform: translateY(10px);
}

.tooltip:hover .tooltip-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* References Grid */
.references-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.reference-card {
    background: var(--off-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    border: 1px solid var(--light-gray);
}

.reference-card h3 {
    font-family: var(--heading-font);
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gold);
}

/* Upload Sections */
.upload-section {
    background: var(--off-white);
    border-radius: var(--radius-xl);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--light-gray);
}

.upload-section h3 {
    font-family: var(--heading-font);
    font-size: 1.25rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--navy);
}

/* Requirements List */
.requirements-list {
    background: rgba(0, 71, 144, 0.05);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--light-gray);
}

.requirements-list h4 {
    color: var(--navy);
    margin-bottom: 1rem;
    font-size: 1rem;
}

.requirements-list ul {
    list-style: none;
    padding-left: 0;
}

.requirements-list li {
    margin-bottom: 0.5rem;
    color: var(--medium-gray);
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.requirements-list li::before {
    content: '•';
    color: var(--navy);
    font-weight: bold;
    flex-shrink: 0;
}

/* Declaration */
.declaration {
    background: linear-gradient(135deg, rgba(0, 71, 144, 0.05) 0%, rgba(0, 71, 144, 0.02) 100%);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid var(--light-gray);
}

.declaration h3 {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 1.5rem;
}

.declaration-content {
    color: var(--dark-gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.declaration-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.declaration-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--navy);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.declaration-checkbox label {
    color: var(--dark-gray);
    line-height: 1.4;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

/* Closing Message */
.closing-message {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(16, 185, 129, 0.02) 100%);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.closing-message h3 {
    color: var(--navy);
    margin-bottom: 1rem;
    font-family: var(--heading-font);
    font-size: 1.5rem;
}

.closing-message p {
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 3rem;
    border-top: 1px solid var(--light-gray);
    background: var(--off-white);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: var(--radius-lg);
    font-family: var(--body-font);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    gap: 0.5rem;
    min-width: 140px;
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: var(--navy);
    border-color: var(--gold);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-gray);
    border-color: var(--light-gray);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--light-gray);
    transform: translateY(-2px);
}

.btn-outline-navy {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}

.btn-outline-navy:hover:not(:disabled) {
    background: var(--navy);
    color: var(--white);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #D97706 100%);
    color: var(--white);
    border-color: var(--warning);
}

.btn-warning:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

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

/* Success Message */
.success-container {
    padding: 4rem 2rem;
    text-align: center;
    animation: fadeIn 0.6s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: var(--white);
}

.success-container h2 {
    font-family: var(--heading-font);
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

.success-container p {
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.reference-number {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
    margin: 2rem 0;
    padding: 1rem;
    background: rgba(210, 174, 109, 0.1);
    border-radius: var(--radius-lg);
    display: inline-block;
    border: 2px dashed var(--gold);
}

/* Auto-save Indicator */
.auto-save-indicator {
    position: fixed;
    top: 100px;
    right: 20px;
    width: calc(100% - 40px);
    max-width: 300px;

    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1.25rem;

    display: flex;
    align-items: center;
    gap: 0.5rem;

    box-shadow: var(--shadow-lg);
    border: 1px solid var(--light-gray);

    font-size: 0.875rem;
    z-index: 1000;

    transition: opacity 0.3s ease, visibility 0.3s ease;

    opacity: 0;
    visibility: hidden;

    box-sizing: border-box;
}

.auto-save-indicator.show {
    opacity: 1;
    visibility: visible;
}

.auto-save-indicator.saving {
    color: var(--info);
    border-color: var(--info);
}

.auto-save-indicator.saved {
    color: var(--success);
    border-color: var(--success);
}

.auto-save-indicator.error {
    color: var(--error);
    border-color: var(--error);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--white);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px);
    transition: var(--transition);
    position: relative;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--medium-gray);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--navy);
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    font-family: var(--heading-font);
    font-size: 1.5rem;
    color: var(--navy);
}

.modal-content {
    color: var(--medium-gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .apply-hero h1 {
        font-size: 3rem;
    }

    .progress-stats {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
}

@media (max-width: 768px) {
    .apply-hero {
        padding: 6rem 0 3rem;
    }

    .apply-hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section-header {
        padding: 2rem 1.5rem 1.5rem;
    }

    .form-content {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .amount-container {
        grid-template-columns: 1fr;
    }

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

    .form-actions {
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions .btn {
        width: 100%;
        max-width: 300px;
    }

    .step-indicator {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }

    .step-label {
        font-size: 0.7rem;
    }

    .auto-save-indicator {
        top: 80px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .apply-hero h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .option-group {
        grid-template-columns: 1fr;
    }

    .declaration,
    .closing-message {
        padding: 1.5rem;
    }

    .modal-container {
        padding: 1.5rem;
    }

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

    .modal-actions .btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .apply-hero {
        background: none;
        color: var(--dark-gray);
        padding: 2rem 0;
    }

    .apply-hero h1 {
        background: none;
        -webkit-text-fill-color: var(--navy);
    }

    .progress-stats,
    .form-actions,
    .auto-save-indicator {
        display: none;
    }

    .form-wrapper {
        box-shadow: none;
        border: 2px solid var(--navy);
    }

    .btn {
        display: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Notification System */
/* Notification System */
.app-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    color: var(--dark-gray);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    z-index: 99999;
    font-family: var(--body-font);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid transparent;
    pointer-events: all;
}

.app-notification-success {
    border-left-color: var(--success);
    background: #ecfdf5;
    color: #065f46;
}

.app-notification-error {
    border-left-color: var(--error);
    background: #fef2f2;
    color: #991b1b;
}

.app-notification-warning {
    border-left-color: var(--warning);
    background: #fffbeb;
    color: #92400e;
}

.app-notification-info {
    border-left-color: var(--info);
    background: #eff6ff;
    color: #1e40af;
}

.app-notification button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.app-notification button:focus-visible {
    outline: 2px solid var(--navy-light);
    outline-offset: 2px;
}

/* Auto-save indicator should be BELOW notifications */
.page-apply .auto-save-indicator {
    top: 80px; /* Lower than notification's top: 20px */
    right: 20px;
    z-index: 99998; /* Lower than notification's z-index */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .app-notification {
        top: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
        min-width: 0;
    }

    .page-apply .auto-save-indicator {
        top: 80px;
        right: 10px;
        left: 10px;
    }
}

@media (max-width: 480px) {
    .app-notification {
        top: 20px;
        padding: 0.875rem 1rem;
    }

    .page-apply .auto-save-indicator {
        top: 80px;
    }
}
.app-notification.show {
    transform: translateX(0); /* Brings it onto the screen */
}


/* 2026 dedicated Apply composition */
.page-apply { --apply-ink:#082a47; --apply-deep:#03223e; --apply-blue:#004790; --apply-gold:#d2ae6d; --apply-paper:#f4f1e8; color:#465d70; background:var(--apply-paper); }
.page-apply .apply-hero { padding:calc(var(--fog-header-h,76px) + 82px) 0 115px; text-align:left; background:var(--apply-deep); }
.page-apply .apply-hero .hero-content { max-width:850px; margin:0; text-align:left; }
.page-apply .hero-badge { padding:0; background:none; border:0; color:#efd58c; letter-spacing:.14em; }
.page-apply .apply-hero h1 { max-width:800px; margin:22px 0; color:#fff; background:none; -webkit-text-fill-color:currentColor; font-size:clamp(3.2rem,6.5vw,6.2rem); letter-spacing:-.055em; line-height:.94; }
.page-apply .hero-subtitle { max-width:690px; margin:0; color:#c8d6e1; }
.page-apply .progress-stats { position:relative; z-index:3; grid-template-columns:repeat(3,1fr); gap:0; max-width:1120px; margin:-55px auto 55px; padding:0; background:#fff; border:1px solid #d5dfe5; box-shadow:0 20px 60px rgba(8,42,71,.1); }
.page-apply .progress-stat { display:grid; grid-template-columns:42px 1fr; grid-template-rows:auto auto; gap:3px 13px; padding:25px 28px; text-align:left; border:0; border-right:1px solid #d5dfe5; border-radius:0; }
.page-apply .progress-stat:last-child { border-right:0; }
.page-apply .stat-icon { grid-row:1/3; width:40px; height:40px; display:grid; place-items:center; margin:0; color:#fff; background:var(--apply-blue); border-radius:50%; }
.page-apply .stat-icon .fog-i { width:18px; }
.page-apply .stat-value { margin:0; font-size:1.35rem; }
.page-apply .stat-description { font-size:.6rem; }
.page-apply .progress-container { max-width:1050px; margin-bottom:45px; }
.page-apply .step-indicator { border-radius:3px; }
.page-apply .form-container { width:min(1100px,calc(100% - 40px)); margin:0 auto 100px; padding:0; }
.page-apply .form-wrapper { overflow:hidden; border:1px solid #d8d1c4; border-radius:0; box-shadow:0 25px 75px rgba(8,42,71,.09); }
.page-apply .form-step > .section-header { padding:34px 42px; color:#fff; background:var(--apply-deep); text-align:left; }
.page-apply .form-step > .section-header h2 { color:#fff; }
.page-apply .form-step > .section-header p { color:#c2d1dc; }
.page-apply .section-icon { color:var(--apply-deep); background:var(--apply-gold); }
.page-apply .form-content { padding:42px; }
.page-apply .form-control { border-radius:3px; }
.page-apply .option-label,.page-apply .reference-card,.page-apply .upload-section,.page-apply .requirements-list,.page-apply .declaration,.page-apply .closing-message { border-radius:3px; }
.page-apply .form-actions { padding:24px 42px; }
.page-apply .btn { border-radius:3px; }
.page-apply .btn-primary { color:var(--apply-ink); background:var(--apply-gold); border-color:var(--apply-gold); }
.page-apply .conditional-field { display:none; }
.page-apply .label-note { font-size:.8rem; font-weight:400; }
.page-apply .declaration-note { margin-top:1rem; color:var(--apply-blue); font-weight:600; }
.page-apply .submit-spinner,.page-apply .success-message-panel { display:none; }
.page-apply .cta-grid { display:flex; justify-content:center; gap:1rem; flex-wrap:wrap; margin-top:2rem; }
.page-apply :focus-visible { outline:3px solid var(--apply-gold); outline-offset:3px; }
@media(max-width:760px){.page-apply .progress-stats{grid-template-columns:1fr;margin-inline:14px}.page-apply .progress-stat{border-right:0;border-bottom:1px solid #d5dfe5}.page-apply .form-container{width:calc(100% - 28px)}.page-apply .form-step>.section-header,.page-apply .form-content,.page-apply .form-actions{padding:26px 18px}.page-apply .step-label{display:none}}
