/* HRMS panel chrome — dark navy sidebar + example-style topbar */

:root {
    /* Rockman Advanced Composites brand palette (logo: orange / blue / red) */
    --hrms-brand-orange: #F06020;
    --hrms-brand-orange-dark: #C44A14;
    --hrms-brand-blue: #305090;
    --hrms-brand-red: #E02020;
    --hrms-sidebar-bg: #1B2F5C;
    --hrms-sidebar-bg-deep: #122042;
    --hrms-sidebar-border: rgba(255, 255, 255, 0.08);
    --hrms-sidebar-text: rgba(255, 255, 255, 0.88);
    --hrms-sidebar-muted: rgba(192, 204, 230, 0.72);
    --hrms-sidebar-icon: rgba(226, 232, 240, 0.72);
    --hrms-sidebar-hover: rgba(255, 255, 255, 0.08);
    --hrms-sidebar-active: #305090;
    --hrms-page-bg: #f4f5f8;
    --hrms-card-radius: 0.9rem;
}

/* ---------- Impersonation banner ---------- */
.hrms-impersonation-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    width: 100%;
    padding: 0.7rem 1.25rem;
    background: linear-gradient(90deg, #1B2F5C 0%, #305090 100%);
    color: #ffffff;
    font-size: 0.9rem;
    z-index: 60;
    position: relative;
}

.hrms-impersonation-banner__text strong {
    font-weight: 700;
}

.hrms-impersonation-banner__btn {
    border: 0;
    border-radius: 0.55rem;
    background: #F06020;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.45rem 0.9rem;
    cursor: pointer;
}

.hrms-impersonation-banner__btn:hover {
    background: #C44A14;
}

/* ---------- Page shell ---------- */
html,
.fi-body,
.fi-main-ctn,
.fi-page {
    background-color: var(--hrms-page-bg) !important;
}

.fi-body {
    overflow-x: clip;
}

