/* ============================================================================
   HRDashboardRedesign.css
   Scope: HR Management > Default > Dashboard_Index and all its lazy-loaded
          dashboard partials (Employee Strength, Pay Slip, Birthday, Employee
          Status, Salary Statement, Probation, 25-Years-Completion, Attendance,
          Leave Applications, Retirement).
   Prefix / scope class: .hrdb-scope  (added once, to the outer container of
          Dashboard_Index.cshtml and to the root element of every partial that
          can also be loaded standalone into a modal, so this file never
          affects any other AdminLTE-skinned page).
   Everything below is a pure re-skin of EXISTING markup/classes (.box,
   .box-header, table.table, .nav-tabs-custom, .products-list, plus the
   Chart.js htmlLegend classes .scroll/.listContainer/.li/.boxSpan/
   .textContainer already emitted by Dashboard_Index.cshtml's chart JS) — no
   id, form action, or JS hook is renamed here.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@500&display=swap');

.hrdb-scope {
    --hrdb-bg: #F3F5FB;
    --hrdb-surface: #FFFFFF;
    --hrdb-surface-2: #FAFBFF;
    --hrdb-line: #E7E9F4;

    --hrdb-ink: #262A41;
    --hrdb-ink-soft: #6B7094;
    --hrdb-ink-faint: #A6ABC7;

    --hrdb-primary: #5B5FEF;
    --hrdb-primary-dark: #4347C4;
    --hrdb-primary-tint: #EDEEFD;

    --hrdb-teal: #14B8A6;
    --hrdb-teal-tint: #E3F8F5;

    --hrdb-coral: #FF8A65;
    --hrdb-coral-tint: #FFEDE5;

    --hrdb-amber: #F5B942;
    --hrdb-amber-tint: #FDF3DE;

    --hrdb-violet: #8A3FFC;
    --hrdb-violet-tint: #F2E9FF;

    --hrdb-success: #2FBE8F;
    --hrdb-danger: #F0576B;

    --hrdb-radius-lg: 20px;
    --hrdb-radius-md: 14px;
    --hrdb-radius-sm: 9px;

    --hrdb-shadow-soft: 0 1px 2px rgba(38,42,65,0.04), 0 8px 24px -10px rgba(38,42,65,0.12);

    --hrdb-font-display: 'Space Grotesk', sans-serif;
    --hrdb-font-body: 'Inter', sans-serif;
    --hrdb-font-mono: 'IBM Plex Mono', monospace;

    font-family: var(--hrdb-font-body);
    color: var(--hrdb-ink);
}

/* ---------- Panels (.box) ---------- */
.hrdb-scope .box {
    background: var(--hrdb-surface);
    border-radius: var(--hrdb-radius-lg) !important;
    box-shadow: var(--hrdb-shadow-soft);
    border: 1px solid var(--hrdb-line);
    overflow: hidden;
}

.hrdb-scope .box-header {
    background: transparent;
    border-bottom: 1px solid var(--hrdb-line);
    padding: 14px 18px;
}

.hrdb-scope .box-header .box-title,
.hrdb-scope .box-title {
    font-family: var(--hrdb-font-display);
    font-weight: 600;
    font-size: 14.5px;
    color: var(--hrdb-ink);
}

.hrdb-scope .box-body {
    padding: 14px 18px;
}

/* ---------- Card panel (replacement for AdminLTE .box/.box-header/.box-body,
   used where the view no longer relies on those global classes) ---------- */
