/* ==========================================================================
   CareerFluxio — design system
   A single, dependency-light stylesheet. Bootstrap 5 is loaded only for its
   utility/grid classes; every component below is hand-built so the product
   has its own visual identity rather than looking like stock Bootstrap.
   ========================================================================== */

:root {
    /* Brand ---------------------------------------------------------------- */
    --brand-50: #eef2ff;
    --brand-100: #e0e7ff;
    --brand-200: #c7d2fe;
    --brand-300: #a5b4fc;
    --brand-400: #818cf8;
    --brand-500: #6366f1;
    --brand-600: #4f46e5;
    --brand-700: #4338ca;
    --brand-800: #3730a3;

    /* Neutrals ------------------------------------------------------------- */
    --ink-900: #0f172a;
    --ink-800: #1e293b;
    --ink-700: #334155;
    --ink-600: #475569;
    --ink-500: #64748b;
    --ink-400: #94a3b8;
    --ink-300: #cbd5e1;
    --ink-200: #e2e8f0;
    --ink-100: #f1f5f9;
    --ink-50: #f8fafc;
    --white: #ffffff;

    /* Semantic ------------------------------------------------------------- */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-700: #047857;
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-700: #b45309;
    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-700: #b91c1c;
    --info-50: #eff6ff;
    --info-500: #3b82f6;
    --info-700: #1d4ed8;
    --amber-50: #fff7ed;
    --amber-500: #f97316;
    --amber-700: #c2410c;
    --indigo-50: #eef2ff;
    --indigo-500: #6366f1;
    --indigo-700: #4338ca;

    /* Shape & motion ------------------------------------------------------- */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    --radius-pill: 999px;

    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 14px rgba(15, 23, 42, .07), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow-lg: 0 18px 44px rgba(15, 23, 42, .12);
    --shadow-brand: 0 8px 20px rgba(79, 70, 229, .24);

    --sidebar-w: 264px;
    --sidebar-w-collapsed: 76px;
    --topbar-h: 66px;

    --ease: cubic-bezier(.4, 0, .2, 1);
    --speed: .18s;

    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    color: var(--ink-700);
    background: var(--ink-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    color: var(--ink-900);
    font-weight: 650;
    letter-spacing: -.012em;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.0625rem; }
h4 { font-size: .9375rem; }

a { color: var(--brand-600); text-decoration: none; transition: color var(--speed) var(--ease); }
a:hover { color: var(--brand-800); }

p { margin: 0 0 .75rem; }
p:last-child { margin-bottom: 0; }

hr { border: 0; border-top: 1px solid var(--ink-200); margin: 1.25rem 0; }

code, kbd, pre {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
    font-size: .85em;
}

::selection { background: var(--brand-100); color: var(--brand-800); }

/* Scrollbars ------------------------------------------------------------- */
* { scrollbar-width: thin; scrollbar-color: var(--ink-300) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: var(--radius-pill); border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-400); background-clip: content-box; }

.text-muted-soft { color: var(--ink-400) !important; }
.text-ink { color: var(--ink-900) !important; }
.fw-medium { font-weight: 550; }
.fs-13 { font-size: 13px; }
.fs-12 { font-size: 12px; }
.fs-11 { font-size: 11px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   Application shell
   ========================================================================== */

.app { min-height: 100vh; }

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    background: var(--white);
    border-right: 1px solid var(--ink-200);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: width var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.app-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    height: var(--topbar-h);
    padding: 0 1.15rem;
    border-bottom: 1px solid var(--ink-200);
    flex: 0 0 auto;
}

.app-brand__mark {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    box-shadow: var(--shadow-brand);
    overflow: hidden;
}

.app-brand__mark img,
.app-brand__mark svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.app-brand__text { min-width: 0; }
.app-brand__name { font-weight: 680; color: var(--ink-900); font-size: 14.5px; letter-spacing: -.01em; }
.app-brand__sub { font-size: 11px; color: var(--ink-400); text-transform: uppercase; letter-spacing: .07em; }

.app-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .9rem .7rem 1.4rem;
}

.app-nav__heading {
    font-size: 10.5px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--ink-400);
    padding: .9rem .65rem .3rem;
}

.app-nav__link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .56rem .65rem;
    border-radius: 10px;
    color: var(--ink-600);
    font-weight: 520;
    font-size: 13.5px;
    position: relative;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.app-nav__link:hover { background: var(--ink-100); color: var(--ink-900); }

.app-nav__link.is-active {
    background: var(--brand-50);
    color: var(--brand-700);
    font-weight: 600;
}

.app-nav__link.is-active::before {
    content: "";
    position: absolute;
    left: -0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    border-radius: 0 3px 3px 0;
    background: var(--brand-600);
}

.app-nav__icon {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    font-size: 14px;
    color: var(--ink-400);
    transition: color var(--speed) var(--ease);
}

.app-nav__link:hover .app-nav__icon { color: var(--ink-600); }
.app-nav__link.is-active .app-nav__icon { color: var(--brand-600); }

.app-nav__badge {
    margin-left: auto;
    background: var(--danger-500);
    color: #fff;
    font-size: 10.5px;
    font-weight: 650;
    line-height: 1;
    padding: .25rem .42rem;
    border-radius: var(--radius-pill);
}

.app-sidebar__footer {
    flex: 0 0 auto;
    border-top: 1px solid var(--ink-200);
    padding: .8rem;
}

