/* =========================================================================
   InPhase Recruit - theme layer over Bootstrap 5.3
   Tokens first, then layout, then components. A rebrand is this file only.
   ========================================================================= */

:root {
    /* Brand */
    --ip-primary:      #2C5277;
    --ip-primary-600:  #24455f;
    --ip-primary-700:  #1b3549;
    --ip-primary-100:  #e8eef4;
    --ip-primary-50:   #f4f7fa;
    --ip-accent:       #0d9488;

    /* Status */
    --ip-success:      #16a34a;
    --ip-warning:      #d97706;
    --ip-danger:       #dc2626;
    --ip-info:         #0284c7;

    /* Surfaces */
    --ip-bg:           #f4f6f9;
    --ip-surface:      #ffffff;
    --ip-border:       #e2e8f0;
    --ip-text:         #1e293b;
    --ip-text-muted:   #64748b;

    /* Spacing */
    --ip-space-1: 4px;  --ip-space-2: 8px;  --ip-space-3: 12px;
    --ip-space-4: 16px; --ip-space-5: 24px; --ip-space-6: 32px; --ip-space-8: 48px;

    /* Radius + elevation */
    --ip-radius-sm:   4px;
    --ip-radius:      8px;
    --ip-radius-lg:   12px;
    --ip-radius-pill: 999px;

    --ip-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --ip-shadow:    0 4px 12px rgba(16, 24, 40, .08);
    --ip-shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

    /* Type - system stack, nothing downloaded */
    --ip-font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

    /* Chrome */
    --ip-topbar-h:      56px;
    --ip-topbar-bg:     #0b2540;
    --ip-sidebar-w:     248px;
    --ip-sidebar-rail:  68px;

    /* Bootstrap overrides */
    --bs-primary:       #2C5277;
    --bs-primary-rgb:   44, 82, 119;
    --bs-body-bg:       var(--ip-bg);
    --bs-body-color:    var(--ip-text);
    --bs-body-font-family: var(--ip-font);
    --bs-border-color:  var(--ip-border);
    --bs-link-color:    var(--ip-primary);
    --bs-link-hover-color: var(--ip-primary-700);
}

/* ------------------------------------------------------------ base ------- */

body {
    font-family: var(--ip-font);
    background: var(--ip-bg);
    color: var(--ip-text);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }

.text-muted { color: var(--ip-text-muted) !important; }

/* Focus is always visible - never outline:none */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--ip-primary);
    outline-offset: 2px;
    border-radius: var(--ip-radius-sm);
}

.btn-primary {
    --bs-btn-bg: var(--ip-primary);
    --bs-btn-border-color: var(--ip-primary);
    --bs-btn-hover-bg: var(--ip-primary-600);
    --bs-btn-hover-border-color: var(--ip-primary-600);
    --bs-btn-active-bg: var(--ip-primary-700);
    --bs-btn-disabled-bg: var(--ip-primary);
    --bs-btn-disabled-border-color: var(--ip-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--ip-primary);
    --bs-btn-border-color: var(--ip-primary);
    --bs-btn-hover-bg: var(--ip-primary);
    --bs-btn-hover-border-color: var(--ip-primary);
}

.card {
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    box-shadow: var(--ip-shadow-sm);
}

.form-control:focus, .form-select:focus {
    border-color: var(--ip-primary);
    box-shadow: 0 0 0 .2rem rgba(44, 82, 119, .15);
}

/* ---------------------------------------------------------- topbar ------- */

.ip-topbar {
    height: var(--ip-topbar-h);
    background: var(--ip-topbar-bg);   /* deep navy: the logo's blue ribbon needs it to stand out */
    color: #fff;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1040;
    display: flex;
    align-items: center;
    gap: var(--ip-space-3);
    padding: 0 var(--ip-space-4);
    box-shadow: var(--ip-shadow-sm);
}

/* Plain links in the bar are white; buttons keep their own colours (this rule used to turn
   .btn-light text white on a white button - the invisible "Staff Login"). */
