/* XpatForce additions to Filament's panels. Uses Filament's colour variables, so dark mode follows automatically. */
:root {
    --xf-radius: 16px;
    --xf-line: var(--gray-200);
    --xf-surface: #fff;
    --xf-surface-2: var(--gray-50);
    --xf-ink: var(--gray-950);
    --xf-muted: var(--gray-500);
    --xf-brand: var(--primary-600);
    --xf-brand-soft: var(--primary-50);
    --xf-shadow: 0 1px 2px rgb(15 23 42 / .05), 0 10px 30px -18px rgb(15 23 42 / .25);
}
.dark {
    --xf-line: rgb(255 255 255 / .08);
    --xf-surface: var(--gray-900);
    --xf-surface-2: rgb(255 255 255 / .04);
    --xf-ink: #fff;
    --xf-muted: var(--gray-400);
    --xf-brand: var(--primary-400);
    --xf-brand-soft: color-mix(in srgb, var(--primary-400) 14%, transparent);
}

/* Logo */
.xf-logo { display: inline-flex; align-items: center; gap: 10px; }
.xf-logo-mark { width: 34px; height: 34px; flex: none; }
.xf-logo-text { font-weight: 800; font-size: 20px; letter-spacing: -.03em; color: var(--gray-900); }
.xf-logo-text span { color: var(--primary-600); }
.dark .xf-logo-text { color: #fff; }
.dark .xf-logo-text span { color: var(--primary-400); }
.xf-logo-suffix { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--xf-muted); border-inline-start: 1px solid var(--xf-line); padding-inline-start: 10px; }

/* Sign-in and sign-up pages */
.fi-simple-layout {
    background:
        radial-gradient(800px 400px at 100% 0%, color-mix(in srgb, var(--primary-500) 16%, transparent), transparent 70%),
        radial-gradient(600px 320px at 0% 100%, rgb(245 158 11 / .10), transparent 70%),
        var(--gray-50);
}
.dark .fi-simple-layout {
    background:
        radial-gradient(800px 400px at 100% 0%, color-mix(in srgb, var(--primary-500) 12%, transparent), transparent 70%),
        var(--gray-950);
}
.xf-auth-switch { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--xf-line); font-size: 14px; color: var(--xf-muted); }
.xf-auth-switch a { color: var(--xf-brand); font-weight: 700; text-decoration: none; }
.xf-auth-switch a:hover { text-decoration: underline; }
.xf-auth-home { margin: 14px 0 0; text-align: center; font-size: 14px; }
.xf-auth-home a { color: var(--xf-muted); text-decoration: none; }
.xf-auth-home a:hover { color: var(--xf-brand); text-decoration: underline; }
.xf-auth-notice a { color: var(--xf-brand); font-weight: 700; white-space: nowrap; }
.xf-auth-notice { margin-bottom: 12px; padding: 12px 14px; border-radius: 12px; background: rgb(245 158 11 / .12); border: 1px solid rgb(245 158 11 / .35); color: var(--xf-ink); font-size: 14px; font-weight: 600; }

/* Layout helpers */
.xf-grid { display: grid; gap: 16px; }
.xf-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.xf-span-2 { grid-column: span 2; }
.xf-grid-jobs { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 1023px) { .xf-grid-3 { grid-template-columns: 1fr; } .xf-span-2 { grid-column: auto; } }

.xf-card { background: var(--xf-surface); border: 1px solid var(--xf-line); border-radius: var(--xf-radius); padding: 20px; box-shadow: var(--xf-shadow); }
.xf-card-head, .xf-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.xf-card-head h3, .xf-section-head h3 { font-size: 16px; font-weight: 700; color: var(--xf-ink); display: flex; align-items: center; gap: 8px; }
.xf-section-head h3 { font-size: 18px; }
.xf-count { font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--xf-brand-soft); color: var(--xf-brand); }
.xf-link { color: var(--xf-brand); font-weight: 700; font-size: 14px; text-decoration: none; }
.xf-link:hover { text-decoration: underline; }
.xf-muted { color: var(--xf-muted); font-size: 14px; }
.xf-small { font-size: 12.5px; }
.xf-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--xf-brand); margin-bottom: 6px; }
.xf-empty { text-align: center; padding: 24px 12px; color: var(--xf-muted); font-size: 14.5px; }
.xf-empty strong { color: var(--xf-ink); }
.xf-alert { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: rgb(244 63 94 / .08); color: var(--danger-600); font-size: 14px; font-weight: 600; }
.xf-alert a { color: inherit; }
.xf-pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: var(--xf-surface-2); border: 1px solid var(--xf-line); font-size: 13px; color: var(--xf-ink); }
.xf-chip { display: inline-flex; align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--xf-brand-soft); color: var(--xf-brand); }

/* First-visit hero */
.xf-hero-card { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 28px; border-radius: 20px; border: 1px solid var(--xf-line);
    background: radial-gradient(600px 300px at 100% 0%, color-mix(in srgb, var(--primary-500) 18%, transparent), transparent 70%), var(--xf-surface); box-shadow: var(--xf-shadow); }