/* Collapsed rail ---------------------------------------------------------- */
body.sidebar-collapsed .app-sidebar { width: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .app-main { margin-left: var(--sidebar-w-collapsed); }
body.sidebar-collapsed .app-brand__text,
body.sidebar-collapsed .app-nav__heading,
body.sidebar-collapsed .app-nav__link span:not(.app-nav__icon),
body.sidebar-collapsed .app-nav__badge,
body.sidebar-collapsed .app-sidebar__footer .sidebar-user__meta { display: none; }
body.sidebar-collapsed .app-nav__link { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .app-brand { justify-content: center; padding-inline: 0; }

.app-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin var(--speed) var(--ease);
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.35rem;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--ink-200);
}

.app-content { padding: 1.35rem; flex: 1 1 auto; }
.app-footer {
    padding: 1rem 1.35rem 1.6rem;
    color: var(--ink-400);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    z-index: 1035;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--speed) var(--ease);
}

body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   Topbar pieces
   ========================================================================== */

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 10px;
    color: var(--ink-500);
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    position: relative;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.icon-btn:hover { background: var(--ink-100); color: var(--ink-800); }
.icon-btn:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 2px; }

.icon-btn__dot {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--danger-500);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

.topbar-search {
    position: relative;
    flex: 1 1 340px;
    max-width: 460px;
}

.topbar-search input {
    width: 100%;
    height: 40px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-pill);
    background: var(--ink-50);
    padding: 0 2.6rem 0 2.5rem;
    font-size: 13.5px;
    color: var(--ink-800);
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), background var(--speed) var(--ease);
}

.topbar-search input::placeholder { color: var(--ink-400); }
.topbar-search input:focus {
    outline: 0;
    background: #fff;
    border-color: var(--brand-300);
    box-shadow: 0 0 0 3.5px var(--brand-50);
}

.topbar-search__icon {
    position: absolute;
    left: .95rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-400);
    font-size: 13px;
    pointer-events: none;
}

.topbar-search__kbd {
    position: absolute;
    right: .55rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10.5px;
    color: var(--ink-400);
    border: 1px solid var(--ink-200);
    border-radius: 6px;
    padding: .1rem .35rem;
    background: #fff;
    pointer-events: none;
}

/* Avatar ----------------------------------------------------------------- */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    background: var(--brand-100);
    color: var(--brand-700);
    display: inline-grid;
    place-items: center;
    font-weight: 650;
    font-size: 12.5px;
    flex: 0 0 auto;
    overflow: hidden;
    text-transform: uppercase;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 28px; height: 28px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.avatar--xl { width: 84px; height: 84px; font-size: 26px; }
.avatar--stack { box-shadow: 0 0 0 2px #fff; margin-left: -8px; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem;
    border-radius: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: background var(--speed) var(--ease);
}

.sidebar-user:hover { background: var(--ink-100); }
.sidebar-user__meta { min-width: 0; }
.sidebar-user__name { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.sidebar-user__role { font-size: 11.5px; color: var(--ink-400); }

/* ==========================================================================
   Dropdowns (hand-rolled, no JS framework)
   ========================================================================== */

.dropdown-host { position: relative; }

.dropdown-panel {
    position: absolute;
    top: calc(100% + .45rem);
    right: 0;
    min-width: 250px;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: .4rem;
    z-index: 1200;
    opacity: 0;
    transform: translateY(-6px) scale(.985);
    pointer-events: none;
    transition: opacity var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.dropdown-panel--left { right: auto; left: 0; }
.dropdown-panel--up { top: auto; bottom: calc(100% + .45rem); }
.dropdown-panel--wide { min-width: 340px; }

.dropdown-host.is-open > .dropdown-panel {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .6rem;
    border-radius: 8px;
    color: var(--ink-700);
    font-size: 13.5px;
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

.dropdown-item i { width: 16px; text-align: center; color: var(--ink-400); font-size: 13px; }
.dropdown-item:hover { background: var(--ink-100); color: var(--ink-900); }
.dropdown-item:hover i { color: var(--ink-600); }
.dropdown-item--danger { color: var(--danger-700); }
.dropdown-item--danger i { color: var(--danger-500); }
.dropdown-item--danger:hover { background: var(--danger-50); color: var(--danger-700); }

.dropdown-divider { height: 1px; background: var(--ink-200); margin: .35rem .2rem; }
.dropdown-header {
    padding: .5rem .6rem .35rem;
    font-size: 10.5px;
    font-weight: 650;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--ink-400);
}

/* Notification list inside a dropdown ------------------------------------ */
.notif-list { max-height: 380px; overflow-y: auto; margin: 0 -.4rem; padding: 0 .4rem; }

.notif-item {
    display: flex;
    gap: .7rem;
    padding: .6rem;
    border-radius: 10px;
    transition: background var(--speed) var(--ease);
}

.notif-item:hover { background: var(--ink-50); }
.notif-item.is-unread { background: var(--brand-50); }
.notif-item.is-unread:hover { background: var(--brand-100); }

.notif-item__icon {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: var(--white);
    border: 1px solid var(--ink-200);
    color: var(--brand-600);
    font-size: 13px;
}

.notif-item__title { font-size: 13px; font-weight: 600; color: var(--ink-900); }
.notif-item__body { font-size: 12.5px; color: var(--ink-500); }
.notif-item__time { font-size: 11px; color: var(--ink-400); }

/* ==========================================================================
   Page header & breadcrumbs
   ========================================================================== */

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.page-head__title { display: flex; align-items: center; gap: .65rem; }
.page-head h1 { font-size: 1.4rem; }
.page-head__sub { color: var(--ink-500); font-size: 13.5px; margin-top: .2rem; }
.page-head__actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

.crumbs {
    display: flex;
    align-items: center;
    gap: .4rem;
    list-style: none;
    margin: 0 0 .35rem;
    padding: 0;
    font-size: 12.5px;
    color: var(--ink-400);
    flex-wrap: wrap;
}

.crumbs a { color: var(--ink-500); }
.crumbs a:hover { color: var(--brand-600); }
.crumbs li:not(:last-child)::after { content: "/"; margin-left: .4rem; color: var(--ink-300); }
.crumbs li[aria-current] { color: var(--ink-700); font-weight: 550; }

/* ==========================================================================
   Cards & surfaces
   ========================================================================== */

.card-x {
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
}

.card-x__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--ink-200);
    flex-wrap: wrap;
}