.hrdb-scope .hrdb-panel {
    background: var(--hrdb-surface);
    border-radius: var(--hrdb-radius-lg) !important;
    box-shadow: var(--hrdb-shadow-soft);
    border: 1px solid var(--hrdb-line);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 360px !important;
}
.hrdb-scope .hrdb-panel-body {
    padding: 14px 18px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
/* Thin custom scrollbar — same as Employee Strength legend/hbar lists */
.hrdb-scope .hrdb-panel-body::-webkit-scrollbar,
.hrdb-scope .table-responsive::-webkit-scrollbar,
.hrdb-scope .tab-pane::-webkit-scrollbar,
.hrdb-scope #staffBirthdayDiv::-webkit-scrollbar,
.hrdb-scope .hrdb-drawer-body::-webkit-scrollbar { width: 5px; height: 5px; }
.hrdb-scope .hrdb-panel-body::-webkit-scrollbar-thumb,
.hrdb-scope .table-responsive::-webkit-scrollbar-thumb,
.hrdb-scope .tab-pane::-webkit-scrollbar-thumb,
.hrdb-scope #staffBirthdayDiv::-webkit-scrollbar-thumb,
.hrdb-scope .hrdb-drawer-body::-webkit-scrollbar-thumb { background: var(--hrdb-line); border-radius: 99px !important; }
.hrdb-scope .hrdb-panel-body::-webkit-scrollbar-track,
.hrdb-scope .table-responsive::-webkit-scrollbar-track,
.hrdb-scope .tab-pane::-webkit-scrollbar-track,
.hrdb-scope #staffBirthdayDiv::-webkit-scrollbar-track,
.hrdb-scope .hrdb-drawer-body::-webkit-scrollbar-track { background: transparent; }

/* ---------- Panel header — reused (class names + layout) from
   MCampusUI/Areas/Enquiry/Views/Default/EnquiryAnalyticsDashboard_New.cshtml's
   .enqad-panel-head/.enqad-panel-title/.enqad-panel-hd-right/.enqad-viewtoggle/
   .enqad-vt-btn/.enqad-box-btn system, recolored with this stylesheet's
   --hrdb-* tokens instead of introducing a second (--enqad-*) palette onto
   this page. Unlike the reference's own container-query-based stacking, the
   title here truncates instead of wrapping onto its own line — this keeps the
   tool icons pinned to the header's right edge on every width without
   depending on @container query support (which isn't guaranteed in every
   client browser this app runs in), rather than the icons ever collapsing to
   the left edge on a narrow render. ---------- */
.hrdb-scope .enqad-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--hrdb-line);
    padding: 14px 18px;
    flex-wrap: nowrap;
    position: relative;
    overflow: visible;
    z-index: 2;
}
/* Html.BeginForm() renders a <form> that becomes .enqad-panel-head's ONLY
   direct child (wrapping .enqad-panel-title/.enqad-panel-hd-right inside it) —
   without this, the flex rules above never reach the title/tools because
   they're grandchildren, not direct children, and the plain block-level <form>
   just stacks them vertically regardless. Making the form itself the flex
   container is what actually keeps title-left/tools-right on one row. */
.hrdb-scope .enqad-panel-head > form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.hrdb-scope .enqad-panel-title {
    font-family: var(--hrdb-font-display);
    font-size: 14.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--hrdb-ink);
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.hrdb-scope .enqad-panel-title span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hrdb-scope .enqad-panel-title i {
    color: var(--hrdb-primary-dark);
    font-size: 13px;
    flex-shrink: 0;
}
.hrdb-scope .hrdb-panel-subtitle {
    font-family: var(--hrdb-font-body);
    font-size: 10.5px;
    font-weight: 500;
    color: var(--hrdb-ink-faint);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.hrdb-scope .enqad-panel-hd-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
    flex-wrap: nowrap;
}
.hrdb-scope .enqad-viewtoggle {
    display: inline-flex;
    border: 1px solid var(--hrdb-line);
    border-radius: 8px !important;
    overflow: hidden;
    background: var(--hrdb-surface-2);
    height: 28px;
}
.hrdb-scope .enqad-vt-btn {
    border: none;
    background: transparent;
    color: var(--hrdb-ink-soft);
    padding: 0 10px;
    height: 28px;
    line-height: 28px;
    cursor: pointer;
    font-size: 12px;
    transition: .15s;
}
.hrdb-scope .enqad-vt-btn + .enqad-vt-btn {
    border-left: 1px solid var(--hrdb-line);
}
.hrdb-scope .enqad-vt-btn:hover {
    color: var(--hrdb-primary-dark);
}
.hrdb-scope .enqad-vt-btn.is-active {
    background: var(--hrdb-primary);
    color: #fff;
}
.hrdb-scope .enqad-box-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--hrdb-line);
    background: var(--hrdb-surface);
    color: var(--hrdb-ink-soft);
    border-radius: 7px !important;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    transition: .15s;
}
/* Dropdown inside the header must float above panel content */
.hrdb-scope .enqad-panel-hd-right .dropdown-menu {
    z-index: 1055 !important;
    margin-top: 3px;
}
/* Normalize the month-filter select to match button height */
.hrdb-scope .enqad-panel-hd-right select.form-control {
    height: 28px !important;
    padding: 0 6px !important;
    line-height: 28px;
    font-size: 11px;
    border-radius: 7px !important;
    width: auto !important;
    display: inline-block !important;
}
/* Select2 v4 container inside panel header — fallback if MCampusSelectBox can't be removed */
.hrdb-scope .enqad-panel-hd-right .select2-container {
    width: auto !important;
    min-width: 110px;
    display: inline-block !important;
    vertical-align: middle;
}
.hrdb-scope .enqad-panel-hd-right .select2-container .select2-selection--single {
    height: 28px !important;
    line-height: 26px !important;
    border-radius: 7px !important;
    border: 1px solid var(--hrdb-line) !important;
    background: var(--hrdb-surface-2) !important;
    font-size: 11px !important;
}
.hrdb-scope .enqad-panel-hd-right .select2-container .select2-selection--single .select2-selection__rendered {
    line-height: 26px !important;
    padding-left: 8px !important;
    padding-right: 24px !important;
    color: var(--hrdb-ink) !important;
    font-size: 11px !important;
}
.hrdb-scope .enqad-panel-hd-right .select2-container .select2-selection--single .select2-selection__arrow {
    height: 26px !important;
    top: 0 !important;
    right: 4px !important;
}
.hrdb-scope .enqad-box-btn:hover {
    background: var(--hrdb-primary);
    border-color: var(--hrdb-primary);
    color: #fff;
}
/* Bootstrap nav-tabs styled as pill tab-group — matches reference .tab-group.
   Used in panel-hd-right (Employee Status, Probation) and panel-body
   (Leave Applications). Bootstrap manages <li class="active"> on click. */
