/* =====================================================================
   HRMS - application theme
   Works with bootstrap.min.css (LTR) or bootstrap.rtl.min.css (RTL).
   Direction-sensitive rules use logical properties so one file serves both.
   ===================================================================== */

:root {
    --hrms-primary:        #1b6ca8;
    --hrms-primary-dark:   #14527d;
    --hrms-accent:         #12a58c;
    --hrms-sidebar-bg:     #12263f;
    --hrms-sidebar-fg:     #b9c6d6;
    --hrms-sidebar-active: #1b6ca8;
    --hrms-body-bg:        #f2f5f9;
    --hrms-card-bg:        #ffffff;
    --hrms-border:         #e2e8f0;
    --hrms-text:           #22303f;
    /* Muted text still has to be readable: this is the darkest-but-one step
       that clears 4.5:1 on the light card background (4.96:1). The previous
       value sat at 4.26:1, under the floor for text this size. */
    --hrms-muted:          #61718a;
    --hrms-header-h:       60px;
    --hrms-sidebar-w:      260px;
    --hrms-radius:         10px;
    --hrms-shadow:         0 1px 3px rgba(18, 38, 63, .08), 0 1px 2px rgba(18, 38, 63, .06);
}

[data-theme="dark"] {
    --hrms-sidebar-bg:     #0d1626;
    --hrms-sidebar-fg:     #93a4b8;
    --hrms-body-bg:        #121a26;
    --hrms-card-bg:        #1a2434;
    --hrms-border:         #2a3648;
    --hrms-text:           #dfe6ef;
    --hrms-muted:          #8b9bb0;
    --hrms-shadow:         0 1px 3px rgba(0, 0, 0, .4);
}

/* ---------------------------------------------------------------- base */
body {
    background: var(--hrms-body-bg);
    color: var(--hrms-text);
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", "Cairo", system-ui, -apple-system, sans-serif;
    font-size: .925rem;
    min-height: 100vh;
}

html[dir="rtl"] body {
    font-family: "Noto Sans Arabic", "Cairo", Tahoma, "Segoe UI", sans-serif;
}

a { text-decoration: none; }