.card-x__title { font-size: 14.5px; font-weight: 650; color: var(--ink-900); }
.card-x__sub { font-size: 12.5px; color: var(--ink-400); margin-top: .1rem; }
.card-x__body { padding: 1.15rem; }
.card-x__body--flush { padding: 0; }
.card-x__foot {
    padding: .85rem 1.15rem;
    border-top: 1px solid var(--ink-200);
    background: var(--ink-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Stat card -------------------------------------------------------------- */
.stat {
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-lg);
    padding: 1.05rem 1.1rem;
    box-shadow: var(--shadow-xs);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    position: relative;
    overflow: hidden;
    transition: box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

.stat__top { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.stat__label {
    font-size: 11.5px;
    font-weight: 620;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-400);
}
.stat__value { font-size: 1.65rem; font-weight: 700; color: var(--ink-900); line-height: 1.15; letter-spacing: -.02em; }
.stat__meta { font-size: 12.5px; color: var(--ink-500); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }

.stat__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 16px;
}

.stat__spark { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; }

.delta { display: inline-flex; align-items: center; gap: .22rem; font-weight: 620; font-size: 12px; }
.delta--up { color: var(--success-700); }
.delta--down { color: var(--danger-700); }
.delta--flat { color: var(--ink-400); }

/* Tone helpers used by icons/sparks -------------------------------------- */
.tone-primary { background: var(--brand-50); color: var(--brand-600); }
.tone-success { background: var(--success-50); color: var(--success-700); }
.tone-warning { background: var(--warning-50); color: var(--warning-700); }
.tone-danger  { background: var(--danger-50);  color: var(--danger-700); }
.tone-info    { background: var(--info-50);    color: var(--info-700); }
.tone-indigo  { background: var(--indigo-50);  color: var(--indigo-700); }
.tone-amber   { background: var(--amber-50);   color: var(--amber-700); }
.tone-muted   { background: var(--ink-100);    color: var(--ink-600); }

.bar-primary { background: var(--brand-500); }
.bar-success { background: var(--success-500); }
.bar-warning { background: var(--warning-500); }
.bar-danger  { background: var(--danger-500); }
.bar-info    { background: var(--info-500); }
.bar-indigo  { background: var(--indigo-500); }
.bar-amber   { background: var(--amber-500); }
.bar-muted   { background: var(--ink-300); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn-x {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    height: 38px;
    padding: 0 .9rem;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 13.5px;
    font-weight: 570;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease),
                color var(--speed) var(--ease), box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}

.btn-x:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 2px; }
.btn-x:active { transform: translateY(1px); }
.btn-x[disabled], .btn-x.is-disabled { opacity: .55; pointer-events: none; }
.btn-x i { font-size: 12.5px; }