.hrdb-scope .enqad-status-tabs {
    display: inline-flex;
    gap: 4px;
    border: 1px solid var(--hrdb-line);
    border-radius: 999px !important;
    background: var(--hrdb-surface-2);
    padding: 4px;
    margin: 0;
    list-style: none;
}
.hrdb-scope .enqad-status-tabs > li {
    float: none;
    margin: 0;
    border: none;
}
.hrdb-scope .enqad-status-tabs > li > a {
    display: flex;
    align-items: center;
    border: none !important;
    border-radius: 999px !important;
    background: transparent !important;
    color: var(--hrdb-ink-soft) !important;
    font-size: 11.5px;
    font-weight: 600;
    font-family: var(--hrdb-font-body);
    padding: 6px 12px !important;
    margin: 0 !important;
    transition: background .15s, color .15s;
    white-space: nowrap;
}
.hrdb-scope .enqad-status-tabs > li > a:hover {
    background: rgba(91, 95, 239, 0.08) !important;
    color: var(--hrdb-primary-dark) !important;
}
.hrdb-scope .enqad-status-tabs > li.active > a,
.hrdb-scope .enqad-status-tabs > li.active > a:focus,
.hrdb-scope .enqad-status-tabs > li.active > a:hover {
    background: var(--hrdb-primary) !important;
    color: #fff !important;
}
/* Small phones: title has already truncated to make room, but tighten the
   tool row's own spacing/sizing a little further too. */
@media (max-width: 380px) {
    .hrdb-scope .enqad-panel-head { padding: 12px 14px; gap: 6px; }
    .hrdb-scope .enqad-panel-hd-right { gap: 4px; }
    .hrdb-scope .enqad-box-btn { width: 24px; height: 24px; }
    .hrdb-scope .enqad-viewtoggle { height: 24px; }
    .hrdb-scope .enqad-vt-btn { height: 24px; line-height: 24px; padding: 0 7px; }
}

/* ============================================================
   Staff Birthday Widget
   ============================================================ */
@keyframes bdayGlowBg {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,138,101,0); }
    50%     { box-shadow: 0 4px 18px -4px rgba(255,138,101,.35); }
}
@keyframes bdayRing {
    0%,100% { box-shadow: 0 0 0 0 rgba(255,138,101,.45); }
    50%     { box-shadow: 0 0 0 6px rgba(255,138,101,0); }
}
@keyframes bdayPulse {
    0%,100% { transform: scale(1); }
    50%     { transform: scale(1.06); }
}
@keyframes confettiFloat {
    0%   { opacity: 0; transform: translateY(6px) rotate(0deg); }
    15%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; transform: translateY(-22px) rotate(200deg); }
}

