:root {
        --kuhn-black: #050505;
    --kuhn-black-soft: #1f1f1f;
    --kuhn-orange: #F28C28;
    --kuhn-orange-dark: #C06E18;
    --kuhn-nav-orange: #E7A348;
    --kuhn-gold: #F2C66D;
    --kuhn-cream: #FFF3E4;
    --kuhn-light: #F7F7F7;
    --kuhn-border: #D9D9D9;

    --kuhn-red: var(--kuhn-orange);
    --kuhn-red-dark: var(--kuhn-orange-dark);
    --kuhn-red-soft: var(--kuhn-cream);
    --kuhn-gray: var(--kuhn-black-soft);

    --bg: #FFFFE3;
    --card: #ffffff;
    --text: #171717;
    --muted: #6b7280;
    --primary: var(--kuhn-orange);
}

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

.kuhn-navbar {
    background: var(--kuhn-nav-orange);
    border-bottom: 3px solid var(--kuhn-black);
}

.kuhn-navbar .navbar-brand,
.kuhn-navbar .nav-link {
    color: var(--kuhn-black) !important;
}

.kuhn-navbar .navbar-brand {
    font-size: 1.15rem;
    white-space: nowrap;
}

.kuhn-navbar .nav-link {
    font-weight: 650;
    border-radius: 10px;
    padding-left: .72rem !important;
    padding-right: .72rem !important;
}

.kuhn-navbar .nav-link:hover,
.kuhn-navbar .nav-link:focus {
    background: rgba(255,255,255,.32);
    color: #000 !important;
}

.kuhn-navbar .nav-cta {
    background: var(--kuhn-black);
    color: #fff !important;
}

.kuhn-navbar .nav-cta:hover,
.kuhn-navbar .nav-cta:focus {
    background: #fff;
    color: var(--kuhn-black) !important;
}

.kuhn-navbar .dropdown-menu {
    border: 1px solid rgba(5,5,5,.18);
    box-shadow: 0 10px 24px rgba(5,5,5,.12);
}

.kuhn-navbar .user-menu {
    background: rgba(255,255,255,.22);
}

.kuhn-nav-logo {
    height: 34px;
    width: auto;
    background: #fff;
    border: 1px solid var(--kuhn-black);
    padding: 2px 4px;
    margin-right: 10px;
}


.kuhn-brand-mark,
.login-logo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--kuhn-black);
    border: 2px solid var(--kuhn-black);
    border-radius: 0;
    padding: 2px 8px;
    margin-right: 8px;
    letter-spacing: .12em;
    font-weight: 900;
    box-shadow: inset -10px 0 0 var(--kuhn-orange), inset -18px 0 0 var(--kuhn-gold);
}

.login-logo span {
    font-size: 1.1rem;
    padding: 8px 24px 8px 14px;
    box-shadow: inset -16px 0 0 var(--kuhn-orange), inset -28px 0 0 var(--kuhn-gold), 0 10px 30px rgba(5, 5, 5, .13);
}

.kuhn-login-logo {
    width: 188px;
    max-width: 100%;
    height: auto;
    background: #fff;
    border: 2px solid var(--kuhn-black);
    padding: 6px 8px;
    box-shadow: 0 10px 28px rgba(5, 5, 5, .12), 0 4px 0 var(--kuhn-gold);
}

.login-wrap {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg);
}

.login-card {
    width: 100%;
    max-width: 520px;
    border-radius: 22px;
    border-top: 5px solid var(--kuhn-orange) !important;
}


.card {
    border: 0;
    border-radius: 18px;
}

.card-header:first-child {
    border-radius: 18px 18px 0 0;
}

.btn-primary {
    --bs-btn-bg: var(--kuhn-orange);
    --bs-btn-border-color: var(--kuhn-orange);
    --bs-btn-color: #111;
    --bs-btn-hover-bg: var(--kuhn-orange-dark);
    --bs-btn-hover-border-color: var(--kuhn-orange-dark);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--kuhn-orange-dark);
    --bs-btn-active-border-color: var(--kuhn-orange-dark);
    --bs-btn-active-color: #fff;
    font-weight: 700;
}

.btn-outline-primary {
    --bs-btn-color: var(--kuhn-black);
    --bs-btn-border-color: var(--kuhn-orange);
    --bs-btn-hover-bg: var(--kuhn-orange);
    --bs-btn-hover-border-color: var(--kuhn-orange);
    --bs-btn-hover-color: #111;
    --bs-btn-active-bg: var(--kuhn-orange-dark);
    --bs-btn-active-border-color: var(--kuhn-orange-dark);
    --bs-btn-active-color: #fff;
}

.dropdown-item:active {
    background: var(--kuhn-orange);
    color: #111;
}

.metric-card {
    background: var(--card);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 3px solid transparent;
}

.metric-card.small {
    min-height: 100px;
}

.metric-card span {
    color: var(--muted);
    font-weight: 600;
}

.metric-card strong {
    font-size: 2.4rem;
    line-height: 1;
    margin-top: 10px;
}

.metric-card small {
    color: var(--muted);
}

.metric-card.highlight {
    background: #FFF8EF;
    color: var(--text);
    border-top: 4px solid var(--kuhn-orange);
    border: 1px solid #F1D2A5;
    box-shadow: 0 6px 18px rgba(242, 140, 40, .10);
}

.metric-card.highlight span,
.metric-card.highlight small {
    color: #7A5A2B;
}

.metric-card.highlight strong {
    color: var(--kuhn-black);
}

.metric-card.mandatory-card {
    background: var(--card);
    color: var(--text);
}

.metric-card.mandatory-card strong {
    color: #6B46C1;
}

.role-check-list {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .65);
}

.role-check-list .form-check {
    margin-top: 4px;
    margin-bottom: 4px;
}

.hr-card {
    border-left: 5px solid var(--kuhn-orange) !important;
    background: #fff;
}

.status {
    display: inline-flex;
    align-items: center;
    padding: .32rem .58rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .82rem;
}