.ip-topbar a:not(.btn) { color: #fff; }
.ip-topbar-link { font-size: .82rem; opacity: .8; }
.ip-topbar-link:hover { opacity: 1; text-decoration: underline; }
/* Public pages: the bar matches the hero so there is no seam, with a colour thread underneath. */
.ip-topbar-public {
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08);
}
.ip-topbar-public::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -3px; height: 3px;
    background: linear-gradient(90deg, #f59e0b, #f97316, #db2777, #7c3aed, #2563eb, #0d9488);
}
.ip-topbar .ip-brand {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: var(--ip-space-2);
    white-space: nowrap;
}
.ip-topbar .ip-brand:hover { text-decoration: none; }
/* The InPhase logo (reversed: white wordmark) with the product name beside it. Phones get the icon alone. */
.ip-brand img { display: block; width: auto; }
.ip-brand .ip-logo-full { height: 26px; }
.ip-brand .ip-logo-mark { height: 24px; }
.ip-brand-product {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    line-height: 1;
    padding-left: var(--ip-space-3);
    margin-left: var(--ip-space-1);
    border-left: 1px solid rgba(255, 255, 255, .3);
    opacity: .92;
}
/* Logo above the sign-in card and on the error pages (full colour, on the light page) */
.ip-auth-logo { display: block; margin: 0 auto var(--ip-space-5); width: min(340px, 88%); height: auto; }
.ip-auth-product { text-align: center; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ip-text-muted); margin: calc(-1 * var(--ip-space-3)) 0 var(--ip-space-5); }
.ip-footer-logo { display: block; width: 220px; max-width: 100%; height: auto; margin-bottom: var(--ip-space-3); }

.ip-topbar-toggle {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 1.25rem;
    line-height: 1;
    padding: var(--ip-space-2);
    border-radius: var(--ip-radius-sm);
}
.ip-topbar-toggle:hover { background: rgba(255, 255, 255, .12); }

.ip-user-chip {
    display: inline-flex;
    align-items: center;
    gap: var(--ip-space-2);
    background: rgba(255, 255, 255, .12);
    border: 0;
    color: #fff;
    padding: 5px 10px 5px 5px;
    border-radius: var(--ip-radius-pill);
    font-size: .875rem;
}
.ip-user-chip:hover { background: rgba(255, 255, 255, .2); }

.ip-avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: #fff;
    color: var(--ip-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: .78rem;
    flex: 0 0 auto;
}
.ip-avatar-lg { width: 44px; height: 44px; font-size: 1rem; }

/* --------------------------------------------------------- sidebar ------- */

.ip-sidebar {
    position: fixed;
    top: var(--ip-topbar-h);
    bottom: 0;
    left: 0;
    width: var(--ip-sidebar-w);
    background: var(--ip-surface);
    border-right: 1px solid var(--ip-border);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 1030;
    padding: var(--ip-space-3) 0 var(--ip-space-6);
    transition: transform .18s ease;
}

.ip-sidebar .ip-nav-section {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--ip-text-muted);
    font-weight: 700;
    padding: var(--ip-space-4) var(--ip-space-4) var(--ip-space-1);
}

.ip-sidebar .ip-nav-link {
    display: flex;
    align-items: center;
    gap: var(--ip-space-3);
    padding: 9px var(--ip-space-4);
    color: var(--ip-text);
    font-size: .9rem;
    font-weight: 500;
    border-left: 3px solid transparent;
}
.ip-sidebar .ip-nav-link:hover {
    background: var(--ip-primary-50);
    text-decoration: none;
}
.ip-sidebar .ip-nav-link.active {
    background: var(--ip-primary-100);
    color: var(--ip-primary-700);
    border-left-color: var(--ip-primary);
    font-weight: 600;
}
.ip-sidebar .ip-nav-link i { font-size: 1.05rem; width: 20px; text-align: center; flex: 0 0 auto; }
.ip-sidebar .ip-nav-badge { margin-left: auto; font-size: .7rem; }