.fi-layout {
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.fi-main {
    background-color: transparent !important;
    min-width: 0;
}

/* Soft cards / sections / table wrappers */
.fi-section,
.fi-wi-stats-overview-stat,
.fi-ta-ctn,
.fi-wi-widget {
    border-radius: var(--hrms-card-radius) !important;
}

/* Dashboard: compact stats in a card grid (not full-width rows) */
.fi-page-content .fi-wi-stats-overview-stats-ctn {
    display: grid !important;
    align-items: stretch;
    gap: 0.75rem !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

@media (min-width: 768px) {
    .fi-page-content .fi-wi-stats-overview-stats-ctn {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 1280px) {
    /* 4 HRMS summary cards in one row */
    .fi-page-content .fi-wi-stats-overview-stats-ctn:has(> :nth-child(4):last-child) {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    /* Present … Early Leave (5) */
    .fi-page-content .fi-wi-stats-overview-stats-ctn:has(> :nth-child(5):last-child) {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    }

    /* Present … Early Leave + Today Join (6) */
    .fi-page-content .fi-wi-stats-overview-stats-ctn:has(> :nth-child(6):last-child) {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    }
}

.fi-wi-stats-overview-stat a {
    cursor: pointer;
}

/* Attractive dashboard stat cards (same data, richer look) */
.fi-wi-stats-overview-stat.hrms-stat,
.fi-wi-stats-overview-stat {
    position: relative;
    min-height: 0 !important;
    padding: 1rem 1.1rem !important;
    width: 100%;
    overflow: hidden;
    border: 1px solid #e8eef7 !important;
    box-shadow: 0 1px 2px rgba(15, 41, 94, 0.04), 0 10px 28px -16px rgba(15, 41, 94, 0.18) !important;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    text-decoration: none !important;
}

.fi-wi-stats-overview-stat.hrms-stat:hover {
    box-shadow: 0 6px 18px -10px rgba(15, 41, 94, 0.22) !important;
    border-color: #d6e2f5 !important;
}

.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-label {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    color: #64748b !important;
}

.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-value {
    font-size: 1.55rem !important;
    line-height: 1.2 !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
    color: #0f172a !important;
}

.dark .fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-value {
    color: #f8fafc !important;
}

.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-description {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-description-icon {
    width: 1rem !important;
    height: 1rem !important;
}

.fi-wi-stats-overview-stat .fi-wi-stats-overview-stat-chart {
    display: none !important;
}

/* Plain cards: no gradient washes, stripes or tinted icon tiles. A small
   monochrome icon sits inline with the label; colour is kept for status
   text only. Numbers use the brand navy. */
.fi-wi-stats-overview-stat.hrms-stat .fi-wi-stats-overview-stat-value {
    color: var(--hrms-sidebar-bg) !important;
}

.dark .fi-wi-stats-overview-stat.hrms-stat .fi-wi-stats-overview-stat-value {
    color: #f8fafc !important;
}

.fi-wi-stats-overview-stat.hrms-stat .fi-wi-stats-overview-stat-icon {
    width: 1rem !important;
    height: 1rem !important;
    color: #94a3b8 !important;
}

.dark .fi-wi-stats-overview-stat.hrms-stat .fi-wi-stats-overview-stat-icon {
    color: rgb(var(--gray-500)) !important;
}

.fi-wi-chart {
    min-height: 0 !important;
    border: 1px solid #e8eef7 !important;
    box-shadow: 0 1px 2px rgba(15, 41, 94, 0.04), 0 12px 32px -16px rgba(15, 41, 94, 0.16) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
}

.fi-wi-chart .fi-wi-chart-canvas {
    max-height: 200px;
    padding: 0.25rem 0.5rem 0.5rem;
}

.fi-page-dashboard .fi-section,
.fi-dashboard-page .fi-section,
.fi-page-dashboard .fi-ta-ctn,
.fi-dashboard-page .fi-ta-ctn {
    border: 1px solid #e8eef7 !important;
    box-shadow: 0 1px 2px rgba(15, 41, 94, 0.04), 0 12px 32px -16px rgba(15, 41, 94, 0.14) !important;
}

.fi-page-dashboard .fi-wi-widget,
.fi-dashboard-page .fi-wi-widget {
    margin-block: 0 !important;
}

.fi-page-content > .fi-grid {
    row-gap: 0.9rem !important;
}

/* Daily attendance: one row — who/when · shift timeline · status + action */
.hrms-attendance-widget .fi-wi-widget-content,
.hrms-attendance-widget {
    padding: 0 !important;
    overflow: visible;
}

.hrms-att {
    display: grid;
    grid-template-columns: minmax(15rem, auto) minmax(14rem, 1fr) auto;
    align-items: center;
    gap: 0.75rem 1.75rem;
    padding: 1rem 1.15rem;
    border-radius: var(--hrms-card-radius);
    border: 0;
    /* Brand hero: same navy as the sidebar so the page reads as Rockman HRMS */
    background: linear-gradient(120deg, var(--hrms-sidebar-bg) 0%, var(--hrms-sidebar-bg-deep) 100%);
    box-shadow: 0 10px 28px -18px rgba(18, 32, 66, 0.6);
    color: #e2e8f0;
    min-width: 0;
}

.hrms-att--collapsed {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.55rem 1rem;
}

.hrms-att__meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.hrms-att__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    flex-shrink: 0;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.hrms-att--collapsed .hrms-att__icon {
    width: 1.9rem;
    height: 1.9rem;
}

.hrms-att__meta-text {
    min-width: 0;
}

.hrms-att__title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.hrms-att__sub {
    margin-top: 0.1rem;
    font-size: 0.76rem;
    color: #a9b6d3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hrms-att__timeline {
    min-width: 0;
}

.hrms-att__ends {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.4rem;
}

.hrms-att__end {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    white-space: nowrap;
}

.hrms-att__end--right {
    flex-direction: row-reverse;
}

.hrms-att__end-label {
    font-size: 0.72rem;
    color: #a9b6d3;
}

.hrms-att__end-time {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
}

.hrms-att__track {
    position: relative;
    height: 0.4rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.hrms-att__fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f59e0b, #F06020);
    box-shadow: 0 0 12px rgba(240, 96, 32, 0.55);
    transition: width 0.4s ease;
}

.hrms-att__fill--done {
    background: #22c55e;
    box-shadow: none;
}

.hrms-att__foot {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 0.35rem;
    font-size: 0.74rem;
    color: #a9b6d3;
    white-space: nowrap;
}

.hrms-att__foot strong {
    color: #ffffff;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.hrms-att__compact {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    font-size: 0.8rem;
    color: #a9b6d3;
    white-space: nowrap;
}

.hrms-att__compact strong {
    color: #ffffff;
    font-weight: 600;
}

.hrms-att__dot {
    width: 0.25rem;
    height: 0.25rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.35);
}

.hrms-att__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    min-width: 0;
}

.hrms-att__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    background: transparent;
    color: #a9b6d3;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.hrms-att__toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Status pill and button on the navy hero */
.hrms-att__actions .fi-badge {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    --tw-ring-color: rgba(255, 255, 255, 0.18) !important;
    padding: 0.3rem 0.65rem !important;
}

.hrms-att__actions .fi-badge::before {
    content: '';
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    margin-right: 0.15rem;
    background: var(--hrms-att-dot, #4ade80);
    box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18);
}

.hrms-att__actions .fi-badge.fi-color-warning { --hrms-att-dot: #fbbf24; }
.hrms-att__actions .fi-badge.fi-color-danger { --hrms-att-dot: #f87171; }
.hrms-att__actions .fi-badge.fi-color-gray { --hrms-att-dot: #cbd5e1; }

.hrms-att__actions .fi-btn {
    background: #ffffff !important;
    color: var(--hrms-sidebar-bg) !important;
    --tw-ring-color: transparent !important;
    font-weight: 600 !important;
}

.hrms-att__actions .fi-btn .fi-btn-icon {
    color: var(--hrms-sidebar-bg) !important;
}

.hrms-att__actions .fi-btn:hover {
    background: #fff4ec !important;
    color: #c2410c !important;
}

.hrms-att__actions .fi-btn.fi-color-primary {
    background: #F06020 !important;
    color: #ffffff !important;
}

.hrms-att__actions .fi-btn.fi-color-primary .fi-btn-icon {
    color: #ffffff !important;
}

.hrms-att__toggle svg {
    width: 1.1rem;
    height: 1.1rem;
    transition: transform 0.15s ease;
}

.hrms-att__toggle svg.rotate-180 {
    transform: rotate(180deg);
}

.dark .hrms-att {
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

@media (max-width: 1100px) {
    .hrms-att {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .hrms-att__timeline {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 640px) {
    .hrms-att,
    .hrms-att--collapsed {
        grid-template-columns: minmax(0, 1fr);
    }

    .hrms-att__actions {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .hrms-att__sub {
        white-space: normal;
    }
}

.fi-section,
.fi-ta-ctn {
    box-shadow: 0 1px 2px rgba(15, 41, 94, 0.04), 0 8px 24px -12px rgba(15, 41, 94, 0.1) !important;
    border-color: #e8eef7 !important;
}

/* Tables: allow horizontal scroll + readable wrapped cells */
.fi-ta-ctn {
    overflow-x: auto !important;
}

.fi-ta-table {
    min-width: 100%;
}

.fi-ta-header-cell {
    white-space: nowrap !important;
}

.fi-ta-cell {
    vertical-align: middle;
}

.fi-ta-text {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

/* ---------- Sidebar ---------- */
.fi-main-sidebar .fi-sidebar,
.fi-sidebar {
    background: linear-gradient(180deg, var(--hrms-sidebar-bg) 0%, var(--hrms-sidebar-bg-deep) 100%) !important;
    box-shadow: none !important;
    border: none !important;
    outline: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-ring-offset-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
}

/* Collapsed icon rail: fixed width so icons are not clipped by padding/scroll */
@media (min-width: 1024px) {
    .fi-main-sidebar.fi-sidebar:not(.fi-sidebar-open) {
        width: var(--collapsed-sidebar-width, 4.5rem) !important;
        min-width: var(--collapsed-sidebar-width, 4.5rem) !important;
    }

    .fi-main-sidebar.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

    .fi-main-sidebar.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups {
        scrollbar-width: none;
        padding-bottom: 0.5rem;
    }

    .fi-main-sidebar.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups::-webkit-scrollbar,
    .fi-main-sidebar.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-nav-groups::-webkit-scrollbar-button {
        width: 0;
        height: 0;
        display: none;
    }

    .fi-main-sidebar.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-button {
        justify-content: center !important;
        padding-left: 0.45rem !important;
        padding-right: 0.45rem !important;
    }
}

.fi-sidebar.fi-sidebar-open,
.fi-sidebar.lg\:bg-transparent,
.dark .fi-sidebar,
.dark .fi-main-sidebar .fi-sidebar {
    background: linear-gradient(180deg, var(--hrms-sidebar-bg) 0%, var(--hrms-sidebar-bg-deep) 100%) !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
}

.fi-sidebar-header {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-ring-offset-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
}

/* Search stays fixed; only the menu list scrolls */
.fi-sidebar-nav {
    padding-top: 0.35rem !important;
    padding-bottom: 0.5rem !important;
    overflow: hidden !important;
    gap: 0.45rem !important;
}

.fi-sidebar-nav-search {
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    background: var(--hrms-sidebar-bg);
    padding-top: 0.25rem !important;
    padding-bottom: 0.45rem !important;
    margin-bottom: 0 !important;
}

.fi-sidebar-nav-search .fi-input-wrp {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
}

.fi-sidebar-nav-search .fi-input,
.fi-sidebar-nav-search input {
    color: #ffffff !important;
    background: transparent !important;
}

.fi-sidebar-nav-search .fi-input::placeholder,
.fi-sidebar-nav-search input::placeholder {
    color: rgba(226, 232, 240, 0.55) !important;
}

.fi-sidebar-nav-groups {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 0.5rem;
    gap: 0.35rem !important;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.fi-sidebar-nav-groups:hover,
.fi-sidebar-nav-groups:focus-within {
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

/* Thin overlay scrollbar — hide Windows arrow buttons */
.fi-sidebar-nav-groups::-webkit-scrollbar {
    width: 5px;
}

.fi-sidebar-nav-groups::-webkit-scrollbar-button {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.fi-sidebar-nav-groups::-webkit-scrollbar-track {
    background: transparent;
}

.fi-sidebar-nav-groups::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 9999px;
}

.fi-sidebar-nav-groups:hover::-webkit-scrollbar-thumb,
.fi-sidebar-nav-groups:focus-within::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
}

.fi-sidebar-nav-groups::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

.fi-sidebar-group {
    gap: 0.15rem !important;
}

.fi-sidebar-group-items {
    gap: 0.1rem !important;
}

.fi-sidebar-group-button,
.fi-sidebar-group > .fi-sidebar-group-button {
    padding-top: 0.35rem !important;
    padding-bottom: 0.25rem !important;
}

/* Expanded: labels must stay readable on navy */
.fi-sidebar.fi-sidebar-open .fi-sidebar-item-label {
    display: inline-block !important;
    color: var(--hrms-sidebar-text) !important;
    opacity: 1 !important;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* LMS: wider labels, allow a short wrap so menu names stay readable */
.fi-panel-lms .fi-sidebar.fi-sidebar-open {
    --lms-sidebar-label-max: 11.5rem;
}

.fi-panel-lms .fi-sidebar.fi-sidebar-open .fi-sidebar-item-button {
    align-items: flex-start !important;
    gap: 0.55rem !important;
}

.fi-panel-lms .fi-sidebar.fi-sidebar-open .fi-sidebar-item-icon {
    margin-top: 0.12rem !important;
    flex-shrink: 0 !important;
}

.fi-panel-lms .fi-sidebar.fi-sidebar-open .fi-sidebar-item-label {
    display: block !important;
    max-width: var(--lms-sidebar-label-max);
    white-space: normal !important;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.25 !important;
    word-break: break-word;
}

.fi-panel-lms .fi-sidebar.fi-sidebar-open .fi-sidebar-group-label {
    white-space: nowrap;
}

/* Collapse / expand chevron — blend into navy, no harsh outline */
.fi-sidebar-header .fi-icon-btn {
    color: rgba(226, 232, 240, 0.7) !important;
    background: transparent !important;
    box-shadow: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
}

.fi-sidebar-header .fi-icon-btn:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.fi-sidebar .fi-logo {
    height: auto !important;
}

.fi-sidebar .fi-logo,
.fi-sidebar .fi-logo .hrms-brand-text {
    color: #ffffff !important;
}

.fi-sidebar-group-label {
    color: var(--hrms-sidebar-muted) !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

.fi-sidebar-group-icon,
.fi-sidebar-group-collapse-button {
    color: var(--hrms-sidebar-muted) !important;
}

.fi-sidebar-item-button {
    border-radius: 0.55rem !important;
    padding: 0.38rem 0.65rem !important;
    min-height: 0 !important;
}

.fi-sidebar-item-button:hover,
.fi-sidebar-item-button:focus-visible {
    background: var(--hrms-sidebar-hover) !important;
}

.fi-sidebar-item-icon {
    width: 1.15rem !important;
    height: 1.15rem !important;
    color: var(--hrms-sidebar-icon) !important;
}

.fi-sidebar-item-label {
    color: var(--hrms-sidebar-text) !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-button,
.fi-sidebar-item-button[aria-current='page'] {
    background: var(--hrms-sidebar-active) !important;
    box-shadow: 0 8px 18px -8px rgba(48, 80, 144, 0.65) !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-button:hover,
.fi-sidebar-item.fi-active > .fi-sidebar-item-button:focus-visible {
    background: #243d72 !important;
}

.fi-sidebar-item.fi-active .fi-sidebar-item-icon,
.fi-sidebar-item.fi-active .fi-sidebar-item-label {
    color: #ffffff !important;
}

.fi-sidebar-item-grouped-border > div.bg-gray-300,
.fi-sidebar-item-grouped-border > div.dark\:bg-gray-600 {
    background-color: rgba(148, 163, 184, 0.35) !important;
}

/* ---------- Brand logo (Rockman Advanced Composites) ---------- */
.hrms-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    height: 100%;
    max-width: 100%;
}

.hrms-brand-logo-img {
    height: 2.35rem;
    width: auto;
    max-width: 12.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

.hrms-brand-header-bar {
    background-color: #344895 !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 0.65rem !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px -2px rgba(52, 72, 149, 0.45) !important;
}

.hrms-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, #F06020 0%, #305090 100%);
    box-shadow: 0 6px 14px -6px rgba(240, 96, 32, 0.7);
    flex-shrink: 0;
}

.hrms-brand-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    color: #ffffff !important;
    stroke: #ffffff !important;
}

.hrms-brand-text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    line-height: 1;
    color: #ffffff !important;
}

/* Dark mode: use lighter blue tint #7C8FE0 for links and active navigation */
.dark a:not([class*="bg-"]):not([class*="btn"]),
.dark .fi-link,
.dark .fi-tabs-item-active,
.dark [data-active="true"] {
    color: #7C8FE0 !important;
}

.hrms-brand-text-main {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hrms-brand-text-sub {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(226, 232, 240, 0.72);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9rem;
}

/* ---------- Panel switcher (HRMS | LMS) ---------- */
.hrms-panel-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.2rem;
    margin-inline-end: 0.35rem;
    border: 1px solid #e5ebf5;
    border-radius: 9999px;
    background: #f3f6fb;
    flex-shrink: 0;
}

.hrms-panel-switch__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.3rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #64748b;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.hrms-panel-switch__btn:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
}

.hrms-panel-switch__btn.is-active {
    color: #fff;
    background: #F06020;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

/* LMS panel uses brand blue for the active chip */
.fi-panel-lms .hrms-panel-switch__btn.is-active {
    background: #344895;
}

/* ---------- Topbar ---------- */
.fi-topbar {
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-ring-offset-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
}

.fi-topbar > nav,
.hrms-topbar-nav {
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
    border-top: 0 !important;
    border-bottom: 1px solid #e8eef7 !important;
    outline: none !important;
    --tw-ring-shadow: 0 0 #0000 !important;
    --tw-ring-offset-shadow: 0 0 #0000 !important;
    --tw-shadow: 0 0 #0000 !important;
    gap: 0.75rem !important;
}

/* Kill Livewire navigate progress bar if it sticks at the top */
#nprogress,
#nprogress .bar,
#nprogress .peg,
#nprogress .spinner {
    display: none !important;
}

.hrms-topbar-icon-btn {
    border-radius: 0.65rem !important;
    background: #f3f6fb !important;
}

.hrms-topbar-search-slot {
    margin-inline-start: 0.25rem;
    position: relative;
    z-index: 40;
}

.hrms-topbar-search-slot .fi-global-search {
    width: 100%;
    position: relative;
}

.hrms-topbar-search-slot .fi-global-search-field,
.hrms-topbar-search-slot .fi-input-wrp {
    width: 100% !important;
    max-width: 28rem;
    background: #f3f6fb !important;
    border: 1px solid #e5ebf5 !important;
    border-radius: 9999px !important;
    box-shadow: none !important;
}

.hrms-topbar-search-slot .fi-input-wrp:focus-within {
    border-color: #93c5fd !important;
    box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.12) !important;
    background: #ffffff !important;
}

.hrms-topbar-search-slot input {
    font-size: 0.875rem !important;
    color: #0f172a !important;
}

.hrms-topbar-search-slot input::placeholder {
    color: #94a3b8 !important;
}

/* Global search dropdown — keep it compact and under the search field */
.fi-topbar,
.hrms-topbar-nav {
    overflow: visible !important;
}

.fi-global-search-results-ctn {
    z-index: 60 !important;
    left: 0 !important;
    right: auto !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    width: min(22rem, calc(100vw - 2rem)) !important;
    max-width: 22rem !important;
    margin-top: 0.5rem !important;
    border: 1px solid #e8eef7 !important;
    border-radius: 0.9rem !important;
    box-shadow: 0 18px 40px -20px rgba(15, 41, 94, 0.35) !important;
    background: #ffffff !important;
}

.fi-global-search-no-results-message {
    color: #64748b !important;
    font-weight: 500 !important;
}

.fi-global-search-result-link,
.fi-global-search-result-group-label {
    color: #0f172a !important;
}

.hrms-topbar-notify .fi-icon-btn {
    border-radius: 9999px !important;
    background: #f3f6fb !important;
}

/* User menu: avatar + name */
.hrms-user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.25rem 0.55rem 0.25rem 0.25rem;
    border-radius: 9999px;
    border: 1px solid #e8eef7;
    background: #ffffff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.hrms-user-menu-trigger:hover {
    background: #f8fafc;
    border-color: #dbe4f2;
}

.hrms-user-menu-meta {
    display: none;
    align-items: center;
    gap: 0.35rem;
    padding-inline-end: 0.2rem;
}

@media (min-width: 640px) {
    .hrms-user-menu-meta {
        display: inline-flex;
    }
}

.hrms-user-menu-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hrms-user-menu-caret {
    color: #94a3b8;
}

/* Primary buttons match login blue */
.fi-btn-color-primary {
    box-shadow: 0 8px 18px -10px rgba(240, 96, 32, 0.55) !important;
}

/* Breadcrumbs quieter */
.fi-breadcrumbs {
    color: #94a3b8 !important;
}

/* Page title */
.fi-header-heading {
    letter-spacing: -0.02em;
    color: #0f172a !important;
}

/* ---------- Organization chart (tree mockup) ---------- */
.org-chart-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: none;
}

.org-chart-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100%;
}

.org-chart-search {
    position: relative;
    min-width: min(100%, 18rem);
    flex: 0 1 22rem;
    max-width: 28rem;
    width: 100%;
}

.org-chart-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}

.org-chart-search-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    padding: 0.65rem 1rem 0.65rem 2.35rem;
    font-size: 0.875rem;
    color: #0f172a;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.org-chart-search-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.15);
}

.org-chart-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: #fff;
    padding: 2rem;
    text-align: center;
    color: #64748b;
    font-size: 0.9rem;
}

.org-chart-canvas {
    overflow-x: auto;
    overflow-y: visible;
    padding: 0.75rem 0.25rem 1.75rem;
    width: 100%;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(15, 41, 94, 0.04), 0 8px 24px -12px rgba(15, 41, 94, 0.08);
}

.org-tree {
    display: block;
    width: 100%;
    min-width: 100%;
}

.org-tree-level {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 1.25rem 1.5rem;
    padding-top: 1.25rem;
    position: relative;
    list-style: none;
    margin: 0;
    padding-left: 0;
    width: 100%;
}

.org-tree-level--roots {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: flex-start;
    gap: 1.75rem 2rem;
    padding: 0.5rem 0.75rem;
}

.org-tree-level--roots::before {
    display: none;
}

.org-tree-level:not(.org-tree-level--roots)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    width: auto;
    height: 1px;
    background: #cbd5e1;
}

.org-tree-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 1.25rem;
    flex: 1 1 16rem;
    min-width: 15rem;
    max-width: 100%;
}

.org-tree-level--roots > .org-tree-item {
    padding-top: 0;
    flex: 1 1 18rem;
    min-width: 16rem;
    max-width: 28rem;
}

.org-tree-level--roots > .org-tree-item::before,
.org-tree-level--roots > .org-tree-item::after {
    display: none;
}

.org-tree-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 1.25rem;
    background: #cbd5e1;
}

.org-tree-children {
    width: 100%;
    max-width: 100%;
}

.org-tree-children .org-tree-level {
    justify-content: space-evenly;
}

.org-card {
    width: min(100%, 17rem);
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    border-radius: 0.9rem;
    padding: 0.9rem 1rem;
    border: 1px solid #dbe7fb;
    background: #ffffff;
    box-shadow: 0 8px 20px -16px rgba(15, 23, 42, 0.35);
    text-align: left;
    position: relative;
}

.org-card--clickable {
    cursor: pointer;
    user-select: none;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.org-card--clickable:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -14px rgba(15, 23, 42, 0.4);
}

.org-card--linkable {
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.org-card--linkable:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px -14px rgba(15, 23, 42, 0.4);
}

.org-card-link {
    display: flex;
    gap: 0.65rem;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

.org-card-link--disabled {
    pointer-events: none;
    cursor: default;
}

.org-card--root {
    width: min(100%, 18rem);
    background: linear-gradient(180deg, #F06020 0%, #C44A14 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 28px -16px rgba(240, 96, 32, 0.75);
}

.org-card--mid {
    background: #e8f1ff;
    border-color: #c9ddff;
}

.org-card--leaf {
    background: #fff;
    border-color: #e2e8f0;
}

.org-card-icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    display: grid;
    place-items: center;
    background: rgba(240, 96, 32, 0.12);
    color: #F06020;
}

.org-card--root .org-card-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.org-card--purple .org-card-icon { background: #f3e8ff; color: #7c3aed; }
.org-card--green .org-card-icon { background: #dcfce7; color: #15803d; }
.org-card--orange .org-card-icon { background: #ffedd5; color: #c2410c; }
.org-card--blue .org-card-icon { background: #dbeafe; color: #1d4ed8; }
.org-card--sky .org-card-icon { background: #e0f2fe; color: #0284c7; }
.org-card--amber .org-card-icon { background: #fef3c7; color: #d97706; }
.org-card--amber { border-color: #fde68a; background: #fffdf5; }
.org-card--root.org-card--purple .org-card-icon,
.org-card--root.org-card--green .org-card-icon,
.org-card--root.org-card--orange .org-card-icon,
.org-card--root.org-card--blue .org-card-icon,
.org-card--root.org-card--sky .org-card-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.org-card-body {
    min-width: 0;
    flex: 1;
}

.org-card-chevron {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    color: #94a3b8;
    align-self: flex-start;
    border: 0;
    background: transparent;
    padding: 0.15rem;
    border-radius: 0.4rem;
    cursor: pointer;
    line-height: 0;
}

.org-card-chevron:hover {
    background: rgba(15, 23, 42, 0.06);
}

.org-card--root .org-card-chevron {
    color: rgba(255, 255, 255, 0.85);
}

.org-card-chevron svg {
    transition: transform 0.15s ease;
}

.org-card-chevron svg.is-collapsed {
    transform: rotate(-90deg);
}

.org-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    color: #0f172a;
}

.org-card--root .org-card-title {
    color: #fff;
}

.org-card-name {
    margin-top: 0.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.org-card--root .org-card-name {
    color: rgba(255, 255, 255, 0.92);
}

.org-card-role {
    margin-top: 0.1rem;
    font-size: 0.72rem;
    color: #64748b;
}

.org-card--root .org-card-role {
    color: rgba(255, 255, 255, 0.78);
}

.org-card-badge {
    display: inline-flex;
    margin-top: 0.55rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.68rem;
    font-weight: 600;
}

.org-card--root .org-card-badge {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.org-card-badge--unassigned {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.org-card-badge--manager {
    background: #dbeafe;
    color: #305090;
    border: 1px solid #bfdbfe;
}

.org-chart-unassigned-section {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 1rem;
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    box-shadow: 0 4px 12px -8px rgba(15, 23, 42, 0.15);
}

.org-chart-unassigned-header {
    margin-bottom: 1.25rem;
}

.org-chart-unassigned-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.org-chart-unassigned-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.org-chart-unassigned-count {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 600;
}

.org-chart-unassigned-subtitle {
    margin-top: 0.25rem;
    font-size: 0.82rem;
    color: #64748b;
}

.org-chart-unassigned-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16.5rem, 1fr));
    gap: 1rem;
}

@media (max-width: 768px) {
    .org-chart-canvas {
        padding: 0.75rem 0.5rem 1.25rem;
    }

    .org-tree-level--roots {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .org-tree-level--roots > .org-tree-item,
    .org-tree-item {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .org-card,
    .org-card--root {
        width: 100%;
        max-width: none;
    }

    .org-tree-level {
        gap: 0.75rem;
        justify-content: center;
    }
}

/* ---------- Company Profile overview ---------- */
.cp-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cp-empty {
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: #fff;
    padding: 2rem;
    text-align: center;
    color: #64748b;
}

.cp-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: 1.1rem;
    border: 1px solid #dbe7fb;
    background:
        linear-gradient(110deg, rgba(255,255,255,0.96) 0%, rgba(232,241,255,0.92) 55%, rgba(219,234,254,0.75) 100%),
        radial-gradient(circle at 90% 20%, rgba(240, 96, 32,0.18), transparent 45%);
    box-shadow: 0 12px 28px -22px rgba(15, 23, 42, 0.4);
}

.cp-hero::after {
    content: "";
    position: absolute;
    right: -2rem;
    bottom: -3rem;
    width: 14rem;
    height: 14rem;
    border-radius: 2rem;
    background: linear-gradient(145deg, rgba(240, 96, 32,0.18), rgba(240, 96, 32,0.02));
    transform: rotate(18deg);
    pointer-events: none;
}

.cp-hero-main {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-width: min(100%, 42rem);
    flex: 1;
}

.cp-hero-logo {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #F06020;
    color: #fff;
    overflow: hidden;
    flex: 0 0 auto;
    box-shadow: 0 10px 20px -10px rgba(240, 96, 32, 0.8);
}

.cp-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cp-hero-name {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.cp-hero-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.cp-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    background: #e2e8f0;
    color: #475569;
}

.cp-status-badge.is-active {
    background: #dcfce7;
    color: #15803d;
}

.cp-hero-tagline {
    margin: 0.55rem 0 0;
    max-width: 42rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.5;
}

.cp-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
    margin-top: 0.95rem;
}

.cp-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 500;
}

.cp-meta-item svg {
    color: #F06020;
}

.cp-hero-actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
}

.cp-edit-btn,
.cp-mini-edit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
}

.cp-edit-btn {
    border-radius: 0.7rem;
    background: #F06020;
    color: #fff !important;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    box-shadow: 0 10px 20px -12px rgba(240, 96, 32, 0.9);
}

.cp-edit-btn:hover {
    background: #C44A14;
}

.cp-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.9rem;
}

.cp-stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 8px 18px -16px rgba(15, 23, 42, 0.35);
}

.cp-stat-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.65rem;
    display: grid;
    place-items: center;
    margin-bottom: 0.7rem;
}

.cp-stat-icon--blue { background: #dbeafe; color: #1d4ed8; }
.cp-stat-icon--indigo { background: #e0e7ff; color: #4338ca; }
.cp-stat-icon--sky { background: #e0f2fe; color: #0284c7; }
.cp-stat-icon--orange { background: #ffedd5; color: #c2410c; }
.cp-stat-icon--green { background: #dcfce7; color: #15803d; }

.cp-stat-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.cp-stat-value {
    margin-top: 0.25rem;
    font-size: 1.55rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.cp-stat-value.is-green {
    color: #16a34a;
}

.cp-stat-hint {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.cp-stat-hint.is-up,
.cp-stat-hint.is-green {
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.cp-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #22c55e;
    display: inline-block;
}

.cp-details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}

.cp-detail-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 1.1rem 1.15rem;
    box-shadow: 0 8px 18px -16px rgba(15, 23, 42, 0.35);
    min-width: 0;
}

.cp-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.cp-detail-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #0f172a;
}

.cp-detail-icon {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 0.55rem;
    display: grid;
    place-items: center;
    background: #e8f1ff;
    color: #F06020;
}

.cp-mini-edit {
    color: #F06020;
    font-size: 0.78rem;
}

.cp-kv {
    display: grid;
    gap: 0.75rem;
}

.cp-kv > div {
    display: grid;
    grid-template-columns: 7.25rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
}

.cp-kv--stacked > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.25rem;
}

.cp-kv dt {
    margin: 0;
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 600;
}

.cp-kv dd {
    margin: 0;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cp-link {
    color: #F06020 !important;
    text-decoration: none;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.cp-link:hover {
    text-decoration: underline;
}

@media (max-width: 1100px) {
    .cp-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cp-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .cp-stats {
        grid-template-columns: 1fr;
    }

    .cp-kv > div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* ---------- Missing Timesheets page ---------- */
.mt-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mt-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.35rem 1.5rem;
    border-radius: 1.1rem;
    border: 1px solid #dbe7fb;
    background:
        linear-gradient(110deg, #ffffff 0%, #eef5ff 58%, #e3efff 100%);
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.35);
}

.mt-hero-main {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-width: 0;
}

.mt-hero-icon {
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 0.95rem;
    display: grid;
    place-items: center;
    background: #F06020;
    color: #fff;
    flex: 0 0 auto;
    box-shadow: 0 10px 18px -10px rgba(240, 96, 32, 0.8);
}

.mt-hero-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.mt-hero-text {
    margin: 0.45rem 0 0;
    max-width: 42rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.55;
}

.mt-hero-art {
    display: none;
    position: relative;
    width: 7.5rem;
    height: 5.5rem;
    flex: 0 0 auto;
}

@media (min-width: 900px) {
    .mt-hero-art {
        display: block;
    }
}

.mt-hero-calendar {
    position: absolute;
    right: 0.4rem;
    top: 0.3rem;
    width: 4.6rem;
    height: 4.6rem;
    border-radius: 1rem;
    display: grid;
    place-items: center;
    background: #dbeafe;
    color: #F06020;
    box-shadow: 0 10px 20px -14px rgba(240, 96, 32, 0.55);
}

.mt-hero-clock {
    position: absolute;
    right: -0.15rem;
    bottom: 0.15rem;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #F06020;
    color: #fff;
    box-shadow: 0 8px 14px -8px rgba(240, 96, 32, 0.9);
}

.mt-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.05rem;
    box-shadow: 0 10px 24px -18px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.mt-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #eef2f7;
}

.mt-card-title {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 700;
    color: #0f172a;
}

.mt-card-title-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
    display: grid;
    place-items: center;
    background: #e8f1ff;
    color: #F06020;
}

.mt-total-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    border-radius: 999px;
    background: #e8f1ff;
    color: #1e3a8a;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.45rem 0.35rem 0.8rem;
}

.mt-total-count {
    min-width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #F06020;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0 0.35rem;
}

.mt-empty {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 1.5rem 1.15rem;
    color: #15803d;
    font-size: 0.92rem;
    font-weight: 600;
}

.mt-table-wrap {
    overflow-x: auto;
}

.mt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.mt-table thead th {
    background: #f3f8ff;
    color: #334155;
    font-weight: 700;
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.mt-table tbody td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
    color: #0f172a;
}

.mt-table tbody tr:last-child td {
    border-bottom: 0;
}

.mt-col-index {
    width: 3rem;
    color: #64748b !important;
    font-weight: 600;
}

.mt-col-count {
    width: 5.5rem;
    text-align: center !important;
}

.mt-employee {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.mt-avatar,
.mt-avatar-img {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    flex: 0 0 auto;
}

.mt-avatar {
    display: inline-grid;
    place-items: center;
    background: #F06020;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
}

.mt-avatar-img {
    object-fit: cover;
}

.mt-employee-name {
    font-weight: 700;
    color: #0f172a;
}

.mt-department {
    color: #475569 !important;
    font-weight: 600;
}

.mt-dates {
    color: #334155 !important;
    line-height: 1.5;
    max-width: 28rem;
}

.mt-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    border-radius: 999px;
    background: #e8f1ff;
    color: #1d4ed8;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.2rem 0.55rem;
}

@media (max-width: 768px) {
    .mt-hero {
        padding: 1.1rem;
    }

    .mt-dates {
        max-width: 16rem;
    }
}

/* Keep main column tall so the credit footer stays visible on short pages */
.fi-main-ctn {
    display: flex !important;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.fi-main-ctn > .fi-main {
    flex: 1 0 auto;
}

/* EFSOULS credit footer */
.hrms-credit-footer {
    width: 100%;
    margin-top: auto;
    flex-shrink: 0;
    text-align: center;
    padding: 0.95rem 1.25rem 1.2rem;
    border-top: 1px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.92);
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    z-index: 10;
}

.hrms-credit-footer__text {
    margin: 0;
    line-height: 1.5;
}

.hrms-credit-footer .hrms-credit-link,
.hrms-credit-footer .hrms-credit-link:hover,
.hrms-credit-footer .hrms-credit-link:focus,
.hrms-credit-footer .hrms-credit-link:visited,
.hrms-credit-link,
.hrms-credit-link:hover,
.hrms-credit-link:focus,
.hrms-credit-link:visited {
    color: #0f295e;
    font-weight: 700;
    text-decoration: none !important;
    cursor: pointer;
}

.hrms-credit-footer .hrms-credit-link:hover,
.hrms-credit-link:hover {
    color: #F06020;
}

/* ---------- HRMS Reports & Analytics Design System ---------- */
.ar-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
}

.ar-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ar-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}

.ar-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.4;
}

.ar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.ar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    text-decoration: none !important;
}

.ar-btn-primary {
    background: #F06020 !important;
    color: #ffffff !important;
}

.ar-btn-primary:hover {
    background: #C44A14 !important;
}

.ar-btn-secondary {
    background: #ffffff !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

.ar-btn-secondary:hover {
    background: #f8fafc !important;
    border-color: #94a3b8 !important;
}

/* ---------- Filters Bar ---------- */
.ar-filters-card {
    background: #ffffff;
    padding: 1.15rem 1.35rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative !important;
    z-index: 30 !important;
}

.ar-filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.85rem;
    align-items: flex-end;
}

.ar-filter-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.ar-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    text-transform: capitalize;
}