.hrdb-scope .bday-list {
    list-style: none;
    padding: 6px 8px 10px;
    margin: 0;
}
.hrdb-scope .bday-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: 12px !important;
    position: relative;
    transition: background .15s ease;
}
.hrdb-scope .bday-item:hover { background: var(--hrdb-surface-2); }
.hrdb-scope .bday-item.is-today {
    background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
    border-radius: 14px !important;
    animation: bdayGlowBg 2.6s ease-in-out infinite;
}
.hrdb-scope .bday-item.is-today:hover {
    background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
}
.hrdb-scope .bday-avatar {
    width: 40px;
    height: 40px;
    border-radius: 11px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--hrdb-font-display);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    letter-spacing: .4px;
}
.hrdb-scope .bday-item.is-today .bday-avatar {
    background: linear-gradient(135deg, var(--hrdb-coral), var(--hrdb-amber)) !important;
    animation: bdayRing 1.8s ease-in-out infinite;
}
.hrdb-scope .bday-info {
    flex: 1;
    min-width: 0;
}
.hrdb-scope .bday-info .bday-name {
    font-size: 12.5px;
    font-weight: 600;
    display: block;
    color: var(--hrdb-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hrdb-scope .bday-item.is-today .bday-name { color: #B5401F; }
.hrdb-scope .bday-info .bday-school {
    font-size: 11.5px;
    color: var(--hrdb-ink-soft);
    margin-top: 1px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hrdb-scope .bday-date {
    font-family: var(--hrdb-font-mono);
    font-size: 11px;
    font-weight: 600;
    background: var(--hrdb-primary-tint);
    color: var(--hrdb-primary-dark);
    padding: 5px 10px;
    border-radius: 8px !important;
    flex-shrink: 0;
    white-space: nowrap;
}
.hrdb-scope .bday-badge-today {
    font-size: 10.5px;
    font-weight: 700;
    background: linear-gradient(120deg, var(--hrdb-coral), var(--hrdb-amber));
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px !important;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    animation: bdayPulse 1.6s ease-in-out infinite;
}
.hrdb-scope .confetti-bit {
    position: absolute;
    top: 6px;
    font-size: 11px;
    pointer-events: none;
    opacity: 0;
    animation: confettiFloat 3.2s ease-in infinite;
}

/* ---------- Title icon-chip (append class hrdb-ic + a color modifier to the
   existing <i class="fa ..."> that already precedes each panel's title) ---- */
.hrdb-scope .hrdb-ic {
    width: 30px;
    height: 30px;
    border-radius: 9px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    margin-right: 6px;
    vertical-align: middle;
}
.hrdb-scope .hrdb-ic-indigo { background: var(--hrdb-primary-tint); color: var(--hrdb-primary-dark); }
.hrdb-scope .hrdb-ic-teal   { background: var(--hrdb-teal-tint);    color: #0D8A7C; }
.hrdb-scope .hrdb-ic-coral  { background: var(--hrdb-coral-tint);   color: #D9502F; }
.hrdb-scope .hrdb-ic-amber  { background: var(--hrdb-amber-tint);   color: #A8730B; }
.hrdb-scope .hrdb-ic-violet { background: var(--hrdb-violet-tint);  color: var(--hrdb-violet); }

/* ---------- Ghost / tool buttons (filter, export, view-more, search) ---------- */
.hrdb-scope .btn-social-icon.btn-bitbucket,
.hrdb-scope .box-tools .btn-primary,
.hrdb-scope .btnAttendance,
.hrdb-scope #btnAttendanceChart {
    background: var(--hrdb-surface-2) !important;
    border: 1px solid var(--hrdb-line) !important;
    color: var(--hrdb-ink-soft) !important;
    border-radius: 9px !important;
    transition: all .15s ease;
}
.hrdb-scope .btn-social-icon.btn-bitbucket:hover,
.hrdb-scope .box-tools .btn-primary:hover,
.hrdb-scope .btnAttendance:hover,
.hrdb-scope #btnAttendanceChart:hover {
    border-color: var(--hrdb-primary) !important;
    color: var(--hrdb-primary-dark) !important;
}

/* ---------- Form controls ---------- */
.hrdb-scope select.form-control,
.hrdb-scope input.form-control,
.hrdb-scope .form-control {
    font-family: var(--hrdb-font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--hrdb-ink);
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 9px !important;
    box-shadow: none;
}
.hrdb-scope .form-control:focus {
    border-color: var(--hrdb-primary);
    box-shadow: none;
}

/* ---------- Attendance filter row ---------- */
.hrdb-scope .hrdb-filter-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: flex-end;
}
.hrdb-scope .hrdb-filter-row > div {
    flex: 1 1 140px;
    min-width: 120px;
}

/* ---------- Tables ---------- */
.hrdb-scope table.table {
    font-size: 12.5px;
    border-collapse: collapse;
}
.hrdb-scope table.table > thead > tr > th,
.hrdb-scope table.table thead th {
    text-align: left;
    background: var(--hrdb-surface-2);
    color: var(--hrdb-ink-soft);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--hrdb-line);
    border-top: none !important;
    white-space: nowrap;
}
/* header rows that aren't inside a real <thead> (several partials use plain <tr><th>) */
.hrdb-scope table.table > tr:first-child > th,
.hrdb-scope table.table tbody > tr > th {
    background: var(--hrdb-surface-2);
    color: var(--hrdb-ink-soft);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-top: none !important;
}
.hrdb-scope table.table td,
.hrdb-scope table.table th {
    padding: 11px 14px;
    border-bottom: 1px solid var(--hrdb-line);
    border-top: none !important;
    vertical-align: top;
}
.hrdb-scope table.table.table-striped > tbody > tr:nth-of-type(odd) {
    background: transparent;
}
.hrdb-scope table.table tbody tr:hover td {
    background: var(--hrdb-surface-2);
}
.hrdb-scope table.table tr.btn-primary td,
.hrdb-scope table.table tr.btn-primary th {
    background: var(--hrdb-primary) !important;
    color: #fff;
}


/* ---------- Birthday list (.products-list.product-list-in-box) ---------- */
.hrdb-scope .products-list {
    padding: 0;
    margin: 0;
    list-style: none;
}
.hrdb-scope .products-list > .item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px !important;
    transition: background .15s ease;
    list-style: none;
    border-bottom: none !important;
}
.hrdb-scope .products-list > .item:hover {
    background: var(--hrdb-surface-2);
}
.hrdb-scope .products-list > .item.btn-primary {
    background: var(--hrdb-primary) !important;
}
.hrdb-scope .products-list .product-img {
    flex-shrink: 0;
    width: auto;
}
.hrdb-scope .products-list .product-img img.thumbnail {
    width: 42px;
    height: 42px;
    border-radius: 11px !important;
    object-fit: cover;
    border: 2px solid var(--hrdb-line);
}
.hrdb-scope .products-list .product-info {
    flex: 1;
    min-width: 0;
}
.hrdb-scope .products-list .product-title {
    font-size: 12.5px;
    font-weight: 600;
    display: block;
}
.hrdb-scope .products-list .product-title .label {
    font-family: var(--hrdb-font-mono);
    font-size: 11px !important;
    font-weight: 600;
    background: var(--hrdb-primary-tint);
    color: var(--hrdb-primary-dark);
    padding: 5px 10px;
    border-radius: 8px !important;
}
.hrdb-scope .products-list > .item.btn-primary .product-title .label {
    background: rgba(255,255,255,0.25);
    color: #fff;
}
.hrdb-scope .products-list .product-description {
    font-size: 11.5px;
    color: var(--hrdb-ink-soft);
    margin-top: 1px;
}

/* ---------- Donut-chart legend (classes already emitted by the existing
   Chart.js htmlLegend plugin in Dashboard_Index.cshtml and
   _Employee_Strength_Details_Report.cshtml — restyle only, do not rename) --- */
.hrdb-scope .scroll {
    background: var(--hrdb-surface);
}
.hrdb-scope .scroll::-webkit-scrollbar { width: 5px; }
.hrdb-scope .scroll::-webkit-scrollbar-thumb { background: var(--hrdb-line); border-radius: 99px !important; }

.hrdb-scope .listContainer {
    padding: 0 !important;
    margin: 0;
    list-style: none;
}
.hrdb-scope .li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px !important;
    transition: background .15s ease;
    list-style: none;
}
.hrdb-scope .li:hover {
    background: var(--hrdb-surface-2);
}
.hrdb-scope .boxSpan {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    border-radius: 50% !important;
    border: none !important;
    flex-shrink: 0;
    cursor: pointer;
}
.hrdb-scope .textContainer {
    font-family: var(--hrdb-font-body);
    font-size: 11.5px !important;
    font-weight: 600 !important;
    color: var(--hrdb-ink);
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.hrdb-scope .chart-container {
    position: relative;
}

/* ---------- Donut + progress-bar legend — mirrors the Enquiry Analytics
   dashboard's proven .enqad-donut-flex / .enqad-legend design (see
   MCampusUI/Areas/Enquiry/Views/Default/EnquiryAnalyticsDashboard_New.cshtml
   and its .enqad-* rules in this same stylesheet file) so the two systems read
   as one visual language. Center total is drawn directly on the canvas by a
   Chart.js plugin (see hrdbCenterText in the chart scripts), same as enqad's
   enqadCenterText — no separate absolutely-positioned overlay div needed, so
   it always stays centered through any responsive resize. ---------- */
.hrdb-scope .hrdb-donut-flex {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.hrdb-scope .hrdb-chart-wrap {
    position: relative;
    flex: 1 1 190px;
    min-width: 170px;
    max-width: 260px;
    height: 220px;
}
.hrdb-scope #jsAttendanceChartSection .hrdb-chart-wrap {
    max-width: 190px;
    height: 180px;
}
.hrdb-scope .hrdb-legend {
    flex: 1 1 220px;
    min-width: 200px;
    max-height: 260px;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 4px;
}
.hrdb-scope .hrdb-legend::-webkit-scrollbar { width: 5px; }
.hrdb-scope .hrdb-legend::-webkit-scrollbar-thumb { background: var(--hrdb-line); border-radius: 99px !important; }
.hrdb-scope .hrdb-legend-row {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 8px;
    border-radius: 8px !important;
    cursor: pointer;
    transition: background .12s ease;
}
.hrdb-scope .hrdb-legend-row:hover {
    background: var(--hrdb-surface-2);
}
.hrdb-scope .hrdb-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50% !important;
    flex: none;
}
.hrdb-scope .hrdb-legend-name {
    font-family: var(--hrdb-font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--hrdb-ink);
    flex: 0 1 34%;
    min-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hrdb-scope .hrdb-legend-track {
    flex: 1 1 auto;
    height: 6px;
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 99px !important;
    overflow: hidden;
    min-width: 40px;
}
.hrdb-scope .hrdb-legend-fill {
    display: block;
    height: 100%;
    border-radius: 99px !important;
}
.hrdb-scope .hrdb-legend-val {
    font-family: var(--hrdb-font-mono);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--hrdb-ink-soft);
    flex: none;
    min-width: 32px;
    text-align: right;
}
@media (max-width: 768px) {
    .hrdb-scope .hrdb-donut-flex { justify-content: center; }
    .hrdb-scope .hrdb-chart-wrap { margin: 0 auto; }
}
@media (max-width: 380px) {
    .hrdb-scope .hrdb-legend-track { display: none; }
}

/* ---------- Horizontal bar list (replaces the donut for Employee Strength's own
   main widget + drawer breakdown) — labelled progress bars, one per category,
   scrollable when there are many. ---------- */
.hrdb-scope .hrdb-hbar-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}
.hrdb-scope .hrdb-hbar-list::-webkit-scrollbar { width: 5px; }
.hrdb-scope .hrdb-hbar-list::-webkit-scrollbar-thumb { background: var(--hrdb-line); border-radius: 99px !important; }
/* Inside a panel-body the panel itself is the scroll container — remove the list's
   own cap so only one scrollbar appears. The standalone drawer hbar-list keeps its cap. */
