/* =====================================================
   PUBLIC APPLICATION PAGES — EasyApply / Apply / UploadResume
   Scoped under .ea-page so the legacy theme's body/.container/.tm-*
   rules can't bleed in.  Self-contained CSS variables.
   ===================================================== */
.ea-page {
    --ea-blue: #1FA9E0;
    --ea-blue-700: #0B76A3;
    --ea-blue-50: #EAF7FD;
    --ea-blue-100: #D2EEFA;
    --ea-navy: #0B2F4D;
    --ea-ink: #0B1220;
    --ea-line: #E5E7EB;
    --ea-line-2: #EEF1F4;
    --ea-bg: #F7F8FA;
    --ea-muted: #6B7280;
    --ea-muted-2: #94A3B8;
    --ea-success: #059669;
    --ea-amber: #F59E0B;
    --ea-danger: #DC2626;
    --ea-mono: ui-monospace, 'JetBrains Mono', SFMono-Regular, Menlo, monospace;
    --ea-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--ea-bg);
    color: var(--ea-ink);
    font-family: var(--ea-sans);
    line-height: 1.5;
    min-height: 80vh;
}
.ea-page *, .ea-page *::before, .ea-page *::after { box-sizing: border-box; }
.ea-page a { color: inherit; text-decoration: none; }

.ea-main { padding: 28px 24px 120px; }
.ea-main__inner { max-width: 1240px; margin: 0 auto; }
.ea-main--narrow .ea-main__inner { max-width: 760px; }

