:root {
    --hrms-primary: #ff6b2c;
    --hrms-primary-dark: #f2521d;
    --hrms-primary-soft: #fff1ea;
    --hrms-accent: #0f5f78;
    --hrms-success: #1cc88a;
    --hrms-warning: #ffb020;
    --hrms-danger: #f04438;
    --hrms-text: #0f172a;
    --hrms-text-muted: #667085;
    --hrms-border: #e9edf5;
    --hrms-surface: #ffffff;
    --hrms-body-bg: #f7f8fc;
    --hrms-shadow-sm: 0 10px 30px rgba(15, 23, 42, 0.05);
    --hrms-shadow-md: 0 18px 45px rgba(15, 23, 42, 0.08);
    --hrms-radius: 20px;
    --hrms-sidebar-width: 300px;
    --hrms-sidebar-collapsed-width: 96px;
    --hrms-header-height: 88px;
    --hrms-content-spacing: 28px;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, #fff8f4 0, transparent 22%), var(--hrms-body-bg);
    color: var(--hrms-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.layout-fixed {
    overflow-x: hidden;
}

body.sidebar-open {
    overflow: hidden;
}

.app-wrapper {
    min-height: 100vh;
    background: transparent;
}

.app-header {
    position: fixed;
    top: 0;
    left: var(--hrms-sidebar-width);
    right: 0;
    z-index: 1035;
    min-height: var(--hrms-header-height);
    display: flex;
    align-items: center;
    background: rgba(247, 248, 252, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.hrms-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.9rem var(--hrms-content-spacing);
}

.hrms-topbar-start,
.hrms-topbar-end {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.hrms-sidebar-trigger {
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--hrms-surface);
    border-radius: 14px;
    box-shadow: var(--hrms-shadow-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hrms-text);
    font-size: 1.15rem;
}

.hrms-sidebar-trigger:hover {
    background: var(--hrms-primary-soft);
    color: var(--hrms-primary);
}

.hrms-brand-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--hrms-text);
    min-width: 220px;
}

.hrms-brand-inline img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 12px;
    background: #fff;
    padding: 0.3rem;
    box-shadow: var(--hrms-shadow-sm);
}

.hrms-brand-inline strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.1;
}

.hrms-brand-inline span {
    display: block;
    color: var(--hrms-text-muted);
    font-size: 0.8rem;
}

.hrms-topbar-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 560px;
    min-height: 52px;
    background: var(--hrms-surface);
    border: 1px solid var(--hrms-border);
    border-radius: 18px;
    padding: 0 1rem;
    box-shadow: var(--hrms-shadow-sm);
}

.hrms-topbar-search i {
    color: var(--hrms-text-muted);
}

.hrms-topbar-search input {
    flex: 1;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--hrms-text);
    font-size: 0.96rem;
}

.hrms-topbar-search input::placeholder {
    color: #98a2b3;
}

.hrms-search-chip {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--hrms-text-muted);
    padding: 0.35rem 0.55rem;
    border-radius: 10px;
    background: #f4f6fb;
    border: 1px solid #e9eef5;
}

.hrms-topbar-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: transparent;
    color: var(--hrms-text-muted);
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hrms-topbar-icon:hover {
    background: var(--hrms-surface);
    border-color: var(--hrms-border);
    color: var(--hrms-primary);
    box-shadow: var(--hrms-shadow-sm);
}

.hrms-ai-button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.78rem 1rem;
    border-radius: 16px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(135deg, var(--hrms-primary) 0%, var(--hrms-primary-dark) 100%);
    box-shadow: 0 12px 28px rgba(255, 107, 44, 0.24);
    font-weight: 700;
}

.hrms-ai-button:hover {
    color: #fff;
    transform: translateY(-1px);
}

.user-menu > .nav-link {
    min-height: auto;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
}

.hrms-user-chip {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--hrms-surface);
    border: 1px solid var(--hrms-border);
    border-radius: 18px;
    padding: 0.4rem 0.55rem 0.4rem 0.4rem;
    box-shadow: var(--hrms-shadow-sm);
}

.user-image,
.sidebar-profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.hrms-user-copy {
    min-width: 0;
}

.hrms-user-name {
    font-weight: 700;
    color: var(--hrms-text);
    line-height: 1.1;
}

.hrms-user-role {
    font-size: 0.78rem;
    color: var(--hrms-text-muted);
}

.dropdown-menu {
    border: 1px solid var(--hrms-border);
    border-radius: 18px;
    box-shadow: var(--hrms-shadow-md);
    padding: 0.8rem;
}