.btn-x--primary { background: var(--brand-600); color: #fff; box-shadow: var(--shadow-brand); }
.btn-x--primary:hover { background: var(--brand-700); color: #fff; }

.btn-x--secondary { background: #fff; border-color: var(--ink-200); color: var(--ink-700); box-shadow: var(--shadow-xs); }
.btn-x--secondary:hover { background: var(--ink-50); border-color: var(--ink-300); color: var(--ink-900); }

.btn-x--ghost { background: transparent; color: var(--ink-600); }
.btn-x--ghost:hover { background: var(--ink-100); color: var(--ink-900); }

.btn-x--danger { background: var(--danger-500); color: #fff; }
.btn-x--danger:hover { background: var(--danger-700); color: #fff; }

.btn-x--danger-soft { background: var(--danger-50); color: var(--danger-700); border-color: #fecaca; }
.btn-x--danger-soft:hover { background: #fee2e2; color: var(--danger-700); }

.btn-x--success { background: var(--success-500); color: #fff; }
.btn-x--success:hover { background: var(--success-700); color: #fff; }

.btn-x--sm { height: 32px; padding: 0 .7rem; font-size: 12.5px; border-radius: 9px; }
.btn-x--lg { height: 44px; padding: 0 1.25rem; font-size: 14.5px; }
.btn-x--icon { width: 38px; padding: 0; }
.btn-x--icon.btn-x--sm { width: 32px; }
.btn-x--block { width: 100%; }

.btn-group-x { display: inline-flex; }
.btn-group-x .btn-x { border-radius: 0; margin-left: -1px; }
.btn-group-x .btn-x:first-child { border-radius: 10px 0 0 10px; margin-left: 0; }
.btn-group-x .btn-x:last-child { border-radius: 0 10px 10px 0; }

/* Segmented control ------------------------------------------------------ */
.segmented {
    display: inline-flex;
    background: var(--ink-100);
    border-radius: 10px;
    padding: 3px;
    gap: 2px;
}

.segmented a, .segmented button {
    padding: .38rem .75rem;
    border: 0;
    background: transparent;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 560;
    color: var(--ink-500);
    cursor: pointer;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.segmented a:hover, .segmented button:hover { color: var(--ink-800); }
.segmented .is-active { background: #fff; color: var(--brand-700); box-shadow: var(--shadow-xs); }

/* ==========================================================================
   Badges, chips, pills
   ========================================================================== */

.badge-x {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    padding: .22rem .55rem;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 620;
    line-height: 1.35;
    white-space: nowrap;
}

.badge-x--dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 6px;
}

.badge-x.tone-primary { background: var(--brand-50); color: var(--brand-700); }
.badge-x.tone-success { background: var(--success-50); color: var(--success-700); }
.badge-x.tone-warning { background: var(--warning-50); color: var(--warning-700); }
.badge-x.tone-danger { background: var(--danger-50); color: var(--danger-700); }
.badge-x.tone-info { background: var(--info-50); color: var(--info-700); }
.badge-x.tone-indigo { background: var(--indigo-50); color: var(--indigo-700); }
.badge-x.tone-amber { background: var(--amber-50); color: var(--amber-700); }
.badge-x.tone-muted { background: var(--ink-100); color: var(--ink-600); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .6rem;
    border-radius: var(--radius-pill);
    background: var(--ink-100);
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 550;
}

.chip a, .chip button {
    border: 0;
    background: transparent;
    color: var(--ink-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    display: grid;
    place-items: center;
}

.chip a:hover, .chip button:hover { color: var(--danger-500); }

.dot-colour { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: 0 0 9px; }

/* Priority flag ---------------------------------------------------------- */
.flag { display: inline-flex; align-items: center; gap: .35rem; font-size: 12.5px; font-weight: 560; }
.flag--low { color: var(--ink-500); }
.flag--medium { color: var(--info-700); }
.flag--high { color: var(--warning-700); }
.flag--urgent { color: var(--danger-700); }

/* Score meter ------------------------------------------------------------ */
.meter { height: 6px; border-radius: var(--radius-pill); background: var(--ink-200); overflow: hidden; min-width: 54px; }
.meter__fill { height: 100%; border-radius: inherit; background: var(--brand-500); transition: width .4s var(--ease); }
.meter__fill--success { background: var(--success-500); }
.meter__fill--warning { background: var(--warning-500); }
.meter__fill--danger { background: var(--danger-500); }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { margin-bottom: 1rem; }

.field__label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: .35rem;
}

.field__label .req { color: var(--danger-500); margin-left: .15rem; }
.field__hint { font-size: 12px; color: var(--ink-400); margin-top: .3rem; }
.field__error { font-size: 12px; color: var(--danger-700); margin-top: .3rem; display: flex; align-items: center; gap: .3rem; }

.input,
.select,
.textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ink-200);
    border-radius: 10px;
    background: #fff;
    padding: .5rem .75rem;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ink-800);
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
    appearance: none;
}

.textarea { min-height: 96px; resize: vertical; line-height: 1.55; }

.input::placeholder, .textarea::placeholder { color: var(--ink-400); }

.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-300); }

.input:focus, .select:focus, .textarea:focus {
    outline: 0;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3.5px var(--brand-50);
}

.input:disabled, .select:disabled, .textarea:disabled { background: var(--ink-50); color: var(--ink-400); cursor: not-allowed; }

.input.is-invalid, .select.is-invalid, .textarea.is-invalid {
    border-color: var(--danger-500);
    box-shadow: 0 0 0 3.5px var(--danger-50);
}

.select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' d='M2.5 4.5 6 8l3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .7rem center;
    padding-right: 2.1rem;
    cursor: pointer;
}

.input-group { display: flex; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group .input-group__addon {
    display: grid;
    place-items: center;
    padding: 0 .7rem;
    border: 1px solid var(--ink-200);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: var(--ink-50);
    color: var(--ink-500);
    font-size: 13px;
}

.input-group--prefix .input { border-radius: 0 10px 10px 0; }
.input-group--prefix .input-group__addon { border-left: 1px solid var(--ink-200); border-right: 0; border-radius: 10px 0 0 10px; }

/* Checkbox / radio ------------------------------------------------------- */
.check { display: inline-flex; align-items: flex-start; gap: .55rem; cursor: pointer; font-size: 13.5px; }

.check input[type="checkbox"],
.check input[type="radio"] {
    appearance: none;
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    margin-top: 1px;
    border: 1.5px solid var(--ink-300);
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.check input[type="radio"] { border-radius: 50%; }

.check input:checked { background: var(--brand-600); border-color: var(--brand-600); }

.check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 4.5px;
    top: 1px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 1.8px 1.8px 0;
    transform: rotate(42deg);
}

.check input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    inset: 3.5px;
    border-radius: 50%;
    background: #fff;
}

.check input:indeterminate { background: var(--brand-600); border-color: var(--brand-600); }
.check input:indeterminate::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 6.5px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.check input:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 2px; }

/* Switch ----------------------------------------------------------------- */
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-size: 13.5px; }

.switch input { appearance: none; width: 40px; height: 22px; border-radius: var(--radius-pill);
    background: var(--ink-300); position: relative; cursor: pointer; flex: 0 0 40px;
    transition: background var(--speed) var(--ease); }

.switch input::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform var(--speed) var(--ease);
}

.switch input:checked { background: var(--brand-600); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--brand-300); outline-offset: 2px; }

/* Fieldset --------------------------------------------------------------- */
.form-section { padding: 1.15rem; border-bottom: 1px solid var(--ink-200); }
.form-section:last-of-type { border-bottom: 0; }
.form-section__title { font-size: 13.5px; font-weight: 650; color: var(--ink-900); margin-bottom: .2rem; }
.form-section__sub { font-size: 12.5px; color: var(--ink-400); margin-bottom: 1rem; }

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    padding: .95rem 1.15rem;
    border-top: 1px solid var(--ink-200);
    background: var(--ink-50);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    flex-wrap: wrap;
}

/* File drop ------------------------------------------------------------- */
.dropzone {
    border: 1.5px dashed var(--ink-300);
    border-radius: var(--radius);
    background: var(--ink-50);
    padding: 1.6rem 1.2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}