.ip-content {
    margin-left: var(--ip-sidebar-w);
    padding: calc(var(--ip-topbar-h) + var(--ip-space-5)) var(--ip-space-5) var(--ip-space-8);
    min-height: 100vh;
}

.ip-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 1029;
    display: none;
}
.ip-sidebar-backdrop.show { display: block; }

/* Laptop: icon rail */
@media (max-width: 1199.98px) and (min-width: 992px) {
    .ip-sidebar { width: var(--ip-sidebar-rail); }
    .ip-sidebar .ip-nav-link { justify-content: center; padding: 11px 0; border-left-width: 0; }
    .ip-sidebar .ip-nav-link span, .ip-sidebar .ip-nav-section, .ip-sidebar .ip-nav-badge { display: none; }
    .ip-content { margin-left: var(--ip-sidebar-rail); }
}

/* Tablet and phone: off-canvas drawer */
@media (max-width: 991.98px) {
    .ip-sidebar {
        transform: translateX(-100%);
        box-shadow: var(--ip-shadow-lg);
    }
    .ip-sidebar.open { transform: translateX(0); }
    .ip-content {
        margin-left: 0;
        padding: calc(var(--ip-topbar-h) + var(--ip-space-4)) var(--ip-space-3) var(--ip-space-8);
    }
}

/* ------------------------------------------------------ page header ------ */

.ip-page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--ip-space-3);
    margin-bottom: var(--ip-space-5);
}
.ip-page-head h1 {
    font-size: 1.5rem;
    font-weight: 650;
    margin: 0;
}
.ip-page-head .ip-page-actions { margin-left: auto; display: flex; gap: var(--ip-space-2); flex-wrap: wrap; }

.ip-breadcrumb {
    font-size: .82rem;
    color: var(--ip-text-muted);
    margin-bottom: var(--ip-space-2);
}
.ip-breadcrumb a { color: var(--ip-text-muted); }

/* ------------------------------------------------------- stat card ------- */

.ip-stat {
    background: var(--ip-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    padding: var(--ip-space-4);
    display: block;
    color: inherit;
    height: 100%;
    transition: box-shadow .15s ease, transform .15s ease;
}
a.ip-stat:hover {
    text-decoration: none;
    box-shadow: var(--ip-shadow);
    transform: translateY(-1px);
}
.ip-stat-label {
    font-size: .78rem;
    color: var(--ip-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.ip-stat-value { font-size: 1.85rem; font-weight: 680; line-height: 1.15; margin-top: var(--ip-space-1); }
.ip-stat-meta  { font-size: .8rem; color: var(--ip-text-muted); }
.ip-stat-icon {
    width: 38px; height: 38px;
    border-radius: var(--ip-radius);
    background: var(--ip-primary-100);
    color: var(--ip-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* ----------------------------------------------------- empty state ------- */

.ip-empty {
    text-align: center;
    padding: var(--ip-space-8) var(--ip-space-4);
    color: var(--ip-text-muted);
}
.ip-empty i { font-size: 2.6rem; opacity: .45; display: block; margin-bottom: var(--ip-space-3); }
.ip-empty h3 { font-size: 1.05rem; color: var(--ip-text); font-weight: 600; }

/* ----------------------------------------------------------- auth -------- */

.ip-auth-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--ip-space-5) var(--ip-space-3);
    background:
        radial-gradient(1100px 520px at 50% -10%, var(--ip-primary-100), transparent 70%),
        var(--ip-bg);
}
.ip-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--ip-surface);
    border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-lg);
    box-shadow: var(--ip-shadow-lg);
    padding: var(--ip-space-6);
}
.ip-auth-card h1 { font-size: 1.3rem; font-weight: 650; margin-bottom: var(--ip-space-1); }
.ip-auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--ip-radius-pill);
    background: var(--ip-primary-100);
    color: var(--ip-primary-700);
    margin-bottom: var(--ip-space-3);
}
.ip-auth-alt {
    margin-top: var(--ip-space-5);
    padding-top: var(--ip-space-4);
    border-top: 1px solid var(--ip-border);
    font-size: .875rem;
    text-align: center;
    color: var(--ip-text-muted);
}