/* ── breadcrumb ── */
.ea-crumb { font-size: 0.82rem; color: var(--ea-muted); margin-bottom: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.ea-crumb a { color: var(--ea-muted); cursor: pointer; }
.ea-crumb a:hover { color: var(--ea-blue-700); }
.ea-crumb__sep { color: #D1D5DB; margin: 0 6px; }
.ea-crumb__here { color: #374151; font-weight: 500; }

/* ── page header + progress ring ── */
.ea-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.ea-pagehead__title { font-size: 1.85rem; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em; color: var(--ea-ink); }
.ea-pagehead__sub { font-size: 0.875rem; color: var(--ea-muted); margin: 0; max-width: 640px; line-height: 1.55; }

.ea-progress {
    background: #fff; border: 1px solid var(--ea-line); border-radius: 12px;
    padding: 14px 18px; min-width: 280px;
    display: flex; align-items: center; gap: 14px;
}
.ea-progress__ring {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: conic-gradient(var(--ea-blue) calc(var(--ea-pct, 0) * 1%), #F1F5F9 0);
    display: flex; align-items: center; justify-content: center;
    transition: background 0.25s;
}
.ea-progress__pct {
    width: 32px; height: 32px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 700; color: var(--ea-ink);
}
.ea-progress__text strong { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ea-ink); }
.ea-progress__text span { display: block; font-size: 0.75rem; color: var(--ea-muted); margin-top: 2px; }

/* ── two-column layout ── */
.ea-grid { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: flex-start; }

/* ── job context card (left rail) ── */
.ea-rail { position: sticky; top: 16px; }
.ea-jobcard { background: #fff; border: 1px solid var(--ea-line); border-radius: 12px; overflow: hidden; }
.ea-jobcard__head {
    background: linear-gradient(135deg, var(--ea-blue-700), var(--ea-blue));
    padding: 18px 20px; color: #fff;
}
.ea-jobcard__eyebrow { font-size: 0.66rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.85; margin-bottom: 8px; }
.ea-jobcard__title { font-size: 1.2rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.ea-jobcard__id { font-size: 0.78rem; margin-top: 6px; opacity: 0.9; font-family: var(--ea-mono); }
.ea-jobcard__rows { padding: 16px 20px; }
.ea-jobcard__row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--ea-line-2); }
.ea-jobcard__row:last-child { border-bottom: none; }
.ea-jobcard__row__k { font-size: 0.75rem; color: var(--ea-muted); font-weight: 500; }
.ea-jobcard__row__v { font-size: 0.82rem; color: var(--ea-ink); font-weight: 600; text-align: right; }
.ea-jobcard__note { padding: 14px 20px; background: #F8FAFC; border-top: 1px solid var(--ea-line-2); display: flex; align-items: flex-start; gap: 10px; font-size: 0.78rem; color: #475569; line-height: 1.5; }
.ea-jobcard__note i { color: #475569; flex-shrink: 0; margin-top: 1px; }

/* ── application checklist ── */
.ea-checklist {
    background: #fff; border: 1px solid var(--ea-line); border-radius: 12px;
    padding: 8px; margin-top: 16px;
}
.ea-checklist__label { font-size: 0.62rem; font-weight: 700; color: var(--ea-muted-2); padding: 10px 12px 6px; letter-spacing: 0.12em; text-transform: uppercase; }
.ea-checklist__item {
    padding: 10px 12px; display: flex; align-items: center; gap: 10px;
    font-size: 0.84rem; font-weight: 500; color: #374151;
    border-radius: 8px; cursor: pointer; margin-bottom: 2px;
    background: transparent;
    border: none; width: 100%; text-align: left; font-family: inherit;
}
.ea-checklist__item:hover { background: #F9FAFB; }
.ea-checklist__item.is-active { background: var(--ea-blue-50); color: var(--ea-blue-700); font-weight: 600; }
.ea-checklist__check {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
    background: #fff; border: 1.5px solid #CBD5E1;
    display: flex; align-items: center; justify-content: center; color: #fff;
}
.ea-checklist__item.is-complete .ea-checklist__check { background: var(--ea-success); border-color: var(--ea-success); }
.ea-checklist__item.is-current .ea-checklist__check { background: var(--ea-blue); border-color: var(--ea-blue); }
.ea-checklist__item.is-current .ea-checklist__check::before {
    content: ''; width: 6px; height: 6px; border-radius: 50%; background: #fff;
}
.ea-checklist__check i { font-size: 0.6rem; }
.ea-checklist__name { flex: 1; }
.ea-checklist__hint { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.02em; }
.ea-checklist__hint--complete    { color: var(--ea-success); }
.ea-checklist__hint--inprogress  { color: var(--ea-blue-700); }
.ea-checklist__hint--notstarted  { color: var(--ea-muted-2); }
.ea-checklist__hint--attention   { color: var(--ea-danger); }
.ea-checklist__item.is-attention .ea-checklist__check { background: var(--ea-danger); border-color: var(--ea-danger); color: #fff; }

/* ── accordion section ── */
.ea-section {
    background: #fff; border: 1px solid var(--ea-line); border-radius: 12px;
    margin-bottom: 12px; box-shadow: 0 1px 2px rgba(15,23,42,.03); overflow: hidden;
    scroll-margin-top: var(--ea-scroll-offset, 236px);
}
.ea-section__head {
    width: 100%; text-align: left; background: transparent; border: none;
    padding: 16px 22px; cursor: pointer; font-family: inherit;
    display: flex; align-items: center; justify-content: space-between;
}
.ea-section__head__left { display: flex; align-items: center; gap: 14px; }
.ea-section__step {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--ea-blue-50); color: var(--ea-blue-700);
    border: 1px solid var(--ea-blue-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; flex-shrink: 0;
}
.ea-section.is-complete .ea-section__step { background: var(--ea-success); color: #fff; border: none; }
.ea-section__title { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.005em; color: var(--ea-ink); }
.ea-section__head__right { display: flex; align-items: center; gap: 12px; }
.ea-section__pill {
    font-size: 0.66rem; font-weight: 600;
    padding: 4px 10px; border-radius: 999px; letter-spacing: 0.02em;
    display: inline-flex; align-items: center; gap: 5px;
}
.ea-section__pill--complete    { background: #ECFDF5; color: #047857; }
.ea-section__pill--inprogress  { background: var(--ea-blue-50); color: var(--ea-blue-700); }
.ea-section__pill--notstarted  { background: #F1F5F9; color: #64748B; }
.ea-section__pill--attention   { background: #FEE2E2; color: #991B1B; }

/* Highlight the current section (in progress) */
.ea-section.is-current { border-color: var(--ea-blue); box-shadow: 0 1px 2px rgba(15,140,196,.10), 0 0 0 1px rgba(31,169,224,.18); }
.ea-section.is-current .ea-section__step { background: var(--ea-blue); color: #fff; border-color: var(--ea-blue); }

/* Needs attention — section failed validation on Next */
.ea-section.is-attention { border-color: var(--ea-danger); box-shadow: 0 1px 2px rgba(220,38,38,.10), 0 0 0 1px rgba(220,38,38,.18); }
.ea-section.is-attention .ea-section__step { background: var(--ea-danger); color: #fff; border-color: var(--ea-danger); }

/* Per-section navigation footer (Back / Next) */
.ea-section__nav {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap;
    margin-top: 22px; padding-top: 18px;
    border-top: 1px solid var(--ea-line-2);
}
.ea-section__nav-side { display: flex; gap: 10px; flex-wrap: wrap; }
.ea-section__nav .ea-btn[disabled],
.ea-section__nav .ea-btn.is-disabled { opacity: .55; cursor: not-allowed; }
.ea-section__nav-hint {
    font-size: 0.72rem; color: var(--ea-muted-2);
}
.ea-section__chev { color: var(--ea-muted-2); transition: transform 0.18s; font-size: 0.8rem; }
.ea-section.is-open .ea-section__chev { transform: rotate(180deg); }
.ea-section__body { padding: 8px 22px 22px; border-top: 1px solid var(--ea-line-2); display: none; }
.ea-section.is-open .ea-section__body { display: block; }
.ea-section__intro { font-size: 0.82rem; color: var(--ea-muted); margin: 12px 0 14px; line-height: 1.55; }

/* ── fields (self-contained, doesn't depend on profile.css) ── */
.ea-fields { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ea-fields--single { grid-template-columns: 1fr; }
.ea-field { display: block; min-width: 0; }
.ea-field--full { grid-column: 1 / -1; }
.ea-field__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ea-field__label { font-size: 0.75rem; font-weight: 600; color: #374151; letter-spacing: 0.01em; }
.ea-field__req { color: var(--ea-danger); margin-left: 2px; }
.ea-field__hint-right { font-size: 0.7rem; color: var(--ea-muted-2); font-weight: 500; }
.ea-field__input,
.ea-field__select {
    width: 100% !important; height: 44px !important;
    background: #fff !important; border: 1px solid #D1D5DB !important;
    border-radius: 8px !important; padding: 0 14px !important;
    font-size: 0.875rem !important; font-weight: 500 !important; font-family: inherit;
    color: var(--ea-ink) !important; outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-shadow: none !important;
    margin: 0 !important;
}
.ea-field__input:focus,
.ea-field__select:focus {
    border-color: var(--ea-blue) !important;
    box-shadow: 0 0 0 3px rgba(31,169,224,.15) !important;
}
.ea-field__textarea {
    width: 100%; min-height: 110px; resize: vertical;
    background: #fff; border: 1px solid #D1D5DB; border-radius: 8px;
    padding: 10px 14px; font-size: 0.875rem; font-family: inherit; font-weight: 500;
    color: var(--ea-ink); outline: none; line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.ea-field__textarea:focus { border-color: var(--ea-blue); box-shadow: 0 0 0 3px rgba(31,169,224,.15); }
.ea-field__hint { display: block; font-size: 0.72rem; color: var(--ea-muted); margin-top: 6px; }
.ea-field__error { display: block; font-size: 0.78rem; font-weight: 600; color: var(--ea-danger); margin-top: 6px; }
.ea-field__error:empty { display: none; }
.ea-field__error::before { content: "\f06a"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 6px; }
.ea-field__error:empty::before { content: ""; margin-right: 0; }

/* Invalid field highlight */
.ea-field__input.is-invalid,
.ea-field__select.is-invalid,
.ea-field__textarea.is-invalid {
    border-color: var(--ea-danger) !important;
    box-shadow: 0 0 0 3px rgba(220,38,38,.12) !important;
}
/* selects: custom chevron, no native menulist arrow */
.ea-field__select {
    appearance: none !important; -webkit-appearance: none !important; -moz-appearance: none !important;
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 14px 14px !important;
    cursor: pointer;
}
.ea-field__select::-ms-expand { display: none; }

/* ── drop-zone ── */
.ea-drop {
    border-radius: 14px;
    border: 2px dashed #CBD5E1;
    background: #FAFBFC;
    padding: 36px 24px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
    display: block;
}
.ea-drop.is-dragging { border-color: var(--ea-blue); background: var(--ea-blue-50); }
.ea-drop.is-picked { border-color: var(--ea-blue-700); background: #F0F9FF; }
.ea-drop__icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--ea-blue-50); color: var(--ea-blue);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 14px; font-size: 1.35rem;
    transition: all 0.2s;
}
.ea-drop.is-dragging .ea-drop__icon { background: var(--ea-blue); color: #fff; }
.ea-drop__title { font-size: 0.95rem; font-weight: 600; color: var(--ea-ink); margin-bottom: 6px; }
.ea-drop__sub { font-size: 0.82rem; color: var(--ea-muted); margin-bottom: 16px; }
.ea-drop__browse { color: var(--ea-blue-700); font-weight: 600; text-decoration: underline; }
.ea-drop__formats { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: center; font-size: 0.7rem; font-weight: 600; color: #475569; }
.ea-drop__formats span { background: #fff; border: 1px solid var(--ea-line); padding: 4px 10px; border-radius: 999px; }
.ea-drop__limit { font-size: 0.72rem; color: var(--ea-muted-2); margin-top: 10px; }
.ea-drop__file-input { display: none; }
.ea-drop__picked { margin-top: 12px; font-size: 0.82rem; color: var(--ea-blue-700); font-weight: 600; display: none; }
.ea-drop.is-picked .ea-drop__picked { display: block; }
.ea-drop.is-picked .ea-drop__title { color: var(--ea-blue-700); }

/* ── submission notice + actions for non-stickybar pages (UploadResume) ── */
.ea-notice { font-size: 0.82rem; color: #374151; line-height: 1.6; margin: 20px 4px 0; }
.ea-notice a { color: var(--ea-blue-700); font-weight: 600; text-decoration: underline; }
.ea-secure { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--ea-muted); margin-top: 12px; }
.ea-secure i { color: var(--ea-muted-2); }

.ea-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; gap: 12px; flex-wrap: wrap; }
.ea-actions__buttons { display: flex; gap: 10px; }

/* ── buttons ── */
.ea-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit; font-weight: 600 !important; cursor: pointer;
    border-radius: 8px; text-decoration: none !important;
    transition: background 0.12s, border-color 0.12s;
    white-space: nowrap; border: 1px solid transparent;
}
.ea-btn--primary {
    height: 42px !important; padding: 0 24px !important; border: none !important;
    background: var(--ea-blue) !important; color: #fff !important;
    font-size: 0.92rem !important;
    box-shadow: 0 1px 2px rgba(15,140,196,.3);
}
.ea-btn--primary:hover { background: var(--ea-blue-700) !important; color: #fff !important; }
.ea-btn--primary:disabled,
.ea-btn--primary.is-disabled { background: #CBD5E1 !important; cursor: not-allowed; box-shadow: none; }
.ea-btn--ghost {
    height: 42px !important; padding: 0 20px !important;
    background: #fff !important; border: 1px solid var(--ea-line) !important;
    color: #374151 !important; font-size: 0.92rem !important; font-weight: 500 !important;
}
.ea-btn--ghost:hover { background: #F9FAFB !important; color: var(--ea-blue-700) !important; border-color: #CBD5E1 !important; }

/* ── sticky submit bar (EasyApply / Apply) ── */
.ea-submitbar {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
    background: rgba(255,255,255,0.96);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--ea-line);
    box-shadow: 0 -4px 20px rgba(15,23,42,.05);
}
.ea-submitbar__inner {
    max-width: 1240px; margin: 0 auto; padding: 14px 24px;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.ea-submitbar__msg { display: flex; align-items: center; gap: 12px; font-size: 0.84rem; color: #374151; }
.ea-submitbar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ea-amber); }
.ea-submitbar.is-ready .ea-submitbar__dot { background: var(--ea-success); }
.ea-submitbar__msg strong { color: var(--ea-ink); font-weight: 600; }
.ea-submitbar__sep { color: var(--ea-muted-2); }
.ea-submitbar__actions { display: flex; gap: 10px; align-items: center; }

/* ── recaptcha placeholder card ── */
.ea-recaptcha {
    background: #FAFBFC; border: 1px solid var(--ea-line); border-radius: 10px;
    padding: 14px 16px;
    display: flex; align-items: center; justify-content: space-between;
    max-width: 360px;
}
.ea-recaptcha__check { display: flex; align-items: center; gap: 12px; }
.ea-recaptcha__box {
    width: 24px; height: 24px; border-radius: 4px;
    background: #fff; border: 1.5px solid #9CA3AF;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    color: #fff;
}
.ea-recaptcha__box.is-checked { background: var(--ea-blue); border-color: var(--ea-blue); }
.ea-recaptcha__label { font-size: 0.82rem; color: #374151; font-weight: 500; }
.ea-recaptcha__brand { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ea-recaptcha__brand i { color: #1F4FB8; font-size: 1.1rem; }
.ea-recaptcha__brand span { font-size: 0.55rem; color: var(--ea-muted); letter-spacing: 0.04em; }

/* ── alerts ── */
.ea-alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border-radius: 8px;
    font-size: 0.84rem; margin-bottom: 16px;
}
.ea-alert--error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.ea-alert--success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.ea-alert i { margin-top: 2px; flex-shrink: 0; }

/* ── UploadResume "What happens next" ── */
.ea-next { background: #fff; border: 1px solid var(--ea-line); border-radius: 12px; padding: 18px 22px; margin-bottom: 18px; }
.ea-next__label { font-size: 0.7rem; font-weight: 700; color: var(--ea-blue-700); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 12px; }
.ea-next__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.ea-next__step { display: flex; gap: 12px; align-items: flex-start; }
.ea-next__num {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--ea-blue-50); color: var(--ea-blue-700);
    border: 1px solid var(--ea-blue-100);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; flex-shrink: 0;
}
.ea-next__title { font-size: 0.84rem; font-weight: 600; color: var(--ea-ink); margin-bottom: 2px; }
.ea-next__desc { font-size: 0.78rem; color: var(--ea-muted); line-height: 1.5; }

/* ── UploadResume single-card layout ── */
.ea-card {
    background: #fff; border: 1px solid var(--ea-line); border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15,23,42,.03); overflow: hidden;
}
.ea-subsection { padding: 22px 26px; border-top: 1px solid var(--ea-line-2); }
.ea-subsection--first { padding-top: 24px; border-top: none; }
.ea-subsection__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ea-subsection__icon {
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--ea-blue-50); color: var(--ea-blue-700);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.ea-subsection__title { font-size: 0.95rem; font-weight: 700; letter-spacing: -0.005em; color: var(--ea-ink); }
.ea-subsection__desc { font-size: 0.78rem; color: var(--ea-muted); margin-top: 2px; }

/* ── responsive ── */
@media (max-width: 960px) {
    .ea-grid { grid-template-columns: 1fr; }
    .ea-rail { position: static; }
    .ea-pagehead { flex-direction: column; align-items: stretch; }
    .ea-progress { width: 100%; }
}
@media (max-width: 640px) {
    .ea-main { padding: 16px 14px 110px; }
    .ea-pagehead__title { font-size: 1.5rem; }
    .ea-fields { grid-template-columns: 1fr; }
    .ea-next__grid { grid-template-columns: 1fr; gap: 12px; }
    .ea-submitbar__inner { flex-direction: column; align-items: stretch; padding: 10px 14px; gap: 10px; }
    .ea-submitbar__actions { justify-content: flex-end; }
    .ea-submitbar__sep { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .ea-section__chev, .ea-btn, .ea-drop, .ea-progress__ring { transition: none; }
}