.xf-hero-card h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; color: var(--xf-ink); margin-bottom: 8px; }
.xf-hero-card p { color: var(--xf-muted); max-width: 560px; }
@media (max-width: 767px) { .xf-hero-card { flex-direction: column; padding: 20px; } }

.xf-ticks { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 8px; }
.xf-ticks li { padding-inline-start: 28px; position: relative; color: var(--xf-ink); font-size: 15px; }
.xf-ticks li::before { content: "✓"; position: absolute; inset-inline-start: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--xf-brand-soft); color: var(--xf-brand); }

/* Profile strength ring + checklist */
.xf-strength { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.xf-strength strong { color: var(--xf-ink); font-size: 15px; }
.xf-ring { --size: 76px; width: var(--size); height: var(--size); flex: none; border-radius: 50%; display: grid; place-items: center;
    background: conic-gradient(var(--xf-brand) calc(var(--value) * 1%), var(--xf-line) 0); }
.xf-ring span { width: calc(var(--size) - 14px); height: calc(var(--size) - 14px); border-radius: 50%; background: var(--xf-surface); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--xf-ink); }
.xf-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.xf-checklist li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 14px; color: var(--xf-ink); }
.xf-checklist li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; border: 2px solid var(--gray-300); }
.xf-checklist li.done { color: var(--xf-muted); }
.xf-checklist li.done::before { border-color: var(--xf-brand); background: var(--xf-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='white' d='M8 13.2 4.8 10l-1.1 1.1L8 15.4l8.3-8.3-1.1-1.1z'/%3E%3C/svg%3E") center / 14px no-repeat; }
.xf-checklist a { color: var(--xf-brand); font-weight: 700; text-decoration: none; }
.xf-checklist li:not(.done):hover { background: var(--xf-surface-2); }

/* Application stepper */
.xf-app { padding: 14px 0; border-top: 1px solid var(--xf-line); }
.xf-app:first-of-type { border-top: 0; padding-top: 0; }
.xf-app-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.xf-app-head > div { display: grid; }
.xf-app-head strong { color: var(--xf-ink); font-size: 15px; }
.xf-stepper { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.xf-stepper li { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; }
.xf-stepper li + li::before { content: ""; position: absolute; top: 13px; inset-inline-end: 50%; width: 100%; height: 2px; background: var(--xf-line); z-index: 0; }
.xf-stepper li.done + li::before, .xf-stepper li.done + li.current::before { background: var(--xf-brand); }
.xf-stepper-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--xf-surface); border: 2px solid var(--xf-line); color: var(--xf-muted); }
.xf-stepper li.done .xf-stepper-dot { background: var(--xf-brand); border-color: var(--xf-brand); color: #fff; }
.xf-stepper li.current .xf-stepper-dot { border-color: var(--warning-500); color: var(--xf-ink); background: rgb(245 158 11 / .14); box-shadow: 0 0 0 4px rgb(245 158 11 / .18); }
.xf-stepper-label { font-size: 12px; font-weight: 600; color: var(--xf-muted); }
.xf-stepper li.done .xf-stepper-label { color: var(--xf-brand); }
.xf-stepper li.current .xf-stepper-label { color: var(--xf-ink); font-weight: 800; }
.xf-stepper.is-rejected { opacity: .5; }
.xf-stepper-note { margin-top: 8px; font-size: 13px; color: var(--danger-600); font-weight: 600; }
.xf-stepper-compact .xf-stepper-dot { width: 22px; height: 22px; font-size: 10px; }
.xf-stepper-compact li + li::before { top: 10px; }
.xf-stepper-compact .xf-stepper-label { font-size: 11px; }
.xf-stepper-compact { min-width: 340px; }
.xf-stepper-cell { padding-block: 6px; }
@media (max-width: 1023px) { .xf-stepper-cell { margin-top: 10px; } .xf-stepper-compact { min-width: 0; } }
@media (max-width: 480px) { .xf-stepper-label { font-size: 10.5px; } }

/* Who viewed */
.xf-viewers { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.xf-viewers-count { display: flex; align-items: center; gap: 12px; color: var(--xf-ink); font-weight: 600; font-size: 14.5px; max-width: 280px; }
.xf-big { font-size: 34px; font-weight: 800; color: var(--xf-brand); letter-spacing: -.03em; line-height: 1; }
.xf-viewers-list { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }

/* Job tiles */
.xf-job { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--xf-radius); border: 1px solid var(--xf-line); background: var(--xf-surface); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.xf-job:hover { border-color: var(--primary-300); box-shadow: var(--xf-shadow); transform: translateY(-2px); }
.xf-job-title { color: var(--xf-ink); font-size: 15.5px; margin-top: 6px; line-height: 1.3; }
.xf-job-salary { margin-top: 8px; font-weight: 800; color: var(--xf-brand); font-size: 16px; }
.xf-job-salary small { font-weight: 500; color: var(--xf-muted); font-size: 12.5px; }
.xf-job-oep { margin-top: 6px; padding-top: 8px; border-top: 1px dashed var(--xf-line); font-size: 12.5px; color: var(--xf-muted); }

/* CV bank / job table cards */
.xf-cand { display: flex; align-items: center; gap: 12px; }
.xf-cand-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.xf-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--xf-surface-2); border: 1px solid var(--xf-line); color: var(--xf-ink); }
.xf-tag.ok { background: var(--xf-brand-soft); border-color: transparent; color: var(--xf-brand); }
.xf-tag.warn { background: rgb(245 158 11 / .12); border-color: transparent; color: var(--warning-700); }
.dark .xf-tag.warn { color: var(--warning-400); }

/* Approval queue */
.xf-queue-empty { display: flex; align-items: center; gap: 12px; color: var(--xf-muted); }

/* Pipeline bar (OEP dashboard) */
.xf-funnel { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.xf-funnel a { display: grid; gap: 2px; padding: 14px; border-radius: 12px; border: 1px solid var(--xf-line); background: var(--xf-surface); text-decoration: none; transition: border-color .15s; }
.xf-funnel a:hover { border-color: var(--primary-300); }
.xf-funnel span { font-size: 12.5px; font-weight: 600; color: var(--xf-muted); }
.xf-funnel strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--xf-ink); }
.xf-funnel .is-hot strong { color: var(--warning-600); }
@media (max-width: 1023px) { .xf-funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.xf-quick { display: flex; flex-wrap: wrap; gap: 8px; }

/* My CV */
.xf-banner { display: flex; gap: 14px; align-items: center; border-color: var(--primary-300); background: var(--xf-brand-soft); }
.xf-banner > div { display: grid; }
.xf-banner strong { color: var(--xf-ink); }
.xf-banner-icon { width: 28px; height: 28px; color: var(--xf-brand); flex: none; }
.xf-progress { display: grid; gap: 8px; }
.xf-progress-label { display: flex; justify-content: space-between; font-size: 14px; color: var(--xf-muted); font-weight: 600; }
.xf-progress-label strong { color: var(--xf-ink); }
.xf-progress-track { height: 8px; border-radius: 999px; background: var(--xf-line); overflow: hidden; }
.xf-progress-bar { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-500), var(--primary-400)); transition: width .4s ease; }
.xf-form { display: grid; gap: 24px; }
.xf-savebar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    padding: 14px 16px; margin-inline: -4px; border-radius: 16px; border: 1px solid var(--xf-line); background: color-mix(in srgb, var(--xf-surface) 92%, transparent); backdrop-filter: blur(10px); box-shadow: 0 -10px 30px -20px rgb(15 23 42 / .35); }
@media (max-width: 640px) { .xf-savebar { margin-inline: -16px; border-radius: 0; border-inline: 0; padding: 10px 16px; } .xf-savebar > .xf-muted { display: none; } .xf-savebar .fi-btn { width: 100%; } }