.dropzone:hover, .dropzone.is-dragging { border-color: var(--brand-400); background: var(--brand-50); }
.dropzone input[type="file"] { display: none; }
.dropzone__icon { font-size: 22px; color: var(--brand-500); margin-bottom: .45rem; }

/* ==========================================================================
   Filters bar
   ========================================================================== */

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: .6rem;
    flex-wrap: wrap;
    padding: .9rem 1.15rem;
    border-bottom: 1px solid var(--ink-200);
    background: var(--white);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.filter-bar .field { margin-bottom: 0; }
.filter-bar__grow { flex: 1 1 220px; min-width: 180px; }
.filter-bar__item { flex: 0 1 165px; min-width: 140px; }

.applied-filters {
    display: flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
    padding: .65rem 1.15rem;
    border-bottom: 1px solid var(--ink-200);
    background: var(--ink-50);
}

/* ==========================================================================
   Tables
   ========================================================================== */

.table-wrap { overflow-x: auto; }

.table-x { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }

.table-x thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--ink-50);
    border-bottom: 1px solid var(--ink-200);
    padding: .65rem .9rem;
    text-align: left;
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-500);
    white-space: nowrap;
}

.table-x thead th a { color: inherit; display: inline-flex; align-items: center; gap: .3rem; }
.table-x thead th a:hover { color: var(--brand-600); }
.table-x thead th .sort-i { color: var(--ink-300); font-size: 10px; }
.table-x thead th a.is-sorted { color: var(--brand-700); }
.table-x thead th a.is-sorted .sort-i { color: var(--brand-600); }

.table-x tbody td {
    padding: .7rem .9rem;
    border-bottom: 1px solid var(--ink-100);
    vertical-align: middle;
    color: var(--ink-700);
}

.table-x tbody tr { transition: background var(--speed) var(--ease); }
.table-x tbody tr:hover { background: var(--ink-50); }
.table-x tbody tr.is-selected { background: var(--brand-50); }
.table-x tbody tr:last-child td { border-bottom: 0; }

.table-x--compact tbody td { padding: .5rem .9rem; }
.table-x .col-check { width: 40px; padding-right: 0; }
.table-x .col-actions { width: 1%; white-space: nowrap; text-align: right; }

.cell-primary { font-weight: 600; color: var(--ink-900); }
.cell-sub { font-size: 12px; color: var(--ink-400); }

.person { display: flex; align-items: center; gap: .6rem; min-width: 0; }
.person__meta { min-width: 0; }

/* Bulk action bar -------------------------------------------------------- */
.bulk-bar {
    display: none;
    align-items: center;
    gap: .6rem;
    padding: .65rem 1.15rem;
    background: var(--brand-600);
    color: #fff;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    flex-wrap: wrap;
}

.bulk-bar.is-visible { display: flex; }
.bulk-bar__count { font-weight: 650; font-size: 13.5px; }
.bulk-bar .btn-x--secondary { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); color: #fff; box-shadow: none; }
.bulk-bar .btn-x--secondary:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.bulk-bar select.select { height: 32px; min-height: 32px; padding-block: 0; font-size: 12.5px; }

/* Pagination ------------------------------------------------------------- */
.pagination-x {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1.15rem;
    border-top: 1px solid var(--ink-200);
    flex-wrap: wrap;
}

.pagination-x__info { font-size: 12.5px; color: var(--ink-500); }
.pagination-x__pages { display: flex; align-items: center; gap: .25rem; }

.pagination-x__pages a,
.pagination-x__pages span {
    min-width: 34px;
    height: 34px;
    padding: 0 .5rem;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    font-size: 13px;
    font-weight: 550;
    color: var(--ink-600);
    border: 1px solid transparent;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.pagination-x__pages a:hover { background: var(--ink-100); color: var(--ink-900); }
.pagination-x__pages .is-current { background: var(--brand-600); color: #fff; }
.pagination-x__pages .is-disabled { color: var(--ink-300); pointer-events: none; }

/* Empty state ------------------------------------------------------------ */
.empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--ink-500);
}

.empty__icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    background: var(--ink-100);
    color: var(--ink-400);
    display: grid;
    place-items: center;
    font-size: 22px;
    margin: 0 auto .85rem;
}

.empty__title { font-size: 15px; font-weight: 650; color: var(--ink-800); margin-bottom: .25rem; }
.empty__text { font-size: 13.5px; max-width: 420px; margin: 0 auto 1rem; }

/* ==========================================================================
   Modal
   ========================================================================== */

.modal-x {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 4vh 1rem;
    overflow-y: auto;
}

.modal-x.is-open { display: flex; }

.modal-x__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(2px);
    animation: fade-in .16s var(--ease);
}

.modal-x__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 540px;
    background: #fff;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: pop-in .2s var(--ease);
    margin: auto;
}

.modal-x__dialog--lg { max-width: 780px; }
.modal-x__dialog--sm { max-width: 420px; }

.modal-x__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem .85rem;
    border-bottom: 1px solid var(--ink-200);
}

.modal-x__title { font-size: 15.5px; font-weight: 650; color: var(--ink-900); }
.modal-x__sub { font-size: 12.5px; color: var(--ink-400); margin-top: .15rem; }
.modal-x__body { padding: 1.25rem; }
.modal-x__foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .55rem;
    padding: .95rem 1.25rem;
    border-top: 1px solid var(--ink-200);
    background: var(--ink-50);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
    flex-wrap: wrap;
}

.modal-x__icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 18px;
    margin-bottom: .85rem;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }

body.modal-open { overflow: hidden; }

/* ==========================================================================
   Toasts
   ========================================================================== */

.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1400;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    max-width: min(380px, calc(100vw - 2rem));
}

.toast-x {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    padding: .8rem .9rem;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-left: 3px solid var(--brand-500);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: toast-in .22s var(--ease);
}