.user-header.text-bg-primary {
    border-radius: 16px;
    background: linear-gradient(135deg, #11243f 0%, #183a61 100%) !important;
}

.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--hrms-sidebar-width);
    z-index: 1037;
    overflow: hidden;
    background: #fff;
    border-right: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: var(--hrms-shadow-md);
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: none;
}

.sidebar-profile-card {
    padding: 1.5rem 1.35rem 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    background: linear-gradient(180deg, #fff6f1 0%, #fff 100%);
}

.sidebar-profile-panel {
    background: var(--hrms-surface);
    border: 1px solid #f1e6df;
    border-radius: 26px;
    padding: 1.35rem 1rem;
    box-shadow: var(--hrms-shadow-sm);
    text-align: center;
}

.sidebar-profile-avatar-wrap {
    position: relative;
    width: 88px;
    margin: 0 auto 0.9rem;
}

.sidebar-profile-avatar {
    width: 88px;
    height: 88px;
    border: 4px solid #fff;
    box-shadow: var(--hrms-shadow-sm);
}

.sidebar-profile-dot {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #22c55e;
    border: 3px solid #fff;
}

.sidebar-profile-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--hrms-text);
}

.sidebar-profile-role {
    margin-top: 0.2rem;
    font-size: 0.82rem;
    color: var(--hrms-text-muted);
}

.sidebar-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
    margin-top: 1rem;
}

.sidebar-shortcut {
    border: 0;
    border-radius: 999px;
    padding: 0.72rem 0.5rem;
    background: #f8fafc;
    color: var(--hrms-text-muted);
    font-weight: 700;
    box-shadow: inset 0 0 0 1px #edf2f7;
	font-size: 14px;
}

.sidebar-shortcut.active {
    background: linear-gradient(135deg, var(--hrms-primary) 0%, var(--hrms-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 22px rgba(255, 107, 44, 0.22);
}

.sidebar-wrapper {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.9rem 1.2rem;
}

.sidebar-wrapper::-webkit-scrollbar {
    width: 8px;
}

.sidebar-wrapper::-webkit-scrollbar-thumb {
    background: #e5eaf2;
    border-radius: 999px;
}

.nav-header {
    padding: 1rem 0.9rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: #98a2b3;
    letter-spacing: 0.08em;
}

.sidebar-menu .nav-item {
    list-style: none;
}

.sidebar-menu .nav-link {
    position: relative;
    margin: 0.18rem 0.35rem;
    border-radius: 16px;
    color: #344054;
    display: flex;
    align-items: center;
    gap: 0.85rem;

    transition: all 0.2s ease-in-out;
    font-weight: 600;
}

.sidebar-menu .nav-link::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 50%;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
    transform: translateY(-50%);
    transition: all 0.2s ease;
}

.sidebar-menu .nav-link:hover {
    background: #fff5f0;
    color: var(--hrms-primary);
}

.sidebar-menu .nav-link:hover::before {
    background: rgba(255, 107, 44, 0.45);
}

.sidebar-menu .nav-link.active {
    background: linear-gradient(135deg, #fff4ee 0%, #fffaf7 100%);
    color: var(--hrms-primary) !important;
    box-shadow: inset 0 0 0 1px #fde2d5;
}

.sidebar-menu .nav-link.active::before {
    background: var(--hrms-primary);
    width: 4px;
    height: 24px;
    border-radius: 999px;
    left: 6px;
}

.sidebar-menu .nav-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #f8fafc;
    color: inherit;
    font-size: 1rem;
    flex-shrink: 0;
}

.sidebar-menu .nav-link.active .nav-icon,
.sidebar-menu .nav-link:hover .nav-icon {
    background: rgba(255, 107, 44, 0.12);
}

.sidebar-menu .nav-link p {
    margin: 0;
    font-size: 0.96rem;
}

.hrms-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1036;
}

.app-main {
    min-height: 100vh;
    margin-left: var(--hrms-sidebar-width);
    padding-top: var(--hrms-header-height);
}

.app-content-header {
    padding: calc(var(--hrms-content-spacing) - 12px) var(--hrms-content-spacing) 0;
}

.app-content {
    padding: 0 var(--hrms-content-spacing) var(--hrms-content-spacing);
}

.app-content > .container-fluid,
.app-content-header > .container-fluid {
    padding-left: 0;
    padding-right: 0;
}