.hrdb-scope .hrdb-panel-body .hrdb-hbar-list {
    max-height: none;
    overflow-y: visible;
}
.hrdb-scope .hrdb-hbar-row {
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 8px !important;
    transition: background .12s ease;
}
.hrdb-scope .hrdb-hbar-row:hover {
    background: var(--hrdb-surface-2);
}
.hrdb-scope .hrdb-hbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--hrdb-font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--hrdb-ink);
    margin-bottom: 6px;
}
.hrdb-scope .hrdb-hbar-num {
    font-family: var(--hrdb-font-mono);
    color: var(--hrdb-ink-soft);
    font-weight: 700;
    text-transform: none;
    letter-spacing: normal;
}
.hrdb-scope .hrdb-hbar-track {
    height: 9px;
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 20px !important;
    overflow: hidden;
}
.hrdb-scope .hrdb-hbar-fill {
    display: block;
    height: 100%;
    border-radius: 20px !important;
    transition: width .5s ease;
}

/* ---------- Donut table view (toggled alongside the chart view) ---------- */
.hrdb-scope .hrdb-table-view-donut {
    display: none;
    padding: 4px 14px 14px;
}
.hrdb-scope .hrdb-table-view-donut.active {
    display: block;
}
.hrdb-scope .hrdb-table-view-donut tfoot th {
    background: var(--hrdb-surface-2);
    border-top: 1px solid var(--hrdb-line);
}