.toast-x.is-leaving { animation: toast-out .2s var(--ease) forwards; }
.toast-x--success { border-left-color: var(--success-500); }
.toast-x--danger { border-left-color: var(--danger-500); }
.toast-x--warning { border-left-color: var(--warning-500); }
.toast-x--info { border-left-color: var(--info-500); }

.toast-x__icon { font-size: 15px; margin-top: 1px; }
.toast-x--success .toast-x__icon { color: var(--success-500); }
.toast-x--danger .toast-x__icon { color: var(--danger-500); }
.toast-x--warning .toast-x__icon { color: var(--warning-500); }
.toast-x--info .toast-x__icon { color: var(--info-500); }

.toast-x__body { flex: 1 1 auto; font-size: 13.5px; color: var(--ink-800); }
.toast-x__close { border: 0; background: transparent; color: var(--ink-400); cursor: pointer; padding: 0; line-height: 1; }
.toast-x__close:hover { color: var(--ink-700); }

@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* ==========================================================================
   Tabs
   ========================================================================== */

.tabs-x {
    display: flex;
    gap: .15rem;
    border-bottom: 1px solid var(--ink-200);
    overflow-x: auto;
    padding: 0 1.15rem;
}

.tabs-x a, .tabs-x button {
    padding: .75rem .85rem;
    border: 0;
    background: transparent;
    color: var(--ink-500);
    font-size: 13.5px;
    font-weight: 560;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.tabs-x a:hover, .tabs-x button:hover { color: var(--ink-800); }
.tabs-x .is-active { color: var(--brand-700); border-bottom-color: var(--brand-600); font-weight: 620; }

/* ==========================================================================
   Timeline
   ========================================================================== */

.timeline { position: relative; padding-left: 1.6rem; }

.timeline::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--ink-200);
    border-radius: 1px;
}

.timeline__item { position: relative; padding-bottom: 1.15rem; }
.timeline__item:last-child { padding-bottom: 0; }

.timeline__dot {
    position: absolute;
    left: -1.6rem;
    top: 1px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--ink-200);
    display: grid;
    place-items: center;
    font-size: 10px;
    color: var(--ink-400);
}

.timeline__dot.tone-success { border-color: var(--success-500); color: var(--success-700); background: var(--success-50); }
.timeline__dot.tone-danger { border-color: var(--danger-500); color: var(--danger-700); background: var(--danger-50); }
.timeline__dot.tone-primary { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }
.timeline__dot.tone-warning { border-color: var(--warning-500); color: var(--warning-700); background: var(--warning-50); }

.timeline__title { font-size: 13.5px; color: var(--ink-800); font-weight: 550; }
.timeline__meta { font-size: 12px; color: var(--ink-400); }

/* ==========================================================================
   Pipeline strip / funnel
   ========================================================================== */

.pipeline { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .2rem; }

.pipeline__step {
    flex: 1 1 0;
    min-width: 132px;
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    padding: .7rem .8rem;
    transition: border-color var(--speed) var(--ease), box-shadow var(--speed) var(--ease);
}

.pipeline__step:hover { border-color: var(--brand-300); box-shadow: var(--shadow-sm); }
.pipeline__step.is-active { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-50); }
.pipeline__label { font-size: 11.5px; font-weight: 620; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; }
.pipeline__value { font-size: 1.2rem; font-weight: 700; color: var(--ink-900); }
.pipeline__bar { height: 3px; border-radius: 2px; margin-top: .45rem; background: var(--ink-100); overflow: hidden; }
.pipeline__bar span { display: block; height: 100%; border-radius: inherit; }

.funnel__row { display: flex; align-items: center; gap: .75rem; margin-bottom: .65rem; }
.funnel__label { flex: 0 0 118px; font-size: 12.5px; color: var(--ink-600); font-weight: 550; }
.funnel__track { flex: 1 1 auto; height: 26px; background: var(--ink-100); border-radius: 7px; overflow: hidden; }
.funnel__fill { height: 100%; border-radius: 7px; display: flex; align-items: center; justify-content: flex-end;
    padding-right: .5rem; color: #fff; font-size: 11.5px; font-weight: 650; transition: width .5s var(--ease); }
.funnel__count { flex: 0 0 52px; text-align: right; font-size: 13px; font-weight: 650; color: var(--ink-800); }

/* ==========================================================================
   Kanban board
   ========================================================================== */

.kanban {
    display: flex;
    gap: .85rem;
    overflow-x: auto;
    padding-bottom: .6rem;
    align-items: flex-start;
}

.kanban__col {
    flex: 0 0 306px;
    background: var(--ink-100);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
    border: 1px solid transparent;
    transition: background var(--speed) var(--ease), border-color var(--speed) var(--ease);
}

.kanban__col.is-drop-target { background: var(--brand-50); border-color: var(--brand-300); }

.kanban__head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem .9rem .55rem;
    flex: 0 0 auto;
}

.kanban__title { font-size: 12.5px; font-weight: 680; color: var(--ink-700); text-transform: uppercase; letter-spacing: .05em; }
.kanban__count { background: #fff; color: var(--ink-500); font-size: 11.5px; font-weight: 650; padding: .1rem .42rem; border-radius: var(--radius-pill); }
.kanban__body { flex: 1 1 auto; overflow-y: auto; padding: 0 .6rem .6rem; display: flex; flex-direction: column; gap: .55rem; min-height: 72px; }

.kanban-card {
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius);
    padding: .75rem .8rem;
    box-shadow: var(--shadow-xs);
    cursor: grab;
    transition: box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease), opacity var(--speed) var(--ease);
}

