/* ============================================================
   Minno People — site.css (Component overrides & app-specific styles)
   by Minno Software
   ============================================================
   This file contains app-specific component styles that extend
   the Aurora Violet theme. The theme base is in minno-people-theme.css.
   ============================================================ */

/* ── Tokens (legacy compatibility + app-specific) ─────────── */
:root {
    --app-font-size: 14px; /* matches theme base */

    /* Legacy aliases mapped to Aurora Violet theme */
    --ys-primary: var(--violet-600);
    --ys-primary-dark: var(--violet-700);
    --ys-primary-light: var(--violet-100);
    --ys-accent: var(--warning-500);
    --ys-brand-accent: var(--violet-200);

    /* Sidebar uses theme gradient */
    --ys-sidebar-bg: var(--bg-sidebar);
    --ys-sidebar-text: rgba(255,255,255,0.7);
    --ys-sidebar-hover: rgba(255,255,255,0.06);
    --ys-sidebar-active: rgba(255,255,255,0.14);
    --ys-sidebar-w: 260px;

    /* Layout */
    --ys-topbar-h: 60px;

    /* Surfaces - map to theme */
    --ys-body-bg: var(--bg-app);
    --ys-card-bg: var(--bg-surface);
    --ys-border: var(--border-subtle);

    /* Typography - map to theme */
    --ys-text: var(--text-primary);
    --ys-text-muted: var(--text-secondary);
    --ys-text-disabled: var(--text-tertiary);

    /* Semantic - map to theme */
    --ys-success: var(--success-500);
    --ys-warning: var(--warning-500);
    --ys-error: var(--danger-500);
    --ys-info: var(--violet-600);

    /* Bootstrap overrides */
    --bs-info: var(--violet-600);
    --bs-info-rgb: 102,55,224;

    /* Misc - map to theme */
    --ys-radius: var(--r-lg);
    --ys-radius-sm: var(--r-md);
    --ys-shadow: var(--shadow-xs);
    --ys-shadow-md: var(--shadow-md);
}

/* Global icon-wrap base: ensure centering applies everywhere, not just inside .card-title */
.icon-wrap {
    display: grid;
    place-items: center;
    border-radius: var(--r-sm);
    flex-shrink: 0;
}

/* Fix: ensure status badges inside employee cards do not overflow the card border
   Place badges absolutely within the card body so they remain inside rounded corners */
.emp-cards .card .card-body { position: relative; }
.emp-cards .card .card-body .badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
}

/* On small devices, ensure there is a small space between icon and text for employee action buttons */
@media (max-width: 576px) {
    .employee-actions .btn i { margin-right: 6px !important; }
}

/* Ensure Manage button icon-only style applies specifically in shift assignments list on small screens */
@media (max-width: 576px) {
    .shift-assignments .btn-label { display: none !important; }
    .shift-assignments .btn i { margin-right: 0 !important; }
}

/* Ensure shift-hours-footer in footer is positioned center and does not overlap actions */
.roster-cards .card-footer { position: relative; }
.roster-cards .shift-hours-footer {
    position: relative;
    left: auto;
    transform: none;
}
.roster-cards .card-footer .actions { margin-left: auto; }

/* Small clock-style progress used to show shift duration proportion */
.shift-clock { display:inline-block; vertical-align:middle; }
.shift-clock .clock-bg { stroke: rgba(0,0,0,0.06); }
.shift-clock .clock-fg { stroke: var(--ys-primary); stroke-linecap: round; transition: stroke-dasharray 0.25s ease, transform 0.25s ease; }
/* Marker to indicate the exact start point when the arc is ambiguous (full circle or zero-length) */
.shift-clock .clock-marker {
    stroke: #fff; /* subtle white border so marker reads on all backgrounds */
    stroke-width: 1.25px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.12));
}

/* ── Base ────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: var(--app-font-size) !important;
}

html, body {
    font-size: var(--app-font-size);
}

body {
    font-family: var(--font-sans);
    background: var(--bg-app);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.6;
}

a {
    color: var(--violet-600);
    text-decoration: none;
}

a:hover {
    color: var(--violet-700);
}


/* Theme primary button - extends .btn-primary from theme */
.btn-primary {
    background: linear-gradient(180deg, var(--violet-500), var(--violet-600));
    color: #fff;
    border-color: transparent;
    box-shadow: var(--shadow-brand), var(--shadow-inset);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(180deg, var(--violet-400), var(--violet-500));
    border-color: transparent;
    box-shadow: var(--shadow-brand-lg), var(--shadow-inset);
    transform: translateY(-1px);
    color: #fff;
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: var(--violet-100);
    border-color: var(--violet-100);
    color: rgba(255,255,255,0.7);
    transform: none;
}

/* Utility: prevent button text from wrapping */
.text-nowrap {
    white-space: nowrap;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--ys-sidebar-w);
    background: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
    color: var(--text-on-brand);
    padding: 0;
    margin: 0;
}

.sidebar::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(400px 300px at 20% 0%, rgba(154,124,255,0.25), transparent 70%),
        radial-gradient(300px 200px at 100% 50%, rgba(218,207,255,0.08), transparent 70%);
}