/* Phones: long rows in the job seeker portal swipe sideways instead of stacking */
@media (max-width: 640px) {
    .xf-grid-jobs { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory; padding: 2px 2px 10px; scrollbar-width: thin; }
    .xf-grid-jobs > * { scroll-snap-align: start; }
    .xf-viewers-list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
    .xf-viewers-list::-webkit-scrollbar { display: none; }
    .xf-viewers-list > * { flex: none; }
}

/* Admin -> Appearance: theme cards (each card sets its own --t-* colours) */
.xf-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; border: 0; padding: 0; margin: 0; }
.xf-theme-legend { grid-column: 1 / -1; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.xf-theme { position: relative; display: grid; gap: 10px; padding: 12px; border-radius: 16px; border: 2px solid var(--xf-line); background: var(--xf-surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.xf-theme:hover { border-color: var(--t-line); }
.xf-theme:has(input:checked) { border-color: var(--t-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--t-brand) 18%, transparent); }
.xf-theme:has(input:focus-visible) { outline: 2px solid var(--t-brand); outline-offset: 3px; }
.xf-theme input { position: absolute; opacity: 0; pointer-events: none; }
.xf-theme-preview { display: grid; border-radius: 10px; overflow: hidden; border: 1px solid var(--xf-line); background: #fff; }
.xf-theme-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
.xf-theme-mark svg { width: 22px; height: 22px; display: block; }
.xf-theme-lines { display: grid; gap: 4px; flex: 1; }
.xf-theme-lines i { display: block; height: 5px; border-radius: 3px; background: #e2e8f0; width: 70%; }
.xf-theme-lines i:first-child { background: var(--t-strong); width: 45%; }
.xf-theme-body { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 14px 10px; background: var(--t-soft); }
.xf-theme-chip { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #fff; color: var(--t-brand); border: 1px solid var(--t-line); }
.xf-theme-btn { font-size: 11px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--t-brand); color: #fff; }
.xf-theme-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 700; font-size: 14px; }