.kanban-card:hover { box-shadow: var(--shadow-md); }
.kanban-card.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.kanban-card__title { font-size: 13.5px; font-weight: 600; color: var(--ink-900); margin-bottom: .35rem; }
.kanban-card__meta { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-400); }
.kanban-card__foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .6rem; }

/* ==========================================================================
   Calendar
   ========================================================================== */

.calendar { border: 1px solid var(--ink-200); border-radius: var(--radius-lg); overflow: hidden; background: #fff; }
.calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }

.calendar__dow {
    padding: .6rem .55rem;
    background: var(--ink-50);
    border-bottom: 1px solid var(--ink-200);
    font-size: 11px;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--ink-500);
    text-align: center;
}

.calendar__day {
    min-height: 116px;
    border-right: 1px solid var(--ink-100);
    border-bottom: 1px solid var(--ink-100);
    padding: .4rem .45rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.calendar__day:nth-child(7n) { border-right: 0; }
.calendar__day.is-outside { background: var(--ink-50); }
.calendar__day.is-today { background: var(--brand-50); }
.calendar__date { font-size: 12px; font-weight: 620; color: var(--ink-600); }
.calendar__day.is-today .calendar__date { color: var(--brand-700); }
.calendar__day.is-outside .calendar__date { color: var(--ink-300); }

.calendar__event {
    display: block;
    font-size: 11px;
    padding: .2rem .38rem;
    border-radius: 6px;
    background: var(--brand-50);
    color: var(--brand-700);
    border-left: 2px solid var(--brand-500);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background var(--speed) var(--ease);
}

.calendar__event:hover { background: var(--brand-100); }
.calendar__event--success { background: var(--success-50); color: var(--success-700); border-left-color: var(--success-500); }
.calendar__event--danger { background: var(--danger-50); color: var(--danger-700); border-left-color: var(--danger-500); }
.calendar__event--warning { background: var(--warning-50); color: var(--warning-700); border-left-color: var(--warning-500); }
.calendar__event--muted { background: var(--ink-100); color: var(--ink-600); border-left-color: var(--ink-400); }

/* ==========================================================================
   Charts
   ========================================================================== */

.chart-box { position: relative; width: 100%; }
.chart-box--sm { height: 190px; }
.chart-box--md { height: 260px; }
.chart-box--lg { height: 320px; }

.legend { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: .85rem; }
.legend__item { display: inline-flex; align-items: center; gap: .4rem; font-size: 12.5px; color: var(--ink-600); }
.legend__swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 10px; }

/* ==========================================================================
   Auth screen
   ========================================================================== */

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--ink-50);
}

@media (min-width: 992px) {
    .auth { grid-template-columns: 1.05fr .95fr; }
}

.auth__aside {
    display: none;
    position: relative;
    padding: 3rem;
    color: #fff;
    background:
        radial-gradient(900px 420px at 15% 10%, rgba(255, 255, 255, .16), transparent 60%),
        linear-gradient(155deg, var(--brand-700) 0%, var(--brand-600) 45%, #312e81 100%);
    overflow: hidden;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 992px) { .auth__aside { display: flex; } }

.auth__aside::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -170px;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
}

.auth__quote { font-size: 1.6rem; font-weight: 650; line-height: 1.35; letter-spacing: -.02em; max-width: 27ch; }
.auth__points { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; gap: .75rem; }
.auth__points li { display: flex; gap: .65rem; align-items: flex-start; font-size: 14px; color: rgba(255, 255, 255, .88); }
.auth__points i { margin-top: 3px; }

.auth__main { display: grid; place-items: center; padding: 2rem 1.25rem; }
.auth__card { width: 100%; max-width: 404px; }

.auth__brand { display: flex; align-items: center; gap: .7rem; margin-bottom: 1.75rem; }

.credential-grid { display: grid; gap: .4rem; margin-top: .75rem; }

.credential {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .45rem .6rem;
    border: 1px solid var(--ink-200);
    border-radius: 9px;
    background: #fff;
    font-size: 12.5px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: border-color var(--speed) var(--ease), background var(--speed) var(--ease);
}

.credential:hover { border-color: var(--brand-300); background: var(--brand-50); }
.credential__role { font-weight: 620; color: var(--ink-800); }
.credential__mail { color: var(--ink-400); font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; }

/* ==========================================================================
   Misc utilities
   ========================================================================== */

.grid-cards { display: grid; gap: 1rem; }
.grid-cards--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-cards--3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-cards--4 { grid-template-columns: repeat(auto-fit, minmax(206px, 1fr)); }

.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .55rem .9rem; font-size: 13.5px; }
.kv dt { color: var(--ink-400); font-weight: 500; }
.kv dd { margin: 0; color: var(--ink-800); font-weight: 550; word-break: break-word; }

.divider-y { width: 1px; background: var(--ink-200); align-self: stretch; }