/* ----------------------------------------------------------- home -------- */

/* Energetic accents - the public pages only; the staff app stays calm. */
:root {
    --ip-e-navy:   #0b2540;
    --ip-e-blue:   #2563eb;
    --ip-e-teal:   #0d9488;
    --ip-e-amber:  #f59e0b;
    --ip-e-orange: #f97316;
    --ip-e-violet: #7c3aed;
    --ip-e-pink:   #db2777;
    --ip-e-green:  #16a34a;
}

/* Hero: deep blue into teal with a warm glow, and a power-quality waveform running along the bottom. */
.ip-home-hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 64px 0 132px;
    background:
        radial-gradient(900px 420px at 90% -15%, rgba(245, 158, 11, .42), transparent 62%),
        radial-gradient(760px 420px at 0% 115%, rgba(13, 148, 136, .55), transparent 62%),
        linear-gradient(135deg, #0b2540 0%, #1d4f91 54%, #0f766e 100%);
}
.ip-home-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: var(--ip-radius-pill);
    background: #fbbf24;
    color: #3b2300;
    margin-bottom: var(--ip-space-4);
}
.ip-home-kicker i { animation: ip-pulse 1.6s ease-in-out infinite; }
.ip-home-hero h1 {
    font-size: clamp(2.2rem, 5.4vw, 3.8rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -.02em;
    margin-bottom: var(--ip-space-4);
    max-width: 16em;
}
.ip-home-hero h1 .hl {
    background: linear-gradient(90deg, #fde68a, #fbbf24 45%, #fb923c);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.ip-home-lead {
    font-size: clamp(1.02rem, 1.7vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, .92);
    max-width: 40rem;
}
.ip-home-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--ip-space-3); margin-top: var(--ip-space-5); }
.btn-ip-amber {
    background: linear-gradient(180deg, #fcd34d, #f59e0b);
    border: 0;
    color: #3b2300;
    font-weight: 700;
    box-shadow: 0 8px 22px rgba(245, 158, 11, .45);
    transition: transform .15s ease, box-shadow .15s ease;
}
.btn-ip-amber:hover, .btn-ip-amber:focus {
    background: linear-gradient(180deg, #fde68a, #fbbf24);
    color: #3b2300;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 158, 11, .55);
}
.ip-home-fine { font-size: .9rem; color: rgba(255, 255, 255, .8); margin-top: var(--ip-space-3); }
.ip-home-fine a { color: #fde68a; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.ip-home-chips { display: flex; flex-wrap: wrap; gap: var(--ip-space-2); margin-top: var(--ip-space-5); }
.ip-home-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: var(--ip-radius-pill);
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(4px);
}
.ip-home-stats { display: flex; flex-wrap: wrap; gap: var(--ip-space-3); margin-top: var(--ip-space-6); }
.ip-home-stat {
    min-width: 128px;
    padding: 12px 18px;
    border-radius: var(--ip-radius-lg);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    border-left: 4px solid var(--c, #fbbf24);
}
.ip-home-stat b { display: block; font-size: 2.2rem; font-weight: 800; line-height: 1; }
.ip-home-stat span { font-size: .85rem; color: rgba(255, 255, 255, .85); }

/* The waveform: a clean sine trace over a liquid edge into the page. Loops seamlessly (3 whole periods per view). */
.ip-home-wave { position: absolute; left: 0; right: 0; bottom: 0; height: 124px; pointer-events: none; }
.ip-home-wave svg { position: absolute; left: 0; bottom: 0; width: 200%; height: 100%; animation: ip-wave 22s linear infinite; }
.ip-home-wave .back { animation-duration: 15s; animation-direction: reverse; }
.ip-home-wave .mid  { animation-duration: 30s; opacity: .55; }
@keyframes ip-wave  { to { transform: translateX(-50%); } }
@keyframes ip-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.35); opacity: .65; } }

