:root {
    --ats-bg: #f4f7fb;
    --ats-surface: #ffffff;
    --ats-surface-alt: #f8fbff;
    --ats-ink: #162033;
    --ats-accent: #1459c6;
    --ats-accent-soft: #e8f1ff;
    --ats-muted: #6b7280;
    --ats-border: rgba(15, 23, 42, 0.08);
    --ats-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    --status-imported: #2f6feb;
    --status-shortlisted: #d4a72c;
    --status-submitted: #1f9d62;
    --status-interview: #7c3aed;
    --status-offered: #06b6d4;
    --status-joined: #334155;
    --status-rejected: #dc2626;
}

body {
    background:
        radial-gradient(circle at top left, rgba(20, 89, 198, 0.10), transparent 24%),
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.10), transparent 18%),
        linear-gradient(180deg, #f6f9fd 0%, #eef3f8 100%);
    color: var(--ats-ink);
    min-height: 100vh;
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
}

.auth-page {
    background: linear-gradient(135deg, #162033 0%, #1459c6 100%);
}

.card {
    background: var(--ats-surface);
    border-radius: 1.25rem;
    border: 1px solid var(--ats-border);
    box-shadow: var(--ats-shadow);
}

.stat-card {
    background: linear-gradient(160deg, rgba(20, 89, 198, 0.08), rgba(255, 255, 255, 0.96));
}

.detail-pre {
    white-space: pre-wrap;
    max-height: 20rem;
    overflow: auto;
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--ats-border);
}

.table > :not(caption) > * > * {
    background-color: transparent;
}

.container,
.container-fluid,
.container-xxl {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.navbar-shell {
    background: rgba(22, 32, 51, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.navbar-shell .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.4);
}

.navbar-shell .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.navbar-shell .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: #fff;
    text-decoration: none;
}

.brand-mark__icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #38bdf8, #2563eb);
    font-weight: 700;
}