.sidebar > * {
    position: relative;
    z-index: 1;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.sidebar-logo {
    flex-shrink: 0;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    /* Initial colour = sidebar gradient top stop; JS overrides dynamically on scroll */
    background: linear-gradient(180deg, #1A0847 0%, #1A0847 70%, rgba(26,8,71,0) 100%);
    padding: var(--s-6) var(--s-4);
    padding-bottom: calc(var(--s-6) + 6px);
    margin: 0;
    z-index: 10;
    width: 100%;
}

.sidebar-logo .brand {
    font-family: var(--font-display);
    font-size: 1.75rem !important;
    font-weight: 400;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1;
    text-decoration: none;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

.sidebar-logo .brand .brand-main {
    color: #fff;
}

.sidebar-logo .brand .brand-accent {
    background: linear-gradient(135deg, #BBA6FF 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: normal;
}

/* Ensure all brand anchor states maintain consistent appearance */
.sidebar-logo .brand:link,
.sidebar-logo .brand:visited,
.sidebar-logo .brand:hover,
.sidebar-logo .brand:active,
.sidebar-logo .brand:focus {
    color: #fff !important;
    text-decoration: none !important;
    background: transparent !important;
    outline: none !important;
}

/* Keep accent color for all states */
.sidebar-logo .brand .brand-accent,
.sidebar-logo .brand:link .brand-accent,
.sidebar-logo .brand:visited .brand-accent,
.sidebar-logo .brand:hover .brand-accent,
.sidebar-logo .brand:active .brand-accent,
.sidebar-logo .brand:focus .brand-accent {
    background: linear-gradient(135deg, #BBA6FF 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Keep main white for all states */
.sidebar-logo .brand .brand-main,
.sidebar-logo .brand:link .brand-main,
.sidebar-logo .brand:visited .brand-main,
.sidebar-logo .brand:hover .brand-main,
.sidebar-logo .brand:active .brand-main,
.sidebar-logo .brand:focus .brand-main {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

@media (max-width: 768px) {
    .sidebar-logo .brand {
        font-size: 1.25rem !important;
    }
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--s-4) var(--s-4) 0;
    gap: var(--s-6);
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Nav search */
#navSearch::placeholder { color: rgba(255,255,255,0.35); }
#navSearch:focus {
    outline: none;
    box-shadow: none !important;
    color: #fff;
}
#navSearchClear { line-height: 1; }
#navItems { display: contents; }

/* Mobile organization selector in sidebar */
.sidebar-org-mobile {
    display: none;
    padding-bottom: var(--s-1);
}

.sidebar-org-mobile .org-btn {
    background: transparent;
    border: none;
    color: var(--ys-sidebar-text);
    padding: 8px 10px;
    border-radius: var(--r-md);
    transition: all var(--dur-base) var(--ease-out);
}

.sidebar-org-mobile .org-btn:hover {
    background: rgba(255,255,255,0.03);
    color: #fff;
}

.sidebar-org-mobile .org-btn.org-selected {
    background: rgba(255,255,255,0.14);
    color: #FFFFFF !important;
    border-radius: var(--r-md);
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.sidebar-org-mobile .org-btn.org-selected i {
    color: #FFFFFF !important;
}

.sidebar-org-mobile .small {
    color: rgba(218,207,255,0.5) !important;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.nav-section {
    font-size: 10px;
    font-weight: 600;
    color: rgba(218,207,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0 var(--s-3);
    margin: var(--s-3) 0 var(--s-2);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px var(--s-3);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--r-md);
    transition: all var(--dur-base) var(--ease-out);
    position: relative;
}

.sidebar-nav a:hover {
    background: var(--ys-sidebar-hover);
    color: #fff;
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.06));
    color: #fff;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.sidebar-nav a.active::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 20px;
    background: linear-gradient(180deg, var(--violet-300), #FFF);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 12px rgba(218,207,255,0.8);
}

.sidebar-nav a i {
    font-size: 17px;
    width: 17px;
    text-align: center;
    flex-shrink: 0;
    opacity: 0.85;
}

.sidebar-footer {
    padding: var(--s-4);
    flex-shrink: 0;
    margin-top: auto;
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sidebar-footer .avatar,
.sidebar-footer .avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-footer .avatar {
    object-fit: cover;
}

.sidebar-footer .avatar-fallback {
    background: linear-gradient(135deg, var(--violet-400), var(--violet-600));
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer .user-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
}

.sidebar-footer .user-org {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* ── Main wrapper ────────────────────────────────────────── */
.main-wrapper {
    margin-left: var(--ys-sidebar-w);
    min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ys-card-bg);
    height: var(--ys-topbar-h);
    border-bottom: 1px solid var(--ys-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ys-text);
}

/* Make table row hover use a very light purple (app theme) instead of default grey */
.table-hover tbody tr:hover {
    background-color: var(--ys-primary-light);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Page content ────────────────────────────────────────── */
.main-content {
    padding: 28px;
}

/* On small devices use the brand dark purple surface for the top form control card
   to match the sidebar/brand appearance. Adjust text/controls color for contrast. */
@media (max-width: 768px) {
    /* Keep the previously used subtle purple surface for form top cards on small devices
       (so intentionally purple cards remain in their prior lighter purple look). */
    .main-content > .card.p-3.mb-3,
    .main-content > .card.p-3:first-of-type {
        background: linear-gradient(180deg,#F8F6FF 0%, #F3F0FF 100%) !important;
        border-color: rgba(94,53,177,0.06) !important;
        color: var(--ys-text);
    }
    .main-content > .card.p-3.mb-3 .form-label,
    .main-content > .card.p-3.mb-3 .topbar-title,
    .main-content > .card.p-3.mb-3 .small,
    .main-content > .card.p-3.mb-3 .bi,
    .main-content > .card.p-3.mb-3 .btn,
    .main-content > .card.p-3.mb-3 .btn-ghost,
    .main-content > .card.p-3:first-of-type .form-label,
    .main-content > .card.p-3:first-of-type .topbar-title,
    .main-content > .card.p-3:first-of-type .small,
    .main-content > .card.p-3:first-of-type .bi,
    .main-content > .card.p-3:first-of-type .btn,
    .main-content > .card.p-3:first-of-type .btn-ghost {
        color: var(--ys-text) !important;
    }
    .main-content > .card.p-3.mb-3 .form-control,
    .main-content > .card.p-3.mb-3 .form-select,
    .main-content > .card.p-3.mb-3 .input-group-text,
    .main-content > .card.p-3:first-of-type .form-control,
    .main-content > .card.p-3:first-of-type .form-select,
    .main-content > .card.p-3:first-of-type .input-group-text {
        background: #fff;
        border-color: rgba(94,53,177,0.06);
        color: var(--ys-text);
    }
    .main-content > .card.p-3.mb-3 .form-control::placeholder,
    .main-content > .card.p-3:first-of-type .form-control::placeholder {
        color: rgba(29,27,32,0.5);
    }

    /* Ensure primary action buttons keep white text on the purple/pale surfaces */
    .main-content > .card.p-3.mb-3 .btn-primary,
    .main-content > .card.p-3:first-of-type .btn-primary {
        color: #fff !important;
    }
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.page-header-left h4 {
    font-weight: 800;
    margin-bottom: 2px;
}

.page-header-left p {
    color: var(--ys-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ── Cards ───────────────────────────────────────────────── */
.card {
    background: var(--ys-card-bg);
    border: 1px solid var(--ys-border);
    border-radius: var(--ys-radius);
    box-shadow: var(--ys-shadow);
}

/* Card view container: prevent horizontal scrolling (cards wrap instead) */
.emp-cards {
    overflow-x: hidden;
}

.emp-cards .card {
    min-width: 0; /* prevent cards from forcing row to overflow */
}

/* Users page cards container */
#usersCards {
    overflow-x: hidden;
}

#usersCards .card {
    min-width: 0;
}

/* Roster cards container: prevent horizontal scrolling */
.roster-cards {
    overflow-x: hidden;
}
.roster-cards .card { min-width: 0; }

/* Prevent wrapping of working days in roster list view */
.nowrap-days {
    white-space: nowrap;
    overflow: hidden;
}
.nowrap-days .badge { display: inline-block; }

/* Make options in employee multi-select more readable by increasing vertical spacing */
.select-employee option {
    padding-top: 6px;
    padding-bottom: 6px;
}

/* Use theme purple for selected options in the multi-select so selection matches app branding */
.select-employee option:checked,
.select-employee option:active {
    background-color: var(--ys-primary) !important;
    color: #fff !important;
    font-weight: 600;
}

/* Persistent theme styling for selected options even when select loses focus
   Some browsers show a different (grey) look when the select is not focused.
   We mirror selection to an option-level class via JS and style that class here. */
.select-employee option.selected-theme {
    background-color: var(--ys-primary) !important;
    color: #fff !important;
    font-weight: 600;
}

/* Custom checkbox list used as replacement for native multi-select in Bulk Assign */
.select-employee-list {
    border: 1px solid var(--ys-border);
    border-radius: 8px;
    padding: 8px;
    min-height: 200px;
    max-height: 360px;
    overflow-y: auto;
    background: var(--ys-card-bg);
}
.select-employee-list .emp-group-label { padding-left: 6px; }
.select-employee-list .list-item { margin-bottom: 4px; }
.select-employee-list .list-item .emp-text {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    transition: background 0.12s, color 0.12s;
}
.select-employee-list .list-item input[type="checkbox"] {
    flex: 0 0 auto;
}
/* Checked state uses theme purple */
.select-employee-list .list-item input[type="checkbox"]:checked + .emp-text,
.select-employee-list .list-item .emp-text.checked {
    /* Very light purple selection so contrast is subtle but visible */
    background: rgba(94,53,177,0.12);
    color: var(--ys-primary-dark);
    font-weight: 700;
}
.select-employee-list input[type="checkbox"] {
    /* Use accent-color so native checkbox matches theme in modern browsers */
    accent-color: var(--ys-primary);
    width: 18px;
    height: 18px;
}
.select-employee-list .list-item .emp-text:hover {
    background: rgba(94,53,177,0.06);
}
.select-employee-list label { display:flex; align-items:center; gap:8px; }

/* Highlight shift hours inside roster cards */
.shift-hours {
    background: linear-gradient(90deg, rgba(94,53,177,0.08), rgba(94,53,177,0.04));
    border-radius: 8px;
    padding: 6px 8px;
    min-width: 72px;
}
.shift-hours-value {
    color: var(--ys-primary);
    font-weight: 800;
    font-size: 0.95rem;
}

/* Footer shift hours for small devices */
.shift-hours-footer {
    background: rgba(94,53,177,0.06);
    padding: 6px 10px;
    border-radius: 8px;
}
.shift-hours-footer .shift-hours-value { font-size: 0.95rem; }

/* Hide action button labels on extra-small screens to show only icons */
@media (max-width: 576px) {
    .btn-label { display: none !important; }
    .btn i { margin-right: 0 !important; }

    /* Ensure action buttons in roster card footer are same height on xs */
    .roster-cards .card-footer .btn {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 6px 8px !important;
        height: 36px !important;
        min-height: 36px !important;
        line-height: 1 !important;
        font-size: 0.88rem !important;
    }
    .roster-cards .card-footer .btn i { margin-right: 0 !important; }
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--ys-border);
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 20px;
}

/* ── Stat cards ──────────────────────────────────────────── */
.stat-card {
    background: var(--ys-card-bg);
    border: 1px solid var(--ys-border);
    border-radius: var(--ys-radius);
    padding: 18px 18px;
    display: flex;
    flex-direction: column; /* stack header and value */
    justify-content: space-between; /* push value to bottom */
    align-items: stretch;
    min-height: 120px; /* uniform card height */
    box-shadow: var(--ys-shadow);
    transition: box-shadow 0.2s;
}

    .stat-card:hover {
        box-shadow: var(--ys-shadow-md);
    }

.stat-label {
    font-size: 0.78rem;
    color: var(--ys-text-muted);
    font-weight: 600;
    margin: 0;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--ys-text);
    /* ensure the numeric value appears visually separated at the bottom */
    margin-top: 8px;
}

/* Footer inside stat card containing the numeric value (left) and icon (right) */
.stat-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex: 0 0 44px;
}

.stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-delta {
    font-size: 0.72rem;
    margin-top: 4px;
}

    .stat-delta.up {
        color: #198754;
    }

    .stat-delta.down {
        color: #DC3545;
    }

/* ── Tables ──────────────────────────────────────────────── */
.table {
    margin-bottom: 0;
    font-size: 0.87rem;
}

    .table thead th {
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--ys-text-muted);
        border-bottom-width: 1px;
        padding: 10px 12px;
    }

    .table tbody td {
        padding: 12px 12px;
        vertical-align: middle;
        border-color: var(--ys-border);
    }

.table-hover tbody tr:hover {
    /* Use app very light purple and force it to override other rules */
    background: var(--ys-primary-light) !important;
}

/* Stronger override: cover more specific Bootstrap selectors that may set background-color */
table.table-hover > tbody > tr:hover,
.table.table-hover > tbody > tr:hover,
.table-hover > tbody > tr:hover {
    background-color: var(--ys-primary-light) !important;
    color: inherit !important;
}

/* Highest-specificity fallback: browsers or other libs may set background on each cell
   so force the cells to use the purple background as well. Placed after other rules. */
.table.table-hover tbody tr:hover td,
.table-hover tbody tr:hover td,
table.table-hover tbody tr:hover td {
    background-color: var(--ys-primary-light) !important;
    background-image: none !important;
}

/* ── Forms ───────────────────────────────────────────────── */
.form-control, .form-select {
    border-color: var(--ys-border);
    font-size: 0.88rem;
    border-radius: var(--ys-radius-sm);
    color: var(--ys-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-control:focus, .form-select:focus {
        border-color: var(--ys-primary);
        box-shadow: 0 0 0 3px rgba(94,53,177,0.15);
    }

/* Ensure any elements using Bootstrap's .text-info or .bg-info inherit app primary color */
.text-info, .bg-info, .text-info-subtle, .bg-info-subtle {
    color: var(--ys-primary) !important;
    background-color: rgba(94,53,177,0.06) !important;
}

/* Ensure any borders using Bootstrap 'info' or explicit info classes use app primary */
.border-info,
.table.table-info,
.card.border-info,
.input-group .input-group-text.info,
.list-group-item.info,
.form-control.is-valid,
.form-select.is-valid {
    border-color: var(--ys-primary) !important;
}

/* Outline-info buttons mapped to app primary */
.btn-outline-info {
    color: var(--ys-primary);
    background-color: transparent;
    border-color: var(--ys-primary);
}
.btn-outline-info:hover, .btn-outline-info:focus {
    color: #fff !important;
    background-color: var(--ys-primary) !important;
    border-color: var(--ys-primary) !important;
}

.form-label {
    font-size: 0.82rem;
}

.form-text {
    font-size: 0.75rem;
    color: var(--ys-text-muted);
}

.input-group-text {
    background: #F5F0FF;
    border-color: var(--ys-border);
    font-size: 0.85rem;
    color: var(--ys-text-muted);
}

/* Global checkbox / radio theme: use application primary color when selected */
input[type="checkbox"], input[type="radio"] {
    /* modern browsers support accent-color */
    accent-color: var(--ys-primary);
}

/* Bootstrap specific form-check inputs (override default blue) */
.form-check-input:checked {
    background-color: var(--ys-primary) !important;
    border-color: var(--ys-primary) !important;
}
.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(94,53,177,0.18) !important;
}

/* Radios: ensure border/indicator uses theme when selected */
.form-check-input[type="radio"]:checked {
    background-color: var(--ys-primary) !important;
    border-color: var(--ys-primary) !important;
}

/* Specific surface for attendance rules card to use very light purple */
.bg-attendance-rules {
    background: linear-gradient(180deg,#F8F6FF 0%, #F3F0FF 100%);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: var(--ys-radius-sm);
    transition: all 0.15s;
}

.btn-primary {
    background: var(--ys-primary);
    border-color: var(--ys-primary);
    color: #fff;
}

    .btn-primary:hover {
        background: var(--ys-primary-dark);
        border-color: var(--ys-primary-dark);
        box-shadow: 0 4px 12px rgba(94,53,177,0.35);
    }

.btn-ghost {
    background: transparent;
    border: none;
    color: var(--ys-text-muted);
    padding: 4px 8px;
}

    .btn-ghost:hover {
        background: #EDE7F6;
        color: var(--ys-primary);
    }

/* Outline primary buttons match app theme */
.btn-outline-primary {
    color: var(--ys-primary);
    background-color: transparent;
    border-color: var(--ys-primary);
}

    .btn-outline-primary:hover, .btn-outline-primary:focus {
        color: #fff !important;
        background-color: var(--ys-primary);
        border-color: var(--ys-primary);
        box-shadow: 0 6px 20px rgba(94,53,177,0.12);
    }

/* Make outline-secondary use theme purple for text and border globally */
.btn-outline-secondary {
    color: var(--ys-primary) !important;
    background-color: transparent;
    border-color: var(--ys-primary) !important;
}
.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    color: #fff !important;
    background-color: var(--ys-primary) !important;
    border-color: var(--ys-primary) !important;
    box-shadow: 0 6px 20px rgba(94,53,177,0.12);
}
.btn-outline-secondary:disabled,
.btn-outline-secondary.disabled {
    color: var(--ys-primary-light) !important;
    border-color: var(--ys-primary-light) !important;
}

/* Dropdown active state should match theme primary */
.dropdown-item.active, .dropdown-item:active,
.nav-link.active, .nav-link:active,
.btn:active, a:active {
    background-color: var(--ys-primary) !important;
    color: #fff !important;
}

/* Ensure active/focus borders for interactive controls use the theme purple
   instead of the default Bootstrap blue. This covers buttons, inputs, selects
   and generic interactive elements. */
.btn:active, .btn:focus, .btn:focus-visible,
input:active, textarea:active, select:active,
input:focus, textarea:focus, select:focus,
.form-control:active, .form-select:active,
.form-control:focus, .form-select:focus,
.dropdown-toggle:focus, .dropdown-toggle:active {
    border-color: var(--ys-primary) !important;
    box-shadow: 0 0 0 0.18rem rgba(94,53,177,0.14) !important;
}

/* Use theme purple-light for dropdown hover / focus instead of default grey */
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(94,53,177,0.06) !important; /* subtle purple tint */
    color: var(--ys-primary-dark) !important;
}

/* Select / option focus: attempt to use theme purple light where supported */
select.form-select option:focus,
select.form-select option:hover {
    background-color: rgba(94,53,177,0.06);
    color: var(--ys-primary-dark);
}

/* Checked state for toggle buttons using the hidden .btn-check input */
.btn-check:checked + .btn,
.btn-check:active + .btn,
.btn-check:focus + .btn {
    background: var(--ys-primary);
    color: #fff !important;
    border-color: var(--ys-primary);
    box-shadow: 0 6px 20px rgba(94,53,177,0.12);
}

    .btn-check:checked + .btn:hover,
    .btn-check:checked + .btn:focus {
        background: var(--ys-primary-dark);
        border-color: var(--ys-primary-dark);
    }

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 3px 8px;
}

/* Status badges (attendance) */
.badge-present {
    background: #DCFCE7;
    color: #166534;
}

.badge-absent {
    background: #FEE2E2;
    color: #991B1B;
}

.badge-halfday {
    background: #FEF3C7;
    color: #92400E;
}

.badge-late {
    background: #FFEDD5;
    color: #9A3412;
}

.badge-earlyleave {
    background: #FFEDD5;
    color: #9A3412;
}

.badge-weekoff {
    background: #F1F5F9;
    color: #475569;
}

.badge-holiday {
    background: #EDE7F6;
    color: #4527A0;
}

.badge-leave {
    background: #EDE7F6;
    color: #4527A0;
}

/* Pagination: use theme purple for pagination controls */
.pagination .page-link {
    color: var(--ys-primary);
    border-color: rgba(94,53,177,0.18);
}

.pagination .page-link:hover {
    background-color: rgba(94,53,177,0.06);
    color: var(--ys-primary-dark);
}

.pagination .page-item.active .page-link {
    background-color: var(--ys-primary);
    border-color: var(--ys-primary);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: var(--ys-text-disabled);
}

.pagination .page-link:focus {
    box-shadow: 0 0 0 0.18rem rgba(94,53,177,0.14);
}

/* Payment status badges */
.badge-paid {
    background: #DCFCE7;
    color: #166534;
}

.badge-pending {
    background: #FEF3C7;
    color: #92400E;
}

.badge-partial {
    background: #EDE7F6; /* light purple */
    color: var(--ys-primary-dark);
}

/* ── Attendance Calendar ─────────────────────────────────── */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.cal-day-header {
    text-align: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ys-text-muted);
    text-transform: uppercase;
    padding: 6px 0;
    letter-spacing: 0.05em;
}

.day-cell {
    border: 1.5px solid var(--ys-border);
    border-radius: var(--ys-radius-sm);
    padding: 7px 8px;
    min-height: 78px;
    cursor: pointer;
    position: relative;
    background: #fff;
    transition: all 0.15s;
}

    .day-cell:hover {
        border-color: var(--ys-primary);
        transform: translateY(-2px);
        box-shadow: 0 4px 14px rgba(94,53,177,0.15);
        z-index: 2;
    }

    .day-cell.empty {
        background: transparent;
        border-color: transparent;
        cursor: default;
    }

        .day-cell.empty:hover {
            transform: none;
            box-shadow: none;
        }

    .day-cell.today {
        border-color: var(--ys-primary) !important;
        box-shadow: 0 0 0 3px rgba(94,53,177,0.18);
    }

.att-present {
    background: #F0FDF4 !important;
    border-color: #86EFAC !important;
}

.att-absent {
    background: #FFF1F2 !important;
    border-color: #FECACA !important;
}

.att-halfday {
    background: #FFFBEB !important;
    border-color: #FDE68A !important;
}

.att-late {
    background: #FFF7ED !important;
    border-color: #FDBA74 !important;
}

.att-earlyleave {
    background: #FFF7ED !important;
    border-color: #FDBA74 !important;
}

.att-weekoff {
    background: #F8FAFC !important;
    border-color: #E2E8F0 !important;
}

.att-holiday {
    background: #EDE7F6 !important;
    border-color: #D1C4E9 !important;
}

.att-leave {
    background: #F3E5F5 !important;
    border-color: #CE93D8 !important;
}

.day-num {
    font-size: 0.8rem;
    font-weight: 700;
    color: #374151;
}

.day-status {
    font-size: 0.6rem;
    font-weight: 700;
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.day-time {
    font-size: 0.58rem;
    color: #6B7280;
    margin-top: 2px;
    line-height: 1.5;
}

.override-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ys-primary);
    border: 1.5px solid #fff;
}

/* ── Salary slip print ───────────────────────────────────── */
@media print {
    .sidebar, .topbar, .no-print {
        display: none !important;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .main-content {
        padding: 0 !important;
    }

    body {
        background: white !important;
        font-size: 11pt;
    }

    .slip-card {
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    a[href]:after {
        content: none !important;
    }
}

/* ── Avatars ─────────────────────────────────────────────── */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-initial {
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Theme avatar colors */
.bg-primary-subtle {
    background-color: rgba(94,53,177,0.08) !important;
    color: var(--ys-primary) !important;
}

.avatar-initial {
    background: linear-gradient(90deg, var(--ys-primary) 0%, var(--ys-primary-dark) 100%);
    color: #fff !important;
}

.text-primary {
    color: var(--ys-primary) !important;
}

/* Self attendance calendar improvements */
.self-attendance-calendar .calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
}
.self-attendance-calendar .day-header {
    text-align: center;
    font-weight: 700;
    color: var(--ys-text-muted);
    padding: 6px 8px;
    background: transparent;
}

/* Hide the top weekday labels (day names) as requested */
.self-attendance-calendar .day-header { display: none !important; }
.self-attendance-calendar .day-cell {
    min-height: 150px;
    padding: 10px;
    border-radius: 8px;
    background: var(--ys-card-bg);
    border: 1px solid var(--ys-border);
    box-shadow: var(--ys-shadow);
    display: flex;
    flex-direction: column;
}
.self-attendance-calendar .day-name-inside {
    font-size: 0.78rem;
    color: var(--ys-text-muted);
    font-weight: 700;
    margin-bottom: 6px;
}

/* Responsive: small screens show 2 columns and compact cards */
@media (max-width: 767px) {
    .self-attendance-calendar .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .self-attendance-calendar .day-cell {
        min-height: 120px;
        padding: 8px;
    }
    .self-attendance-calendar .day-thumb { height: 64px; }
    .self-attendance-calendar .day-header { display: none; }
}

@media (min-width: 768px) and (max-width: 991px) {
    /* tablet: 4 columns */
    .self-attendance-calendar .calendar-grid { grid-template-columns: repeat(4, 1fr); }
}
.self-attendance-calendar .day-cell.empty {
    background: transparent;
    border: none;
    box-shadow: none;
}
.self-attendance-calendar .day-num {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ys-text-muted);
}
.self-attendance-calendar .day-thumb {
    height: 78px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 8px;
}
.self-attendance-calendar .times { margin-top: 8px; font-size: 0.88rem }
.self-attendance-calendar .times div { color: var(--ys-text); }
.self-attendance-calendar .has-capture {
    border-left: 4px solid var(--ys-primary);
}

/* make headers sticky on large screens */
@media (min-width: 768px) {
    /* avoid sticky headers inside a scrolling container which can cause layout issues */
    .self-attendance-calendar .day-header { position: static; top: auto; background: transparent; z-index: 2; }
}

/* Fix overflow issues: ensure grid fits parent and cells don't create internal scrollbars */
.self-attendance-calendar .calendar-grid {
    width: 100%;
    box-sizing: border-box;
    grid-auto-rows: minmax(140px, auto);
}
.self-attendance-calendar .day-cell {
    overflow: hidden; /* prevent inner scrollbars */
}
.self-attendance-calendar .day-thumb {
    display: block;
    max-width: 100%;
    height: 78px;
    object-fit: cover;
}

/* Themed subtle backgrounds and text colors for role badges */
.bg-info-subtle {
    background-color: rgba(13,110,253,0.12) !important; /* light info */
    color: var(--ys-info) !important;
}

.text-info {
    color: var(--ys-info) !important;
}

/* purple branding alias (used for HR role) */
.bg-purple-subtle {
    background-color: rgba(94,53,177,0.10) !important;
    color: var(--ys-primary) !important;
}

.text-purple {
    color: var(--ys-primary) !important;
}

/* Purple solid and light variants used by roster badges */
.bg-purple {
    background-color: var(--ys-primary) !important;
    color: #fff !important;
}

.bg-purple-light {
    background-color: rgba(94,53,177,0.06) !important;
    color: var(--ys-primary) !important;
}

/* Secondary subtle (light gray) */
.bg-secondary-subtle {
    background-color: #F8FAFC !important;
    color: var(--ys-text-muted) !important;
}

.text-secondary {
    color: var(--ys-text-muted) !important;
}

/* ── Summary pills ───────────────────────────────────────── */
.summary-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border-radius: 30px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid;
}

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--ys-text-muted);
}

    .empty-state i {
        font-size: 3rem;
        opacity: 0.2;
        display: block;
        margin-bottom: 12px;
    }

    .empty-state h6 {
        font-weight: 700;
        color: var(--ys-text);
        margin-bottom: 6px;
    }

    .empty-state p {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s;
    }

        .sidebar.open {
            transform: translateX(0);
        }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .topbar {
        padding: 0 16px;
    }

    .main-content {
        padding: 16px;
    }

    /* Small device form title bar - match brand/sidebar background */
    .form-title-bar {
        background: linear-gradient(90deg, #32164a 0%, #2a0f3f 100%);
        color: #fff;
        padding: 10px 12px;
        border-radius: 8px;
        font-weight: 700;
        text-align: left;
    }

    .calendar-grid {
        gap: 2px;
    }

    .day-cell {
        min-height: 54px;
        padding: 5px 4px;
    }

    .day-num {
        font-size: 0.72rem;
    }

    .day-status, .day-time {
        display: none;
    }
    /* Hide organization selector and date/time in topbar on small devices */
    .topbar-org, .topbar-datetime, .topbar-sep {
        display: none !important;
    }
    /* Show mobile org selector inside sidebar */
    .sidebar-org-mobile { display: block !important; }
    /* On small devices show only the plus icon in the Add Department button */
    .btn-add-dept .full-text {
        display: none !important;
    }

    /* hide the short text too so only the icon is visible */
    .btn-add-dept .short-text {
        display: none !important;
    }

    /* remove the icon's end margin so it's centered without extra gap */
    .btn-add-dept .bi {
        margin-right: 0 !important;
    }

    /* Employee toolbar: stack controls on small screens */
    .emp-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
    }

    /* Prevent Roster Master button text from wrapping on small screens */
    .btn-roster-master { white-space: nowrap; }

    .emp-toolbar .form-select,
    .emp-toolbar .form-control {
        width: 100% !important;
    }

    /* ensure the left group flows vertically */
    .emp-toolbar > .d-flex {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    /* Keep view toggle and Add button inline and auto width on small screens */
    .emp-actions {
        display: flex !important;
        gap: 8px !important;
        align-items: center !important;
        justify-content: flex-start !important;
        width: auto !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;
        /* keep actions left-aligned and not stretched */
        align-self: flex-start !important;
    }

    .emp-actions .btn {
        width: auto !important;
        flex: 0 0 auto !important;
    }

    /* Ensure the toggle group and add button stay horizontal and don't stack */
    .emp-actions .btn-group,
    .emp-actions > a {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        flex: 0 0 auto !important;
    }

    /* Organization Users page: icon-only on small screens */
    .btn-invite .full-text,
    .btn-audit .full-text {
        display: none !important;
    }

    .btn-invite i, .btn-audit i {
        margin-right: 0 !important;
    }

    /* Make employee add button compact like department add on small screens */
    .btn-add-emp .full-text { display: none !important; }
    .btn-add-emp .short-text { display: none !important; }
    .btn-add-emp .bi { margin-right: 0 !important; }
}

/* ── Utilities ───────────────────────────────────────────── */
.fw-500 {
    font-weight: 500 !important;
}

.fw-600 {
    font-weight: 600 !important;
}

.fw-700 {
    font-weight: 700 !important;
}

.fw-800 {
    font-weight: 800 !important;
}

.text-xs {
    font-size: 0.72rem !important;
}

.text-sm {
    font-size: 0.82rem !important;
}

.gap-xs {
    gap: 4px !important;
}

.rounded-xl {
    border-radius: 16px !important;
}

/* ── Animated skeleton loader ────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, #EDE7F6 25%, #D1C4E9 50%, #EDE7F6 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 6px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ── Mobile sidebar toggle ───────────────────────────────── */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--ys-text);
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 768px) {
    .sidebar-toggle {
        display: block;
    }
}