/* Clean, standard select input that overrides all repeating browser/Tailwind chevron arrows */
select.ar-select,
.ar-select {
    width: 100% !important;
    height: 2.5rem !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding: 0.45rem 2.25rem 0.45rem 0.75rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    outline: none !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
    background-position: right 0.65rem center !important;
    background-repeat: no-repeat !important;
    background-size: 1.15rem 1.15rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    box-sizing: border-box !important;
}

select.ar-select:focus,
.ar-select:focus {
    border-color: #F06020 !important;
    box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.15) !important;
}

/* Custom Select that opens exclusively DOWNWARDS */
.ar-custom-select-wrap {
    position: relative !important;
    width: 100% !important;
}

.ar-custom-select-btn {
    width: 100% !important;
    height: 2.5rem !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    padding: 0.45rem 0.85rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    outline: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

.ar-custom-select-btn:hover {
    border-color: #94a3b8 !important;
}

.ar-custom-select-btn--active,
.ar-custom-select-btn:focus {
    border-color: #F06020 !important;
    box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.15) !important;
}

.ar-custom-select-label {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    flex: 1 1 auto !important;
}

.ar-custom-select-chevron {
    width: 1.15rem !important;
    height: 1.15rem !important;
    color: #64748b !important;
    flex-shrink: 0 !important;
    transition: transform 0.15s ease !important;
}

