@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Public+Sans:wght@400;500;600;700;800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* Self-contained subset of the admin app's "Case File" theme - just the
   tokens and the intake-form treatment already proven on the login screen.
   Deliberately not the whole styles.css, which is dominated by
   admin-dashboard-only rules this public page never uses. */

:root {
    --ink: #1C1E24;
    --ink-soft: #565A64;
    --paper: #F1F0EC;
    --surface: #FBFAF7;
    --signal: #2B6E63;
    --signal-hover: #235850;
    --signal-tint: rgba(43, 110, 99, 0.09);
    --stamp-reject: #A23B33;
    --stamp-reject-tint: rgba(162, 59, 51, 0.09);
    --stamp-pending: #A67C2E;
    --stamp-pending-tint: rgba(166, 124, 46, 0.1);
    --border: #D9D5C8;
    --border-strong: #C2BCA9;
    --shadow-lg: 0 24px 48px rgba(28, 26, 20, 0.16);
    --radius-sm: 3px;
    --radius-lg: 10px;
    --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
}

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

body {
    font-family: var(--font-body);
    background: var(--paper);
    color: var(--ink);
}

.apply-screen {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.apply-card {
    width: 100%;
    max-width: 480px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 44px 40px;
    box-shadow: var(--shadow-lg);
}

@media (max-width: 480px) {
    .apply-screen {
        padding: 0;
        align-items: stretch;
    }

    .apply-card {
        max-width: none;
        min-height: 100vh;
        min-height: 100dvh;
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 28px 20px;
    }

    .apply-card h1 {
        font-size: 23px;
    }
}

.apply-eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--signal);
    margin-bottom: 18px;
}

.apply-card h1 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 400;
    margin: 0 0 6px;
    color: var(--ink);
}

.apply-subtitle {
    color: var(--ink-soft);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 20px;
}

#formState .apply-subtitle {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.apply-form-group {
    margin-bottom: 22px;
}

.apply-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-soft);
    margin-bottom: 6px;
}

.apply-form-group input,
.apply-form-group textarea,
.apply-form-group select {
    width: 100%;
    border: none;
    border-bottom: 1.5px solid var(--border-strong);
    border-radius: 0;
    padding: 12px 2px;
    background: transparent;
    color: var(--ink);
    font-family: var(--font-body);
    /* 16px avoids iOS Safari's auto-zoom-on-focus, common on this form */
    font-size: 16px;
    transition: border-color 0.15s;
}

.apply-form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23565A64'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 14px;
    appearance: none;
}

.apply-form-group textarea {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    min-height: 80px;
    resize: vertical;
}

.apply-form-group input:focus,
.apply-form-group textarea:focus,
.apply-form-group select:focus {
    outline: none;
    border-color: var(--signal);
}

.apply-form-group input[type="file"] {
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: 13px;
}

/* Drop the native up/down steppers on number fields - they increment by 1,
   which is useless (and annoying to click through) for something like a
   salary figure entered in whole numbers/thousands. Applicants just type
   the value directly instead. */
.apply-form-group input[type="number"]::-webkit-outer-spin-button,
.apply-form-group input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.apply-form-group input[type="number"] {
    -moz-appearance: textfield;
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
}

.apply-submit {
    width: 100%;
    padding: 13px;
    margin-top: 8px;
    background: var(--signal);
    color: var(--paper);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.apply-submit:hover {
    background: var(--signal-hover);
}

.apply-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apply-error {
    display: none;
    background: var(--stamp-reject-tint);
    color: var(--stamp-reject);
    border: 1px solid var(--stamp-reject);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 18px;
}

.apply-error.active {
    display: block;
}

.apply-notice {
    background: var(--stamp-pending-tint);
    color: var(--stamp-pending);
    border: 1px solid var(--stamp-pending);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 18px;
}

.text-muted {
    color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.001ms !important;
    }
}