.app-footer {
    margin-left: var(--hrms-sidebar-width);
    background: transparent;
    color: var(--hrms-text-muted);
    padding: 0 var(--hrms-content-spacing) var(--hrms-content-spacing);
}

.hrms-footer-inner {
    background: #fff;
    border: 1px solid var(--hrms-border);
    border-radius: 18px;
    box-shadow: var(--hrms-shadow-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card {
    border: 1px solid var(--hrms-border);
    border-radius: var(--hrms-radius);
    box-shadow: var(--hrms-shadow-sm);
    background: var(--hrms-surface);
    overflow: hidden;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #eef2f6;
    padding: 1.1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

.card-title {
    font-weight: 700;
    color: var(--hrms-text);
}

.table-responsive {
    overflow-x: auto;
}

.table {
    margin-bottom: 0;
    color: var(--hrms-text);
}

.table thead th {
    border-bottom: 1px solid #edf2f7;
    border-top: 0;
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #98a2b3;
    padding: 1rem 1.05rem;
    background: #fbfcfe;
}

.table tbody td {
    padding: 1rem 1.05rem;
    border-color: #f0f2f7;
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    background: #fff8f4;
}

.form-control,
.form-select,
.select2-container .select2-selection--single,
textarea.form-control {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid #dde5ef;
    box-shadow: none;
    padding: 0.7rem 0.95rem;
    background: #fff;
    color: var(--hrms-text);
}

textarea.form-control {
    min-height: 120px;
}

.form-control:focus,
.form-select:focus,
.select2-container--focus .select2-selection--single,
.select2-container--open .select2-selection--single {
    border-color: rgba(255, 107, 44, 0.45);
    box-shadow: 0 0 0 4px rgba(255, 107, 44, 0.12);
}

.form-label {
    font-weight: 700;
    color: var(--hrms-text);
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--hrms-text-muted);
}

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection__rendered {
    line-height: 46px !important;
    padding-left: 0 !important;
    color: var(--hrms-text) !important;
}

.select2-container .select2-selection__arrow {
    height: 46px !important;
}

.btn {
    border-radius: 14px;
    font-weight: 700;
    padding: 0.72rem 1.1rem;
    transition: all 0.2s ease;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--hrms-primary) 0%, var(--hrms-primary-dark) 100%) !important;
    border-color: transparent !important;
    box-shadow: 0 12px 25px rgba(255, 107, 44, 0.22);
}

.btn-outline-primary {
    color: var(--hrms-primary);
    border-color: rgba(255, 107, 44, 0.25);
    background: #fff;
}

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

.btn-outline-secondary,
.btn-default {
    border-color: #dde5ef;
    color: #475467;
    background: #fff;
}

.badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.5rem 0.7rem;
}

.text-bg-primary {
    background: rgba(255, 107, 44, 0.12) !important;
    color: var(--hrms-primary) !important;
}

.text-bg-success {
    background: rgba(28, 200, 138, 0.15) !important;
    color: #0e9f6e !important;
}

.text-bg-warning {
    background: rgba(255, 176, 32, 0.18) !important;
    color: #b7791f !important;
}

.text-bg-danger {
    background: rgba(240, 68, 56, 0.14) !important;
    color: #d92d20 !important;
}

.text-bg-secondary,
.bg-secondary-subtle {
    background: #f2f4f7 !important;
    color: #475467 !important;
}

.alert {
    border: 0;
    border-radius: 18px;
    box-shadow: var(--hrms-shadow-sm);
    padding: 1rem 1.1rem;
}

.alert-success {
    background: #ecfdf3;
    color: #027a48;
}

.alert-danger {
    background: #fef3f2;
    color: #b42318;
}

.alert-warning {
    background: #fffaeb;
    color: #b54708;
}

.alert-info {
    background: #eff8ff;
    color: #175cd3;
}

.app-content-header h1,
.app-content h1,
.app-content h2,
.app-content h3 {
    color: var(--hrms-text);
    font-weight: 800;
}

.app-content-header .text-muted,
.app-content .text-muted {
    color: var(--hrms-text-muted) !important;
}