/* ---------- Status tag chips (attendance remarks / leave-type badges) ---------- */
.hrdb-scope .hrdb-tag {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 7px !important;
}
.hrdb-scope .hrdb-tag-odd,
.hrdb-scope .hrdb-tag-lm,
.hrdb-scope .hrdb-tag-eg,
.hrdb-scope .hrdb-tag-hd {
    background: var(--hrdb-coral-tint);
    color: #D9502F;
}
.hrdb-scope .hrdb-tag-holiday {
    background: var(--hrdb-teal-tint);
    color: #0D8A7C;
}

/* ---------- Empty state (all widgets, replaces plain Bootstrap alert) ---------- */
.hrdb-scope .hrdb-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px 40px;
    text-align: center;
}
.hrdb-scope .hrdb-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px !important;
    background: var(--hrdb-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 24px;
    color: var(--hrdb-primary);
    opacity: .65;
    flex-shrink: 0;
}
.hrdb-scope .hrdb-empty-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    margin: 0 0 4px;
}
.hrdb-scope .hrdb-empty-sub {
    font-size: 11.5px;
    color: var(--hrdb-ink-soft);
    opacity: .65;
    margin: 0;
}

/* ---------- bday-list section label (PayerGroup / category dividers) ---------- */
.hrdb-scope .bday-group-hdr {
    padding: 8px 10px 2px;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--hrdb-ink-soft);
    text-transform: uppercase;
    letter-spacing: .55px;
    list-style: none;
}