.ar-chevron--rotated {
    transform: rotate(180deg) !important;
}

.ar-custom-select-menu {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-width: 200px !important;
    max-height: 240px !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
    z-index: 9999 !important;
    padding: 0.25rem 0 !important;
    box-sizing: border-box !important;
}

.ar-custom-select-menu::-webkit-scrollbar {
    width: 6px !important;
}

.ar-custom-select-menu::-webkit-scrollbar-track {
    background: transparent !important;
}

.ar-custom-select-menu::-webkit-scrollbar-thumb {
    background-color: #cbd5e1 !important;
    border-radius: 9999px !important;
}

.ar-custom-select-menu::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8 !important;
}

[x-cloak] {
    display: none !important;
}

.ar-custom-select-option {
    padding: 0.55rem 0.85rem !important;
    font-size: 0.84rem !important;
    color: #334155 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: background-color 0.1s ease !important;
}

.ar-custom-select-option:hover {
    background-color: #f1f5f9 !important;
    color: #F06020 !important;
}

.ar-custom-select-option.is-selected {
    background-color: #eff6ff !important;
    color: #F06020 !important;
    font-weight: 600 !important;
}

.ar-custom-select-check {
    font-size: 0.85rem !important;
    color: #F06020 !important;
    font-weight: 700 !important;
}