[data-theme="dark"] .table            { --bs-table-color: var(--hrms-text); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text {
    background-color: #16202e;
    border-color: var(--hrms-border);
    color: var(--hrms-text);
}
[data-theme="dark"] .form-control:disabled,
[data-theme="dark"] .form-control[readonly] { background-color: #131b27; }
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .offcanvas          { background-color: var(--hrms-card-bg); color: var(--hrms-text); }
[data-theme="dark"] .dropdown-item      { color: var(--hrms-text); }
[data-theme="dark"] .dropdown-item:hover{ background-color: #223046; color: #fff; }
[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--hrms-card-bg);
    border-color: var(--hrms-border) var(--hrms-border) var(--hrms-card-bg);
    color: var(--hrms-text);
}

/* ---------------------------------------------------------------- layout */
.hrms-layout { display: flex; min-height: 100vh; }

.hrms-sidebar {
    width: var(--hrms-sidebar-w);
    flex: 0 0 var(--hrms-sidebar-w);
    background: var(--hrms-sidebar-bg);
    color: var(--hrms-sidebar-fg);
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 1040;
    overflow-y: auto;
    transition: transform .25s ease;
}

.hrms-main {
    flex: 1 1 auto;
    min-width: 0;
    margin-inline-start: var(--hrms-sidebar-w);
    display: flex;
    flex-direction: column;
}

.hrms-content { padding: 1.25rem; flex: 1 0 auto; }

.hrms-footer {
    padding: .75rem 1.25rem;
    color: var(--hrms-muted);
    font-size: .8rem;
    border-top: 1px solid var(--hrms-border);
}

/* ---------------------------------------------------------------- sidebar */
.hrms-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    height: var(--hrms-header-h);
    padding-inline: 1rem;
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    white-space: nowrap;
    overflow: hidden;
}
.hrms-brand i { font-size: 1.4rem; color: var(--hrms-accent); }

.hrms-nav { padding: .5rem 0 2rem; list-style: none; margin: 0; }
.hrms-nav .nav-section {
    padding: 1rem 1rem .35rem;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    /* Small, uppercase and set against the sidebar's dark ground, so it needs
       a lighter grey than it had: 3.36:1 was below the 4.5:1 floor. */
    color: #8fa2b8;
}
.hrms-nav a,
.hrms-nav .nav-toggle {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem 1rem;
    color: var(--hrms-sidebar-fg);
    font-size: .875rem;
    border: 0;
    background: none;
    width: 100%;
    text-align: start;
    cursor: pointer;
}
.hrms-nav a:hover,
.hrms-nav .nav-toggle:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.hrms-nav a.active {
    background: var(--hrms-sidebar-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--hrms-accent);
}
html[dir="rtl"] .hrms-nav a.active { box-shadow: inset -3px 0 0 var(--hrms-accent); }
.hrms-nav i { width: 1.15rem; text-align: center; font-size: 1rem; }
.hrms-nav .submenu { list-style: none; padding: 0; margin: 0; background: rgba(0, 0, 0, .18); }
.hrms-nav .submenu a { padding-inline-start: 2.75rem; font-size: .83rem; }
.nav-toggle .chev { margin-inline-start: auto; font-size: .7rem; transition: transform .2s; }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
html[dir="rtl"] .nav-toggle[aria-expanded="true"] .chev { transform: rotate(-90deg); }

/* ---------------------------------------------------------------- header */
.hrms-header {
    height: var(--hrms-header-h);
    background: var(--hrms-card-bg);
    border-bottom: 1px solid var(--hrms-border);
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-inline: 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
}
.hrms-header .global-search { max-width: 420px; flex: 1 1 auto; }
.hrms-header .icon-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: var(--hrms-muted);
    border: 0; background: transparent;
    position: relative;
}
.hrms-header .icon-btn:hover { background: rgba(125, 140, 160, .14); color: var(--hrms-text); }
.notif-dot {
    position: absolute; top: 6px; inset-inline-end: 6px;
    min-width: 16px; height: 16px; padding: 0 4px;
    background: #dc3545; color: #fff;
    font-size: .62rem; line-height: 16px;
    border-radius: 8px; text-align: center;
}
.notif-list { width: 340px; max-height: 400px; overflow-y: auto; }
.notif-item { display: block; padding: .6rem .9rem; border-bottom: 1px solid var(--hrms-border); }
.notif-item.unread { background: rgba(27, 108, 168, .07); }

/* ---------------------------------------------------------------- cards */
.card {
    background: var(--hrms-card-bg);
    border: 1px solid var(--hrms-border);
    border-radius: var(--hrms-radius);
    box-shadow: var(--hrms-shadow);
    color: var(--hrms-text);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--hrms-border);
    font-weight: 600;
    padding: .8rem 1rem;
}