/* Section headings */
.ip-home-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--c, var(--ip-e-blue));
}
.ip-home-eyebrow::before { content: ""; width: 22px; height: 4px; border-radius: 4px; background: var(--c, var(--ip-e-blue)); }
.ip-home-h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.015em; margin: var(--ip-space-1) 0 var(--ip-space-2); }
.ip-home-sub { color: var(--ip-text-muted); max-width: 40rem; }

/* Openings */
.ip-job-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    padding: 24px 20px 18px;
    background: var(--ip-surface);
    border: 1px solid var(--ip-border);
    border-radius: 16px;
    color: inherit;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.ip-job-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--c); }
.ip-job-card:hover, .ip-job-card:focus-visible {
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: var(--ip-shadow-lg);
    border-color: var(--c);
}
.ip-job-card .dept {
    display: inline-block;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: var(--ip-radius-pill);
    color: var(--c);
    background: var(--ip-primary-50);
    background: color-mix(in srgb, var(--c) 12%, white);
}
.ip-job-card h3 { font-size: 1.15rem; font-weight: 750; margin: var(--ip-space-3) 0 var(--ip-space-2); color: var(--ip-text); }
.ip-job-card .meta { color: var(--ip-text-muted); font-size: .88rem; display: grid; gap: 4px; }
.ip-job-card .go {
    margin-top: auto;
    padding-top: var(--ip-space-4);
    font-weight: 700;
    color: var(--c);
    display: flex;
    align-items: center;
    gap: 6px;
}
.ip-job-card .go i { transition: transform .15s ease; }
.ip-job-card:hover .go i { transform: translateX(5px); }
.ip-job-card .new {
    position: absolute; top: 16px; right: 14px;
    font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
    padding: 3px 9px; border-radius: var(--ip-radius-pill);
    background: #dcfce7; color: #166534;
}

/* From application to your first day */
.ip-home-journey { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--ip-space-3); counter-reset: step; }
.ip-home-step {
    position: relative;
    padding: 20px 18px 18px;
    background: var(--ip-surface);
    border: 1px solid var(--ip-border);
    border-radius: 16px;
    box-shadow: var(--ip-shadow-sm);
}
.ip-home-step-no {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--c);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 18px rgba(16, 24, 40, .18);
    margin-bottom: var(--ip-space-3);
}
.ip-home-step h3 { font-size: 1rem; font-weight: 750; margin-bottom: 4px; }
.ip-home-step p { font-size: .86rem; color: var(--ip-text-muted); margin: 0; }
.ip-home-step small { display: block; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: .68rem; color: var(--c); margin-bottom: 2px; }

/* Why work here */
.ip-home-why {
    height: 100%;
    padding: 22px;
    border-radius: 16px;
    background: var(--ip-surface);
    border: 1px solid var(--ip-border);
    transition: transform .15s ease, box-shadow .15s ease;
}
.ip-home-why:hover { transform: translateY(-3px); box-shadow: var(--ip-shadow); }
.ip-home-icon {
    width: 54px; height: 54px;
    border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    color: #fff;
    background: var(--c);
    box-shadow: 0 10px 22px rgba(16, 24, 40, .2);
    margin-bottom: var(--ip-space-3);
}
.ip-home-why h3 { font-size: 1.05rem; font-weight: 750; }
.ip-home-why p { margin: 0; color: var(--ip-text-muted); font-size: .92rem; }

/* Closing call to action */
.ip-home-cta {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    padding: clamp(28px, 5vw, 48px);
    color: #fff;
    background: linear-gradient(120deg, #6d28d9, #db2777 62%, #ea580c);
    box-shadow: 0 18px 40px rgba(109, 40, 217, .28);
}
.ip-home-cta::after {
    content: ""; position: absolute; right: -80px; top: -80px; width: 280px; height: 280px;
    border-radius: 50%; background: rgba(255, 255, 255, .12);
}
.ip-home-cta h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 800; letter-spacing: -.015em; }
.ip-home-cta p { color: rgba(255, 255, 255, .95); max-width: 36rem; }