/* ---------- Retiring-this-month highlight (retirement report) ---------- */
.hrdb-scope .bday-item.is-retiring {
    background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
    border-radius: 14px !important;
}
.hrdb-scope .bday-item.is-retiring:hover {
    background: linear-gradient(90deg, var(--hrdb-coral-tint), var(--hrdb-amber-tint) 70%);
}
.hrdb-scope .bday-item-retiring-name { color: #B5401F !important; }

/* ---------- Attendance list (bday-list style) ---------- */
.hrdb-scope .att-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}
.hrdb-scope .att-time {
    font-family: var(--hrdb-font-mono);
    font-size: 11px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
    white-space: nowrap;
}
.hrdb-scope .att-tag-present {
    background: #DCFCE7;
    color: #166534;
}
.hrdb-scope .att-tag-absent {
    background: #FEE2E2;
    color: #B91C1C;
}
.hrdb-scope .att-tag-late {
    background: #FEF3C7;
    color: #92400E;
}
.hrdb-scope .att-tag-oddpunch {
    background: var(--hrdb-coral-tint);
    color: #D9502F;
}
.hrdb-scope .att-avatar-absent {
    opacity: .55;
}
.hrdb-scope .att-name-absent {
    color: var(--hrdb-ink-soft) !important;
}

/* ---------- Latest Statement of Salary (bday-list card style) ---------- */
.hrdb-scope .salary-month-hdr {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px 4px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--hrdb-ink-soft);
}
.hrdb-scope .salary-month-label {
    color: var(--hrdb-ink);
    font-family: var(--hrdb-font-mono);
}
.hrdb-scope .salary-month-vs {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.hrdb-scope .salary-amt {
    font-family: var(--hrdb-font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--hrdb-ink);
    white-space: nowrap;
}
.hrdb-scope .salary-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 12px;
    border-top: 1px solid var(--hrdb-line);
    margin-top: 4px;
    list-style: none;
}
.hrdb-scope .salary-total-label {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--hrdb-ink);
}
.hrdb-scope .salary-total-label small {
    font-weight: 400;
    color: var(--hrdb-ink-soft);
}
.hrdb-scope .salary-total-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}
.hrdb-scope .salary-total-amt {
    font-size: 13.5px;
}