.stat-card { display: flex; align-items: center; gap: .9rem; padding: 1rem; }
.stat-card .stat-icon {
    width: 48px; height: 48px; flex: 0 0 48px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 12px; font-size: 1.3rem; color: #fff;
}
.stat-card .stat-value { font-size: 1.55rem; font-weight: 700; line-height: 1.1; }
.stat-card .stat-label { color: var(--hrms-muted); font-size: .8rem; }
.bg-grad-primary { background: linear-gradient(135deg, #1b6ca8, #2e8bc9); }
.bg-grad-success { background: linear-gradient(135deg, #14866b, #21b58f); }
.bg-grad-warning { background: linear-gradient(135deg, #c98a15, #e0a92b); }
.bg-grad-danger  { background: linear-gradient(135deg, #b3372f, #d9534f); }
.bg-grad-info    { background: linear-gradient(135deg, #2a6f97, #468faf); }
.bg-grad-purple  { background: linear-gradient(135deg, #5b3b8c, #7c5cb5); }

.page-title { font-size: 1.25rem; font-weight: 600; margin: 0; }
.page-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }

/* ---------------------------------------------------------------- tables */
.table > :not(caption) > * > * { padding: .6rem .7rem; }
.table thead th {
    background: rgba(125, 140, 160, .09);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--hrms-muted);
    border-bottom: 1px solid var(--hrms-border);
    white-space: nowrap;
}
.table-hover tbody tr:hover { background: rgba(27, 108, 168, .05); }
.table-wrap { overflow-x: auto; }

div.dt-container .dt-search input,
div.dt-container .dt-length select { margin-inline: .4rem; }
div.dt-buttons .btn { margin-inline-end: .25rem; }

/* ---------------------------------------------------------------- misc */
.avatar {
    width: 38px; height: 38px; border-radius: 50%;
    object-fit: cover; background: var(--hrms-primary);
    color: #fff; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: .85rem; flex: 0 0 auto;
}
.avatar-lg { width: 96px; height: 96px; font-size: 2rem; }
.badge-soft { padding: .3rem .55rem; border-radius: 6px; font-weight: 500; font-size: .75rem; }
.required::after { content: " *"; color: #dc3545; }
.form-label { font-size: .82rem; font-weight: 500; margin-bottom: .25rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
    position: relative;
    padding-inline-start: 1.25rem;
    padding-block: .5rem;
    border-inline-start: 2px solid var(--hrms-border);
}
.timeline li::before {
    content: ""; position: absolute;
    inset-inline-start: -5px; top: .85rem;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--hrms-primary);
}

/* ---------------------------------------------------------------- auth pages */
.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #12263f 0%, #1b6ca8 100%);
}
.auth-card { width: 100%; max-width: 420px; border-radius: 14px; overflow: hidden; }
.auth-card .card-body { padding: 1.75rem; }
.auth-logo { width: 58px; height: 58px; border-radius: 14px; background: var(--hrms-primary); color: #fff;
             display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem; }

/* ---------------------------------------------------------------- errors */
.error-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.error-code { font-size: 5.5rem; font-weight: 700; line-height: 1; color: var(--hrms-primary); }

/* ---------------------------------------------------------------- responsive */
.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
    z-index: 1035; display: none;
}
body.sidebar-open .sidebar-backdrop { display: block; }

@media (max-width: 991.98px) {
    .hrms-sidebar { transform: translateX(-100%); }
    html[dir="rtl"] .hrms-sidebar { transform: translateX(100%); }
    body.sidebar-open .hrms-sidebar,
    html[dir="rtl"] body.sidebar-open .hrms-sidebar { transform: translateX(0); }
    .hrms-main { margin-inline-start: 0; }
    .hrms-header .global-search { display: none; }
    .hrms-content { padding: .85rem; }
    .stat-card .stat-value { font-size: 1.3rem; }
    .btn { min-height: 40px; }
    .form-control, .form-select { min-height: 42px; }
}

/* Stacked "card" tables on very small screens. Add class .table-responsive-cards */
@media (max-width: 575.98px) {
    .table-responsive-cards thead { display: none; }
    .table-responsive-cards tbody tr {
        display: block;
        border: 1px solid var(--hrms-border);
        border-radius: 8px;
        margin-bottom: .6rem;
        padding: .35rem .5rem;
    }
    .table-responsive-cards tbody td {
        display: flex; justify-content: space-between; gap: 1rem;
        border: 0; padding: .35rem .15rem;
    }
    .table-responsive-cards tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--hrms-muted);
        font-size: .78rem;
    }
}

/* ---------------------------------------------------------------- print */
@media print {
    .hrms-sidebar, .hrms-header, .hrms-footer, .no-print, .dt-buttons, .dt-search, .dt-length, .dt-paging { display: none !important; }
    .hrms-main { margin: 0 !important; }
    .hrms-content { padding: 0 !important; }
    .card { border: 0 !important; box-shadow: none !important; }
    body { background: #fff !important; color: #000 !important; }
    a[href]::after { content: ""; }
}

/* =====================================================================
   Employee 360 - overview panels, timeline, empty and loading states.
   Built on the same tokens as the rest of the theme, so dark mode and RTL
   follow without a second set of rules.
   ===================================================================== */

/* ------------------------------------------------------- overview stats */
.overview-stat {
    padding: .65rem .35rem;
    border: 1px solid var(--hrms-border);
    border-radius: var(--hrms-radius);
    background: var(--hrms-body-bg);
    height: 100%;
}
.overview-stat-value { font-size: 1.15rem; font-weight: 600; line-height: 1.2; }
.overview-stat-label { font-size: .72rem; color: var(--hrms-muted); margin-top: .15rem; }

/* ------------------------------------------------------------- timeline */
.hrms-timeline { list-style: none; margin: 0; padding: 0; position: relative; }

/* The rail sits on the inline-start edge, so it moves to the right under RTL
   without a mirrored rule. */
.hrms-timeline::before {
    content: "";
    position: absolute;
    inset-block: .4rem;
    inset-inline-start: 11px;
    width: 2px;
    background: var(--hrms-border);
}

.hrms-timeline-day {
    position: relative;
    margin: 1rem 0 .5rem;
    padding-inline-start: 2.25rem;
    font-size: .74rem;
    font-weight: 600;
    color: var(--hrms-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}
.hrms-timeline-day:first-child { margin-top: 0; }

.hrms-timeline-item {
    position: relative;
    padding-inline-start: 2.25rem;
    padding-block: .45rem;
}

.hrms-timeline-marker {
    position: absolute;
    inset-inline-start: 0;
    top: .5rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .72rem;
    background: var(--hrms-card-bg);
    border: 2px solid currentColor;
}

.hrms-timeline-body { min-width: 0; }

/* An arrow that points "forward" has to turn around under RTL. */
html[dir="rtl"] .rtl-flip { transform: scaleX(-1); display: inline-block; }

/* ---------------------------------------------------------- empty state */
.empty-state {
    text-align: center;
    padding: 2.25rem 1rem;
    color: var(--hrms-muted);
}
.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: .6rem;
    opacity: .55;
}

/* Outline buttons keep Bootstrap's light-mode brand colours, which land on the
   dark card at 3.3-3.5:1 - under the floor for their size. These are the same
   hues lifted until they clear it; only the resting label colour changes, so a
   filled or hovered button is untouched. */
[data-theme="dark"] .btn-outline-secondary { --bs-btn-color: #adb5bd; --bs-btn-border-color: #6c757d; }
[data-theme="dark"] .btn-outline-success   { --bs-btn-color: #4ade80; --bs-btn-border-color: #198754; }
[data-theme="dark"] .btn-outline-primary   { --bs-btn-color: #6ea8fe; --bs-btn-border-color: #0d6efd; }
[data-theme="dark"] .btn-outline-danger    { --bs-btn-color: #ea868f; --bs-btn-border-color: #dc3545; }

/* ------------------------------------------------------------- skeleton */
.skeleton {
    background: linear-gradient(90deg,
        var(--hrms-border) 25%,
        color-mix(in srgb, var(--hrms-border) 55%, transparent) 37%,
        var(--hrms-border) 63%);
    background-size: 400% 100%;
    animation: hrms-shimmer 1.4s ease infinite;
    border-radius: 6px;
}
.skeleton-line  { height: .7rem; margin-bottom: .5rem; }
.skeleton-line:last-child { width: 70%; margin-bottom: 0; }
.skeleton-chart { height: 260px; border-radius: var(--hrms-radius); }

@keyframes hrms-shimmer {
    from { background-position: 100% 50%; }
    to   { background-position: 0 50%; }
}

/* Someone who has asked for less motion gets a still placeholder, not a
   flashing one. */
@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; }
    .card, .btn, .nav-link { transition: none !important; }
}

/* ---------------------------------------------------- quick action bar */
.quick-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.quick-actions .btn { --bs-btn-padding-y: .3rem; --bs-btn-font-size: .82rem; }

/* -------------------------------------------------------- error pages */
.error-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: .5rem;
    opacity: .85;
}

/* ---------------------------------------------------------------- KPI cards
   The dashboard card gained a third line - a real figure in context, such as
   how many of the headcount are active - and a chevron that only appears on
   hover, so the card reads as a destination without shouting about it. */
.kpi-card {
    position: relative;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    border: 1px solid var(--hrms-border);
}
.kpi-card:hover,
.kpi-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(18, 38, 63, .10);
    border-color: color-mix(in srgb, var(--hrms-primary) 35%, var(--hrms-border));
}
[data-theme="dark"] .kpi-card:hover,
[data-theme="dark"] .kpi-card:focus-visible { box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

.kpi-card .kpi-sub {
    font-size: .72rem;
    color: var(--hrms-muted);
    margin-top: .15rem;
}

/* Logical inset so the chevron sits on the trailing edge in both directions,
   and points the way the language reads. */
.kpi-card .kpi-go {
    position: absolute;
    inset-inline-end: .65rem;
    inset-block-start: .65rem;
    font-size: .8rem;
    color: var(--hrms-muted);
    opacity: 0;
    transition: opacity .18s ease;
}
html[dir="rtl"] .kpi-card .kpi-go { transform: rotate(180deg); }
.kpi-card:hover .kpi-go,
.kpi-card:focus-visible .kpi-go { opacity: 1; }

/* Skeletons - shown while a widget's data is still in flight, so the page has
   its final shape before the numbers arrive - are defined once, in the
   skeleton section above, and used unchanged here. */

/* ------------------------------------------------------- empty / error state
   A widget with nothing to show still occupies its space and says why, rather
   than collapsing and leaving a hole in the grid. */
.widget-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 220px;
    padding: 1.5rem;
    text-align: center;
    color: var(--hrms-muted);
}
.widget-state .bi { font-size: 1.75rem; opacity: .55; }
.widget-state-title { font-weight: 600; color: var(--hrms-text); font-size: .9rem; }
.widget-state-text  { font-size: .8rem; }

/* Anyone who has asked their system to stop moving things should not be made
   to watch a shimmer loop. */
@media (prefers-reduced-motion: reduce) {
    .kpi-card,
    .kpi-card .kpi-go { transition: none; }
    .kpi-card:hover,
    .kpi-card:focus-visible { transform: none; }
}

/* A chart slot stacks skeleton, state panel and canvas in the same box, so the
   card keeps its height through every transition and the grid never jumps. */
.chart-slot { position: relative; }
.chart-slot > .skeleton-chart,
.chart-slot > .widget-state { position: absolute; inset: 0; }
.chart-slot > .widget-state { min-height: 0; }

/* ------------------------------------------------------------ filter chips
   One chip per applied filter. The chip is a link that drops that single
   parameter, so removing a filter is a plain navigation and works without
   JavaScript. */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .55rem;
    font-size: .78rem;
    border: 1px solid var(--hrms-border);
    border-radius: 999px;
    background: var(--hrms-card-bg);
    color: var(--hrms-text);
    transition: border-color .15s ease, background-color .15s ease;
}
.filter-chip:hover,
.filter-chip:focus-visible {
    border-color: var(--bs-danger);
    background: color-mix(in srgb, var(--bs-danger) 8%, var(--hrms-card-bg));
    color: var(--hrms-text);
}
.filter-chip .filter-chip-label { color: var(--hrms-muted); }
.filter-chip .bi { font-size: .9rem; opacity: .7; }

@media (prefers-reduced-motion: reduce) { .filter-chip { transition: none; } }

/* ------------------------------------------------------------- breadcrumb
   Separators are drawn with ::before rather than typed into the markup, so the
   trail carries no punctuation for a screen reader to read aloud. The chevron
   is mirrored under RTL because it points the way the language runs. */
.hrms-breadcrumb { margin-block-end: .5rem; }
.hrms-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .8rem;
}
.hrms-breadcrumb li { display: flex; align-items: center; gap: .35rem; color: var(--hrms-muted); }
.hrms-breadcrumb li + li::before {
    content: "\f285";                 /* bi-chevron-right */
    font-family: "bootstrap-icons";
    font-size: .65rem;
    opacity: .5;
}
html[dir="rtl"] .hrms-breadcrumb li + li::before { transform: rotate(180deg); }
.hrms-breadcrumb a { color: var(--hrms-muted); }
.hrms-breadcrumb a:hover,
.hrms-breadcrumb a:focus-visible { color: var(--hrms-primary); text-decoration: underline; }
.hrms-breadcrumb [aria-current="page"] { color: var(--hrms-text); font-weight: 600; }


/* ------------------------------------------------------ notification panel
   Grouped by day, with unread carried by a dot as well as weight - state must
   not depend on colour alone. The panel reuses the shared state block below
   rather than defining its own empty/loading/error styling. */
.notif-day + .notif-day { border-block-start: 1px solid var(--hrms-border); }
.notif-day-label {
    position: sticky;
    inset-block-start: 0;
    z-index: 1;
    padding: .35rem .9rem;
    font-size: .7rem;
    font-weight: 600;
    color: var(--hrms-muted);
    background: color-mix(in srgb, var(--hrms-card-bg) 92%, var(--hrms-border));
}
.notif-unread-dot {
    flex: 0 0 auto;
    width: .5rem;
    height: .5rem;
    border-radius: 50%;
    background: var(--hrms-primary);
}
.notif-item.unread { background: color-mix(in srgb, var(--hrms-primary) 6%, transparent); }
.notif-item:focus-visible { outline: 2px solid var(--hrms-primary); outline-offset: -2px; }

/* One state block serves the notification panel and the search dropdown, so
   the loading, empty and error treatments cannot drift apart. */
.notif-state,
.search-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1.25rem .9rem;
    font-size: .82rem;
    color: var(--hrms-muted);
    text-align: center;
}
.notif-state .bi { font-size: 1.1rem; opacity: .6; }
.notif-state .spinner-border,
.search-state .spinner-border { width: .9rem; height: .9rem; border-width: .15em; }

/* ------------------------------------------------------------- passkeys
   The "or" rule between the password form and the passkey button. Drawn
   with a border on a pseudo-element rather than a graphic, so it inverts
   with the theme and mirrors under RTL without a second rule. */
.passkey-block { margin-top: 1.25rem; }

.passkey-divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
    color: var(--hrms-muted);
    font-size: .8rem;
}
.passkey-divider::before,
.passkey-divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--hrms-border);
}

/* ------------------------------------------------- recruitment pipeline
   A horizontally scrolling board. The columns have a fixed width rather
   than flexing, because a stage with forty candidates and one with none
   should still be the same size - a column that shrinks to nothing is a
   column nobody can drop onto.

   Every colour here is a theme variable, so the board inverts with the
   rest of the application rather than staying light in dark mode. Under
   RTL the whole board mirrors from `direction` on the page; nothing here
   hard-codes left or right. */
.ats-board {
    display: flex;
    gap: .75rem;
    overflow-x: auto;
    padding-bottom: .75rem;
    align-items: flex-start;
}

.ats-column {
    flex: 0 0 15rem;
    max-width: 15rem;
    background: var(--hrms-card-bg);
    border: 1px solid var(--hrms-border);
    border-radius: var(--bs-border-radius, .5rem);
}

.ats-column-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .5rem .75rem;
    border-bottom: 1px solid var(--hrms-border);
}

.ats-column-body {
    padding: .5rem;
    min-height: 4rem;
    max-height: 70vh;
    overflow-y: auto;
}

.ats-card {
    position: relative;
    padding: .5rem .625rem;
    margin-bottom: .5rem;
    border: 1px solid var(--hrms-border);
    border-radius: var(--bs-border-radius, .5rem);
    background: var(--hrms-body-bg);
    cursor: grab;
}
.ats-card:last-child { margin-bottom: 0; }

/* Held while the move is in flight. It is deliberately not a spinner: the
   card has to stay readable, because it may be about to snap back. */
.ats-card.is-saving { opacity: .55; cursor: progress; }

/* A phone cannot drag, so the board becomes a single readable column and
   the cards are followed as links to the candidate page instead. */
@media (max-width: 575.98px) {
    .ats-board  { display: block; overflow-x: visible; }
    .ats-column { max-width: none; margin-bottom: .75rem; }
    .ats-card   { cursor: pointer; }
}
