/* FTS job portal - sign-in pages and the candidate dashboard.
   Everything is scoped by the layout's body class (.fts-auth / .fts-portal) so it cannot touch the admin screens. */
:root {
    --c-ink: #0f172a;
    --c-text: #1e293b;
    --c-muted: #64748b;
    --c-line: #e2e8f0;
    --c-bg: #f4f6fb;
    --c-card: #ffffff;
    --c-brand: #1e3a6e;
    --c-brand-dark: #152c56;
    --c-brand-soft: #e2e8f4;
    --c-side: #0e1f40;
    --c-ok: #15803d;
    --c-warn: #b45309;
    --c-bad: #b91c1c;
    --radius: 12px;
}

body.fts-auth, body.fts-portal { background: var(--c-bg); color: var(--c-text); font-family: 'Segoe UI', system-ui, -apple-system, Roboto, sans-serif; }

/* ------------------------------------------------------------ sign-in / sign-up shell */
.fts-auth .auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(300px, 44%) 1fr; }
.fts-auth .auth-side {
    background: radial-gradient(1200px 500px at 0% 0%, #2c4f94 0%, rgba(47,91,224,0) 60%), linear-gradient(160deg, #0e1f40 0%, #152c56 100%);
    color: #e6ecff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.fts-auth .auth-side .brand img { height: 54px; background: #fff; border-radius: 10px; padding: 6px 10px; }
.fts-auth .auth-side h1 { font-size: 2rem; line-height: 1.2; font-weight: 700; color: #fff; margin: 40px 0 14px; letter-spacing: -.01em; }
.fts-auth .auth-side p.lead { color: #c7d4f7; font-size: 1.02rem; max-width: 30em; }
.fts-auth .auth-points { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.fts-auth .auth-points li { display: flex; gap: 12px; align-items: flex-start; color: #dbe5ff; font-size: .95rem; }
.fts-auth .auth-points i { color: #9db3de; font-size: 1.15rem; line-height: 1.3; }
.fts-auth .auth-side small { color: #9fb2e6; }
.fts-auth .auth-main { display: flex; align-items: center; justify-content: center; padding: 36px 20px; }
.fts-auth .auth-card { width: 100%; max-width: 480px; background: var(--c-card); border: 1px solid var(--c-line); border-radius: 16px; padding: 34px 32px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.fts-auth .auth-card.wide { max-width: 640px; }
.fts-auth .auth-card h2 { font-size: 1.45rem; font-weight: 700; color: var(--c-ink); margin: 0 0 6px; }
.fts-auth .auth-card .sub { color: var(--c-muted); margin-bottom: 22px; font-size: .95rem; }
.fts-auth .form-label { font-weight: 600; font-size: .86rem; color: var(--c-text); margin-bottom: 5px; }
.fts-auth .form-control { padding: 10px 13px; border-radius: 9px; border-color: #cbd5e1; }
.fts-auth .form-control:focus { border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(29,78,216,.15); }
.fts-auth .btn-primary { background: var(--c-brand); border-color: var(--c-brand); padding: 11px; font-weight: 600; border-radius: 9px; }
.fts-auth .btn-primary:hover { background: var(--c-brand-dark); border-color: var(--c-brand-dark); }
.fts-auth .apply-banner { display: flex; gap: 12px; align-items: center; background: var(--c-brand-soft); border: 1px solid #c4d0e8; border-radius: 10px; padding: 12px 14px; margin-bottom: 20px; }
.fts-auth .apply-banner i { font-size: 1.4rem; color: var(--c-brand); }
.fts-auth .apply-banner b { color: var(--c-ink); display: block; line-height: 1.25; }
.fts-auth .apply-banner span { font-size: .82rem; color: var(--c-muted); }
.fts-auth .code-input { font-size: 1.9rem; letter-spacing: .5em; text-align: center; font-weight: 700; padding-left: .5em; }
.fts-auth .linkrow { display: flex; justify-content: space-between; align-items: center; font-size: .9rem; }
.fts-auth .back-home { position: absolute; top: 18px; right: 22px; font-size: .88rem; }
@media (max-width: 900px) {
    .fts-auth .auth-wrap { grid-template-columns: 1fr; }
    .fts-auth .auth-side { padding: 26px 24px; }
    .fts-auth .auth-side h1, .fts-auth .auth-points, .fts-auth .auth-side p.lead, .fts-auth .auth-side small { display: none; }
    .fts-auth .auth-side .brand img { height: 42px; }
    .fts-auth .auth-card { padding: 26px 20px; }
}

/* ------------------------------------------------------------ candidate portal shell */
.fts-portal .portal { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.fts-portal .side { background: var(--c-side); color: #cbd5e1; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.fts-portal .side .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 16px; border-bottom: 1px solid #1e293b; margin-bottom: 14px; }
.fts-portal .side .brand img { height: 38px; background: #fff; border-radius: 8px; padding: 3px 6px; }
.fts-portal .side .brand span { color: #fff; font-weight: 700; font-size: 1.02rem; line-height: 1.1; }
.fts-portal .side .brand small { display: block; color: #7d8ba5; font-weight: 500; font-size: .72rem; }
.fts-portal .side nav a { display: flex; align-items: center; gap: 11px; color: #cbd5e1; text-decoration: none; padding: 10px 12px; border-radius: 9px; font-size: .93rem; font-weight: 500; margin-bottom: 2px; }
.fts-portal .side nav a i { font-size: 1.05rem; width: 20px; text-align: center; color: #8ea3c4; }
.fts-portal .side nav a:hover { background: #152c56; color: #fff; }
.fts-portal .side nav a.active { background: var(--c-brand); color: #fff; }
.fts-portal .side nav a.active i { color: #fff; }
.fts-portal .side nav .sep { height: 1px; background: #1e293b; margin: 12px 4px; }
.fts-portal .side nav .count { margin-left: auto; background: #f59e0b; color: #1f2937; font-size: .7rem; font-weight: 700; border-radius: 10px; padding: 1px 7px; }
.fts-portal .main { min-width: 0; display: flex; flex-direction: column; }
.fts-portal .topbar { background: #fff; border-bottom: 1px solid var(--c-line); height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; position: sticky; top: 0; z-index: 20; }
.fts-portal .topbar .who { display: flex; align-items: center; gap: 10px; }
.fts-portal .topbar .who img, .fts-portal .avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--c-brand-soft); background: #fff; }
.fts-portal .content { padding: 26px; max-width: 1180px; width: 100%; margin: 0 auto; flex: 1; }
.fts-portal .page-title { font-size: 1.4rem; font-weight: 700; color: var(--c-ink); margin: 0; }
.fts-portal .page-sub { color: var(--c-muted); font-size: .92rem; margin: 2px 0 0; }
.fts-portal footer.foot { border-top: 1px solid var(--c-line); background: #fff; color: var(--c-muted); font-size: .8rem; padding: 14px 26px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; }
@media (max-width: 991px) {
    .fts-portal .portal { grid-template-columns: 1fr; }
    .fts-portal .side { display: none; }
    .fts-portal .content { padding: 18px 14px; }
}

/* ------------------------------------------------------------ cards, tiles, tables */
.fts-portal .card, .fts-auth .card { border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.fts-portal .card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--c-line); }
.fts-portal .card-h h5 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--c-ink); }
.fts-portal .card-b { padding: 18px; }
.fts-portal .tile { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: center; height: 100%; }
.fts-portal .tile .ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 1.3rem; background: var(--c-brand-soft); color: var(--c-brand); flex: none; }
.fts-portal .tile .ico.warn { background: #fff4de; color: var(--c-warn); }
.fts-portal .tile .ico.ok { background: #e3f6e8; color: var(--c-ok); }
.fts-portal .tile .ico.info { background: #e0f2fe; color: #0369a1; }
.fts-portal .tile b { display: block; font-size: 1.55rem; line-height: 1.1; color: var(--c-ink); }
.fts-portal .tile span { color: var(--c-muted); font-size: .82rem; }
.fts-portal .table > :not(caption) > * > * { padding: .8rem .9rem; }
.fts-portal .table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); font-weight: 700; background: #f8fafc; border-bottom: 1px solid var(--c-line); }
.fts-portal .kv { display: grid; grid-template-columns: minmax(70px, 120px) minmax(0, 1fr); gap: 8px 14px; font-size: .92rem; margin: 0; }
.fts-portal .kv dt { color: var(--c-muted); font-weight: 500; }
.fts-portal .kv dd { margin: 0; color: var(--c-ink); font-weight: 600; overflow-wrap: anywhere; }
.fts-portal .empty { text-align: center; color: var(--c-muted); padding: 34px 12px; }
.fts-portal .empty i { font-size: 2.2rem; display: block; margin-bottom: 6px; color: #94a3b8; }
.fts-portal .status-pill { font-size: .78rem; font-weight: 600; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }

/* progress steps (apply -> pay -> verify -> slip) */
.steps { display: flex; gap: 0; margin: 0 0 22px; padding: 0; list-style: none; counter-reset: s; }
.steps li { flex: 1; text-align: center; position: relative; font-size: .8rem; color: var(--c-muted); font-weight: 600; padding-top: 38px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50%; background: #e2e8f0; color: #64748b; display: grid; place-items: center; font-weight: 700; z-index: 1; }
.steps li::after { content: ''; position: absolute; top: 14px; left: -50%; width: 100%; height: 3px; background: #e2e8f0; }
.steps li:first-child::after { display: none; }
.steps li.done { color: var(--c-ok); }
.steps li.done::before { content: '\2713'; background: var(--c-ok); color: #fff; }
.steps li.done::after, .steps li.now::after { background: var(--c-ok); }
.steps li.now { color: var(--c-brand); }
.steps li.now::before { background: var(--c-brand); color: #fff; box-shadow: 0 0 0 5px var(--c-brand-soft); }

/* timeline */
.tl { list-style: none; padding: 0; margin: 0; }
.tl li { position: relative; padding: 0 0 18px 26px; font-size: .9rem; }
.tl li::before { content: ''; position: absolute; left: 4px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: #cbd5e1; }
.tl li::after { content: ''; position: absolute; left: 9px; top: 18px; bottom: -4px; width: 2px; background: #e2e8f0; }
.tl li:last-child::after { display: none; }
.tl li.on::before { background: var(--c-ok); }
.tl li.now::before { background: var(--c-brand); box-shadow: 0 0 0 4px var(--c-brand-soft); }
.tl li.bad::before { background: var(--c-bad); }
.tl li b { display: block; color: var(--c-ink); }
.tl li span { color: var(--c-muted); font-size: .82rem; }

/* profile completeness */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.checklist li i.bi-check-circle-fill { color: var(--c-ok); }
.checklist li i.bi-circle { color: #94a3b8; }

/* job cards on the portal */
.jobrow { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--c-line); }
.jobrow:last-child { border-bottom: 0; }
.jobrow .t { font-weight: 700; color: var(--c-ink); }
.jobrow .m { color: var(--c-muted); font-size: .84rem; }

@media print { .fts-portal .side, .fts-portal .topbar, .fts-portal footer.foot, .no-print { display: none !important; } .fts-portal .portal { display: block; } }

/* Bootstrap 5.1 (the copy in wwwroot/lib) has no text-bg-* / *-subtle colour helpers; the job portal screens use them, so they are defined here. */
.text-bg-secondary { color: #fff !important; background-color: #6c757d !important; }
.text-bg-success { color: #fff !important; background-color: #198754 !important; }
.text-bg-danger { color: #fff !important; background-color: #dc3545 !important; }
.text-bg-warning { color: #1f2937 !important; background-color: #ffc107 !important; }
.text-bg-info { color: #052c65 !important; background-color: #6edff6 !important; }
.text-bg-light { color: #212529 !important; background-color: #f8f9fa !important; }
.text-bg-dark { color: #fff !important; background-color: #212529 !important; }
.bg-secondary-subtle { background-color: #e2e3e5 !important; }
.bg-success-subtle { background-color: #d1e7dd !important; }
.bg-danger-subtle { background-color: #f8d7da !important; }
.bg-warning-subtle { background-color: #fff3cd !important; }
.bg-info-subtle { background-color: #cff4fc !important; }