/* ── Page transition ─────────────────────────────────────── */
.main-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Dark mode ───────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
    :root {
        --ys-primary: #B39DDB;
        --ys-primary-dark: #D1C4E9;
        --ys-primary-light: #312D4B;
        --ys-accent: #FFD54F;
        --ys-sidebar-bg: #12121A;
        --ys-sidebar-text: #CAC4D0;
        --ys-sidebar-active: rgba(179,157,219,0.15);
        --ys-body-bg: #12121A;
        --ys-card-bg: #1E1E2A;
        --ys-border: #333344;
        --ys-text: #E6E1E5;
        --ys-text-muted: #CAC4D0;
        --ys-text-disabled: #757575;
        --ys-success: #81C784;
        --ys-warning: #FFD54F;
        --ys-error: #E57373;
        --ys-info: #64B5F6;
        --ys-shadow: 0 1px 4px rgba(0,0,0,0.3);
        --ys-shadow-md: 0 4px 16px rgba(0,0,0,0.4);
    }

    body {
        color-scheme: dark;
        background: var(--ys-body-bg);
        color: var(--ys-text);
    }

    /* Surfaces */
    .topbar {
        background: var(--ys-card-bg);
        border-bottom-color: var(--ys-border);
    }

    .card {
        background: var(--ys-card-bg);
        border-color: var(--ys-border);
    }

    .card-header {
        border-color: var(--ys-border);
    }

    .stat-card {
        background: var(--ys-card-bg);
        border-color: var(--ys-border);
    }

    /* Tables */
    .table {
        color: var(--ys-text);
    }

        .table thead th {
            color: var(--ys-text-muted);
            border-color: var(--ys-border);
        }

        .table tbody td {
            border-color: var(--ys-border);
        }

    .table-hover tbody tr:hover {
        background: rgba(94,53,177,0.10);
    }

    .table-light {
        --bs-table-bg: #252535;
        --bs-table-color: #E6E1E5;
    }

    .table-success {
        --bs-table-bg: rgba(129,199,132,0.15);
        --bs-table-color: #81C784;
    }

    .table-danger {
        --bs-table-bg: rgba(229,115,115,0.15);
        --bs-table-color: #E57373;
    }

    /* Forms */
    .form-control, .form-select {
        background-color: #252535;
        border-color: var(--ys-border);
        color: var(--ys-text);
    }

        .form-control:focus, .form-select:focus {
            background-color: #252535;
            border-color: var(--ys-primary);
            box-shadow: 0 0 0 3px rgba(179,157,219,0.2);
        }

        .form-control::placeholder {
            color: var(--ys-text-disabled);
        }

    .input-group-text {
        background-color: #252535;
        border-color: var(--ys-border);
        color: var(--ys-text-muted);
    }

    /* Buttons */
    .btn-primary {
        color: #1D1B20;
        background-color: var(--ys-primary);
        border-color: var(--ys-primary);
    }

        .btn-primary:hover {
            color: #1D1B20;
            background-color: var(--ys-primary-dark);
            border-color: var(--ys-primary-dark);
            box-shadow: 0 4px 12px rgba(179,157,219,0.3);
        }

    .btn-ghost:hover {
        background: rgba(255,255,255,0.07);
        color: var(--ys-text);
    }

    .btn-outline-secondary {
        border-color: var(--ys-border);
        color: var(--ys-text-muted);
    }

        .btn-outline-secondary:hover {
            background: rgba(255,255,255,0.07);
            color: var(--ys-text);
            border-color: var(--ys-primary);
        }

    .btn-outline-success {
        border-color: #81C784;
        color: #81C784;
    }

        .btn-outline-success:hover {
            background: rgba(129,199,132,0.15);
            color: #81C784;
            border-color: #81C784;
        }

    /* Attendance calendar */
    .day-cell {
        background: #252535;
        border-color: var(--ys-border);
    }

        .day-cell:hover {
            border-color: var(--ys-primary);
            box-shadow: 0 4px 14px rgba(179,157,219,0.15);
        }

        .day-cell.today {
            border-color: var(--ys-primary) !important;
            box-shadow: 0 0 0 3px rgba(179,157,219,0.25) !important;
        }

    .day-num {
        color: var(--ys-text);
    }

    .att-present {
        background: rgba(129,199,132,0.12) !important;
        border-color: rgba(129,199,132,0.35) !important;
    }

    .att-absent {
        background: rgba(229,115,115,0.12) !important;
        border-color: rgba(229,115,115,0.35) !important;
    }

    .att-halfday {
        background: rgba(255,213,79,0.10) !important;
        border-color: rgba(255,213,79,0.30) !important;
    }

    .att-late {
        background: rgba(255,183,77,0.10) !important;
        border-color: rgba(255,183,77,0.30) !important;
    }

    .att-earlyleave {
        background: rgba(255,183,77,0.10) !important;
        border-color: rgba(255,183,77,0.30) !important;
    }

    .att-weekoff {
        background: rgba(255,255,255,0.04) !important;
        border-color: var(--ys-border) !important;
    }

    .att-holiday {
        background: rgba(179,157,219,0.12) !important;
        border-color: rgba(179,157,219,0.35) !important;
    }

    .att-leave {
        background: rgba(179,157,219,0.10) !important;
        border-color: rgba(179,157,219,0.25) !important;
    }

    /* Badges */
    .badge-present {
        background: rgba(129,199,132,0.2);
        color: #81C784;
    }

    .badge-absent {
        background: rgba(229,115,115,0.2);
        color: #E57373;
    }

    .badge-halfday {
        background: rgba(255,213,79,0.15);
        color: #FFD54F;
    }

    .badge-late {
        background: rgba(255,183,77,0.15);
        color: #FFB74D;
    }

    .badge-earlyleave {
        background: rgba(255,183,77,0.15);
        color: #FFB74D;
    }

    .badge-weekoff {
        background: rgba(255,255,255,0.06);
        color: #CAC4D0;
    }

    .badge-holiday {
        background: rgba(179,157,219,0.2);
        color: #B39DDB;
    }

    .badge-leave {
        background: rgba(179,157,219,0.2);
        color: #B39DDB;
    }

    .badge-paid {
        background: rgba(129,199,132,0.2);
        color: #81C784;
    }

    .badge-pending {
        background: rgba(255,213,79,0.15);
        color: #FFD54F;
    }

    .badge-partial {
        background: rgba(100,181,246,0.2);
        color: #64B5F6;
    }

    /* Skeleton */
    .skeleton {
        background: linear-gradient(90deg, #252535 25%, #333344 50%, #252535 75%);
        background-size: 200% 100%;
    }

    /* Dropdowns */
    .dropdown-menu {
        background-color: #252535;
        border-color: var(--ys-border);
    }

    .dropdown-item {
        color: var(--ys-text);
    }

        .dropdown-item:hover, .dropdown-item:focus {
            background: rgba(255,255,255,0.06);
            color: var(--ys-text);
        }

    .dropdown-header {
        color: var(--ys-text-muted) !important;
    }

    /* Bootstrap semantic overrides */
    .bg-success-subtle {
        background-color: rgba(129,199,132,0.15) !important;
    }

    .text-success {
        color: #81C784 !important;
    }

    .bg-info-subtle {
        background-color: rgba(100,181,246,0.15) !important;
    }

    .text-info {
        color: #64B5F6 !important;
    }

    .bg-warning-subtle {
        background-color: rgba(255,213,79,0.15) !important;
    }

    .text-warning {
        color: #FFD54F !important;
    }

    .bg-danger-subtle {
        background-color: rgba(229,115,115,0.15) !important;
    }

    .text-danger {
        color: #E57373 !important;
    }

    .text-muted {
        color: var(--ys-text-muted) !important;
    }

    .border, .border-bottom, .border-end, .border-top {
        border-color: var(--ys-border) !important;
    }
}