.hrms-auth-page {
    background: radial-gradient(circle at top left, #fff2eb 0, #ffe7d9 20%, #f7f8fc 70%);
}

.hrms-login-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.hrms-alert {
    margin-bottom: 1rem;
}

.hrms-stat-card {
    position: relative;
    overflow: hidden;
}

.hrms-stat-card::after {
    content: "";
    position: absolute;
    inset: auto -35px -35px auto;
    width: 100px;
    height: 100px;
    border-radius: 24px;
    opacity: 0.08;
    transform: rotate(25deg);
}

.hrms-stat-primary::after { background: var(--hrms-primary); }
.hrms-stat-success::after { background: var(--hrms-success); }
.hrms-stat-warning::after { background: var(--hrms-warning); }
.hrms-stat-danger::after { background: var(--hrms-danger); }

.hrms-stat-icon {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: linear-gradient(135deg, #fff1ea 0%, #fff7f3 100%);
    color: var(--hrms-primary);
    box-shadow: inset 0 0 0 1px #ffe2d2;
}

.nav-pills .nav-link {
    border-radius: 999px;
    color: var(--hrms-text-muted);
    font-weight: 700;
    padding: 0.8rem 1.2rem;
}

.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    background: linear-gradient(135deg, var(--hrms-primary) 0%, var(--hrms-primary-dark) 100%);
    box-shadow: 0 10px 22px rgba(255, 107, 44, 0.2);
}

.pagination .page-link {
    border: 1px solid #e5eaf2;
    color: var(--hrms-text-muted);
    border-radius: 12px;
    margin: 0 0.15rem;
}

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

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 12px;
    border: 1px solid #dde5ef;
    min-height: 40px;
    padding: 0.45rem 0.8rem;
}

.dataTables_wrapper .dataTables_filter {
    text-align: right;
}

.dataTables_wrapper .row {
    align-items: center;
    row-gap: 1rem;
}

img.img-thumbnail {
    border-radius: 16px;
    border-color: #eef2f7;
}

.hrms-wizard-nav .nav-link {
    border-radius: 999px;
    margin-right: 0.5rem;
}

.hrms-profile-avatar {
    width: 132px;
    height: 132px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 107, 44, 0.12);
}

.hrms-timeline li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 1rem;
}

.hrms-timeline li:last-child {
    margin-bottom: 0;
}

.hrms-timeline-dot {
    position: absolute;
    left: 0;
    top: 0.35rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hrms-document-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.hrms-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
}

.hrms-calendar-head {
    font-weight: 700;
    color: var(--hrms-text-muted);
    text-align: center;
    padding-bottom: 0.25rem;
}

.hrms-calendar-cell {
    min-height: 130px;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 18px;
    padding: 0.85rem;
    box-shadow: var(--hrms-shadow-sm);
}

.hrms-calendar-cell.is-empty {
    background: rgba(15, 23, 42, 0.02);
    border-style: dashed;
    box-shadow: none;
}

