:root {
    --primary: #1746a2;
    --primary-dark: #10357d;
    --accent: #e8efff;
    --background: #f3f6fc;
    --surface: #ffffff;
    --text: #202b3c;
    --muted: #68758a;
    --border: #dce3ee;
    --success: #167344;
    --success-bg: #e9f8ef;
    --warning: #895b08;
    --warning-bg: #fff5dc;
    --radius: 14px;
    --shadow: 0 12px 40px rgba(28, 48, 85, 0.09);
}

/* Reset */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 30px 16px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

[hidden] {
    display: none !important;
}

/* Main layout */
.container {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.form-card {
    padding: 36px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Company header */
.company-header {
    margin-bottom: 28px;
    text-align: center;
}

.brand-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    color: #ffffff;
    background: var(--primary);
    border-radius: 18px;
    font-size: 32px;
    font-weight: 800;
    box-shadow: 0 7px 18px rgba(23, 70, 162, 0.2);
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.company-header h1 {
    margin: 0;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.7px;
}

.intro {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
}

/* Notices */
.notice {
    margin: 0 0 30px;
    padding: 15px 17px;
    color: #24477d;
    background: var(--accent);
    border-left: 4px solid var(--primary);
    border-radius: 7px;
    font-size: 14px;
}

.section-help {
    margin: -5px 0 20px;
    color: var(--muted);
    font-size: 14px;
}

.privacy-note {
    margin: 15px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.7;
}

/* Form sections */
.form-section {
    margin: 0 0 30px;
    padding: 0 0 28px;
    border-bottom: 1px solid var(--border);
}

.form-section h2 {
    margin: 0 0 22px;
    font-size: 21px;
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.form-section h3 {
    margin: 25px 0 18px;
    font-size: 18px;
}

/* Inputs */
.form-group {
    margin-bottom: 21px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font: inherit;
    font-size: 15px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: #929daf;
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(23, 70, 162, 0.12);
}

input:disabled {
    background: #f1f3f7;
    cursor: not-allowed;
}

.form-group small {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
}

/* File uploads */
input[type="file"] {
    display: block;
    width: 100%;
    padding: 12px;
    color: var(--muted);
    background: #f8faff;
    border: 1px dashed #aebbd0;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
}

input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 9px 12px;
    color: var(--primary);
    background: var(--accent);
    border: 0;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

/* Payment selection */
.payment-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 60px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 9px;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.payment-option:hover {
    background: #f6f8ff;
    border-color: var(--primary);
}

.payment-option:has(input:checked) {
    background: var(--accent);
    border-color: var(--primary);
}

.payment-option input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.payment-option span {
    font-size: 14px;
    font-weight: 700;
}

/* Direct deposit panel */
#bank-fields {
    margin-top: 24px;
    padding: 22px;
    background: #f8faff;
    border: 1px solid var(--border);
    border-radius: 10px;
}

#bank-fields h3 {
    margin-top: 0;
}

/* Submit button */
.submit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    color: #ffffff;
    background: var(--primary);
    border: 0;
    border-radius: 9px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.submit-button:hover {
    background: var(--primary-dark);
}

.submit-button:active {
    transform: translateY(1px);
}

.submit-button:focus-visible {
    outline: 3px solid #9db9ff;
    outline-offset: 3px;
}

.button-link {
    margin-top: 25px;
}

/* Spam honeypot: keep it out of sight */
.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Success and error pages */
.success-card {
    padding-top: 48px;
    padding-bottom: 48px;
    text-align: center;
}

.success-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin: 0 auto 22px;
    color: var(--success);
    background: var(--success-bg);
    border-radius: 50%;
    font-size: 35px;
    font-weight: 700;
}

.success-card h1 {
    margin: 0 0 18px;
    font-size: 29px;
    line-height: 1.3;
}

.status-success,
.status-warning {
    margin: 22px 0;
    padding: 13px 15px;
    border-radius: 8px;
    font-size: 14px;
}

.status-success {
    color: var(--success);
    background: var(--success-bg);
}

.status-warning {
    color: var(--warning);
    background: var(--warning-bg);
}

/* Mobile layout */
@media (max-width: 600px) {
    body {
        padding: 12px 10px;
        font-size: 15px;
    }

    .form-card {
        padding: 24px 18px;
        border-radius: 11px;
    }

    .brand-mark {
        width: 56px;
        height: 56px;
        font-size: 28px;
    }

    .company-header {
        margin-bottom: 23px;
    }

    .company-header h1 {
        font-size: 25px;
    }

    .form-section h2 {
        font-size: 19px;
    }

    .payment-options {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    #bank-fields {
        padding: 16px;
    }

    .submit-button {
        min-height: 50px;
    }
}

/* Respect accessibility preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}