/* ---------- Modals ---------- */
.hrdb-scope .modal-content {
    border-radius: var(--hrdb-radius-lg) !important;
    border: 1px solid var(--hrdb-line);
    box-shadow: var(--hrdb-shadow-soft);
}

/* ---------- Right-side drill-down drawer (Employee Strength V2) ----------
   Local to the widget that renders it (see _Employee_Strength_Report_V2.cshtml)
   — a lighter-weight alternative to the shared #HR_Report_Modal_New modal,
   used only for this widget's own slice/legend drill-down. ---------- */
.hrdb-scope .hrdb-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 1050;
}
.hrdb-scope .hrdb-drawer-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}
.hrdb-scope .hrdb-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 50%;
    background: var(--hrdb-surface);
    box-shadow: -8px 0 32px -8px rgba(15, 23, 42, .25);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 1051;
    display: flex;
    flex-direction: column;
}
.hrdb-scope .hrdb-drawer.is-open {
    transform: translateX(0);
}
.hrdb-scope .hrdb-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--hrdb-line);
    flex: none;
}
.hrdb-scope .hrdb-drawer-title {
    font-family: var(--hrdb-font-display);
    font-weight: 600;
    font-size: 15px;
    color: var(--hrdb-ink);
}
.hrdb-scope .hrdb-drawer-close {
    width: 28px;
    height: 28px;
    border-radius: 8px !important;
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--hrdb-ink-soft);
    font-size: 12px;
    padding: 0;
    transition: all .15s ease;
}
.hrdb-scope .hrdb-drawer-close:hover {
    border-color: var(--hrdb-primary);
    color: var(--hrdb-primary-dark);
}
.hrdb-scope .hrdb-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}
.hrdb-scope .hrdb-drawer-breadcrumb {
    font-family: var(--hrdb-font-display);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--hrdb-ink);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hrdb-scope .hrdb-drawer-back {
    color: var(--hrdb-ink-soft);
    font-size: 13px;
    cursor: pointer;
}
.hrdb-scope .hrdb-drawer-back:hover {
    color: var(--hrdb-primary-dark);
}
.hrdb-scope .hrdb-drawer-dim-switch {
    margin-bottom: 14px;
}
.hrdb-scope .hrdb-drawer-emplist-title {
    font-family: var(--hrdb-font-display);
    font-weight: 600;
    font-size: 13px;
    color: var(--hrdb-ink);
    padding-top: 14px;
    margin-bottom: 8px;
    border-top: 1px solid var(--hrdb-line);
}
.hrdb-scope .hrdb-drawer-dim-switch select {
    font-family: var(--hrdb-font-body);
    font-size: 12px;
    font-weight: 500;
    color: var(--hrdb-ink);
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 9px !important;
    padding: 7px 10px;
    width: 100%;
}
.hrdb-scope .hrdb-drawer-empty {
    padding: 30px 10px;
    text-align: center;
    color: var(--hrdb-ink-faint);
    font-size: 12.5px;
    font-weight: 500;
}
@media (max-width: 768px) {
    .hrdb-scope .hrdb-drawer { width: 95%; }
}


/* ---------- Quick search inside drill-down drawer ---------- */
.hrdb-scope .hrdb-drawer-search-wrap {
    margin-bottom: 10px;
}
.hrdb-scope .hrdb-drawer-search {
    background: var(--hrdb-surface-2);
    border: 1px solid var(--hrdb-line);
    border-radius: 9px !important;
    font-size: 12px;
    padding: 7px 12px;
    width: 100%;
    box-shadow: none;
}
.hrdb-scope .hrdb-drawer-search:focus {
    border-color: var(--hrdb-primary);
    outline: none;
    box-shadow: none;
}

/* ---------- Responsive (mirrors the reference design breakpoints) ---------- */
@media (max-width: 1180px) {
    .hrdb-scope .col-lg-4 { width: 50%; }
}
@media (max-width: 980px) {
    .hrdb-scope .chart-container .col-md-4,
    .hrdb-scope .chart-container .col-md-8 {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .hrdb-scope .box-header { padding: 12px 14px; }
    .hrdb-scope .box-body { padding: 12px 14px; }
    .hrdb-scope table.table { font-size: 11.5px; }
}