.status-pending { background: #fff1c7; color: #7a5600; }
.status-approved { background: #dff7e8; color: #176a36; }
.status-rejected { background: #fde1df; color: #98261e; }
.status-cancelled { background: #e5e7eb; color: #374151; }

.comment-cell {
    max-width: 260px;
    white-space: normal;
}

.person-pill {
    border: 1px solid #e5e7eb;
    border-left: 5px solid var(--kuhn-orange);
    border-radius: 14px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
}

.person-pill small {
    color: var(--muted);
}

.legend {
    display: flex;
    gap: 16px;
    align-items: center;
    color: var(--muted);
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 99px;
    margin-right: 6px;
    vertical-align: -1px;
}

.dot.pending { background: var(--kuhn-gold); }
.dot.approved { background: #2ecc71; }

.list-group-item.unread {
    background: var(--kuhn-cream);
    border-left: 5px solid var(--kuhn-orange);
}

.table thead th {
    color: #4b5563;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.fc .fc-toolbar-title {
    font-size: 1.35rem;
    font-weight: 800;
}

.fc-event {
    border: 0 !important;
    padding: 2px 4px;
    border-radius: 6px;
}

.fc .fc-button-primary {
    background: var(--kuhn-black-soft);
    border-color: var(--kuhn-black-soft);
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:active {
    background: var(--kuhn-orange) !important;
    border-color: var(--kuhn-orange) !important;
    color: #111 !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--kuhn-orange);
    box-shadow: 0 0 0 .2rem rgba(240, 120, 32, .18);
}

.badge.bg-secondary {
    background: var(--kuhn-black-soft) !important;
}

@media (max-width: 768px) {
    .metric-card { min-height: 100px; }
    .metric-card strong { font-size: 2rem; }
    .kuhn-nav-logo { height: 34px; }
}


.holiday-event {
    font-weight: 700;
    border: 1px solid #B8731A !important;
}

.dot.holiday { background: #D71920; border: 1px solid #8F1010; }

@media (max-width: 1200px) {
    .kuhn-navbar .navbar-nav { padding-top: .5rem; }
    .kuhn-navbar .nav-link { margin-bottom: .2rem; }
}

@media (max-width: 576px) {
    .brand-title { font-size: .98rem; }
    .kuhn-nav-logo { height: 30px; }
}


.navbar.kuhn-navbar,
.kuhn-navbar,
body .kuhn-navbar,
body nav.kuhn-navbar {
    background: #E7A348 !important;
    background-image: none !important;
    background-color: #E7A348 !important;
    border-bottom: 3px solid #111111 !important;
    box-shadow: none !important;
}

.kuhn-navbar .navbar-brand,
.kuhn-navbar .brand-title,
.kuhn-navbar .nav-link,
.kuhn-navbar .dropdown-toggle,
.kuhn-navbar .user-menu {
    color: #111111 !important;
}

.kuhn-navbar .navbar-brand {
    font-size: 1.05rem !important;
    letter-spacing: -0.01em;
}

.kuhn-navbar .brand-title {
    font-weight: 800;
}

.kuhn-nav-logo {
    height: 30px !important;
    max-width: 56px;
    object-fit: contain;
    background: #ffffff !important;
    border: 1px solid #111111 !important;
    padding: 1px 3px !important;
    margin-right: 9px !important;
}

.kuhn-navbar .nav-link {
    font-size: .96rem !important;
    padding: .42rem .58rem !important;
    margin: 0 .04rem;
    font-weight: 650;
}

.kuhn-navbar .nav-link:hover,
.kuhn-navbar .nav-link:focus,
.kuhn-navbar .user-menu:hover,
.kuhn-navbar .user-menu:focus {
    background: rgba(255,255,255,.36) !important;
    color: #000000 !important;
}

.kuhn-navbar .nav-cta,
.kuhn-navbar .nav-link.active {
    background: #111111 !important;
    color: #ffffff !important;
}

.kuhn-navbar .user-menu {
    background: transparent !important;
    padding-right: .35rem !important;
    white-space: nowrap;
}

.kuhn-navbar .badge:not(.rounded-pill),
.kuhn-navbar .role-badge,
.kuhn-navbar .user-role,
.kuhn-navbar .text-bg-dark {
    display: none !important;
}

.btn-primary {
    --bs-btn-bg: #F28C28 !important;
    --bs-btn-border-color: #F28C28 !important;
    --bs-btn-color: #111111 !important;
    --bs-btn-hover-bg: #111111 !important;
    --bs-btn-hover-border-color: #111111 !important;
    --bs-btn-hover-color: #ffffff !important;
    --bs-btn-active-bg: #111111 !important;
    --bs-btn-active-border-color: #111111 !important;
    --bs-btn-active-color: #ffffff !important;
}

.metric-card.highlight {
    background: #111111 !important;
    color: #ffffff !important;
    border-top: 4px solid #E7A348 !important;
}

.login-card {
    border-top-color: #F28C28 !important;
}

.hr-card,
.person-pill,
.list-group-item.unread {
    border-left-color: #F28C28 !important;
}

.notification-link .badge.rounded-pill {
    display: inline-block !important;
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

@media (max-width: 1400px) {
    .kuhn-navbar .navbar-brand { font-size: .98rem !important; }
    .kuhn-navbar .nav-link { font-size: .90rem !important; padding-left: .45rem !important; padding-right: .45rem !important; }
    .kuhn-nav-logo { height: 28px !important; max-width: 50px; }
}


.login-wrap {
    min-height: calc(100vh - 3rem);
}

.login-card {
    margin-inline: auto;
}

.login-card .card-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-card form {
    width: 100%;
    max-width: 420px;
    text-align: left;
}

.login-card .demo-box {
    width: 100%;
    max-width: 420px;
    text-align: left;
}

.login-logo {
    width: 100%;
    display: flex;
    justify-content: center;
}

@media (max-width: 576px) {
    .login-card {
        max-width: 100%;
    }

    .login-card .card-body {
        padding: 2rem 1.25rem !important;
    }
}


.birthday-card {
    border-left: 5px solid var(--kuhn-gold) !important;
}

.birthday-pill {
    border: 1px solid #ead6bd;
    border-left: 5px solid var(--kuhn-gold);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: #fffaf4;
    min-height: 78px;
}

.legend .dot.birthday {
    background: var(--kuhn-gold);
    border: 1px solid var(--kuhn-black);
}

.fc .birthday-event {
    font-weight: 700;
}


html,
body,
main,
.login-wrap {
    background: #FFFFE3 !important;
}

.holiday-event,
.fc .holiday-event {
    background-color: #D71920 !important;
    border: 1px solid #8F1010 !important;
    color: #ffffff !important;
    font-weight: 800;
}

.dot.holiday,
.legend .dot.holiday {
    background: #D71920 !important;
    border: 1px solid #8F1010 !important;
}


.remaining-card {
    background: var(--card);
    border-top: 3px solid transparent;
}

.remaining-card .remaining-value.good {
    color: #198754;
}

.remaining-card .remaining-value.low {
    color: #dc3545;
}


/* v41: piros értesítés + hover animáció */
.notification-link {
    color: #dc3545 !important;
    transition: transform .18s ease, background-color .18s ease, color .18s ease;
}

.notification-link .bi-bell {
    color: #dc3545 !important;
    transition: transform .18s ease;
    transform-origin: 50% 10%;
}

.notification-link:hover,
.notification-link:focus {
    background: rgba(220, 53, 69, .14) !important;
    color: #b02a37 !important;
    transform: translateY(-2px);
}

.notification-link:hover .bi-bell,
.notification-link:focus .bi-bell {
    transform: rotate(-14deg) scale(1.18);
}

.notification-link .badge.rounded-pill {
    background-color: #dc3545 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .18);
    animation: notification-pulse 1.8s ease-in-out infinite;
}

@keyframes notification-pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.12); }
}

.btn-ics {
    white-space: nowrap;
}

.btn-ics:hover {
    transform: translateY(-1px);
}


/* v44 request button + navbar cleanup */
.kuhn-navbar .nav-cta {
    background: transparent !important;
    color: var(--kuhn-black) !important;
}

.kuhn-navbar .nav-cta:hover,
.kuhn-navbar .nav-cta:focus {
    background: rgba(255,255,255,.36) !important;
    color: #000000 !important;
}

.btn-request {
    --bs-btn-bg: #198754 !important;
    --bs-btn-border-color: #198754 !important;
    --bs-btn-color: #ffffff !important;
    --bs-btn-hover-bg: #157347 !important;
    --bs-btn-hover-border-color: #146c43 !important;
    --bs-btn-hover-color: #ffffff !important;
    --bs-btn-active-bg: #146c43 !important;
    --bs-btn-active-border-color: #146c43 !important;
    --bs-btn-active-color: #ffffff !important;
    font-weight: 700;
}


/* v47 mobile responsive layout */
@media (max-width: 767.98px) {
    html, body {
        overflow-x: hidden;
    }

    main.container-fluid {
        padding: .85rem .65rem !important;
    }

    .container, .container-fluid, .container-lg, .container-xl {
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }

    .kuhn-navbar .container-fluid {
        padding-left: .65rem !important;
        padding-right: .65rem !important;
    }

    .kuhn-navbar .navbar-brand {
        max-width: calc(100vw - 96px);
        font-size: .95rem !important;
        overflow: hidden;
    }

    .kuhn-navbar .brand-title {
        display: inline-block;
        max-width: calc(100vw - 150px);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .kuhn-nav-logo {
        height: 30px !important;
        max-width: 48px;
        margin-right: 8px;
    }

    .navbar-toggler {
        padding: .25rem .45rem;
        border-color: rgba(5, 5, 5, .35);
    }

    .navbar-collapse {
        margin-top: .65rem;
        padding-top: .65rem;
        border-top: 1px solid rgba(5, 5, 5, .18);
    }

    .kuhn-navbar .nav-link,
    .kuhn-navbar .user-menu {
        width: 100%;
        padding: .7rem .75rem !important;
        margin: .08rem 0;
        border-radius: 12px;
    }

    .kuhn-navbar .dropdown-menu {
        width: 100%;
        border-radius: 14px;
        margin-top: .25rem;
    }

    .d-flex.justify-content-between.align-items-center,
    .d-flex.justify-content-between.align-items-start {
        align-items: stretch !important;
    }

    .d-flex.justify-content-between.align-items-center > .btn,
    .d-flex.justify-content-between.align-items-start > .btn,
    .d-flex.justify-content-between.align-items-center > div > .btn,
    .d-flex.justify-content-between.align-items-start > div > .btn {
        width: 100%;
    }

    .btn-group {
        width: 100%;
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: .45rem;
    }

    .btn-group .btn {
        border-radius: 10px !important;
        width: 100%;
    }

    .card {
        border-radius: 16px;
    }

    .card-body {
        padding: 1rem !important;
    }

    .card-body.p-0 {
        padding: 0 !important;
    }

    .metric-card {
        min-height: 96px;
        padding: 16px;
        border-radius: 16px;
    }

    .metric-card strong {
        font-size: 2rem;
    }

    .birthday-pill,
    .person-pill {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .birthday-pill .text-end {
        text-align: left !important;
    }

    .legend {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
        font-size: .92rem;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-mobile {
        border-collapse: separate;
        border-spacing: 0 .75rem;
        margin-bottom: 0;
    }

    .table-mobile thead {
        display: none;
    }

    .table-mobile tbody,
    .table-mobile tr,
    .table-mobile td {
        display: block;
        width: 100%;
    }

    .table-mobile tbody tr {
        background: #ffffff;
        border: 1px solid #ead6bd;
        border-left: 5px solid var(--kuhn-orange);
        border-radius: 16px;
        box-shadow: 0 6px 18px rgba(5, 5, 5, .06);
        padding: .45rem .75rem;
        margin-bottom: .8rem;
    }

    .table-mobile tbody tr.table-secondary {
        background: #f1f1ee;
    }

    .table-mobile td {
        border: 0 !important;
        border-bottom: 1px solid #f0e2cd !important;
        padding: .58rem 0 !important;
        white-space: normal !important;
        word-break: break-word;
    }

    .table-mobile td:last-child {
        border-bottom: 0 !important;
    }

    .table-mobile td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: .18rem;
        color: #6b7280;
        font-size: .78rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .table-mobile td.actions-cell,
    .table-mobile td.comment-cell {
        max-width: none !important;
    }

    .table-mobile td.actions-cell .d-flex,
    .table-mobile td.actions-cell form.approval-form {
        width: 100%;
    }

    .table-mobile td.actions-cell .btn,
    .table-mobile td.actions-cell form:not(.approval-form) {
        width: 100%;
    }

    .table-mobile td.actions-cell form:not(.approval-form) .btn {
        width: 100%;
    }

    .approval-form textarea {
        min-height: 82px;
    }

    .approval-form .btn {
        width: 100%;
        margin-bottom: .35rem;
    }

    #calendar {
        font-size: .88rem;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        gap: .6rem;
        align-items: stretch;
    }

    .fc .fc-toolbar-title {
        font-size: 1.15rem;
        text-align: center;
    }

    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: .35rem;
    }

    .fc .fc-button {
        padding: .38rem .55rem;
        font-size: .86rem;
    }

    .fc .fc-list-event-title,
    .fc .fc-list-event-time {
        white-space: normal;
    }

    .modal-dialog {
        margin: .75rem;
    }
}

@media (max-width: 420px) {
    .kuhn-navbar .brand-title {
        max-width: calc(100vw - 132px);
    }

    .legend {
        grid-template-columns: 1fr;
    }

    h1.h3, .h3 {
        font-size: 1.35rem;
    }

    .btn, .form-control, .form-select {
        font-size: .96rem;
    }
}


/* v49 calendar: per-employee colors and date input hardening */
.dot.employee-color {
    background: linear-gradient(135deg, #2f80ed 0%, #27ae60 45%, #9b59b6 100%);
    border: 1px solid rgba(0,0,0,.18);
}

.fc .leave-event-pending {
    border-style: dashed !important;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
}

.fc .leave-event-approved {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
}

.fc .birthday-event {
    border-style: solid !important;
    filter: saturate(.92) brightness(1.08);
}

input[type="date"]:invalid {
    border-color: #dc3545;
}

.fc .leave-event-approved {
    background-color: #EAF7EE !important;
    color: #173B25 !important;
    border: 1px solid rgba(25, 135, 84, .45) !important;
    border-left: 5px solid #198754 !important;
}

.fc .leave-event-pending {
    background-color: #FFF3CD !important;
    color: #3A2A00 !important;
    border: 1px solid rgba(200, 135, 0, .45) !important;
    border-left: 5px solid #C88700 !important;
}

.fc .calendar-event-inner {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    max-width: 100%;
}

.fc .calendar-user-dot {
    flex: 0 0 auto;
    width: .55rem;
    height: .55rem;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.18);
}

.fc .calendar-event-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 700;
}

.fc .calendar-status-mini {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: .05rem .38rem;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
}

.fc .calendar-status-mini.approved {
    background: rgba(25, 135, 84, .14);
    color: #146C43;
}

.fc .calendar-status-mini.pending {
    background: rgba(200, 135, 0, .16);
    color: #7A5600;
}

.fc .calendar-event-days {
    flex: 0 0 auto;
    font-size: .78rem;
    opacity: .82;
}

.carryover-form {
    min-width: 260px;
}

.approval-warning-row td {
    background: #fff7df;
    border-top: 0;
}

#substituteWarning {
    border-left: 4px solid #c88700;
}

.change-request-item:target {
    border-left: 4px solid #f58220;
    background: #fff8e8;
}

.fc .mandatory-leave-event,
.mandatory-leave-event {
    background-color: #F0E9FF !important;
    color: #24113F !important;
    border: 1px solid rgba(91, 58, 142, .55) !important;
    border-left: 5px solid #5B3A8E !important;
    font-weight: 700;
}

.dot.mandatory,
.legend .dot.mandatory {
    background: #5B3A8E;
    border: 1px solid #3D2865;
}

.mandatory-detail {
    border-left: 4px solid #5B3A8E !important;
}

.team-overview-page {
    max-width: 1540px;
}

.team-toolbar {
    max-width: 1080px;
    margin-inline: auto;
    border-radius: 16px;
}

.team-legend {
    display: flex;
    justify-content: flex-end;
    gap: 18px;
    flex-wrap: wrap;
    color: #59606b;
    font-weight: 650;
}

.team-legend-box {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    margin-right: 6px;
    vertical-align: -2px;
}

.team-legend-box.approved { background: #86C91E; }
.team-legend-box.pending { background: #E9C46A; }
.team-legend-box.mandatory { background: #5B3A8E; }
.team-legend-box.holiday { background: #D71920; }

.team-board {
    border-radius: 18px;
    overflow: hidden;
}

.team-board-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.team-grid {
    --team-name-width: 250px;
    --team-day-width: 44px;
    display: grid;
    grid-template-columns: var(--team-name-width) repeat(var(--team-days), var(--team-day-width));
    min-width: calc(var(--team-name-width) + var(--team-days) * var(--team-day-width));
    background: #ffffff;
}

.team-header-name,
.team-day-head,
.team-person-cell,
.team-days-row {
    border-bottom: 1px solid #ebedf1;
}

.team-header-name {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
}

.team-day-head {
    min-height: 58px;
    text-align: center;
    font-size: .82rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-right: 1px solid #edf0f3;
}

.team-day-head strong {
    color: #1f2937;
    font-size: .9rem;
}

.team-day-head span {
    color: #6b7280;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}

.team-person-cell {
    position: sticky;
    left: 0;
    z-index: 3;
    min-height: 54px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
}

.team-grid > .team-person-cell:nth-of-type(4n+1) {
    background: #f7f7f7;
}

.team-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #20335f;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 800;
    flex: 0 0 auto;
}

.team-person-name {
    font-weight: 800;
    line-height: 1.15;
}

.team-person-meta {
    color: #6b7280;
    font-size: .76rem;
    text-transform: uppercase;
    font-weight: 800;
    margin-top: 2px;
}

.team-days-row {
    grid-column: span var(--team-days);
    min-height: 58px;
    display: grid;
    grid-template-columns: repeat(var(--team-days), var(--team-day-width));
    grid-template-rows: 58px;
    position: relative;
    background: #ffffff;
}

.team-days-row:nth-of-type(4n) {
    background: #ffffff;
}

.team-day-cell {
    grid-row: 1;
    border-right: 1px solid #edf0f3;
    min-height: 58px;
    height: 58px;
}

.team-day-head.is-weekend,
.team-day-cell.is-weekend {
    background-color: #EEF1F5;
    background-image: none;
}

.team-day-head.is-weekend {
    box-shadow: inset 0 -2px 0 rgba(31, 41, 55, .08);
}

.team-day-head.is-today,
.team-day-cell.is-today {
    background-color: #fff7d6;
}

.team-day-head.is-holiday,
.team-day-cell.is-holiday {
    background-color: #ffecec;
}

.team-day-head.is-mandatory,
.team-day-cell.is-mandatory {
    background-color: #f1eafe;
}

.team-leave-bar {
    grid-row: 1;
    align-self: center;
    min-height: 28px;
    border-radius: 7px;
    z-index: 3;
    margin: 8px 3px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 .55rem;
    font-weight: 800;
    font-size: .72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-shadow: none;
    box-sizing: border-box;
    cursor: default;
}


.team-leave-bar.approved {
    background-color: #EAF7EE;
    color: #173B25;
    border: 1px solid rgba(25, 135, 84, .45);
    border-left: 5px solid #198754;
}

.team-leave-bar.pending {
    background-color: #FFF3CD;
    color: #3A2A00;
    border: 1px solid rgba(200, 135, 0, .45);
    border-left: 5px solid #C88700;
}

.team-calendar-event-inner {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-width: 0;
    max-width: 100%;
}

.team-status-mini {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: .05rem .38rem;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.2;
}

.team-status-mini.approved {
    background: rgba(25, 135, 84, .14);
    color: #146C43;
}

.team-status-mini.pending {
    background: rgba(200, 135, 0, .16);
    color: #7A5600;
}

.team-event-days {
    flex: 0 0 auto;
    font-size: .78rem;
    opacity: .82;
}



.team-leave-popover {
    position: fixed;
    left: 0;
    top: 0;
    width: 288px;
    background: #24113F;
    color: #ffffff;
    border-radius: 2px;
    box-shadow: 0 18px 40px rgba(17, 12, 31, .28);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
    overflow: visible;
}

.team-leave-popover.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.team-leave-popover::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -8px;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #24113F;
}

.team-leave-popover.is-below::before {
    top: -8px;
    bottom: auto;
    border-top: 0;
    border-bottom: 8px solid #24113F;
}

.team-popover-main {
    padding: 16px 18px 18px;
}

.team-popover-head {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.team-popover-avatar {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #20335F;
    color: #BFD7FF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .62rem;
    font-weight: 800;
}

.team-popover-name {
    font-weight: 800;
    font-size: .82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-popover-date {
    font-size: .78rem;
    color: rgba(255, 255, 255, .66);
    white-space: nowrap;
}

.team-popover-label {
    color: rgba(255, 255, 255, .58);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.team-popover-type,
.team-popover-period {
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.35;
}

.team-popover-period {
    margin-top: 7px;
}

.team-popover-availability {
    margin-top: 7px;
    font-size: .78rem;
    color: rgba(255, 255, 255, .72);
    font-weight: 650;
}

.team-popover-footer {
    background: #16002D;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 20px;
    font-size: .94rem;
}

.team-popover-footer.approved {
    color: #86C91E;
}

.team-popover-footer.pending {
    color: #E9C46A;
}

.team-empty {
    grid-column: 1 / -1;
    padding: 28px;
    color: #6b7280;
    text-align: center;
}

@media (max-width: 767.98px) {
    .team-grid {
        --team-name-width: 190px;
        --team-day-width: 38px;
    }

    .team-person-cell {
        padding: 8px;
    }

    .team-avatar {
        width: 26px;
        height: 26px;
    }

    .team-person-name {
        font-size: .88rem;
    }

    .team-legend {
        justify-content: flex-start;
        gap: 10px;
        font-size: .9rem;
    }
}

.theme-toggle {
    border: 0 !important;
    background: transparent !important;
    cursor: pointer;
}

.theme-toggle i {
    font-size: 1.05rem;
}

html[data-theme="dark"] {
    --bg: #111827;
    --card: #1F2937;
    --text: #F9FAFB;
    --muted: #CBD5E1;
    --kuhn-light: #111827;
    --kuhn-border: #374151;
    --kuhn-cream: #2A2117;
    --bs-body-bg: #111827;
    --bs-body-color: #F9FAFB;
    --bs-border-color: #374151;
    --bs-secondary-color: #CBD5E1;
    color-scheme: dark;
}

html[data-theme="dark"],
html[data-theme="dark"] body,
html[data-theme="dark"] main,
html[data-theme="dark"] .login-wrap {
    background: #111827 !important;
    color: #F9FAFB !important;
}

html[data-theme="dark"] .kuhn-navbar,
html[data-theme="dark"] body .kuhn-navbar,
html[data-theme="dark"] body nav.kuhn-navbar,
html[data-theme="dark"] .navbar.kuhn-navbar {
    background: #111111 !important;
    background-color: #111111 !important;
    border-bottom-color: #F28C28 !important;
}

html[data-theme="dark"] .kuhn-navbar .navbar-brand,
html[data-theme="dark"] .kuhn-navbar .brand-title,
html[data-theme="dark"] .kuhn-navbar .nav-link,
html[data-theme="dark"] .kuhn-navbar .dropdown-toggle,
html[data-theme="dark"] .kuhn-navbar .user-menu,
html[data-theme="dark"] .theme-toggle {
    color: #F9FAFB !important;
}

html[data-theme="dark"] .kuhn-navbar .nav-link:hover,
html[data-theme="dark"] .kuhn-navbar .nav-link:focus,
html[data-theme="dark"] .kuhn-navbar .user-menu:hover,
html[data-theme="dark"] .kuhn-navbar .user-menu:focus,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus {
    background: rgba(242, 140, 40, .18) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .kuhn-nav-logo,
html[data-theme="dark"] .kuhn-login-logo {
    background: #FFFFFF !important;
    border-color: #F28C28 !important;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .remaining-card,
html[data-theme="dark"] .hr-card,
html[data-theme="dark"] .person-pill,
html[data-theme="dark"] .birthday-pill,
html[data-theme="dark"] .team-toolbar,
html[data-theme="dark"] .team-board,
html[data-theme="dark"] .list-group-item,
html[data-theme="dark"] .modal-content,
html[data-theme="dark"] .dropdown-menu,
html[data-theme="dark"] .fc,
html[data-theme="dark"] .fc .fc-scrollgrid,
html[data-theme="dark"] .fc-theme-standard td,
html[data-theme="dark"] .fc-theme-standard th {
    background-color: #1F2937 !important;
    color: #F9FAFB !important;
    border-color: #374151 !important;
}

html[data-theme="dark"] .metric-card.highlight {
    background: #0F172A !important;
    color: #F9FAFB !important;
    border-color: #F28C28 !important;
}

html[data-theme="dark"] .metric-card.mandatory-card {
    background: #1F2937 !important;
    color: #F9FAFB !important;
    border-color: #374151 !important;
}

html[data-theme="dark"] .metric-card.mandatory-card strong {
    color: #C084FC !important;
}

html[data-theme="dark"] .role-check-list {
    background: #111827 !important;
    border-color: #374151 !important;
}

html[data-theme="dark"] .metric-card span,
html[data-theme="dark"] .metric-card small,
html[data-theme="dark"] .person-pill small,
html[data-theme="dark"] .birthday-pill small,
html[data-theme="dark"] .legend,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] small,
html[data-theme="dark"] .team-legend,
html[data-theme="dark"] .team-person-meta,
html[data-theme="dark"] .team-empty,
html[data-theme="dark"] .table-mobile td::before {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input,
html[data-theme="dark"] select {
    background-color: #111827 !important;
    color: #F9FAFB !important;
    border-color: #4B5563 !important;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: #94A3B8 !important;
}

html[data-theme="dark"] .dropdown-item,
html[data-theme="dark"] .dropdown-item-text {
    color: #F9FAFB !important;
}

html[data-theme="dark"] .dropdown-item:hover,
html[data-theme="dark"] .dropdown-item:focus {
    background-color: rgba(242, 140, 40, .18) !important;
    color: #FFFFFF !important;
}

html[data-theme="dark"] .dropdown-divider,
html[data-theme="dark"] hr {
    border-color: #374151 !important;
}

html[data-theme="dark"] .table {
    --bs-table-bg: #1F2937;
    --bs-table-color: #F9FAFB;
    --bs-table-border-color: #374151;
    --bs-table-striped-bg: #263244;
    --bs-table-striped-color: #F9FAFB;
    --bs-table-hover-bg: #2B374A;
    --bs-table-hover-color: #FFFFFF;
}

html[data-theme="dark"] .table thead th {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .alert-info,
html[data-theme="dark"] .alert-primary,
html[data-theme="dark"] .alert-secondary {
    background-color: #172033 !important;
    color: #F9FAFB !important;
    border-color: #334155 !important;
}

html[data-theme="dark"] .alert-warning,
html[data-theme="dark"] .approval-warning-row td,
html[data-theme="dark"] #substituteWarning,
html[data-theme="dark"] .change-request-item:target {
    background-color: #3A2A00 !important;
    color: #FFF3CD !important;
    border-color: #C88700 !important;
}

html[data-theme="dark"] .status-approved,
html[data-theme="dark"] .fc .leave-event-approved,
html[data-theme="dark"] .team-leave-bar.approved {
    background-color: #123524 !important;
    color: #DFF7E8 !important;
    border-color: rgba(46, 204, 113, .48) !important;
}

html[data-theme="dark"] .status-pending,
html[data-theme="dark"] .fc .leave-event-pending,
html[data-theme="dark"] .team-leave-bar.pending {
    background-color: #3A2A00 !important;
    color: #FFF3CD !important;
    border-color: rgba(233, 196, 106, .55) !important;
}

html[data-theme="dark"] .status-rejected {
    background-color: #3F1717 !important;
    color: #FFD6D6 !important;
}

html[data-theme="dark"] .status-cancelled {
    background-color: #374151 !important;
    color: #E5E7EB !important;
}

html[data-theme="dark"] .list-group-item.unread {
    background-color: #2A2117 !important;
}

html[data-theme="dark"] .team-grid,
html[data-theme="dark"] .team-header-name,
html[data-theme="dark"] .team-day-head,
html[data-theme="dark"] .team-person-cell,
html[data-theme="dark"] .team-days-row,
html[data-theme="dark"] .team-day-cell {
    background-color: #1F2937 !important;
    color: #F9FAFB !important;
    border-color: #374151 !important;
}

html[data-theme="dark"] .team-day-head strong,
html[data-theme="dark"] .team-person-name {
    color: #F9FAFB !important;
}

html[data-theme="dark"] .team-day-head span {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .team-day-head.is-weekend,
html[data-theme="dark"] .team-day-cell.is-weekend {
    background-color: #2B3444 !important;
}

html[data-theme="dark"] .team-day-head.is-today,
html[data-theme="dark"] .team-day-cell.is-today {
    background-color: #3A3214 !important;
}

html[data-theme="dark"] .team-day-head.is-holiday,
html[data-theme="dark"] .team-day-cell.is-holiday {
    background-color: #3B1717 !important;
}

html[data-theme="dark"] .team-day-head.is-mandatory,
html[data-theme="dark"] .team-day-cell.is-mandatory {
    background-color: #271A3A !important;
}

html[data-theme="dark"] .team-avatar,
html[data-theme="dark"] .team-popover-avatar {
    background: #334155 !important;
    color: #E0F2FE !important;
}

html[data-theme="dark"] .team-leave-popover {
    background: #0F172A !important;
    color: #F9FAFB !important;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .46);
}

html[data-theme="dark"] .team-leave-popover::before {
    border-top-color: #0F172A;
}

html[data-theme="dark"] .team-leave-popover.is-below::before {
    border-bottom-color: #0F172A;
}

html[data-theme="dark"] .team-popover-footer {
    background: #020617 !important;
}

html[data-theme="dark"] .fc .fc-daygrid-day,
html[data-theme="dark"] .fc .fc-list-day-cushion,
html[data-theme="dark"] .fc .fc-list-table td,
html[data-theme="dark"] .fc .fc-col-header-cell,
html[data-theme="dark"] .fc .fc-timegrid-slot,
html[data-theme="dark"] .fc .fc-timegrid-col {
    background-color: #1F2937 !important;
    color: #F9FAFB !important;
    border-color: #374151 !important;
}

html[data-theme="dark"] .fc .fc-day-today {
    background-color: #3A3214 !important;
}

html[data-theme="dark"] .fc .fc-button-primary {
    background: #0F172A !important;
    border-color: #374151 !important;
    color: #F9FAFB !important;
}

html[data-theme="dark"] .fc .fc-button-primary:hover,
html[data-theme="dark"] .fc .fc-button-primary:focus,
html[data-theme="dark"] .fc .fc-button-primary:active {
    background: #F28C28 !important;
    border-color: #F28C28 !important;
    color: #111111 !important;
}

html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .btn-outline-secondary,
html[data-theme="dark"] .btn-outline-dark {
    color: #F9FAFB !important;
    border-color: #64748B !important;
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-secondary:hover,
html[data-theme="dark"] .btn-outline-dark:hover {
    background: #F28C28 !important;
    border-color: #F28C28 !important;
    color: #111111 !important;
}

html[data-theme="dark"] .btn-light {
    background-color: #334155 !important;
    border-color: #475569 !important;
    color: #F9FAFB !important;
}

html[data-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #93C5FD;
}


.team-mobile-layout {
    max-width: 720px;
    margin-inline: auto;
}

.team-mobile-toolbar {
    border-radius: 18px;
}

.team-mobile-week-nav {
    display: grid;
    grid-template-columns: 48px 1fr 48px;
    align-items: center;
    gap: 8px;
}

.team-mobile-nav-btn,
.team-mobile-week-label {
    min-height: 48px;
    border-radius: 12px;
    background: #f7f7f7;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-weight: 800;
}

.team-mobile-nav-btn {
    font-size: 1.1rem;
}

.team-mobile-week-label {
    font-size: 1rem;
    text-align: center;
    padding-inline: 10px;
}

.team-mobile-legend {
    background: transparent;
    border: 0;
    color: #59606b;
    font-weight: 700;
}

.team-mobile-legend summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.team-mobile-legend summary::-webkit-details-marker {
    display: none;
}

.team-mobile-legend summary::after {
    content: '▾';
    font-size: .78rem;
}

.team-legend-mobile {
    justify-content: flex-start;
    gap: 10px 14px;
    font-size: .9rem;
}

.team-mobile-days {
    display: grid;
    gap: 12px;
}

.team-mobile-day {
    border-radius: 16px;
    overflow: hidden;
}

.team-mobile-day.is-today {
    border-color: #E9A64A;
}

.team-mobile-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #ffffff;
    border-bottom: 1px solid #ebedf1;
}

.team-mobile-day.is-weekend .team-mobile-day-head {
    background: #EEF1F5;
}

.team-mobile-day-head strong {
    font-size: 1rem;
    display: inline-block;
    margin-right: 6px;
}

.team-mobile-day-head span {
    color: #6b7280;
    font-weight: 800;
    font-size: .78rem;
}

.team-mobile-today {
    background: #fff7d6;
    color: #7a5600 !important;
    border: 1px solid rgba(200, 135, 0, .28);
    border-radius: 999px;
    padding: 3px 9px;
    font-size: .72rem !important;
}

.team-mobile-day-body {
    padding: 10px;
    display: grid;
    gap: 8px;
    background: #ffffff;
}

.team-mobile-empty {
    color: #6b7280;
    padding: 8px 4px;
    font-weight: 650;
}

.team-mobile-item {
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-left-width: 5px;
    background: #ffffff;
}

.team-mobile-item.approved {
    background: #EAF7EE;
    border-color: rgba(25, 135, 84, .45);
    border-left-color: #198754;
}

.team-mobile-item.pending {
    background: #FFF3CD;
    border-color: rgba(200, 135, 0, .45);
    border-left-color: #C88700;
}

.team-mobile-item.mandatory {
    background: #F0E9FF;
    border-color: rgba(91, 58, 142, .5);
    border-left-color: #5B3A8E;
}

.team-mobile-item.holiday {
    background: #FFECEC;
    border-color: rgba(215, 25, 32, .42);
    border-left-color: #D71920;
}

.team-mobile-item-main {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.team-mobile-item-main strong {
    font-size: .98rem;
}

.team-mobile-item-main span {
    color: #6b7280;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.team-mobile-item-status {
    margin-top: 5px;
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    padding: 2px 8px;
    font-size: .75rem;
    font-weight: 800;
}

.team-mobile-item-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #4b5563;
    font-size: .8rem;
    font-weight: 650;
}

.team-mobile-item-meta span {
    border-radius: 999px;
    background: rgba(255, 255, 255, .55);
    padding: 2px 8px;
}

@media (max-width: 767.98px) {
    .team-overview-page {
        padding-inline: 4px;
    }

    .team-overview-page h1 {
        font-size: 1.55rem;
    }

    .team-mobile-toolbar .card-body {
        padding: 14px;
    }

    .team-mobile-week-nav {
        grid-template-columns: 44px 1fr 44px;
    }

    .team-mobile-nav-btn,
    .team-mobile-week-label {
        min-height: 44px;
    }
}

html[data-theme="dark"] .team-mobile-toolbar,
html[data-theme="dark"] .team-mobile-day,
html[data-theme="dark"] .team-mobile-day-head,
html[data-theme="dark"] .team-mobile-day-body,
html[data-theme="dark"] .team-mobile-nav-btn,
html[data-theme="dark"] .team-mobile-week-label {
    background-color: #1F2937 !important;
    color: #F9FAFB !important;
    border-color: #374151 !important;
}

html[data-theme="dark"] .team-mobile-legend,
html[data-theme="dark"] .team-mobile-empty,
html[data-theme="dark"] .team-mobile-day-head span,
html[data-theme="dark"] .team-mobile-item-main span,
html[data-theme="dark"] .team-mobile-item-meta {
    color: #CBD5E1 !important;
}

html[data-theme="dark"] .team-mobile-day.is-weekend .team-mobile-day-head {
    background-color: #2B3444 !important;
}

html[data-theme="dark"] .team-mobile-today {
    background-color: #3A3214 !important;
    color: #FFE8A3 !important;
    border-color: #8A6500 !important;
}

html[data-theme="dark"] .team-mobile-item.approved {
    background-color: #123524 !important;
    color: #DFF7E8 !important;
    border-color: rgba(46, 204, 113, .48) !important;
    border-left-color: #2ECC71 !important;
}

html[data-theme="dark"] .team-mobile-item.pending {
    background-color: #3A2A00 !important;
    color: #FFF3CD !important;
    border-color: rgba(233, 196, 106, .55) !important;
    border-left-color: #E9C46A !important;
}

html[data-theme="dark"] .team-mobile-item.mandatory {
    background-color: #271A3A !important;
    color: #F2E9FF !important;
    border-color: rgba(142, 104, 203, .55) !important;
    border-left-color: #8E68CB !important;
}

html[data-theme="dark"] .team-mobile-item.holiday {
    background-color: #3B1717 !important;
    color: #FFD6D6 !important;
    border-color: rgba(255, 120, 120, .45) !important;
    border-left-color: #FF6B6B !important;
}

html[data-theme="dark"] .team-mobile-item-status,
html[data-theme="dark"] .team-mobile-item-meta span {
    background: rgba(255, 255, 255, .08) !important;
}


/* v59.1 javítások */
html[data-theme="dark"] .card-header,
html[data-theme="dark"] .card-header.bg-white,
html[data-theme="dark"] .bg-white.card-header {
    background: #E7A348 !important;
    background-color: #E7A348 !important;
    color: #111111 !important;
    border-color: #F28C28 !important;
}

html[data-theme="dark"] .card-header .text-muted,
html[data-theme="dark"] .card-header small,
html[data-theme="dark"] .card-header a:not(.btn) {
    color: #111111 !important;
}

.admin-managed-departments-compact {
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* v59.4 - dark mode calendar readability */
html[data-theme="dark"] .fc {
    background-color: #16202D !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .fc .fc-scrollgrid,
html[data-theme="dark"] .fc-theme-standard td,
html[data-theme="dark"] .fc-theme-standard th {
    border-color: #3A4658 !important;
}

html[data-theme="dark"] .fc .fc-col-header-cell {
    background-color: #131C28 !important;
}

html[data-theme="dark"] .fc .fc-col-header-cell-cushion,
html[data-theme="dark"] .fc .fc-daygrid-day-number {
    color: #93C5FD !important;
    font-weight: 700 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .fc .fc-daygrid-day {
    background-color: #1B2635 !important;
}

html[data-theme="dark"] .fc .fc-day-other {
    background-color: #151E2B !important;
}

html[data-theme="dark"] .fc .fc-day-other .fc-daygrid-day-number {
    color: #64748B !important;
}

html[data-theme="dark"] .fc .fc-day-today {
    background-color: #3A3214 !important;
    box-shadow: inset 0 0 0 1px rgba(242, 198, 109, .35) !important;
}

html[data-theme="dark"] .fc .fc-daygrid-event {
    opacity: 1 !important;
}

html[data-theme="dark"] .fc .leave-event-approved,
html[data-theme="dark"] .fc .fc-event.leave-event-approved {
    background-color: #DFF7E8 !important;
    color: #0B3D25 !important;
    border-color: rgba(25, 135, 84, .7) !important;
    border-left: 5px solid #198754 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .fc .leave-event-approved .calendar-event-name,
html[data-theme="dark"] .fc .leave-event-approved .calendar-event-days,
html[data-theme="dark"] .fc .leave-event-approved .calendar-event-inner {
    color: #0B3D25 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .fc .leave-event-approved .calendar-status-mini.approved {
    background-color: #BFEFD2 !important;
    color: #0A6B3D !important;
}

html[data-theme="dark"] .fc .leave-event-pending,
html[data-theme="dark"] .fc .fc-event.leave-event-pending {
    background-color: #FFF3CD !important;
    color: #3A2A00 !important;
    border-color: rgba(200, 135, 0, .75) !important;
    border-left: 5px solid #C88700 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .fc .leave-event-pending .calendar-event-name,
html[data-theme="dark"] .fc .leave-event-pending .calendar-event-days,
html[data-theme="dark"] .fc .leave-event-pending .calendar-event-inner {
    color: #3A2A00 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .fc .leave-event-pending .calendar-status-mini.pending {
    background-color: #FFE4A3 !important;
    color: #6A4300 !important;
}

html[data-theme="dark"] .fc .mandatory-leave-event,
html[data-theme="dark"] .fc .fc-event.mandatory-leave-event {
    background-color: #EFE7FF !important;
    color: #24113F !important;
    border-color: #7C5AB8 !important;
    border-left: 5px solid #5B3A8E !important;
}

html[data-theme="dark"] .fc .holiday-event,
html[data-theme="dark"] .fc .fc-event.holiday-event {
    background-color: #FFE2E2 !important;
    color: #7F1010 !important;
    border-color: #D71920 !important;
    border-left: 5px solid #D71920 !important;
}

html[data-theme="dark"] .fc .birthday-event,
html[data-theme="dark"] .fc .fc-event.birthday-event {
    filter: none !important;
    color: #0F172A !important;
    border-color: rgba(255,255,255,.35) !important;
}

html[data-theme="dark"] .fc .fc-list-event:hover td {
    background-color: #243244 !important;
}

/* v59.5 - dark mode team overview readability */
html[data-theme="dark"] .team-board,
html[data-theme="dark"] .team-board-scroll,
html[data-theme="dark"] .team-grid {
    background-color: #16202D !important;
    color: #F8FAFC !important;
    border-color: #3A4658 !important;
}

html[data-theme="dark"] .team-header-name,
html[data-theme="dark"] .team-day-head {
    background-color: #131C28 !important;
    color: #F8FAFC !important;
    border-color: #3A4658 !important;
}

html[data-theme="dark"] .team-person-cell {
    background-color: #182434 !important;
    color: #F8FAFC !important;
    border-color: #3A4658 !important;
}

html[data-theme="dark"] .team-days-row,
html[data-theme="dark"] .team-day-cell {
    background-color: #1B2635 !important;
    color: #F8FAFC !important;
    border-color: #3A4658 !important;
}

html[data-theme="dark"] .team-day-head strong,
html[data-theme="dark"] .team-person-name {
    color: #F8FAFC !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .team-day-head span,
html[data-theme="dark"] .team-person-meta {
    color: #CBD5E1 !important;
    opacity: 1 !important;
}

html[data-theme="dark"] .team-day-head.is-weekend,
html[data-theme="dark"] .team-day-cell.is-weekend {
    background-color: #263140 !important;
}

html[data-theme="dark"] .team-day-head.is-today,
html[data-theme="dark"] .team-day-cell.is-today {
    background-color: #3A3214 !important;
    box-shadow: inset 0 0 0 1px rgba(242, 198, 109, .35) !important;
}

html[data-theme="dark"] .team-day-head.is-holiday,
html[data-theme="dark"] .team-day-cell.is-holiday {
    background-color: #3B1717 !important;
}

html[data-theme="dark"] .team-day-head.is-mandatory,
html[data-theme="dark"] .team-day-cell.is-mandatory {
    background-color: #271A3A !important;
}

html[data-theme="dark"] .team-leave-bar,
html[data-theme="dark"] .team-leave-bar * {
    opacity: 1 !important;
}

html[data-theme="dark"] .team-leave-bar.approved {
    background-color: #DFF7E8 !important;
    color: #0B3D25 !important;
    border-color: rgba(25, 135, 84, .7) !important;
    border-left: 5px solid #198754 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .team-leave-bar.approved .team-calendar-event-inner,
html[data-theme="dark"] .team-leave-bar.approved .team-event-days {
    color: #0B3D25 !important;
}

html[data-theme="dark"] .team-leave-bar.approved .team-status-mini.approved {
    background-color: #BFEFD2 !important;
    color: #0A6B3D !important;
}

html[data-theme="dark"] .team-leave-bar.pending {
    background-color: #FFF3CD !important;
    color: #3A2A00 !important;
    border-color: rgba(200, 135, 0, .75) !important;
    border-left: 5px solid #C88700 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .team-leave-bar.pending .team-calendar-event-inner,
html[data-theme="dark"] .team-leave-bar.pending .team-event-days {
    color: #3A2A00 !important;
}

html[data-theme="dark"] .team-leave-bar.pending .team-status-mini.pending {
    background-color: #FFE4A3 !important;
    color: #6A4300 !important;
}

html[data-theme="dark"] .team-mobile-toolbar,
html[data-theme="dark"] .team-mobile-day,
html[data-theme="dark"] .team-mobile-day-head,
html[data-theme="dark"] .team-mobile-day-body,
html[data-theme="dark"] .team-mobile-nav-btn,
html[data-theme="dark"] .team-mobile-week-label {
    background-color: #1B2635 !important;
    color: #F8FAFC !important;
    border-color: #3A4658 !important;
}

html[data-theme="dark"] .team-mobile-day.is-weekend .team-mobile-day-head {
    background-color: #263140 !important;
}

html[data-theme="dark"] .team-mobile-item.approved {
    background-color: #DFF7E8 !important;
    color: #0B3D25 !important;
    border-color: rgba(25, 135, 84, .7) !important;
    border-left-color: #198754 !important;
}

html[data-theme="dark"] .team-mobile-item.pending {
    background-color: #FFF3CD !important;
    color: #3A2A00 !important;
    border-color: rgba(200, 135, 0, .75) !important;
    border-left-color: #C88700 !important;
}

html[data-theme="dark"] .team-mobile-item.mandatory {
    background-color: #EFE7FF !important;
    color: #24113F !important;
    border-color: #7C5AB8 !important;
    border-left-color: #5B3A8E !important;
}

html[data-theme="dark"] .team-mobile-item.holiday {
    background-color: #FFE2E2 !important;
    color: #7F1010 !important;
    border-color: #D71920 !important;
    border-left-color: #D71920 !important;
}

html[data-theme="dark"] .team-mobile-item-status,
html[data-theme="dark"] .team-mobile-item-meta span {
    background: rgba(255, 255, 255, .55) !important;
    color: inherit !important;
}

html[data-theme="dark"] .team-mobile-item.approved .team-mobile-item-main span,
html[data-theme="dark"] .team-mobile-item.approved .team-mobile-item-meta,
html[data-theme="dark"] .team-mobile-item.pending .team-mobile-item-main span,
html[data-theme="dark"] .team-mobile-item.pending .team-mobile-item-meta,
html[data-theme="dark"] .team-mobile-item.mandatory .team-mobile-item-main span,
html[data-theme="dark"] .team-mobile-item.mandatory .team-mobile-item-meta,
html[data-theme="dark"] .team-mobile-item.holiday .team-mobile-item-main span,
html[data-theme="dark"] .team-mobile-item.holiday .team-mobile-item-meta {
    color: inherit !important;
}


/* v59.7 - dark mode table highlight fix */
html[data-theme="dark"] .table-light,
html[data-theme="dark"] .table-light > th,
html[data-theme="dark"] .table-light > td,
html[data-theme="dark"] .table-light th,
html[data-theme="dark"] .table-light td {
    --bs-table-bg: #243142 !important;
    --bs-table-color: #F9FAFB !important;
    --bs-table-border-color: #3F4A5C !important;
    background-color: #243142 !important;
    color: #F9FAFB !important;
}

html[data-theme="dark"] .table-light th,
html[data-theme="dark"] .table-light td {
    font-weight: 700;
}


/* v59.9 - MD áttekintés: dátum egy sorban, régi layout megtartva */
.md-period-cell {
    min-width: 178px;
}

.md-period-nowrap {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

@media (max-width: 767.98px) {
    .md-period-cell {
        min-width: 0;
    }
}


.leave-type-info {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--muted);
}

.leave-type-info-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.16rem 0.48rem;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    background: rgba(245, 130, 32, 0.14);
    border: 1px solid rgba(245, 130, 32, 0.35);
    color: var(--primary-dark);
}

[data-theme="dark"] .leave-type-info-badge {
    background: rgba(245, 130, 32, 0.18);
    border-color: rgba(245, 130, 32, 0.5);
    color: #ffd3a8;
}

/* v618 - FullCalendar list view color coding fix */
.fc .fc-list-table {
    border-radius: 14px;
    overflow: hidden;
}

.fc .fc-list-day-cushion {
    padding: .72rem .9rem !important;
    font-weight: 800;
}

/* hide default all-day / graphic columns in list view */
.fc .fc-list-event td.fc-list-event-time,
.fc .fc-list-event td.fc-list-event-graphic {
    display: none !important;
}

.fc .fc-list-event-title {
    padding: .62rem .9rem !important;
}

.fc .fc-list-event-title a {
    color: inherit !important;
    text-decoration: none !important;
}

.fc .fc-list-event-title .calendar-event-inner {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    width: auto;
    max-width: 100%;
    padding: .36rem .62rem;
    border-radius: 999px;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, .08);
    vertical-align: middle;
}

.fc .fc-list-event-title .calendar-event-name,
.fc .fc-list-event-title .calendar-event-days {
    color: inherit !important;
    opacity: 1 !important;
}

.fc .fc-list-event-title .calendar-event-name {
    max-width: min(52vw, 520px);
}

/* light theme list rows: neutral background, color only in accent + badge */
.fc .fc-list-event.leave-event-approved td,
.fc .fc-list-event.leave-event-pending td,
.fc .fc-list-event.mandatory-leave-event td,
.fc .fc-list-event.holiday-event td,
.fc .fc-list-event.birthday-event td {
    background: #FFFFFF !important;
    color: #111827 !important;
    border-color: rgba(15, 23, 42, .08) !important;
}

.fc .fc-list-event.leave-event-approved td {
    border-color: rgba(25, 135, 84, .18) !important;
}

.fc .fc-list-event.leave-event-pending td {
    border-color: rgba(200, 135, 0, .18) !important;
}

.fc .fc-list-event.mandatory-leave-event td {
    border-color: rgba(91, 58, 142, .18) !important;
}

.fc .fc-list-event.holiday-event td {
    border-color: rgba(215, 25, 32, .16) !important;
}

.fc .fc-list-event.birthday-event td {
    border-color: rgba(59, 130, 246, .16) !important;
}

.fc .fc-list-event.leave-event-approved .fc-list-event-title {
    border-left: 4px solid #198754 !important;
}

.fc .fc-list-event.leave-event-pending .fc-list-event-title {
    border-left: 4px solid #C88700 !important;
}

.fc .fc-list-event.mandatory-leave-event .fc-list-event-title {
    border-left: 4px solid #7C3AED !important;
}

.fc .fc-list-event.holiday-event .fc-list-event-title {
    border-left: 4px solid #D71920 !important;
}

.fc .fc-list-event.birthday-event .fc-list-event-title {
    border-left: 4px solid #3B82F6 !important;
}

html[data-theme="dark"] .fc .fc-list-view {
    border-color: #415166 !important;
}

html[data-theme="dark"] .fc .fc-list-day-cushion {
    background-color: #182536 !important;
    color: #93C5FD !important;
    border-color: #415166 !important;
}

html[data-theme="dark"] .fc .fc-list-event.leave-event-approved td,
html[data-theme="dark"] .fc .fc-list-event.leave-event-pending td,
html[data-theme="dark"] .fc .fc-list-event.mandatory-leave-event td,
html[data-theme="dark"] .fc .fc-list-event.holiday-event td,
html[data-theme="dark"] .fc .fc-list-event.birthday-event td {
    background-color: #182434 !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .fc .fc-list-event.leave-event-approved td {
    border-color: rgba(134, 239, 172, .18) !important;
}

html[data-theme="dark"] .fc .fc-list-event.leave-event-pending td {
    border-color: rgba(252, 211, 77, .18) !important;
}

html[data-theme="dark"] .fc .fc-list-event.mandatory-leave-event td {
    border-color: rgba(196, 181, 253, .18) !important;
}

html[data-theme="dark"] .fc .fc-list-event.holiday-event td {
    border-color: rgba(252, 165, 165, .18) !important;
}

html[data-theme="dark"] .fc .fc-list-event.birthday-event td {
    border-color: rgba(147, 197, 253, .18) !important;
}

html[data-theme="dark"] .fc .fc-list-event:hover td {
    filter: brightness(1.04);
}

html[data-theme="dark"] .fc .fc-list-event-title,
html[data-theme="dark"] .fc .fc-list-event-title a {
    color: inherit !important;
}

html[data-theme="dark"] .fc .fc-list-event-title .calendar-event-inner {
    background: rgba(255, 255, 255, .04) !important;
    border: 1px solid rgba(255, 255, 255, .10) !important;
    color: #F8FAFC !important;
}

html[data-theme="dark"] .fc .fc-list-event-title .calendar-event-name {
    color: #F8FAFC !important;
}

html[data-theme="dark"] .fc .fc-list-event-title .calendar-status-mini.approved {
    background-color: #BBF7D0 !important;
    color: #166534 !important;
}

html[data-theme="dark"] .fc .fc-list-event-title .calendar-status-mini.pending {
    background-color: #FEF3C7 !important;
    color: #92400E !important;
}

html[data-theme="dark"] .fc .fc-list-event-title .calendar-event-days {
    color: inherit !important;
    opacity: .9 !important;
}
@media (max-width: 768px) {
    .fc .fc-list-event-title .calendar-event-inner {
        border-radius: 12px;
        width: 100%;
        flex-wrap: wrap;
    }

    .fc .fc-list-event-title .calendar-event-name {
        max-width: calc(100vw - 190px);
    }
}


/* v623 - Calendar dark mode holiday/weekend readability */
.fc .fc-day-sat,
.fc .fc-day-sun {
    background-color: rgba(245, 130, 32, .055);
}

.fc .fc-day-sat .fc-daygrid-day-number,
.fc .fc-day-sun .fc-daygrid-day-number,
.fc .fc-col-header-cell.fc-day-sat .fc-col-header-cell-cushion,
.fc .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion {
    color: #9A4F12 !important;
    font-weight: 900;
}

.fc .fc-day-today {
    background-color: rgba(245, 130, 32, .12) !important;
}

.fc .holiday-event,
.fc .fc-event.holiday-event {
    background-color: #D71920 !important;
    border-color: #8F1010 !important;
    color: #FFFFFF !important;
    font-weight: 900;
    box-shadow: none !important;
}

.fc .mandatory-leave-event,
.fc .fc-event.mandatory-leave-event {
    background-color: #F0E9FF !important;
    border-color: #7C3AED !important;
    color: #24113F !important;
    font-weight: 900;
    box-shadow: none !important;
}

html[data-theme="dark"] .fc .fc-day-sat,
html[data-theme="dark"] .fc .fc-day-sun {
    background-color: rgba(255, 255, 255, .045) !important;
}

html[data-theme="dark"] .fc .fc-day-sat .fc-daygrid-day-frame,
html[data-theme="dark"] .fc .fc-day-sun .fc-daygrid-day-frame {
    background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.015));
}

html[data-theme="dark"] .fc .fc-day-sat .fc-daygrid-day-number,
html[data-theme="dark"] .fc .fc-day-sun .fc-daygrid-day-number,
html[data-theme="dark"] .fc .fc-col-header-cell.fc-day-sat .fc-col-header-cell-cushion,
html[data-theme="dark"] .fc .fc-col-header-cell.fc-day-sun .fc-col-header-cell-cushion {
    color: #FBBF24 !important;
    font-weight: 950;
}

html[data-theme="dark"] .fc .fc-day-today {
    background-color: rgba(245, 158, 11, .16) !important;
}

html[data-theme="dark"] .fc .fc-day-today .fc-daygrid-day-frame {
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .50);
}

html[data-theme="dark"] .fc .holiday-event,
html[data-theme="dark"] .fc .fc-event.holiday-event {
    background-color: #7F1D1D !important;
    border: 1px solid #F87171 !important;
    color: #FEE2E2 !important;
    box-shadow: inset 4px 0 0 #EF4444 !important;
}

html[data-theme="dark"] .fc .holiday-event .fc-event-title,
html[data-theme="dark"] .fc .holiday-event .fc-event-main,
html[data-theme="dark"] .fc .fc-event.holiday-event .fc-event-title,
html[data-theme="dark"] .fc .fc-event.holiday-event .fc-event-main {
    color: #FEE2E2 !important;
}

html[data-theme="dark"] .fc .mandatory-leave-event,
html[data-theme="dark"] .fc .fc-event.mandatory-leave-event {
    background-color: #2C1F48 !important;
    border: 1px solid #C4B5FD !important;
    color: #F3E8FF !important;
    box-shadow: inset 4px 0 0 #A78BFA !important;
}

html[data-theme="dark"] .fc .mandatory-leave-event .fc-event-title,
html[data-theme="dark"] .fc .mandatory-leave-event .fc-event-main,
html[data-theme="dark"] .fc .fc-event.mandatory-leave-event .fc-event-title,
html[data-theme="dark"] .fc .fc-event.mandatory-leave-event .fc-event-main {
    color: #F3E8FF !important;
}

/* FullCalendar list view keeps neutral rows, but holidays/weekends remain readable */
html[data-theme="dark"] .fc .fc-list-event.holiday-event td {
    background-color: #481A1D !important;
    color: #FEE2E2 !important;
    border-color: rgba(252, 165, 165, .26) !important;
}

html[data-theme="dark"] .fc .fc-list-event.mandatory-leave-event td {
    background-color: #2C1F48 !important;
    color: #F3E8FF !important;
    border-color: rgba(196, 181, 253, .26) !important;
}


/* v623 - HR szabadságnyilvántartó */
.leave-balance-table .balance-input {
    width: 76px;
    min-width: 76px;
}
.leave-balance-table td {
    vertical-align: middle;
}
.leave-balance-table .badge {
    white-space: nowrap;
}
.usage-summary-cell {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    min-width: 160px;
}
.usage-summary-cell-end {
    align-items: flex-end;
}
.usage-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}
.usage-pill.period {
    background: #0D6EFD;
    color: #fff;
}
.usage-pill.cumulative {
    background: #0DCAF0;
    color: #062C33;
}
.usage-label {
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    opacity: .9;
}
html[data-theme="dark"] .leave-balance-table .form-control {
    background-color: #111827;
    color: #F9FAFB;
    border-color: #374151;
}
html[data-theme="dark"] .usage-pill.cumulative {
    color: #062C33;
}


/* v639 - HR szabadságnyilvántartó: rögzített fejléc és egyértelmű, egy számos felhasználás oszlop. */
.leave-balance-scroll {
    max-height: calc(100vh - 240px);
    overflow: auto;
    position: relative;
    padding: 0 !important;
    background: #ffffff;
}

.leave-balance-table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
    min-width: 1835px;
    table-layout: fixed;
    background: #ffffff;
}

.leave-balance-table thead th {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 76px;
    padding: 14px 10px !important;
    background: #ffffff !important;
    background-image: none !important;
    border-top: 0 !important;
    border-bottom: 1px solid #d1d5db !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .12);
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.2;
    vertical-align: bottom;
    word-break: normal;
    hyphens: none;
}

.leave-balance-table th:nth-child(1),
.leave-balance-table td:nth-child(1) { width: 140px; min-width: 140px; }
.leave-balance-table th:nth-child(2),
.leave-balance-table td:nth-child(2) { width: 175px; min-width: 175px; }
.leave-balance-table th:nth-child(3),
.leave-balance-table td:nth-child(3) { width: 92px; min-width: 92px; }
.leave-balance-table th:nth-child(4),
.leave-balance-table td:nth-child(4) { width: 92px; min-width: 92px; }
.leave-balance-table th:nth-child(5),
.leave-balance-table td:nth-child(5) { width: 112px; min-width: 112px; }
.leave-balance-table th:nth-child(6),
.leave-balance-table td:nth-child(6) { width: 105px; min-width: 105px; }
.leave-balance-table th:nth-child(7),
.leave-balance-table td:nth-child(7) { width: 130px; min-width: 130px; }
.leave-balance-table th:nth-child(8),
.leave-balance-table td:nth-child(8) { width: 100px; min-width: 100px; }
.leave-balance-table th:nth-child(9),
.leave-balance-table td:nth-child(9) { width: 125px; min-width: 125px; }
.leave-balance-table th:nth-child(10),
.leave-balance-table td:nth-child(10) { width: 145px; min-width: 145px; }
.leave-balance-table th:nth-child(11),
.leave-balance-table td:nth-child(11) { width: 155px; min-width: 155px; }
.leave-balance-table th:nth-child(12),
.leave-balance-table td:nth-child(12) { width: 190px; min-width: 190px; }
.leave-balance-table th:nth-child(13),
.leave-balance-table td:nth-child(13) { width: 125px; min-width: 125px; }
.leave-balance-table th:nth-child(14),
.leave-balance-table td:nth-child(14) { width: 120px; min-width: 120px; }

.leave-balance-table tbody td {
    background-clip: padding-box;
}

html[data-theme="dark"] .leave-balance-scroll,
html[data-theme="dark"] .leave-balance-table {
    background: #1F2937;
}
html[data-theme="dark"] .leave-balance-table thead th {
    background: #1F2937 !important;
    background-image: none !important;
    border-bottom-color: #374151 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
@media (max-width: 767.98px) {
    .leave-balance-scroll {
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
    }
    .leave-balance-table {
        min-width: 0;
        table-layout: auto;
    }
    .leave-balance-table thead th {
        position: static;
        min-height: 0;
        box-shadow: none;
    }
}

/* v626 calendar multi-group filter and people/manager search */
.calendar-multi-select {
    width: 100%;
}

.calendar-multi-select-button {
    min-height: 48px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-multi-select-menu {
    max-height: 380px;
    overflow-y: auto;
    padding: .35rem;
}

.calendar-check-item {
    border-radius: .55rem;
    white-space: normal;
    line-height: 1.25;
    cursor: pointer;
}

.calendar-check-item:hover {
    background-color: rgba(13, 110, 253, .10);
}

.calendar-search-results {
    position: absolute;
    left: calc(var(--bs-gutter-x) * .5);
    right: calc(var(--bs-gutter-x) * .5);
    top: calc(100% + .25rem);
    z-index: 1080;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: .75rem;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .18);
    overflow: hidden;
    max-height: 360px;
    overflow-y: auto;
}

.calendar-search-result {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, .08);
    background: transparent;
    padding: .72rem .9rem;
    color: #111827;
}

.calendar-search-result:last-child {
    border-bottom: 0;
}

.calendar-search-result:hover,
.calendar-search-result:focus {
    background: rgba(13, 110, 253, .10);
    outline: none;
}

.calendar-search-result-title {
    display: block;
    font-weight: 800;
}

.calendar-search-result-subtitle {
    display: block;
    margin-top: .12rem;
    font-size: .86rem;
    color: #6b7280;
}

.calendar-search-empty {
    padding: .8rem .9rem;
    color: #6b7280;
}

.calendar-search-active {
    min-height: 48px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(15, 23, 42, .16);
    border-radius: .65rem;
    padding: .55rem .75rem;
    color: #475569;
    background: rgba(248, 250, 252, .85);
    font-weight: 700;
}

html[data-theme="dark"] .calendar-multi-select-menu,
html[data-theme="dark"] .calendar-search-results {
    background: #0F172A;
    border-color: #475569;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .42);
}

html[data-theme="dark"] .calendar-check-item,
html[data-theme="dark"] .calendar-search-result {
    color: #F8FAFC;
}

html[data-theme="dark"] .calendar-check-item:hover,
html[data-theme="dark"] .calendar-search-result:hover,
html[data-theme="dark"] .calendar-search-result:focus {
    background: rgba(147, 197, 253, .20);
}

html[data-theme="dark"] .calendar-search-result {
    border-bottom-color: #334155;
}

html[data-theme="dark"] .calendar-search-result-subtitle,
html[data-theme="dark"] .calendar-search-empty {
    color: #CBD5E1;
}

html[data-theme="dark"] .calendar-search-active {
    background: #111827;
    border-color: #475569;
    color: #E5E7EB;
}

@media (max-width: 767.98px) {
    .calendar-search-results {
        position: static;
        margin-top: .35rem;
    }
}

.hr-filter-card .card-body {
    padding: 16px;
}

.hr-filter-form {
    display: grid;
    grid-template-columns: 96px 155px 155px minmax(220px, 1.2fr) minmax(170px, .8fr) minmax(190px, .9fr) 128px auto;
    gap: 8px;
    align-items: end;
}

.hr-filter-form .form-label {
    margin-bottom: 6px;
    line-height: 1.1;
    white-space: nowrap;
}

.hr-filter-form .form-control,
.hr-filter-form .form-select,
.hr-filter-actions .btn {
    min-height: 38px;
}

.hr-filter-form .form-control,
.hr-filter-form .form-select {
    padding-left: 12px;
    padding-right: 12px;
}

.hr-filter-actions {
    display: flex;
    gap: 8px;
    align-items: end;
    justify-content: flex-end;
    white-space: nowrap;
}

.hr-filter-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1450px) {
    .hr-filter-form {
        grid-template-columns: 96px 155px 155px minmax(220px, 1fr) minmax(170px, .8fr) minmax(190px, .9fr);
    }

    .hr-filter-active {
        grid-column: span 1;
    }

    .hr-filter-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 991.98px) {
    .hr-filter-form {
        grid-template-columns: 1fr 1fr;
    }

    .hr-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .hr-filter-form {
        grid-template-columns: 1fr;
    }
}