@media (max-width: 1199px) {
    /* five steps: three across, then two that share the full second row (no empty slot) */
    .ip-home-journey { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .ip-home-step { grid-column: span 2; }
    .ip-home-step:nth-child(n+4) { grid-column: span 3; }
}
@media (max-width: 767px) {
    .ip-home-step, .ip-home-step:nth-child(n+4) { grid-column: auto; }
    .ip-home-hero { padding: 40px 0 112px; }
    .ip-home-journey { grid-template-columns: 1fr; }
    .ip-home-stat { min-width: 0; flex: 1 1 28%; padding: 10px 12px; }
    .ip-home-stat b { font-size: 1.8rem; }
}

.ip-door-icon {
    width: 46px; height: 46px;
    border-radius: var(--ip-radius);
    background: var(--ip-primary-100);
    color: var(--ip-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: var(--ip-space-3);
}

.ip-job-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ip-space-3);
    align-items: center;
    padding: var(--ip-space-4);
    border-bottom: 1px solid var(--ip-border);
}
.ip-job-row:last-child { border-bottom: 0; }
.ip-job-row .ip-job-title { font-weight: 600; color: var(--ip-primary); }
.ip-job-meta { font-size: .85rem; color: var(--ip-text-muted); }

.ip-public-footer {
    border-top: 4px solid;
    border-image: linear-gradient(90deg, #f59e0b, #f97316, #db2777, #7c3aed, #2563eb, #0d9488) 1;
    background: #0b2540;
    color: rgba(255, 255, 255, .75);
    padding: var(--ip-space-6) 0;
    font-size: .875rem;
    margin-top: var(--ip-space-8);
}
.ip-public-footer a { color: rgba(255, 255, 255, .9); }

/* ---------------------------------------------------------- portal ------- */

.ip-portal-tabs {
    background: var(--ip-surface);
    border-bottom: 1px solid var(--ip-border);
    position: sticky;
    top: var(--ip-topbar-h);
    z-index: 1020;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.ip-portal-tabs .nav { flex-wrap: nowrap; white-space: nowrap; }
.ip-portal-tabs .nav-link {
    color: var(--ip-text-muted);
    font-weight: 550;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: var(--ip-space-3) var(--ip-space-4);
}
.ip-portal-tabs .nav-link.active {
    color: var(--ip-primary);
    border-bottom-color: var(--ip-primary);
    background: transparent;
}

.ip-portal-content {
    padding: calc(var(--ip-topbar-h) + var(--ip-space-5)) var(--ip-space-3) var(--ip-space-8);
    max-width: 980px;
    margin: 0 auto;
}

/* ---------------------------------------------------------- badges ------- */

.ip-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .74rem;
    font-weight: 650;
    padding: 3px 9px;
    border-radius: var(--ip-radius-pill);
    border: 1px solid transparent;
    white-space: nowrap;
}
.ip-badge-neutral { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.ip-badge-success { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.ip-badge-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.ip-badge-danger  { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.ip-badge-info    { background: #e0f2fe; color: #075985; border-color: #bae6fd; }
.ip-badge-primary { background: var(--ip-primary-100); color: var(--ip-primary-700); border-color: #cfdcea; }

/* ---------------------------------------------------------- tables ------- */

.ip-table { background: var(--ip-surface); }
.ip-table thead th {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--ip-text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--ip-border);
    background: #fafbfc;
    white-space: nowrap;
}
.ip-table td { vertical-align: middle; }

/* Tables become cards on phones - never a silent horizontal scroll */
@media (max-width: 767.98px) {
    .ip-table-responsive-cards thead { display: none; }
    .ip-table-responsive-cards tbody tr {
        display: block;
        background: var(--ip-surface);
        border: 1px solid var(--ip-border);
        border-radius: var(--ip-radius);
        margin-bottom: var(--ip-space-3);
        padding: var(--ip-space-3);
    }
    .ip-table-responsive-cards tbody td {
        display: flex;
        justify-content: space-between;
        gap: var(--ip-space-3);
        border: 0;
        padding: 5px 0;
        text-align: right;
    }
    .ip-table-responsive-cards tbody td::before {
        content: attr(data-label);
        font-weight: 650;
        color: var(--ip-text-muted);
        font-size: .78rem;
        text-align: left;
        flex: 0 0 42%;
    }
    .ip-table-responsive-cards tbody td:first-child { text-align: left; font-size: 1rem; }
    .ip-table-responsive-cards tbody td:first-child::before { display: none; }
}

/* ---------------------------------------------------------- toasts ------- */

.ip-toast-stack {
    position: fixed;
    top: calc(var(--ip-topbar-h) + var(--ip-space-3));
    right: var(--ip-space-4);
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: var(--ip-space-2);
    max-width: min(380px, calc(100vw - 2 * var(--ip-space-4)));
}

/* ------------------------------------------------------------ misc ------- */

.ip-required::after { content: " *"; color: var(--ip-danger); }

.ip-divider-text {
    display: flex;
    align-items: center;
    gap: var(--ip-space-3);
    color: var(--ip-text-muted);
    font-size: .8rem;
    margin: var(--ip-space-4) 0;
}
.ip-divider-text::before,
.ip-divider-text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--ip-border);
}

@media print {
    .ip-topbar, .ip-sidebar, .ip-page-actions, .ip-toast-stack { display: none !important; }
    .ip-content { margin: 0; padding: 0; }
    body { background: #fff; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}

/* =========================================================================
   P3 - pipeline, scoring, timelines
   ========================================================================= */

/* Match score pill + breakdown bars */
.ip-score {
    display: inline-flex; align-items: center; gap: 6px;
    font-weight: 600; font-size: .8125rem; line-height: 1;
    padding: 4px 9px; border-radius: var(--ip-radius-pill);
    background: var(--ip-primary-100); color: var(--ip-primary-700);
}
.ip-score-success { background: #dcfce7; color: #166534; }
.ip-score-info    { background: #e0f2fe; color: #075985; }
.ip-score-warning { background: #fef3c7; color: #92400e; }
.ip-score-danger  { background: #fee2e2; color: #991b1b; }
.ip-score-none    { background: #f1f5f9; color: var(--ip-text-muted); font-weight: 500; }

.ip-bar { height: 8px; background: #e9eef3; border-radius: var(--ip-radius-pill); overflow: hidden; }
.ip-bar > span { display: block; height: 100%; background: var(--ip-primary); border-radius: var(--ip-radius-pill); }
.ip-bar-success > span { background: var(--ip-success); }
.ip-bar-warning > span { background: var(--ip-warning); }
.ip-bar-danger  > span { background: var(--ip-danger); }

/* Skill chips */
.ip-chip {
    display: inline-block; font-size: .75rem; padding: 2px 8px; margin: 0 4px 4px 0;
    background: var(--ip-primary-50); border: 1px solid var(--ip-border);
    border-radius: var(--ip-radius-pill); color: var(--ip-text);
}

/* Stage ageing dot */
.ip-age { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--ip-success); }
.ip-age-amber { background: var(--ip-warning); }
.ip-age-red   { background: var(--ip-danger); }

/* Kanban board */
.ip-kanban {
    display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px;
    align-items: flex-start; scroll-snap-type: x proximity;
}
.ip-kanban-col {
    flex: 0 0 272px; max-width: 272px; scroll-snap-align: start;
    background: #eaeff4; border-radius: var(--ip-radius-lg);
    display: flex; flex-direction: column; max-height: calc(100vh - 230px);
}
.ip-kanban-head {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    font-weight: 600; font-size: .875rem;
}
.ip-kanban-head .count {
    margin-left: auto; font-size: .75rem; background: #fff; border-radius: var(--ip-radius-pill);
    padding: 1px 8px; color: var(--ip-text-muted);
}
.ip-kanban-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ip-primary); flex: none; }
.ip-kanban-body { padding: 0 8px 8px; overflow-y: auto; min-height: 56px; flex: 1; }
.ip-kanban-col.drop-target { outline: 2px dashed var(--ip-primary); outline-offset: -2px; }
.ip-kanban-col.locked .ip-kanban-head { opacity: .75; }

.ip-kcard {
    background: #fff; border: 1px solid var(--ip-border); border-radius: var(--ip-radius);
    padding: 10px 12px; margin-bottom: 8px; box-shadow: var(--ip-shadow-sm); cursor: grab;
}
.ip-kcard:hover { box-shadow: var(--ip-shadow); }
.ip-kcard.dragging { opacity: .45; }
.ip-kcard.locked { cursor: default; }
.ip-kcard .name { font-weight: 600; font-size: .875rem; }
.ip-kcard .meta { font-size: .75rem; color: var(--ip-text-muted); }
.ip-kcard select { font-size: .75rem; }

@media (max-width: 767.98px) {
    .ip-kanban-col { flex-basis: 85vw; max-width: 85vw; max-height: none; }
}

/* Vertical timeline */
.ip-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--ip-border); }
.ip-timeline > li { position: relative; padding: 0 0 16px 16px; }
.ip-timeline > li::before {
    content: ""; position: absolute; left: -25px; top: 4px; width: 12px; height: 12px;
    border-radius: 50%; background: #fff; border: 3px solid var(--ip-primary);
}
.ip-timeline > li.done::before { background: var(--ip-primary); }
.ip-timeline > li.bad::before  { border-color: var(--ip-danger); }
.ip-timeline > li.good::before { border-color: var(--ip-success); background: var(--ip-success); }
.ip-timeline .when { font-size: .75rem; color: var(--ip-text-muted); }

/* Applicant journey (portal) */
.ip-steps { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.ip-steps li {
    flex: 1 1 90px; text-align: center; font-size: .75rem; padding: 8px 4px;
    background: #eef2f6; color: var(--ip-text-muted); border-radius: var(--ip-radius);
}
.ip-steps li.done    { background: var(--ip-primary-100); color: var(--ip-primary-700); }
.ip-steps li.current { background: var(--ip-primary); color: #fff; font-weight: 600; }
.ip-steps li.stop    { background: #fee2e2; color: #991b1b; font-weight: 600; }

/* Pure-CSS horizontal bars (reports) */
.ip-hbar { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 56px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .875rem; }
.ip-hbar .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-hbar .value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ip-text-muted); }

/* Key/value rows */
.ip-kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: .875rem; margin: 0; }
.ip-kv dt { color: var(--ip-text-muted); font-weight: 400; }
.ip-kv dd { margin: 0; word-break: break-word; }
@media (max-width: 575.98px) { .ip-kv { grid-template-columns: 1fr; } .ip-kv dt { margin-top: 6px; } }

/* Matrix tables (permissions) */
.ip-matrix th, .ip-matrix td { text-align: center; white-space: nowrap; }
.ip-matrix th:first-child, .ip-matrix td:first-child { text-align: left; position: sticky; left: 0; background: #fff; }

/* Notes */
.ip-note { border-left: 3px solid var(--ip-primary-100); padding: 4px 0 4px 12px; margin-bottom: 14px; }
.ip-note .by { font-size: .75rem; color: var(--ip-text-muted); }

/* Global search in the top bar */
.ip-search {
    position: relative; align-items: center; margin-left: 24px; flex: 0 1 340px;
}
.ip-search .bi-search { position: absolute; left: 11px; color: rgba(255,255,255,.65); pointer-events: none; font-size: .85rem; }
.ip-search input {
    width: 100%; height: 34px; padding: 0 12px 0 32px; border-radius: var(--ip-radius-pill);
    border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.12); color: #fff; font-size: .875rem;
}
.ip-search input::placeholder { color: rgba(255,255,255,.65); }
.ip-search input:focus { outline: none; background: #fff; color: var(--ip-text); border-color: #fff; }
.ip-search input:focus::placeholder { color: var(--ip-text-muted); }
.ip-search:focus-within .bi-search { color: var(--ip-text-muted); }