.ar-anim-enter { transition: all 0.12s ease-out !important; }
.ar-anim-start { opacity: 0 !important; transform: translateY(-4px) !important; }
.ar-anim-end { opacity: 1 !important; transform: translateY(0) !important; }
.ar-anim-leave { transition: all 0.08s ease-in !important; }

input.ar-input,
.ar-input {
    width: 100% !important;
    height: 2.5rem !important;
    font-size: 0.85rem !important;
    padding: 0.45rem 0.75rem !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 0.5rem !important;
    background-color: #ffffff !important;
    color: #1e293b !important;
    outline: none !important;
    box-sizing: border-box !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

input.ar-input:focus,
.ar-input:focus {
    border-color: #F06020 !important;
    box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.15) !important;
}

/* ---------- KPI Stat Cards ---------- */
.ar-kpis-grid,
.ar-stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
    gap: 0.85rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
}

.ar-kpi-card,
.ar-stat-card {
    background: #ffffff !important;
    padding: 1.1rem 1.25rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 0.35rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.ar-kpi-card:hover,
.ar-stat-card:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

.ar-kpi-label,
.ar-stat-label {
    font-size: 0.73rem !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    line-height: 1.2 !important;
}

.ar-kpi-value,
.ar-stat-value {
    font-size: 1.55rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    color: #0f172a !important;
}

.ar-kpi-hint {
    font-size: 0.73rem !important;
    color: #94a3b8 !important;
    line-height: 1.3 !important;
}

/* ---------- MIS split panels & section heads ---------- */
.ar-split-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    gap: 1.25rem !important;
    width: 100% !important;
    margin-bottom: 1.25rem !important;
}

.ar-section-head {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 0.75rem !important;
    padding: 1rem 1.25rem 0.85rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.ar-section-title {
    margin: 0 !important;
    font-size: 0.92rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    letter-spacing: -0.01em !important;
}

.ar-section-desc {
    margin: 0.2rem 0 0 !important;
    font-size: 0.75rem !important;
    color: #64748b !important;
    line-height: 1.35 !important;
}

.ar-section-meta {
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 9999px !important;
    padding: 0.35rem 0.75rem !important;
    white-space: nowrap !important;
}

.dark .ar-section-head {
    border-bottom-color: #1e293b !important;
}

.dark .ar-section-title {
    color: #f1f5f9 !important;
}

.dark .ar-section-meta {
    background: #0f172a !important;
    border-color: #334155 !important;
    color: #cbd5e1 !important;
}

/* ---------- Tables & Wrappers ---------- */
.ar-table-wrapper,
.ar-table-card {
    background: #ffffff !important;
    border-radius: 0.85rem !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
}

.ar-scroll-container,
.ar-scroll-wrap {
    overflow-x: auto !important;
    max-width: 100% !important;
    -webkit-overflow-scrolling: touch !important;
}

.ar-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 0.82rem !important;
    text-align: left !important;
}

.ar-th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    padding: 0.75rem 0.85rem !important;
    border-bottom: 1px solid #e2e8f0 !important;
    white-space: nowrap !important;
}

.ar-td {
    padding: 0.75rem 0.85rem !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155 !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

.ar-table tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* ---------- Employee Column & Avatar ---------- */
.ar-emp-cell {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
}

.ar-emp-avatar {
    width: 2.1rem !important;
    height: 2.1rem !important;
    border-radius: 9999px !important;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%) !important;
    color: #3730a3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.78rem !important;
    font-weight: 700 !important;
    flex-shrink: 0 !important;
}

.ar-emp-meta {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.25 !important;
}

.ar-emp-name {
    font-weight: 600 !important;
    color: #0f172a !important;
    font-size: 0.82rem !important;
}

.ar-emp-sub {
    font-size: 0.7rem !important;
    color: #64748b !important;
}

