/*
 | Job Hunter theme "Atlas" (both panels). Plain CSS on top of Filament's styles, no build step.
 | Structure: navigation across the top; a deep colored band behind the navigation and the page title;
 | the page's cards start on that band and continue on a light canvas.
 | Tokens first. Dark mode and the admin panel only re-define tokens.
 */
:root {
    --jh-band-1: #0b3d3a;        /* band: top */
    --jh-band-2: #11665f;        /* band: bottom */
    --jh-band-text: #ffffff;
    --jh-band-muted: rgb(255 255 255 / .72);
    --jh-accent: #f5b942;        /* small highlights on the band */
    --jh-bg: #f3f5f4;
    --jh-surface: #ffffff;
    --jh-surface-2: #f7f9f8;
    --jh-line: #e3e8e6;
    --jh-text: #14211f;
    --jh-muted: #63716e;
    --jh-radius: 14px;
    --jh-shadow: 0 1px 2px rgb(20 33 31 / .05), 0 10px 30px -18px rgb(20 33 31 / .25);
    --jh-band-height: 236px;
}

.fi-panel-admin { --jh-band-1: #3b1d4a; --jh-band-2: #6a2f7d; }

.dark {
    --jh-band-1: #071f1e;
    --jh-band-2: #0c3f3b;
    --jh-bg: #0c1211;
    --jh-surface: #141c1b;
    --jh-surface-2: #192321;
    --jh-line: #25322f;
    --jh-text: #e9f1ef;
    --jh-muted: #93a3a0;
    --jh-shadow: 0 1px 2px rgb(0 0 0 / .35), 0 14px 34px -18px rgb(0 0 0 / .7);
}

.dark.fi-panel-admin, .dark .fi-panel-admin { --jh-band-1: #1d0f26; --jh-band-2: #3d1c4a; }

/* ---------- Canvas and band ---------- */
.fi-body {
    background: var(--jh-bg) !important;
    color: var(--jh-text);
    position: relative;
    isolation: isolate; /* the band sits behind everything, without trapping modals under the top bar */
    -webkit-font-smoothing: antialiased;
}

.fi-body::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: var(--jh-band-height);
    background:
        radial-gradient(40% 120% at 85% 0%, rgb(255 255 255 / .10), transparent 60%),
        linear-gradient(180deg, var(--jh-band-1), var(--jh-band-2));
    pointer-events: none;
}


/* ---------- Navigation across the top (on the band) ---------- */
.fi-topbar {
    background: var(--jh-band-1) !important;
    box-shadow: none !important;
    border: 0 !important;
}

.fi-topbar-ctn { background: transparent !important; box-shadow: none !important; }
.fi-topbar .fi-logo, .fi-topbar .fi-logo * { color: var(--jh-band-text) !important; }
.fi-topbar-nav-groups { gap: 4px !important; margin-inline-start: 20px; }

.fi-topbar-item-btn {
    border-radius: 999px !important;
    padding: 8px 14px !important;
    background: transparent !important;
    transition: background .15s;
}

.fi-topbar-item-label, .fi-topbar-item-icon, .fi-topbar-group-toggle-icon { color: var(--jh-band-muted) !important; font-weight: 500; }
.fi-topbar-item-btn:hover { background: rgb(255 255 255 / .10) !important; }
.fi-topbar-item.fi-active > .fi-topbar-item-btn { background: rgb(255 255 255 / .16) !important; }
.fi-topbar-item.fi-active .fi-topbar-item-label, .fi-topbar-item.fi-active .fi-topbar-item-icon { color: var(--jh-band-text) !important; font-weight: 600; }
.fi-topbar-item .fi-badge { background: var(--jh-accent) !important; color: #2b1d00 !important; box-shadow: none !important; }

.fi-topbar .fi-icon-btn, .fi-topbar .fi-icon-btn .fi-icon { color: var(--jh-band-text) !important; }
.fi-topbar .fi-icon-btn:hover { background: rgb(255 255 255 / .10) !important; }
.fi-topbar .fi-icon-btn .fi-badge { background: var(--jh-accent) !important; color: #2b1d00 !important; }

.fi-global-search-field .fi-input-wrp {
    border-radius: 999px !important;
    background: rgb(255 255 255 / .12) !important;
    box-shadow: none !important;
    border: 1px solid rgb(255 255 255 / .16);
}

.fi-global-search-field input, .fi-global-search-field .fi-icon { color: var(--jh-band-text) !important; }
.fi-global-search-field input::placeholder { color: var(--jh-band-muted) !important; }
.fi-user-avatar { box-shadow: 0 0 0 2px rgb(255 255 255 / .55); }

/* Small screens: the navigation slides in from the side */
.fi-main-sidebar, .fi-sidebar { background: var(--jh-surface) !important; }
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn { background: color-mix(in oklab, var(--primary-500) 12%, transparent) !important; }

/* ---------- Page title (on the band) ---------- */
.fi-header { padding-block: 8px 6px; }

.fi-header-heading {
    color: var(--jh-band-text) !important;
    font-size: 1.9rem !important;
    font-weight: 700 !important;
    letter-spacing: -.02em;
}

.fi-header-subheading { color: var(--jh-band-muted) !important; max-width: 60ch; }
.fi-breadcrumbs-item-label, .fi-breadcrumbs-item-separator { color: var(--jh-band-muted) !important; font-size: .8rem; }

/* Buttons that sit on the band */
.fi-header .fi-btn { border-radius: 999px !important; font-weight: 600 !important; box-shadow: none !important; }
.fi-header .fi-btn.fi-color-primary:not(.fi-outlined), .fi-header .fi-btn.fi-color:not(.fi-outlined):not(.fi-color-gray) { background: #fff !important; color: var(--jh-band-1) !important; }
.fi-header .fi-btn.fi-color-primary:not(.fi-outlined) .fi-icon, .fi-header .fi-btn.fi-color:not(.fi-outlined):not(.fi-color-gray) .fi-icon { color: var(--jh-band-1) !important; }
.fi-header .fi-btn.fi-outlined, .fi-header .fi-btn.fi-color-gray {
    background: rgb(255 255 255 / .10) !important;
    color: var(--jh-band-text) !important;
    border: 1px solid rgb(255 255 255 / .28) !important;
}
.fi-header .fi-btn.fi-outlined .fi-icon, .fi-header .fi-btn.fi-color-gray .fi-icon, .fi-header .fi-btn.fi-outlined .fi-btn-label, .fi-header .fi-btn.fi-color-gray .fi-btn-label { color: var(--jh-band-text) !important; }

/* ---------- Cards ---------- */
.fi-section, .fi-ta-ctn, .fi-wi-stats-overview-stat, .fi-simple-main, .fi-sc-wizard, .fi-dropdown-panel, .fi-modal-window, .jh-card {
    background: var(--jh-surface) !important;
    border: 1px solid var(--jh-line);
    border-radius: var(--jh-radius) !important;
    box-shadow: var(--jh-shadow) !important;
}

.fi-section-header { border-color: var(--jh-line) !important; }
.fi-section-header-heading { font-weight: 650 !important; color: var(--jh-text) !important; }
.fi-modal-window.fi-modal-slide-over-window, .fi-modal-slide-over .fi-modal-window { border-radius: 0 !important; }

/* ---------- Lists as card grids (jobs) ---------- */
.fi-ta-ctn-with-content-layout { background: transparent !important; border: 0 !important; box-shadow: none !important; overflow: visible; }
.fi-ta-ctn-with-content-layout .fi-ta-header-toolbar,
.fi-ta-ctn-with-content-layout .fi-ta-content-header,
.fi-ta-ctn-with-content-layout .fi-ta-filters-above-content-ctn,
.fi-ta-ctn-with-content-layout .fi-pagination {
    background: var(--jh-surface) !important;
    border: 1px solid var(--jh-line) !important;
    border-radius: var(--jh-radius);
    box-shadow: var(--jh-shadow);
    margin-bottom: 14px;
}

.fi-ta-ctn-with-content-layout .fi-ta-content-ctn, .fi-ta-ctn-with-content-layout .fi-ta-content { background: transparent !important; border: 0 !important; }
.fi-ta-content-grid { gap: 14px !important; padding: 0 0 14px !important; }

.fi-ta-ctn-with-content-layout .fi-ta-record {
    background: var(--jh-surface) !important;
    border: 1px solid var(--jh-line) !important;
    border-radius: var(--jh-radius) !important;
    box-shadow: var(--jh-shadow) !important;
    transition: transform .15s, border-color .15s;
}

.fi-ta-ctn-with-content-layout .fi-ta-record:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--primary-500) 45%, var(--jh-line)) !important; }
.fi-ta-record-content { padding-block: 14px !important; }
.fi-ta-ctn-with-content-layout .fi-ta-actions { border-top: 1px dashed var(--jh-line); padding-top: 10px; margin-top: 4px; }

/* ---------- Plain tables (searches, admin) ---------- */
.fi-ta-ctn:not(.fi-ta-ctn-with-content-layout) { overflow: hidden; }
.fi-ta-header-cell { background: var(--jh-surface-2) !important; color: var(--jh-muted) !important; font-size: .74rem !important; letter-spacing: .03em; text-transform: uppercase; }
.fi-ta-row { background: var(--jh-surface) !important; border-color: var(--jh-line) !important; }
.fi-ta-row:hover { background: color-mix(in oklab, var(--primary-500) 5%, var(--jh-surface)) !important; }
.fi-ta-text-description { color: var(--jh-muted) !important; }

/* ---------- Tabs: underline bar inside a card ---------- */
.fi-tabs {
    background: var(--jh-surface) !important;
    border: 1px solid var(--jh-line);
    border-radius: var(--jh-radius) !important;
    padding: 4px 8px !important;
    box-shadow: var(--jh-shadow) !important;
    justify-content: flex-start !important;
    margin-inline: 0 !important;
    width: 100%;
}

.fi-tabs-item { border-radius: 10px !important; padding: 10px 14px !important; position: relative; background: transparent !important; }
.fi-tabs-item.fi-active::after { content: ''; position: absolute; inset: auto 12px 2px 12px; height: 3px; border-radius: 3px; background: var(--primary-500); }
.fi-tabs-item.fi-active .fi-tabs-item-label, .fi-tabs-item.fi-active .fi-icon { color: var(--primary-600) !important; font-weight: 650; }
.dark .fi-tabs-item.fi-active .fi-tabs-item-label, .dark .fi-tabs-item.fi-active .fi-icon { color: var(--primary-300) !important; }

/* ---------- Controls ---------- */
.fi-btn { border-radius: 10px !important; font-weight: 600 !important; }
.fi-input-wrp { border-radius: 10px !important; }
.fi-badge { border-radius: 999px !important; font-weight: 600; }
.fi-fo-field-label-content { font-weight: 600 !important; color: var(--jh-text) !important; }

/* ---------- Sign-in / sign-up: card over a tall band ---------- */
.fi-body:has(.fi-simple-layout)::before { height: 46vh; }
.fi-simple-main { padding: 36px 32px !important; }
.fi-simple-header-heading { font-size: 1.5rem !important; font-weight: 700 !important; letter-spacing: -.02em; }

/* ---------- Home side rail (resources/views/filament/app/widgets/overview.blade.php) ---------- */
.jh-rail { display: flex; flex-direction: column; gap: 14px; }
.jh-card { padding: 16px 18px; }
.jh-card h3 { font-weight: 650; font-size: .95rem; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.jh-card h3 a { font-size: .8rem; font-weight: 600; color: var(--primary-600); }
.dark .jh-card h3 a { color: var(--primary-300); }
.jh-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.jh-number { background: var(--jh-surface-2); border-radius: 12px; padding: 12px 14px; display: block; }
.jh-number b { display: block; font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.jh-number span { font-size: .78rem; color: var(--jh-muted); }
.jh-number.is-main { background: linear-gradient(135deg, var(--jh-band-1), var(--jh-band-2)); color: #fff; }
.jh-number.is-main span { color: rgb(255 255 255 / .8); }
.jh-list { display: flex; flex-direction: column; }
.jh-list > * { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: .875rem; border-top: 1px solid var(--jh-line); }
.jh-list > *:first-child { border-top: 0; }
.jh-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jh-list small { color: var(--jh-muted); }
.jh-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--jh-line); flex-shrink: 0; }
.jh-dot.on { background: #22a06b; box-shadow: 0 0 0 3px rgb(34 160 107 / .18); }

/* Main buttons use the band color, so each panel has one strong color. */
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link), .fi-simple-main .fi-btn.fi-color:not(.fi-outlined):not(.fi-color-gray) { background: var(--jh-band-2) !important; color: #fff !important; }
.fi-btn.fi-color-primary:not(.fi-outlined):not(.fi-link):hover { background: var(--jh-band-1) !important; }

/* Card grids: search/filter bar and the sort bar read as one toolbar. */
.fi-ta-ctn-with-content-layout .fi-ta-header-toolbar { margin-bottom: 0; border-bottom: 0 !important; border-radius: var(--jh-radius) var(--jh-radius) 0 0; box-shadow: none; }
.fi-ta-ctn-with-content-layout .fi-ta-content-header { border-radius: 0 0 var(--jh-radius) var(--jh-radius); border-top: 1px dashed var(--jh-line) !important; }

/* The band paints behind the page (the body is its own stacking context). */
.fi-body::before { z-index: -1; }

/* A card grid's own title bar (home: "Latest new jobs") is a card too. */
.fi-ta-ctn-with-content-layout .fi-ta-header {
    background: var(--jh-surface) !important;
    border: 1px solid var(--jh-line);
    border-radius: var(--jh-radius);
    box-shadow: var(--jh-shadow);
    margin-bottom: 14px;
}
.fi-ta-ctn-with-content-layout .fi-ta-content > .fi-ta-record + .fi-ta-record { margin-top: 12px; }

/* A tall page header (long title + a row of actions) carries the band down with it, so buttons never land on the canvas. */
.fi-body { overflow-x: clip; }
.fi-header { position: relative; }
.fi-header::after {
    content: '';
    position: absolute;
    z-index: -2; /* under the gradient band: only shows where the header is taller than it */
    inset: 0 calc(50% - 50vw) -18px;
    background: var(--jh-band-2);
    pointer-events: none;
}