.brand-mark__title {
    display: block;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.brand-mark__subtitle {
    display: block;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
}

.nav-pills-shell .nav-link {
    border-radius: 999px;
    padding: 0.65rem 1rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 600;
}

.nav-pills-shell .nav-link.active,
.nav-pills-shell .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.user-chip__name {
    color: #fff;
    font-weight: 600;
}

.user-chip__role {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.workspace-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.workspace-subtitle {
    color: var(--ats-muted);
    margin-bottom: 0;
}

.metric-card {
    padding: 1.1rem;
    border-radius: 1.1rem;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border: 1px solid var(--ats-border);
    box-shadow: var(--ats-shadow);
}

.metric-card__label {
    font-size: 0.8rem;
    color: var(--ats-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-card__value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.workspace-surface {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--ats-border);
    border-radius: 1.25rem;
    box-shadow: var(--ats-shadow);
}

.smart-search {
    border-radius: 999px;
    padding: 0.85rem 1rem;
    border: 1px solid var(--ats-border);
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.chip-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.chip-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.55rem 0.95rem;
    background: #fff;
    border: 1px solid var(--ats-border);
    color: var(--ats-ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
}

.chip-filter.active {
    background: var(--ats-accent);
    color: #fff;
    border-color: var(--ats-accent);
}

.list-card {
    border-radius: 1.1rem;
    border: 1px solid var(--ats-border);
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.list-card + .list-card {
    margin-top: 0.9rem;
}

.list-card__meta {
    color: var(--ats-muted);
    font-size: 0.92rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}

.status-imported { background: var(--status-imported); }
.status-shortlisted { background: var(--status-shortlisted); color: #1f2933; }
.status-submitted { background: var(--status-submitted); }
.status-interview { background: var(--status-interview); }
.status-offered { background: var(--status-offered); color: #083344; }
.status-joined { background: var(--status-joined); }
.status-rejected { background: var(--status-rejected); }

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px dashed rgba(15, 23, 42, 0.14);
    border-radius: 1.25rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(248,251,255,0.92));
}

.empty-state__title {
    font-size: 1.1rem;
    font-weight: 700;
}

.empty-state__text {
    color: var(--ats-muted);
    max-width: 34rem;
    margin: 0.4rem auto 0;
}

.timeline {
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 0.7rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(20, 89, 198, 0.22), rgba(20, 89, 198, 0.04));
}

.timeline-item {
    position: relative;
    padding-left: 2.3rem;
    margin-bottom: 1.25rem;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: 0.3rem;
    top: 0.3rem;
    width: 0.9rem;
    height: 0.9rem;
    border-radius: 999px;
    background: var(--ats-accent);
    box-shadow: 0 0 0 0.3rem rgba(20, 89, 198, 0.12);
}

.pagination-shell {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.pagination-summary {
    color: var(--ats-muted);
    font-size: 0.95rem;
}

.section-kicker {
    color: var(--ats-accent);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    font-weight: 700;
}

.hero-panel {
    padding: 1.5rem;
    border-radius: 1.4rem;
    background: linear-gradient(135deg, #162033, #1d4ed8);
    color: #fff;
    box-shadow: 0 24px 56px rgba(29, 78, 216, 0.2);
}

.hero-panel a {
    color: inherit;
}

.surface-muted {
    background: linear-gradient(180deg, #fbfdff, #f5f9ff);
}

.table-shell thead th {
    border-bottom: 1px solid var(--ats-border);
    color: var(--ats-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.data-pair dt {
    color: var(--ats-muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-pair dd {
    font-weight: 600;
}

.inline-stat {
    display: inline-flex;
    flex-direction: column;
    padding: 0.8rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.12);
    min-width: 8rem;
}

.inline-stat__label {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.76);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.inline-stat__value {
    font-size: 1.4rem;
    font-weight: 700;
}

.stack-list {
    display: grid;
    gap: 1rem;
}

.action-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.meta-card {
    padding: 1rem;
    border-radius: 1rem;
    border: 1px solid var(--ats-border);
    background: #fff;
}

.meta-card__label {
    color: var(--ats-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.meta-card__value {
    font-size: 1.5rem;
    font-weight: 700;
}

.record-meta {
    color: var(--ats-muted);
    font-size: 0.92rem;
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    background: var(--ats-accent-soft);
    color: var(--ats-accent);
    font-weight: 700;
}

.panel-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.activity-pill {
    background: #fff;
    border: 1px solid var(--ats-border);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    color: var(--ats-muted);
    font-weight: 600;
}

.loading-hint {
    display: none;
    color: var(--ats-muted);
    font-size: 0.88rem;
}

form[data-loading] .loading-hint {
    display: inline-block;
}

.job-hero {
    position: relative;
    padding: 1.75rem;
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.24), transparent 22%),
        linear-gradient(135deg, #162033, #1d4ed8);
    color: #fff;
    overflow: hidden;
    box-shadow: 0 28px 60px rgba(29, 78, 216, 0.22);
}

.job-hero__eyebrow {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.job-hero__title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    margin-bottom: 0.5rem;
}

.job-hero__meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.job-hero__cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #fff;
    font-weight: 600;
}

.hero-chip--ghost {
    background: rgba(255, 255, 255, 0.04);
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    border-radius: 999px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.status-inline-form {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.status-inline-form .form-select {
    min-width: 180px;
    border-radius: 999px;
}

.workspace-tabs {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.workspace-tabs .nav-link {
    border: 0;
    border-radius: 999px;
    color: var(--ats-ink);
    background: #fff;
    border: 1px solid var(--ats-border);
    font-weight: 600;
}

.workspace-tabs .nav-link.active {
    background: var(--ats-accent);
    color: #fff;
    border-color: var(--ats-accent);
}

.pipeline-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.9rem;
}

.pipeline-card {
    padding: 1rem;
    border-radius: 1.15rem;
    border: 1px solid var(--ats-border);
    background: #fff;
}

.pipeline-card__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ats-muted);
}

.pipeline-card__value {
    font-size: 1.85rem;
    font-weight: 700;
    line-height: 1.1;
}

.pipeline-card--imported { border-top: 4px solid var(--status-imported); }
.pipeline-card--shortlisted { border-top: 4px solid var(--status-shortlisted); }
.pipeline-card--submitted { border-top: 4px solid var(--status-submitted); }
.pipeline-card--interview { border-top: 4px solid var(--status-interview); }
.pipeline-card--offered { border-top: 4px solid var(--status-offered); }
.pipeline-card--joined { border-top: 4px solid var(--status-joined); }
.pipeline-card--rejected { border-top: 4px solid var(--status-rejected); }

.attention-card {
    border-radius: 1.1rem;
    padding: 1rem;
    border: 1px solid transparent;
}

.attention-card--warning {
    background: #fff8e8;
    border-color: rgba(212, 167, 44, 0.28);
}

.attention-card--danger {
    background: #fff0f0;
    border-color: rgba(220, 38, 38, 0.2);
}

.attention-card--info {
    background: #eef6ff;
    border-color: rgba(20, 89, 198, 0.18);
}

.health-card {
    padding: 1.2rem;
    border-radius: 1.2rem;
    border: 1px solid var(--ats-border);
}

.health-card--healthy {
    background: linear-gradient(180deg, #effcf4, #f8fffb);
}

.health-card--warning {
    background: linear-gradient(180deg, #fff8eb, #fffdfa);
}

.health-card--critical {
    background: linear-gradient(180deg, #fff1f1, #fffafa);
}

.top-match-card {
    padding: 1.1rem;
    border-radius: 1.1rem;
    border: 1px solid var(--ats-border);
    background: linear-gradient(180deg, #fff, #f9fbff);
}

.top-match-card__scores {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.score-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: var(--ats-accent-soft);
    color: var(--ats-accent);
    font-weight: 700;
    font-size: 0.82rem;
}

.skills-wrap {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.skills-wrap .badge-soft {
    font-weight: 600;
}

.bulk-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.side-stack {
    display: grid;
    gap: 1rem;
}

.job-meta-list dt {
    color: var(--ats-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.78rem;
}

.job-meta-list dd {
    font-weight: 600;
}

.timeline-card {
    border-radius: 1.15rem;
    border: 1px solid var(--ats-border);
    padding: 1rem;
    background: #fff;
}

@media (max-width: 991.98px) {
    .workspace-header {
        flex-direction: column;
        align-items: stretch;
    }

    .job-hero {
        padding: 1.35rem;
    }
}