.skeleton { background: linear-gradient(90deg, var(--ink-100) 25%, var(--ink-200) 37%, var(--ink-100) 63%);
    background-size: 400% 100%; animation: shimmer 1.3s ease-in-out infinite; border-radius: 6px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.scroll-y-260 { max-height: 260px; overflow-y: auto; }
.scroll-y-340 { max-height: 340px; overflow-y: auto; }

.list-plain { list-style: none; margin: 0; padding: 0; }

.hover-row {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .5rem;
    border-radius: 10px;
    transition: background var(--speed) var(--ease);
}

.hover-row:hover { background: var(--ink-50); }

.ring-brand { box-shadow: 0 0 0 3px var(--brand-50); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1199.98px) {
    .app-sidebar { transform: translateX(-100%); }
    body.sidebar-open .app-sidebar { transform: none; box-shadow: var(--shadow-lg); }
    .app-main { margin-left: 0; }
    body.sidebar-collapsed .app-main { margin-left: 0; }
}

@media (max-width: 767.98px) {
    .app-content { padding: 1rem; }
    .app-topbar { padding: 0 .9rem; gap: .5rem; }
    .topbar-search { display: none; }
    .page-head h1 { font-size: 1.2rem; }
    .stat__value { font-size: 1.4rem; }
    .kv { grid-template-columns: 1fr; gap: .1rem .5rem; }
    .kv dd { margin-bottom: .5rem; }
    .modal-x { padding: 2vh .75rem; }
}

/* ==========================================================================
   Print
   ========================================================================== */

@media print {
    .app-sidebar, .app-topbar, .app-footer, .page-head__actions,
    .filter-bar, .bulk-bar, .pagination-x, .toast-stack, .no-print { display: none !important; }
    .app-main { margin-left: 0 !important; }
    .app-content { padding: 0 !important; }
    body { background: #fff; }
    .card-x { box-shadow: none; border-color: #d1d5db; break-inside: avoid; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* Select2 CareerFluxio Theme Adjustments */
.select2-container--default .select2-selection--multiple {
    background-color: var(--white, #ffffff);
    border: 1px solid var(--ink-300, #cbd5e1);
    border-radius: var(--radius-sm, 8px);
    min-height: 42px;
    padding: 3px 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--brand-500, #6366f1);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: inline-flex !important;
    align-items: center !important;
    flex-direction: row-reverse !important;
    gap: 6px !important;
    background-color: var(--brand-50, #eef2ff) !important;
    border: 1px solid var(--brand-200, #c7d2fe) !important;
    color: var(--brand-700, #4338ca) !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 13px !important;
    font-weight: 550 !important;
    margin-top: 3px !important;
    margin-bottom: 3px !important;
    position: relative !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--brand-600, #4f46e5) !important;
    margin: 0 !important;
    padding: 0 2px !important;
    font-weight: bold !important;
    border: none !important;
    background: transparent !important;
    position: static !important;
    float: none !important;
    font-size: 14px !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--danger-600, #dc2626) !important;
    background: transparent !important;
}

.select2-dropdown {
    border-color: var(--ink-300, #cbd5e1);
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-600, #4f46e5) !important;
}

/* Native Multi-Select Fallback Styling */
select[multiple],
select.select[multiple] {
    background-image: none !important;
    padding-right: 0.75rem !important;
    height: auto !important;
    min-height: 96px !important;
    max-height: 180px !important;
    border: 1px solid var(--ink-300, #cbd5e1) !important;
    border-radius: var(--radius-sm, 8px) !important;
    padding: 6px 8px !important;
    overflow-y: auto !important;
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    background-color: #ffffff !important;
}

select[multiple] option,
select.select[multiple] option {
    padding: 6px 12px !important;
    border-radius: 6px !important;
    margin-bottom: 2px !important;
    cursor: pointer !important;
    color: var(--ink-800, #1e293b) !important;
}

select[multiple] option:checked,
select.select[multiple] option:checked {
    background-color: var(--brand-600, #4f46e5) !important;
    color: #ffffff !important;
    font-weight: 500 !important;
}

select[multiple] option:hover,
select.select[multiple] option:hover {
    background-color: var(--brand-50, #eef2ff) !important;
    color: var(--brand-700, #4338ca) !important;
}

/* Premium Select2 Styling inside Bulk Action Bar */
.bulk-bar .select2-container {
    vertical-align: middle;
    font-family: inherit;
    font-size: 13px;
}

.bulk-bar .select2-container--default .select2-selection--multiple {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    min-height: 34px !important;
    padding: 2px 24px 2px 6px !important;
    position: relative !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.bulk-bar .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: var(--brand-500, #6366f1) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2) !important;
}

.bulk-bar .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.4 !important;
}

.bulk-bar .select2-container--default .select2-selection--multiple .select2-selection__choice {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    background-color: var(--brand-50, #eef2ff) !important;
    border: 1px solid var(--brand-200, #c7d2fe) !important;
    color: var(--brand-700, #4338ca) !important;
    border-radius: 6px !important;
    padding: 2px 7px !important;
    font-size: 12px !important;
    font-weight: 550 !important;
    margin: 1px 0 !important;
}

.bulk-bar .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--brand-500, #6366f1) !important;
    margin-right: 2px !important;
    border: none !important;
    font-weight: bold !important;
    font-size: 13px !important;
    line-height: 1 !important;
    background: transparent !important;
    cursor: pointer !important;
}

.bulk-bar .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--danger-600, #dc2626) !important;
}

.bulk-bar .select2-container--default .select2-search--inline .select2-search__field {
    color: var(--ink-800, #1e293b) !important;
    font-size: 12.5px !important;
    font-family: inherit !important;
    margin: 2px 0 !important;
    height: 24px !important;
}

.bulk-bar .select2-container--default .select2-selection--multiple .select2-selection__clear {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    color: var(--ink-400, #94a3b8) !important;
    font-size: 15px !important;
    font-weight: bold !important;
    cursor: pointer !important;
}

.bulk-bar .select2-container--default .select2-selection--multiple .select2-selection__clear:hover {
    color: var(--danger-600, #dc2626) !important;
}

/* Select2 Dropdown Popup Global Polish */
.select2-dropdown {
    border: 1px solid var(--ink-200, #e2e8f0) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    z-index: 99999 !important;
    background: #ffffff !important;
}

.select2-results__option {
    padding: 7px 12px !important;
    font-size: 13px !important;
    color: var(--ink-800, #1e293b) !important;
    transition: background-color 0.1s ease, color 0.1s ease !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--brand-600, #4f46e5) !important;
    color: #ffffff !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: var(--brand-50, #eef2ff) !important;
    color: var(--brand-700, #4338ca) !important;
    font-weight: 550 !important;
}