.hrms-calendar-cell.status-present { border-top: 4px solid #198754; }
.hrms-calendar-cell.status-late { border-top: 4px solid #f0ad4e; }
.hrms-calendar-cell.status-half_day { border-top: 4px solid #0dcaf0; }
.hrms-calendar-cell.status-absent { border-top: 4px solid #dc3545; }
.hrms-calendar-cell.status-on_leave { border-top: 4px solid #0d6efd; }
.hrms-calendar-cell.status-holiday { border-top: 4px solid #6c757d; }
.hrms-calendar-cell.status-week_off { border-top: 4px solid #212529; }

.hrms-balance-card {
    border-top: 4px solid var(--hrms-primary);
}

body.sidebar-collapsed .app-sidebar {
    width: var(--hrms-sidebar-collapsed-width);
}

body.sidebar-collapsed .app-header,
body.sidebar-collapsed .app-main,
body.sidebar-collapsed .app-footer {
    margin-left: var(--hrms-sidebar-collapsed-width);
    left: var(--hrms-sidebar-collapsed-width);
}

body.sidebar-collapsed .sidebar-profile-card,
body.sidebar-collapsed .nav-header,
body.sidebar-collapsed .sidebar-shortcuts,
body.sidebar-collapsed .sidebar-profile-copy,
body.sidebar-collapsed .sidebar-menu .nav-link p {
    display: none !important;
}

body.sidebar-collapsed .sidebar-wrapper {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
}

body.sidebar-collapsed .sidebar-menu .nav-link {
    justify-content: center;
    padding: 0.9rem 0.75rem;
}

body.sidebar-collapsed .sidebar-menu .nav-link::before {
    display: none;
}

body.sidebar-collapsed .sidebar-menu .nav-icon {
    margin-right: 0;
}

@media (max-width: 1199.98px) {
    .hrms-brand-inline span,
    .hrms-search-chip,
    .hrms-user-copy {
        display: none;
    }
}

@media (max-width: 991.98px) {
    :root {
        --hrms-content-spacing: 18px;
    }

    .app-header {
        left: 0;
    }

    .app-sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
    }

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

    body.sidebar-open .hrms-sidebar-overlay {
        display: block;
    }

    .app-main,
    .app-footer,
    body.sidebar-collapsed .app-main,
    body.sidebar-collapsed .app-footer {
        margin-left: 0;
    }

    .hrms-topbar {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .hrms-topbar-search {
        display: none;
    }

    .hrms-brand-inline {
        min-width: auto;
    }

    .hrms-ai-button span,
    .hrms-topbar-icon.d-md-inline-flex {
        display: none !important;
    }

    .hrms-calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hrms-calendar-head {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .card-body,
    .card-header,
    .app-content-header,
    .app-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hrms-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .sidebar-profile-card {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

.hrms-chart-card .card-body {
    padding-top: 1rem;
}

.hrms-chart-wrap {
    position: relative;
    width: 100%;
    min-height: 280px;
}

.hrms-chart-wrap-sm {
    height: 320px;
}

.hrms-chart-wrap-md {
    height: 320px;
}

@media (max-width: 767.98px) {
    .hrms-chart-wrap-sm,
    .hrms-chart-wrap-md {
        height: 260px;
    }
}

.hrms-topbar-links {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.hrms-topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.72rem 0.95rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #475467;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.hrms-topbar-link:hover {
    background: var(--hrms-surface);
    border-color: var(--hrms-border);
    color: var(--hrms-primary);
    box-shadow: var(--hrms-shadow-sm);
}

.hrms-topbar-link.active {
    background: linear-gradient(135deg, var(--hrms-primary) 0%, var(--hrms-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 22px rgba(255, 107, 44, 0.22);
}

.hrms-topbar-link.active:hover {
    color: #fff;
}

.sidebar-shortcut {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.app-content-header .row {
    align-items: center;
    row-gap: 1rem;
}

.app-content-header h1 {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.1;
}

.app-content-header h1::before {
    font-family: "bootstrap-icons";
    content: "\f4d6";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fff1ea 0%, #fff8f4 100%);
    color: var(--hrms-primary);
    box-shadow: inset 0 0 0 1px #ffe2d2;
    font-size: 1.2rem;
    flex-shrink: 0;
}

body.controller-dashboard .app-content-header h1::before { content: "\f2dc"; }
body.controller-employees .app-content-header h1::before { content: "\f4cf"; }
body.controller-departments .app-content-header h1::before { content: "\f3e7"; }
body.controller-designations .app-content-header h1::before { content: "\f26b"; }
body.controller-employeetransfers .app-content-header h1::before { content: "\f138"; }
body.controller-employeeexits .app-content-header h1::before { content: "\f1c5"; }
body.controller-employeedocuments .app-content-header h1::before { content: "\f3c2"; }
body.controller-attendancelogs .app-content-header h1::before { content: "\f293"; }
body.controller-shifts .app-content-header h1::before,
body.controller-employeeshifts .app-content-header h1::before { content: "\f1f4"; }
body.controller-holidays .app-content-header h1::before { content: "\f1f5"; }
body.controller-leavetypes .app-content-header h1::before,
body.controller-leavebalances .app-content-header h1::before,
body.controller-leaveapplications .app-content-header h1::before { content: "\f1ef"; }
body.controller-salarycomponents .app-content-header h1::before,
body.controller-salarystructures .app-content-header h1::before,
body.controller-employeesalaryassignments .app-content-header h1::before,
body.controller-payrollruns .app-content-header h1::before,
body.controller-salaryslips .app-content-header h1::before,
body.controller-statutory .app-content-header h1::before { content: "\f634"; }
body.controller-appraisalcycles .app-content-header h1::before,
body.controller-performancegoals .app-content-header h1::before,
body.controller-appraisalforms .app-content-header h1::before { content: "\f17e"; }
body.controller-reports .app-content-header h1::before { content: "\f17a"; }
body.controller-users .app-content-header h1::before,
body.controller-roles .app-content-header h1::before,
body.controller-settings .app-content-header h1::before,
body.controller-auditlogs .app-content-header h1::before { content: "\f3e5"; }

.btn,
.page-link,
.sidebar-shortcut,
.hrms-topbar-link,
.hrms-topbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn .bi,
.btn i,
.page-link .bi,
.sidebar-shortcut .bi,
.hrms-topbar-link .bi,
.hrms-topbar-icon .bi {
    line-height: 1;
    font-size: 0.95em;
}

.btn-sm {
    gap: 0.4rem;
    padding: 0.52rem 0.85rem;
    border-radius: 12px;
}

.btn-outline-warning {
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.35);
    background: #fff;
}

.btn-outline-warning:hover {
    color: #fff;
    border-color: #f59e0b;
    background: #f59e0b;
}

.btn-outline-info {
    color: #0891b2;
    border-color: rgba(6, 182, 212, 0.35);
    background: #fff;
}

.btn-outline-info:hover {
    color: #fff;
    border-color: #06b6d4;
    background: #06b6d4;
}

.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-outline-secondary:hover,
.btn-default:hover {
    color: #fff;
}

.app-content-header .text-sm-end,
.card-header .text-sm-end {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hrms-table-actions,
.hrms-form-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.hrms-table-actions {
    justify-content: flex-end;
}

.hrms-table-actions .btn {
    min-width: 96px;
}

.dataTables_wrapper td.text-end,
.table td.text-end {
    white-space: nowrap;
}

.modal-footer,
.card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 767.98px) {
    .app-content-header .text-sm-end,
    .card-header .text-sm-end,
    .hrms-table-actions,
    .hrms-form-actions,
    .modal-footer,
    .card-footer {
        justify-content: stretch;
    }

    .hrms-table-actions .btn,
    .hrms-form-actions .btn,
    .modal-footer .btn,
    .card-footer .btn,
    .app-content-header .text-sm-end .btn {
        width: 100%;
    }

    .app-content-header h1::before {
        width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 1rem;
    }
}

.hrms-user-dropdown {
    min-width: 320px;
    max-width: min(92vw, 360px);
    margin-top: 0.85rem;
    right: 0;
    left: auto;
}

.hrms-user-dropdown .user-header {
    padding: 1.15rem 1rem;
    text-align: center;
}

.hrms-user-dropdown .user-header img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    margin-bottom: 0.85rem;
}

.hrms-user-dropdown .user-header p {
    margin: 0;
    line-height: 1.35;
    word-break: break-word;
}

.hrms-user-dropdown .user-header small {
    display: block;
    margin-top: 0.35rem;
    opacity: 0.82;
}

.hrms-user-dropdown .user-footer {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding-top: 0.9rem;
}

.hrms-user-dropdown .user-footer .btn {
    width: 100%;
    min-width: 0;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    white-space: nowrap;
}

@media (max-width: 575.98px) {
    .hrms-user-dropdown {
        min-width: 280px;
        max-width: calc(100vw - 1.5rem);
    }

    .hrms-user-dropdown .user-footer {
        grid-template-columns: 1fr;
    }
}
:root {
    --hrms-header-height: 104px;
}

.app-header {
    min-height: var(--hrms-header-height);
    overflow: visible;
}

.hrms-topbar {
    min-height: var(--hrms-header-height);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.app-main {
    padding-top: calc(var(--hrms-header-height) + 18px);
}

.app-content-header {
    position: relative;
    z-index: 1;
}

.hrms-topbar-start,
.hrms-topbar-end {
    min-width: 0;
}

.hrms-topbar-end {
    flex-shrink: 0;
}

.user-menu {
    position: relative;
    z-index: 1045;
}

.user-menu > .nav-link {
    max-width: min(100%, 330px);
}

.hrms-user-chip {
    max-width: 330px;
    overflow: hidden;
}

.hrms-user-copy {
    min-width: 0;
    overflow: hidden;
}

.hrms-user-name,
.hrms-user-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hrms-user-dropdown {
    z-index: 1060;
    margin-top: 0.95rem;
}

@media (max-width: 1199.98px) {
    :root {
        --hrms-header-height: 96px;
    }

    .app-main {
        padding-top: calc(var(--hrms-header-height) + 14px);
    }

    .user-menu > .nav-link,
    .hrms-user-chip {
        max-width: none;
    }
}

@media (max-width: 991.98px) {
    :root {
        --hrms-header-height: 88px;
    }

    .app-main {
        padding-top: calc(var(--hrms-header-height) + 12px);
    }
}

.hrms-topbar-start {
    flex: 1 1 auto;
    min-width: 0;
}

.hrms-topbar-links {
    min-width: 0;
}

@media (max-width: 1440px) {
    .hrms-brand-inline {
        min-width: 180px;
    }

    .hrms-brand-inline span,
    .hrms-user-copy {
        display: none !important;
    }

    .hrms-topbar-links {
        gap: 0.35rem;
    }

    .hrms-topbar-link {
        padding: 0.68rem 0.78rem;
        font-size: 0.84rem;
    }

    .hrms-topbar-link span {
        display: none;
    }

    .hrms-topbar-link,
    .hrms-topbar-icon,
    .hrms-sidebar-trigger {
        flex-shrink: 0;
    }

    .hrms-user-chip {
        padding-right: 0.45rem;
    }
}

/* Compact density tuning - keeps the SmartHR look but reduces visual scale. */
:root {
    --hrms-radius: 16px;
    --hrms-sidebar-width: 260px;
    --hrms-sidebar-collapsed-width: 82px;
    --hrms-header-height: 72px;
    --hrms-content-spacing: 20px;
}

body {
    font-size: 0.92rem;
	font-weight: 500;
}
.h1, h1 {
    font-size: 1.5rem;
}

.app-main {
    padding-top: calc(var(--hrms-header-height) + 10px);
}

.hrms-topbar {
    min-height: var(--hrms-header-height);
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
    gap: 0.7rem;
}

.hrms-topbar-start,
.hrms-topbar-end,
.hrms-topbar-links {
    gap: 0.55rem;
}

.hrms-sidebar-trigger,
.hrms-topbar-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 0.98rem;
}

.hrms-brand-inline {
    gap: 0.55rem;
    min-width: 190px;
}

.hrms-brand-inline img,
.user-image {
    width: 34px;
    height: 34px;
}

.hrms-brand-inline strong {
    font-size: 1rem;
}

.hrms-brand-inline span,
.hrms-user-role {
    font-size: 0.72rem;
}

.hrms-topbar-search {
    min-height: 42px;
    max-width: 470px;
    border-radius: 14px;
    padding: 0 0.8rem;
}

.hrms-topbar-search input {
    font-size: 0.86rem;
}

.hrms-search-chip {
    padding: 0.25rem 0.45rem;
    font-size: 0.66rem;
    border-radius: 8px;
}

.hrms-topbar-link {
    padding: 0.56rem 0.78rem;
    font-size: 0.8rem;
}

.hrms-ai-button,
.btn {
    padding: 0.56rem 0.82rem;
    border-radius: 12px;
    font-size: 0.88rem;
}

.btn-sm {
    padding: 0.38rem 0.62rem;
    border-radius: 10px;
    font-size: 0.78rem;
}

.hrms-user-chip {
    gap: 0.55rem;
    border-radius: 14px;
    padding: 0.3rem 0.45rem 0.3rem 0.3rem;
}

.hrms-user-name {
    font-size: 0.9rem;
}

.sidebar-profile-card {
    padding: 1rem 1rem 0.75rem;
}

.sidebar-profile-panel {
    border-radius: 20px;
    padding: 1rem 0.75rem;
}

.sidebar-profile-avatar-wrap,
.sidebar-profile-avatar {
    width: 68px;
    height: 68px;
}

.sidebar-profile-avatar-wrap {
    margin-bottom: 0.55rem;
}

.sidebar-profile-name {
    font-size: 0.9rem;
}

.sidebar-profile-role {
    font-size: 0.74rem;
}

.sidebar-shortcuts {
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.sidebar-shortcut {
    padding: 0.5rem 0.38rem;
    font-size: 0.78rem;
}

.sidebar-wrapper {
    padding: 0.65rem 0.65rem 1rem;
}

.nav-header {
    padding: 0.72rem 0.65rem 0.35rem;
    font-size: 0.66rem;
}

.sidebar-menu .nav-link {
    margin: 0.1rem 0.22rem;
    border-radius: 13px;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
}

.sidebar-menu .nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    font-size: 0.86rem;
}

.sidebar-menu .nav-link p {
    font-size: 0.84rem;
}

.app-content-header {
    padding-top: 0.6rem;
}

.app-content-header h1 {
    font-size: clamp(1.65rem, 2.2vw, 2.45rem);
    gap: 0.75rem;
}

.app-content-header h1::before {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 1rem;
}

.card {
    border-radius: 16px;
}

.card-header {
    padding: 0.82rem 1rem;
}

.card-body {
    padding: 1rem;
}

.card-footer,
.modal-footer {
    padding: 0.8rem 1rem;
}

.form-control,
.form-select,
.select2-container--default .select2-selection--single,
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    min-height: 38px;
    border-radius: 11px;
    font-size: 0.86rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

textarea.form-control {
    min-height: 86px;
}

label,
.form-label,
.col-form-label {
    font-size: 0.86rem;
    margin-bottom: 0.32rem;
}

.row.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 0.85rem;
}

.table {
    font-size: 0.84rem;
}

.table thead th {
    padding: 0.72rem 0.78rem;
    font-size: 0.7rem;
}

.table tbody td {
    padding: 0.72rem 0.78rem;
    vertical-align: middle;
}

.badge,
.status-badge {
    font-size: 0.72rem;
    padding: 0.32rem 0.55rem;
}

.hrms-profile-avatar {
    width: 112px;
    height: 112px;
}

.hrms-table-actions {
    gap: 0.35rem;
}

.hrms-table-actions .btn {
    min-width: 74px;
}

@media (max-width: 991.98px) {
    :root {
        --hrms-sidebar-width: 260px;
        --hrms-header-height: 68px;
        --hrms-content-spacing: 16px;
    }

    .app-main {
        padding-top: calc(var(--hrms-header-height) + 8px);
    }
}

/* Corporate launch polish - calmer enterprise tone on top of compact density. */
:root {
    --hrms-primary-soft: #fff4ef;
    --hrms-accent: #155e75;
    --hrms-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.045);
    --hrms-shadow-md: 0 14px 36px rgba(15, 23, 42, 0.075);
}

body {
    letter-spacing: -0.005em;
}

.app-content-header h1 {
    font-weight: 750;
    letter-spacing: -0.045em;
    color: #111827;
}

.app-content-header .text-muted,
.card .text-muted,
.form-text {
    color: #64748b !important;
}

.card,
.hrms-footer-card,
.sidebar-profile-panel,
.hrms-user-chip,
.hrms-topbar-search {
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.045);
}

.card:hover {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.btn-primary,
.btn-success {
    background: linear-gradient(135deg, var(--hrms-primary) 0%, var(--hrms-primary-dark) 100%);
    border-color: var(--hrms-primary-dark);
    box-shadow: 0 8px 18px rgba(255, 107, 44, 0.18);
}

.btn-success {
    color: #fff;
}

.btn-warning,
.btn-info {
    background: #f8fafc;
    border-color: #dbe3ef;
    color: #334155;
    box-shadow: none;
}

.btn-warning:hover,
.btn-info:hover {
    background: #eef2f7;
    border-color: #cbd5e1;
    color: #0f172a;
}

.btn-outline-primary {
    border-color: #ffd3c1;
    color: var(--hrms-primary-dark);
}

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

.hrms-topbar-link.active {
    box-shadow: 0 10px 22px rgba(255, 107, 44, 0.22);
}

.hrms-user-initials,
.hrms-user-dropdown-initials,
.sidebar-profile-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: linear-gradient(135deg, #155e75 0%, #0f172a 100%);
}

.hrms-user-initials {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
}

.hrms-user-dropdown-initials {
    width: 84px;
    height: 84px;
    margin-bottom: 0.85rem;
    font-size: 1.45rem;
}

.sidebar-profile-initials {
    width: 68px;
    height: 68px;
    font-size: 1.15rem;
    margin: 0 auto;
    border: 4px solid #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.table tbody tr:hover {
    background: #fffaf7;
}

.table td[colspan].text-center {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    color: #64748b !important;
    font-weight: 600;
}

.table td[colspan].text-center::before {
    content: "\F3C2";
    font-family: "bootstrap-icons";
    display: inline-flex;
    width: 30px;
    height: 30px;
    margin-right: 0.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #fff4ef;
    color: var(--hrms-primary);
    vertical-align: middle;
}

canvas {
    max-height: 320px;
}

.hrms-chart-card canvas,
.card canvas {
    filter: saturate(0.92);
}

.alert {
    border-radius: 14px;
    border-width: 1px;
}

.display-6,
.display-5,
.display-4 {
    letter-spacing: -0.035em;
}

.dropdown-menu {
    border-radius: 16px;
}

.hrms-user-dropdown .user-header {
    background: linear-gradient(135deg, #102a43 0%, #155e75 100%) !important;
}

.hrms-user-dropdown .user-footer .btn-primary {
    box-shadow: none;
}

@media print {
    .app-sidebar,
    .app-header,
    .app-footer,
    .btn,
    .hrms-form-actions,
    .hrms-table-actions {
        display: none !important;
    }

    .app-main,
    .app-content,
    .app-content-header {
        margin: 0 !important;
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border-color: #d1d5db !important;
    }
}