/* Sticky Columns for Large Matrix Tables */
.ar-sticky-col-1,
.ar-th-sticky,
.ar-td-sticky {
    position: sticky !important;
    left: 0 !important;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
    box-sizing: border-box !important;
    z-index: 12 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

th.ar-sticky-col-1,
th.ar-th-sticky {
    background: #f8fafc !important;
    z-index: 22 !important;
}

.ar-sticky-col-2 {
    position: sticky !important;
    left: 250px !important;
    width: 140px !important;
    min-width: 140px !important;
    max-width: 140px !important;
    box-sizing: border-box !important;
    z-index: 11 !important;
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 3px 0 6px -2px rgba(0, 0, 0, 0.09) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

th.ar-sticky-col-2 {
    background: #f8fafc !important;
    z-index: 21 !important;
}

.ar-emp-cell {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    max-width: 225px !important;
    width: 100% !important;
    overflow: hidden !important;
}

.ar-emp-meta {
    display: flex !important;
    flex-direction: column !important;
    line-height: 1.25 !important;
    max-width: 175px !important;
    min-width: 0 !important;
    overflow: hidden !important;
}

.ar-emp-name {
    font-weight: 600 !important;
    color: #0f172a !important;
    font-size: 0.82rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ar-emp-sub {
    font-size: 0.7rem !important;
    color: #64748b !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ar-th-emp,
.ar-td-emp {
    min-width: 15rem !important;
    max-width: 15rem !important;
    width: 15rem !important;
    padding: 0.65rem 0.85rem !important;
    box-shadow: none !important;
}

.ar-th-dept,
.ar-td-dept {
    position: sticky !important;
    left: 15rem !important;
    min-width: 9rem !important;
    max-width: 9rem !important;
    width: 9rem !important;
    padding: 0.65rem 0.85rem !important;
    z-index: 11 !important;
    background: #ffffff !important;
    border-right: 1px solid #e2e8f0 !important;
    box-shadow: 3px 0 6px -2px rgba(0, 0, 0, 0.09) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

th.ar-th-dept {
    background: #f8fafc !important;
    z-index: 21 !important;
}

.ar-emp-info {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.15rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    line-height: 1.25 !important;
}

.ar-emp-code {
    font-size: 0.7rem !important;
    color: #64748b !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* ---------- Attendance Register Day Cells & Badges ---------- */
.ar-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    background: #ffffff;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
}

.ar-legend-title {
    font-weight: 700;
    color: #334155;
    margin-right: 0.25rem;
}

.ar-legend-pill {
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.72rem;
}

.ar-pill--P, .ar-badge--P { background: #dcfce7 !important; color: #166534 !important; }
.ar-pill--L, .ar-badge--L { background: #fef3c7 !important; color: #92400e !important; }
.ar-pill--HD, .ar-badge--HD { background: #f3e8ff !important; color: #6b21a8 !important; }
.ar-pill--A, .ar-badge--A { background: #fee2e2 !important; color: #991b1b !important; }
.ar-pill--LV, .ar-badge--LV { background: #dbeafe !important; color: #305090 !important; }
.ar-pill--WO, .ar-badge--WO { background: #f1f5f9 !important; color: #475569 !important; }
.ar-pill--H, .ar-badge--H { background: #e0f2fe !important; color: #0369a1 !important; }
.ar-badge--— { background: transparent !important; color: #94a3b8 !important; }

.ar-badge {
    display: inline-block;
    padding: 0.18rem 0.35rem;
    border-radius: 0.35rem;
    font-weight: 700;
    font-size: 0.68rem;
    min-width: 1.65rem;
    text-align: center;
    cursor: default;
}

.ar-th-day {
    padding: 0.4rem 0.25rem !important;
    min-width: 2.15rem !important;
    border-left: 1px solid #f1f5f9 !important;
    text-align: center !important;
}

.ar-th-day-num {
    font-size: 0.75rem;
    font-weight: 700;
    color: #1e293b;
}

.ar-th-day-name {
    font-size: 0.65rem;
    color: #64748b;
    text-transform: uppercase;
}

.ar-th--weekend { background: #f1f5f9 !important; }
.ar-th--holiday { background: #e0f2fe !important; }

.ar-td-cell {
    padding: 0.35rem 0.15rem !important;
    border-left: 1px solid #f1f5f9 !important;
    text-align: center !important;
}

.ar-td--weekend { background: #fcfdfe !important; }
.ar-td--holiday { background: #f0f9ff !important; }

/* ---------- Attendance Register Summary & Total Columns ---------- */
.ar-th-total {
    min-width: 2.85rem !important;
    padding: 0.6rem 0.55rem !important;
    text-align: center !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    border-left: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
    color: #475569 !important;
    white-space: nowrap !important;
}

.ar-th-total-first {
    border-left: 2px solid #cbd5e1 !important;
}

.ar-th-hours {
    min-width: 7.25rem !important;
    padding: 0.6rem 0.85rem !important;
    text-align: right !important;
    color: #1e293b !important;
}

.ar-td-total {
    min-width: 2.85rem !important;
    padding: 0.55rem 0.55rem !important;
    text-align: center !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    font-variant-numeric: tabular-nums !important;
    border-left: 1px solid #f1f5f9 !important;
    background-color: #ffffff !important;
    white-space: nowrap !important;
}

.ar-td-total-first {
    border-left: 2px solid #cbd5e1 !important;
}

.ar-td-hours {
    min-width: 7.25rem !important;
    padding: 0.55rem 0.85rem !important;
    text-align: right !important;
    font-size: 0.8rem !important;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
    white-space: nowrap !important;
}

.ar-empty {
    padding: 3.5rem 1.5rem !important;
    text-align: center !important;
    background: #ffffff !important;
    border-radius: 0.85rem !important;
    border: 1px dashed #cbd5e1 !important;
    margin: 1.25rem 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.ar-empty svg,
.ar-empty .ar-empty-icon,
svg.ar-empty-icon {
    width: 3.25rem !important;
    height: 3.25rem !important;
    min-width: 3.25rem !important;
    min-height: 3.25rem !important;
    max-width: 3.25rem !important;
    max-height: 3.25rem !important;
    margin: 0 auto 0.75rem auto !important;
    display: block !important;
    color: #94a3b8 !important;
    flex-shrink: 0 !important;
}

.ar-empty-title {
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-bottom: 0.35rem !important;
}

.ar-empty-desc {
    font-size: 0.82rem !important;
    color: #64748b !important;
    max-width: 28rem !important;
    margin: 0 auto !important;
    line-height: 1.4 !important;
}

/* ---------- Appraisal Rating Tier Distribution ---------- */
.ar-rating-box {
    background: #ffffff !important;
    border-radius: 0.85rem !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    padding: 1.15rem 1.25rem !important;
    margin-bottom: 1.25rem !important;
    width: 100% !important;
}

.ar-rating-box-hdr {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 0.75rem !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

.ar-rating-box-title {
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #475569 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
}

.ar-rating-box-meta {
    font-size: 0.74rem !important;
    color: #64748b !important;
    font-weight: 500 !important;
}

.ar-rating-progress {
    height: 8px !important;
    width: 100% !important;
    background: #f1f5f9 !important;
    border-radius: 9999px !important;
    overflow: hidden !important;
    display: flex !important;
    margin-bottom: 0.95rem !important;
}

.ar-prog-seg {
    height: 100% !important;
    transition: width 0.3s ease !important;
}

.ar-prog-5 { background: #10b981 !important; }
.ar-prog-4 { background: #0284c7 !important; }
.ar-prog-3 { background: #f59e0b !important; }
.ar-prog-below-3 { background: #f43f5e !important; }
.ar-prog-unrated { background: #94a3b8 !important; }

.ar-rating-grid {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
    width: 100% !important;
}

.ar-rating-card {
    padding: 0.85rem 1rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 0.35rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease !important;
}

.ar-rating-card:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
}

.ar-rc-label {
    font-size: 0.74rem !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.35rem !important;
    line-height: 1.2 !important;
}

.ar-rc-count {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    font-variant-numeric: tabular-nums !important;
}

.ar-rc-share {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    opacity: 0.85 !important;
    line-height: 1.2 !important;
}

/* Tier Specific Color Accents */
.ar-rc-5 {
    background-color: #f0fdf4 !important;
    border-color: #bbf7d0 !important;
    color: #166534 !important;
}
.ar-rc-5 .ar-rc-count { color: #15803d !important; }

.ar-rc-4 {
    background-color: #f0f9ff !important;
    border-color: #bae6fd !important;
    color: #0369a1 !important;
}
.ar-rc-4 .ar-rc-count { color: #0284c7 !important; }

.ar-rc-3 {
    background-color: #fffbeb !important;
    border-color: #fde68a !important;
    color: #92400e !important;
}
.ar-rc-3 .ar-rc-count { color: #d97706 !important; }

.ar-rc-below-3 {
    background-color: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #9f1239 !important;
}
.ar-rc-below-3 .ar-rc-count { color: #e11d48 !important; }

.ar-rc-unrated {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #475569 !important;
}
.ar-rc-unrated .ar-rc-count { color: #334155 !important; }

@media (max-width: 900px) {
    .ar-rating-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 540px) {
    .ar-rating-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ---------- Dark Mode Overrides ---------- */
.dark .ar-toolbar,
.dark .ar-filters-card,
.dark .ar-kpi-card,
.dark .ar-stat-card,
.dark .ar-table-wrapper,
.dark .ar-table-card,
.dark .ar-legend,
.dark .ar-rating-box,
.dark .ar-empty {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}

.dark .ar-rating-box-title {
    color: #94a3b8 !important;
}

.dark .ar-rating-box-meta {
    color: #64748b !important;
}

.dark .ar-rating-progress {
    background-color: #1e293b !important;
}

.dark .ar-rc-5 {
    background-color: rgba(6, 78, 59, 0.25) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
    color: #6ee7b7 !important;
}
.dark .ar-rc-5 .ar-rc-count { color: #34d399 !important; }

.dark .ar-rc-4 {
    background-color: rgba(12, 74, 110, 0.25) !important;
    border-color: rgba(14, 165, 233, 0.3) !important;
    color: #7dd3fc !important;
}
.dark .ar-rc-4 .ar-rc-count { color: #38bdf8 !important; }

.dark .ar-rc-3 {
    background-color: rgba(120, 53, 15, 0.25) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fcd34d !important;
}
.dark .ar-rc-3 .ar-rc-count { color: #fbbf24 !important; }

.dark .ar-rc-below-3 {
    background-color: rgba(136, 19, 55, 0.25) !important;
    border-color: rgba(244, 63, 94, 0.3) !important;
    color: #fda4af !important;
}
.dark .ar-rc-below-3 .ar-rc-count { color: #fb7185 !important; }

.dark .ar-rc-unrated {
    background-color: rgba(30, 41, 59, 0.4) !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
    color: #94a3b8 !important;
}
.dark .ar-rc-unrated .ar-rc-count { color: #cbd5e1 !important; }

.dark .ar-title,
.dark .ar-kpi-value,
.dark .ar-stat-value,
.dark .ar-emp-name,
.dark .ar-empty-title {
    color: #f1f5f9 !important;
}

.dark select.ar-select,
.dark .ar-select,
.dark input.ar-input,
.dark .ar-input {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark .ar-custom-select-btn {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark .ar-custom-select-btn:hover {
    border-color: #64748b !important;
}

.dark .ar-custom-select-btn--active,
.dark .ar-custom-select-btn:focus {
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2) !important;
}

.dark .ar-custom-select-menu {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4) !important;
}

.dark .ar-custom-select-menu::-webkit-scrollbar-thumb {
    background-color: #475569 !important;
}

.dark .ar-custom-select-menu::-webkit-scrollbar-thumb:hover {
    background-color: #64748b !important;
}

.dark .ar-custom-select-option {
    color: #cbd5e1 !important;
}

.dark .ar-custom-select-option:hover {
    background-color: #1e293b !important;
    color: #38bdf8 !important;
}

.dark .ar-custom-select-option.is-selected {
    background-color: #1e293b !important;
    color: #38bdf8 !important;
}

.dark .ar-custom-select-check {
    color: #38bdf8 !important;
}

.dark .ar-th {
    background-color: #1e293b !important;
    color: #94a3b8 !important;
    border-color: #334155 !important;
}

.dark .ar-td {
    color: #cbd5e1 !important;
    border-color: #1e293b !important;
}

.dark .ar-table tbody tr:hover td {
    background-color: #1e293b/50 !important;
}

.dark .ar-sticky-col-1,
.dark .ar-sticky-col-2,
.dark .ar-th-sticky,
.dark .ar-td-sticky,
.dark .ar-td-dept {
    background-color: #0f172a !important;
}

.dark th.ar-sticky-col-1,
.dark th.ar-sticky-col-2,
.dark th.ar-th-sticky,
.dark th.ar-th-dept {
    background-color: #1e293b !important;
}

.dark .ar-empty svg,
.dark .ar-empty .ar-empty-icon {
    color: #64748b !important;
}

.dark .ar-th-total {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    color: #94a3b8 !important;
}

.dark .ar-th-total-first,
.dark .ar-td-total-first {
    border-left-color: #475569 !important;
}

.dark .ar-td-total {
    background-color: #0f172a !important;
    border-color: #1e293b !important;
}

.dark .ar-td-hours {
    color: #f1f5f9 !important;
}

/* ---------- Print Styles ---------- */
@media print {
    @page {
        size: landscape;
        margin: 5mm;
    }

    html, body, .fi-body, .fi-layout, .fi-main-ctn, .fi-main, .fi-page, .fi-page-content, .ar-container {
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        position: static !important;
        background: #ffffff !important;
        color: #000000 !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .ar-toolbar,
    .ar-filters-card,
    .ar-legend,
    .fi-topbar,
    .fi-sidebar,
    .fi-header,
    .fi-sidebar-close-overlay {
        display: none !important;
    }

    .ar-table-card,
    .ar-table-wrapper {
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        overflow: visible !important;
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        page-break-inside: auto !important;
    }

    .ar-scroll-container,
    .ar-scroll-wrap {
        overflow: visible !important;
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
    }

    .ar-table {
        width: 100% !important;
        font-size: 6.5pt !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
    }

    .ar-table th,
    .ar-table td {
        border: 0.5pt solid #cbd5e1 !important;
        padding: 2.5pt 2pt !important;
    }

    .ar-sticky-col-1,
    .ar-sticky-col-2,
    .ar-th-sticky,
    .ar-td-sticky {
        position: static !important;
        box-shadow: none !important;
    }

    .ar-stat-card,
    .ar-kpi-card {
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
    }
}

/* ==========================================================================
   AI Assistant Widget & Side Panel
   ========================================================================== */

.ai-assistant-root {
    font-family: inherit;
}

/* Floating Launcher Trigger */
.ai-launcher-btn {
    position: fixed !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    z-index: 9998 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.6rem !important;
    padding: 0.65rem 1.15rem 0.65rem 0.85rem !important;
    background: linear-gradient(135deg, #F06020 0%, #305090 100%) !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 9999px !important;
    box-shadow: 0 8px 25px -4px rgba(240, 96, 32, 0.45), 0 4px 10px rgba(0, 0, 0, 0.08) !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ai-launcher-btn:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 12px 28px -4px rgba(240, 96, 32, 0.55), 0 6px 12px rgba(0, 0, 0, 0.1) !important;
}

.ai-launcher-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ai-launcher-text {
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
}

.ai-launcher-ping {
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    width: 10px !important;
    height: 10px !important;
    background-color: #10b981 !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
}

/* Side Panel Drawer */
.ai-chat-panel {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 380px !important;
    max-width: 100vw !important;
    height: 100vh !important;
    background: #ffffff !important;
    border-left: 1px solid #e2e8f0 !important;
    box-shadow: -8px 0 35px rgba(0, 0, 0, 0.08) !important;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.ai-chat-panel[style*="display: none"] {
    display: none !important;
}


.ai-panel-enter {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.ai-panel-enter-start {
    transform: translateX(100%) !important;
}
.ai-panel-enter-end {
    transform: translateX(0) !important;
}
.ai-panel-leave {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Header */
.ai-chat-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 1rem 1.25rem !important;
    background: #ffffff !important;
    border-bottom: 1px solid #f1f5f9 !important;
    flex-shrink: 0 !important;
}

.ai-chat-header-info {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
}

.ai-bot-avatar {
    width: 2.35rem !important;
    height: 2.35rem !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #F06020 0%, #2563eb 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(240, 96, 32, 0.3) !important;
}

.ai-chat-title {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 0 !important;
    line-height: 1.2 !important;
}

.ai-chat-subtitle {
    font-size: 0.75rem !important;
    color: #64748b !important;
    margin: 0.15rem 0 0 0 !important;
}

.ai-chat-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
}

.ai-ctrl-btn {
    width: 1.85rem !important;
    height: 1.85rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.375rem !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    transition: background-color 0.15s ease, color 0.15s ease !important;
}

.ai-ctrl-btn:hover {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
}

/* Chat Body */
.ai-chat-content-wrap {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
}

.ai-chat-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    padding: 1.15rem 1.25rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.95rem !important;
    background: #fcfdfe !important;
}

.ai-chat-body::-webkit-scrollbar {
    width: 5px !important;
}
.ai-chat-body::-webkit-scrollbar-thumb {
    background: #cbd5e1 !important;
    border-radius: 9999px !important;
}

/* Message Rows */
.ai-msg-row {
    display: flex !important;
    gap: 0.65rem !important;
    max-width: 92% !important;
}

.ai-msg-row--bot {
    align-self: flex-start !important;
}

.ai-msg-row--user {
    align-self: flex-end !important;
    flex-direction: row-reverse !important;
}

.ai-msg-avatar {
    width: 1.85rem !important;
    height: 1.85rem !important;
    border-radius: 50% !important;
    background: #3b82f6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin-top: 0.2rem !important;
}

.ai-msg-bubble-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.25rem !important;
}

.ai-msg-bubble {
    font-size: 0.835rem !important;
    line-height: 1.55 !important;
    padding: 0.75rem 0.95rem !important;
    word-break: break-word !important;
}

.ai-bubble--bot {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #1e293b !important;
    border-radius: 1rem 1rem 1rem 0.25rem !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.ai-bubble--user {
    background: #F06020 !important;
    color: #ffffff !important;
    border-radius: 1rem 1rem 0.25rem 1rem !important;
}

.ai-msg-time {
    font-size: 0.675rem !important;
    color: #94a3b8 !important;
    padding: 0 0.25rem !important;
}
.ai-msg-row--user .ai-msg-time {
    text-align: right !important;
}

/* Rich content inside bot bubble */
.ai-list {
    margin: 0.4rem 0 !important;
    padding-left: 1.15rem !important;
    list-style-type: disc !important;
}
.ai-list li {
    margin-bottom: 0.25rem !important;
}

.ai-numbered-list {
    margin: 0.4rem 0 !important;
    padding-left: 1.15rem !important;
    list-style-type: decimal !important;
}
.ai-numbered-list li {
    margin-bottom: 0.35rem !important;
}

.ai-link {
    color: #F06020 !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}
.ai-link:hover {
    text-decoration: underline !important;
}

.ai-action-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    background: #F06020 !important;
    color: #ffffff !important;
    padding: 0.35rem 0.75rem !important;
    border-radius: 0.45rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    margin-top: 0.5rem !important;
    transition: background-color 0.15s ease !important;
}
.ai-action-btn:hover {
    background: #305090 !important;
    color: #ffffff !important;
}
.ai-action-btn--secondary {
    background: #f1f5f9 !important;
    color: #1e293b !important;
    border: 1px solid #cbd5e1 !important;
}
.ai-action-btn--secondary:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.ai-btn-row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    margin-top: 0.4rem !important;
}

.ai-badge {
    display: inline-block !important;
    padding: 0.15rem 0.45rem !important;
    border-radius: 0.25rem !important;
    font-size: 0.7rem !important;
    font-weight: 700 !important;
}
.ai-badge--success { background: #dcfce7 !important; color: #15803d !important; }
.ai-badge--warning { background: #fef3c7 !important; color: #b45309 !important; }

.ai-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
    margin: 0.5rem 0 !important;
}
.ai-stat-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.25rem !important;
    text-align: center !important;
}
.ai-stat-num {
    display: block !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
}
.ai-stat-lbl {
    display: block !important;
    font-size: 0.675rem !important;
    color: #64748b !important;
    font-weight: 600 !important;
}

/* Typing Indicator */
.ai-typing-bubble {
    display: flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0.65rem 0.85rem !important;
}
.ai-dot {
    width: 6px !important;
    height: 6px !important;
    background: #94a3b8 !important;
    border-radius: 50% !important;
    animation: ai-pulse 1.4s infinite ease-in-out both !important;
}
.ai-dot:nth-child(1) { animation-delay: -0.32s !important; }
.ai-dot:nth-child(2) { animation-delay: -0.16s !important; }
@keyframes ai-pulse {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

/* Suggestions Chips */
.ai-suggestions-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem !important;
    margin-top: 0.25rem !important;
}

.ai-chip-btn {
    display: flex !important;
    align-items: center !important;
    gap: 0.55rem !important;
    width: 100% !important;
    background: #ffffff !important;
    border: 1px solid #dbeafe !important;
    color: #1d4ed8 !important;
    padding: 0.5rem 0.85rem !important;
    border-radius: 0.65rem !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    text-align: left !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}
.ai-chip-btn:hover {
    background: #eff6ff !important;
    border-color: #93c5fd !important;
    transform: translateX(3px) !important;
}

/* Footer / Input Area */
.ai-chat-footer {
    padding: 0.85rem 1.15rem !important;
    background: #ffffff !important;
    border-top: 1px solid #f1f5f9 !important;
    flex-shrink: 0 !important;
}

.ai-input-form {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.ai-input-field {
    flex: 1 1 auto !important;
    height: 2.75rem !important;
    padding: 0.5rem 1.15rem !important;
    border-radius: 9999px !important;
    border: 1px solid #cbd5e1 !important;
    background: #f8fafc !important;
    color: #0f172a !important;
    font-size: 0.84rem !important;
    outline: none !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
    box-sizing: border-box !important;
}
.ai-input-field:focus {
    background: #ffffff !important;
    border-color: #F06020 !important;
    box-shadow: 0 0 0 3px rgba(240, 96, 32, 0.15) !important;
}

.ai-send-btn {
    width: 2.75rem !important;
    height: 2.75rem !important;
    border-radius: 50% !important;
    background: #F06020 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    transition: background-color 0.15s ease, transform 0.1s ease !important;
    box-shadow: 0 2px 6px rgba(240, 96, 32, 0.3) !important;
}
.ai-send-btn:hover:not(:disabled) {
    background: #305090 !important;
    transform: scale(1.05) !important;
}
.ai-send-btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
}

/* Dark Mode Overrides */
.dark .ai-chat-panel {
    background: #0f172a !important;
    border-left-color: #1e293b !important;
    box-shadow: -8px 0 35px rgba(0, 0, 0, 0.5) !important;
}
.dark .ai-chat-header {
    background: #0f172a !important;
    border-bottom-color: #1e293b !important;
}
.dark .ai-chat-title {
    color: #f1f5f9 !important;
}
.dark .ai-chat-subtitle {
    color: #94a3b8 !important;
}
.dark .ai-chat-body {
    background: #0b1120 !important;
}
.dark .ai-bubble--bot {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
.dark .ai-chip-btn {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #38bdf8 !important;
}
.dark .ai-chip-btn:hover {
    background: #334155 !important;
    border-color: #475569 !important;
}
.dark .ai-chat-footer {
    background: #0f172a !important;
    border-top-color: #1e293b !important;
}
.dark .ai-input-field {
    background: #1e293b !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}
.dark .ai-stat-box {
    background: #1e293b !important;
    border-color: #334155 !important;
}
.dark .ai-ctrl-btn:hover {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}


/* ==========================================================================
   Customizable dashboard metric cards
   ========================================================================== */

.hrms-customizable-stats {
    gap: 0.75rem !important;
}

.hrms-metric-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.hrms-metric-toolbar__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 650;
    color: #0f172a;
}

.hrms-metric-toolbar__hint {
    margin: 0.15rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.hrms-metric-toolbar__actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.hrms-metric-btn {
    border-radius: 9999px;
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hrms-metric-btn--ghost:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.hrms-metric-btn--primary {
    background: #F06020;
    border-color: #F06020;
    color: #fff;
}

.hrms-metric-btn--primary:hover {
    background: #d9551c;
    border-color: #d9551c;
}

.hrms-metric-card-wrap {
    position: relative;
}

.hrms-metric-grid--customizing .hrms-metric-card-wrap {
    cursor: grab;
}

.hrms-metric-grid--customizing .hrms-metric-card-wrap:active {
    cursor: grabbing;
}

.hrms-metric-card-controls {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.hrms-metric-drag {
    display: inline-flex;
    color: #94a3b8;
}

.hrms-metric-hide {
    border: 1px solid #fecaca;
    background: #fff1f2;
    color: #b91c1c;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 650;
    padding: 0.15rem 0.5rem;
    cursor: pointer;
}

.hrms-metric-card--static {
    pointer-events: none;
}

.hrms-metric-hidden {
    margin-top: 0.25rem;
    padding: 0.85rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 0.9rem;
    background: #f8fafc;
}

.hrms-metric-hidden__title {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    font-weight: 650;
    color: #475569;
}

.hrms-metric-hidden__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hrms-metric-hidden__chip {
    border: 1px solid #dbe3f0;
    background: #fff;
    color: #334155;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
}

.hrms-metric-hidden__chip:hover {
    border-color: #F06020;
    color: #F06020;
}

/* ==========================================================================
   Quick Actions FAB (sits above AI assistant)
   ========================================================================== */

.hrms-fab-root {
    position: fixed !important;
    right: 1.5rem !important;
    bottom: 5.25rem !important;
    z-index: 9997 !important;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}

.hrms-fab-trigger {
    width: 3.25rem;
    height: 3.25rem;
    border: none;
    border-radius: 9999px;
    background: #305090;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -8px rgba(48, 80, 144, 0.55), 0 4px 10px rgba(15, 23, 42, 0.12);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.hrms-fab-trigger:hover {
    transform: translateY(-2px) scale(1.03);
    background: #27467a;
}

.hrms-fab-menu {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 12.5rem;
}

.hrms-fab-item {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px -14px rgba(15, 23, 42, 0.35);
    color: #0f172a;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.hrms-fab-item:hover {
    border-color: #F06020;
    color: #F06020;
}

.hrms-fab-item__icon {
    display: inline-flex;
    color: #305090;
}

@media (max-width: 640px) {
    .hrms-fab-root {
        right: 1rem !important;
        bottom: 5rem !important;
    }
}

/* ---------- Dashboard stats skeleton ---------- */
.hrms-stats-skeleton {
    min-height: var(--hrms-skeleton-min-height, 9rem);
}

.hrms-stat--skeleton {
    display: grid;
    gap: 0.65rem;
    padding: 1rem 1.1rem;
    border-radius: var(--hrms-card-radius);
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(15, 23, 42, 0.06);
}

.hrms-stat-skeleton__label,
.hrms-stat-skeleton__value,
.hrms-stat-skeleton__desc {
    border-radius: 0.4rem;
    background: linear-gradient(90deg, #e8ecf3 0%, #f4f6fa 50%, #e8ecf3 100%);
    background-size: 200% 100%;
}

.hrms-stat-skeleton__label { height: 0.75rem; width: 42%; }
.hrms-stat-skeleton__value { height: 1.75rem; width: 28%; }
.hrms-stat-skeleton__desc { height: 0.7rem; width: 58%; }

/* Approval Inbox */
.hrms-approval-inbox__status {
    display: inline-flex;
    border-radius: 9999px;
    background: #fffbeb;
    color: #92400e;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
}

.hrms-approval-inbox__table-wrap {
    overflow-x: auto;
}

.hrms-approval-inbox {
    padding-bottom: 6rem;
}

.hrms-approval-inbox__table-wrap td:last-child {
    min-width: 12.5rem;
}
