:root {
    --app-primary: #1e40af;
    --app-primary-dark: #1e3a8a;
    --app-primary-light: #2563eb;
    --app-navy: #0f172a;
    --app-success: #059669;
    --app-warning: #d97706;
    --app-danger: #dc2626;
    --app-info: #0284c7;
    --app-sidebar-width: 272px;
    --app-sidebar-collapsed-width: 76px;
    --app-sidebar-bg: #0f172a;
    --app-sidebar-bg-hover: rgba(255, 255, 255, 0.06);
    --app-sidebar-text: #cbd5e1;
    --app-sidebar-active: #2563eb;
    --bs-primary: #1e40af;
    --bs-primary-rgb: 30, 64, 175;
    --bs-success: #059669;
    --bs-warning: #d97706;
    --bs-danger: #dc2626;
    --bs-info: #0284c7;
}

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

.auth-body {
    min-height: 100vh;
    position: relative;
}

.auth-body--default {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #334155 100%);
    background-attachment: fixed;
}

.auth-body--photo {
    background-image: var(--auth-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    pointer-events: none;
    z-index: 0;
}

.auth-main {
    position: relative;
    z-index: 1;
}

.auth-card {
    backdrop-filter: blur(6px);
    border-radius: 1rem;
}

.auth-input {
    border-color: #e2e8f0;
    font-size: 0.95rem;
}

.auth-input:focus {
    border-color: var(--app-primary);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

.auth-submit {
    font-weight: 600;
    letter-spacing: 0.02em;
}

.auth-demo-hint code {
    font-size: 0.8em;
    color: #475569;
}

.auth-logo {
    max-height: 72px;
    max-width: 100%;
    object-fit: contain;
}

.auth-logo-preview {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}

.auth-bg-preview {
    height: 120px;
    background-size: cover;
    background-position: center;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: var(--app-primary-dark);
    --bs-btn-hover-border-color: var(--app-primary-dark);
    --bs-btn-active-bg: var(--app-primary-dark);
    font-weight: 600;
}

.btn.btn-list-nav {
    color: #1e293b;
    background-color: #f1f5f9;
    border: 1px solid #94a3b8;
    font-weight: 600;
}

.btn.btn-list-nav:hover,
.btn.btn-list-nav:focus {
    color: #0f172a;
    background-color: #e2e8f0;
    border-color: #64748b;
}

.btn-outline-primary {
    --bs-btn-color: var(--app-primary);
    --bs-btn-border-color: #93c5fd;
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
}

.form-label.required::after,
label.required::after {
    content: ' *';
    color: var(--app-danger);
    font-weight: 600;
}

.invalid-feedback {
    font-size: 0.8125rem;
}

.app-sidebar-section-label {
    padding: 0.85rem 1.25rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.85);
}

.app-nav-link--muted {
    opacity: 0.85;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 0.85rem;
}

.app-toast-container {
    z-index: 1090;
}

.app-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2000;
    background: linear-gradient(90deg, var(--app-primary-light), #60a5fa, var(--app-primary-light));
    background-size: 200% 100%;
    animation: app-loading-slide 1.2s linear infinite;
}

@keyframes app-loading-slide {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.empty-state-icon {
    width: 3.5rem;
    height: 3.5rem;
    margin-inline: auto;
    border-radius: 1rem;
    background: #eff6ff;
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.empty-state-message {
    max-width: 28rem;
}

.table-app thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    font-weight: 600;
    white-space: nowrap;
}

.table-toolbar {
    border-bottom: 1px solid #f1f5f9;
}

.card-app {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.modal-content {
    border-radius: 0.75rem;
}

.employee-form-compact--dense .form-label {
    margin-bottom: 0.2rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.employee-form-compact--dense .form-text {
    font-size: 0.75rem;
}

.employee-create-card .card-body {
    max-height: calc(100vh - 11rem);
    overflow-y: auto;
}

@media (min-height: 800px) {
    .employee-create-card .card-body {
        max-height: none;
        overflow: visible;
    }
}

.settings-form-actions.sticky-bottom-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 -4px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(6px);
}

@media (max-width: 767.98px) {
    .app-content-area .container-fluid {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

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

    .d-flex.flex-wrap.gap-2 .btn {
        flex: 1 1 auto;
    }
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.app-body {
    background: #f8fafc;
}

.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.app-content-area {
    flex: 1;
}

.app-topbar-hris {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 56px;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-breadcrumb {
    font-size: 0.875rem;
}

.app-breadcrumb .breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
}

.app-breadcrumb .breadcrumb-item.active {
    color: #0f172a;
    font-weight: 500;
}

.app-company-pill {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
}

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.dropdown-toggle-no-caret::after {
    display: none !important;
}

.topbar-notif-badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    padding: 0.2em 0.45em;
}

.topbar-notif-menu {
    width: min(22rem, calc(100vw - 1.5rem));
    max-height: min(28rem, calc(100vh - 5rem));
    overflow: hidden;
    flex-direction: column;
    padding: 0;
}

/* Jangan pakai display:flex di state default — akan menimpa display:none Bootstrap */
.dropdown-menu.topbar-notif-menu.show {
    display: flex;
}

.topbar-notif-list {
    overflow-y: auto;
    max-height: 16rem;
}

.topbar-notif-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s ease;
}

.topbar-notif-item:hover {
    background: #f8fafc;
}

.topbar-notif-item--unread {
    background: #eff6ff;
}

.topbar-notif-item--unread:hover {
    background: #dbeafe;
}

.topbar-notif-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 8px;
    background: #e2e8f0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-notif-item--unread .topbar-notif-icon {
    background: #bfdbfe;
    color: #1d4ed8;
}

.topbar-notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dc2626;
    margin-top: 0.35rem;
}

.notification-inbox-card--unread {
    border-left: 3px solid #2563eb;
}

.topbar-profile-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    background: #f8fafc;
}

.topbar-profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    overflow: hidden;
    flex-shrink: 0;
}

.topbar-profile-avatar:has(.user-avatar-img) {
    background: transparent;
}

/* Bootstrap offcanvas defaults to white — force dark sidebar */
.app-sidebar.offcanvas,
.app-sidebar.offcanvas-lg,
#appSidebar.offcanvas,
#appSidebar.offcanvas-lg {
    --bs-offcanvas-bg: #0f172a;
    --bs-offcanvas-color: #e2e8f0;
    width: var(--app-sidebar-width);
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.app-sidebar .offcanvas-body,
.app-sidebar .offcanvas-header {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

.app-sidebar-shell {
    position: relative;
    flex-shrink: 0;
}

.app-sidebar {
    width: var(--app-sidebar-width);
    background: var(--app-sidebar-bg);
    color: var(--app-sidebar-text);
    border: none;
    transition: width 0.2s ease;
}

.sidebar-rail-toggle {
    position: absolute;
    top: 1.15rem;
    right: -14px;
    z-index: 1045;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #334155;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
    cursor: pointer;
}

.sidebar-rail-toggle:hover {
    background: #f8fafc;
    color: var(--app-primary);
}

.app-sidebar-inner {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.app-sidebar-brand,
.sidebar-user-card,
.app-sidebar .offcanvas-header {
    flex-shrink: 0;
}

.app-sidebar .offcanvas-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.app-sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5rem;
    scroll-padding-bottom: 3rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.55) transparent;
}

.app-sidebar-nav::after {
    content: '';
    display: block;
    height: 2.5rem;
    pointer-events: none;
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.65rem 0.85rem;
    margin-bottom: 0.35rem !important;
}

.user-avatar-img,
.user-avatar-fallback,
.sidebar-user-avatar {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-avatar-fallback,
.sidebar-user-avatar.user-avatar-fallback {
    background: linear-gradient(135deg, #334155, #1e293b);
    border: 2px solid rgba(96, 165, 250, 0.5);
    color: #e2e8f0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.user-avatar-img {
    border: 2px solid rgba(96, 165, 250, 0.45);
}

.topbar-profile-avatar .user-avatar-img,
.topbar-profile-avatar .user-avatar-fallback {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem;
    border-width: 1px;
}

.sidebar-online {
    color: #86efac;
    font-size: 0.75rem;
}

.sidebar-online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.35);
}

.sidebar-soon-badge {
    font-size: 0.65rem;
}

.app-sidebar-nav .app-sidebar-group {
    margin-bottom: 0;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.app-sidebar-nav .app-sidebar-group:last-child:not(.app-sidebar-group--section-close) {
    border-bottom: none;
    padding-bottom: 0;
}

.app-sidebar-nav .app-sidebar-group--section-close:last-child {
    border-bottom: none;
    padding-bottom: 0.75rem;
}

.app-sidebar-nav .app-sidebar-group--section-close .app-nav-link--child:last-of-type {
    margin-bottom: 0.85rem;
}

.app-sidebar-group {
    margin-bottom: 0;
}

.app-nav-link--group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    color: #e2e8f0 !important;
    font-size: 0.9375rem;
    margin-top: 0.35rem;
    cursor: pointer;
    text-align: left;
    background: transparent;
}

.app-sidebar-menu-close-rule {
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
    margin: 0.35rem 0.85rem 0.15rem;
}

.app-nav-link--group:hover {
    background: var(--app-sidebar-bg-hover);
    color: #fff !important;
}

.app-nav-link--group .app-nav-chevron {
    transition: transform 0.2s ease;
    opacity: 0.65;
}

.app-nav-link--group:not(.collapsed) .app-nav-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu .collapse {
    transition: height 0.2s ease;
}

html.sidebar-collapsed .app-nav-label,
html.sidebar-collapsed .sidebar-user-meta,
html.sidebar-collapsed .app-sidebar-brand-text,
html.sidebar-collapsed .sidebar-soon-badge,
html.sidebar-collapsed .app-nav-chevron,
html.sidebar-collapsed .sidebar-submenu {
    display: none !important;
}

html.sidebar-collapsed .app-sidebar-brand,
html.sidebar-collapsed .sidebar-user-card {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

html.sidebar-collapsed .app-sidebar-brand {
    flex-direction: column;
}

html.sidebar-collapsed .app-nav-link {
    justify-content: center;
    margin-left: 0.35rem;
    margin-right: 0.35rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

html.sidebar-collapsed .app-nav-link i:first-child {
    margin: 0;
}

html.sidebar-collapsed .sidebar-user-card .d-flex {
    justify-content: center;
}

.app-nav-link--child {
    padding-left: 2.25rem !important;
    font-size: 0.875rem;
}

.app-sidebar-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
}

.app-sidebar-logo-fallback {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(37, 99, 235, 0.25);
    color: #93c5fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    overflow: hidden;
}

.app-sidebar-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.sidebar-brand-sub {
    color: #94a3b8 !important;
}

.app-sidebar-brand-text {
    min-width: 0;
    color: #f8fafc;
}

.app-sidebar-section {
    padding: 1rem 1.25rem 0.35rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8 !important;
}

@media (min-width: 992px) {
    .app-sidebar,
    .app-sidebar.offcanvas-lg {
        position: sticky;
        top: 0;
        display: flex !important;
        flex-direction: column;
        height: 100vh;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
        flex-shrink: 0;
        transform: none !important;
        visibility: visible !important;
    }

    /* Backdrop from mobile offcanvas must not block desktop clicks */
    .offcanvas-backdrop {
        display: none !important;
    }
}

.app-sidebar .app-nav-link,
.app-sidebar a.app-nav-link,
.app-sidebar span.app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #e2e8f0 !important;
    padding: 0.65rem 1rem;
    margin: 0.15rem 0.75rem;
    border-radius: 0.625rem;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-sidebar .app-nav-link span {
    color: inherit !important;
}

.app-nav-link i {
    width: 1.25rem;
    text-align: center;
    opacity: 0.9;
}

.app-sidebar .app-nav-link:hover {
    background: var(--app-sidebar-bg-hover);
    color: #ffffff !important;
}

.app-sidebar .app-nav-link.active {
    background: #2563eb;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    font-weight: 600;
}

.app-sidebar .app-nav-link--disabled {
    color: #94a3b8 !important;
    opacity: 1;
    cursor: not-allowed;
}

.app-sidebar .app-nav-link--disabled .badge {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
    font-weight: 500;
}

.app-sidebar-brand-text .text-white-50 {
    color: #94a3b8 !important;
}

.card-app {
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    border-radius: 0.75rem;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.stat-sub {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon--muted {
    background: #f1f5f9;
    color: #64748b;
}

.stat-icon--accent {
    background: #ecfdf5;
    color: #059669;
}

.stat-card--primary {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
}

.stat-card--accent {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #fff 0%, #f7fef9 100%);
}

.chart-wrap {
    position: relative;
    width: 100%;
}

.chart-wrap--donut {
    height: 260px;
}

.chart-wrap--bar {
    height: 280px;
}

.chart-wrap--line {
    height: 220px;
}

.dashboard-progress {
    height: 10px;
    background: #e2e8f0;
}

.dashboard-progress-sm {
    height: 8px;
    background: #e2e8f0;
}

.dashboard-progress .progress-bar {
    background: var(--app-primary);
}

.table-app thead th {
    background: #f8fafc;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #64748b;
}

.permission-grid {
    max-height: 420px;
    overflow: auto;
}

/* HRIS-style dashboard (acuan hero banner enterprise) */
.dashboard-hero {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(118deg, #2563eb 0%, #4f46e5 42%, #6366f1 72%, #4338ca 100%);
    color: #fff;
    box-shadow: 0 14px 48px rgba(67, 56, 202, 0.28);
}

.dashboard-hero-deco {
    position: absolute;
    right: -40px;
    top: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.dashboard-hero-deco::after {
    content: "";
    position: absolute;
    right: 60px;
    bottom: -120px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
}

.dashboard-hero-watermark {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(5rem, 14vw, 9rem);
    color: rgba(255, 255, 255, 0.12);
    pointer-events: none;
    line-height: 1;
}

.dashboard-hero-body {
    position: relative;
    z-index: 1;
    padding: 2rem 2rem 1.85rem;
    max-width: 920px;
}

.dashboard-hero-date {
    background: rgba(15, 23, 42, 0.22);
    color: #fff;
    font-weight: 500;
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dashboard-hero-title {
    font-size: clamp(1.5rem, 3vw, 2.125rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 0.65rem;
}

.dashboard-hero-text {
    max-width: 38rem;
    opacity: 0.95;
    font-size: 0.9375rem;
    line-height: 1.55;
    margin-bottom: 1.35rem;
}

.dashboard-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.dashboard-hero-actions .btn {
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.875rem;
    padding: 0.5rem 1.15rem;
    border: none;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.btn-hero-light {
    background: #fff;
    color: #1e293b;
}

.btn-hero-light:hover {
    background: #f8fafc;
    color: #0f172a;
}

.btn-hero-dark {
    background: rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
}

.btn-hero-dark:hover {
    background: rgba(15, 23, 42, 0.42);
    color: #fff;
}

.btn-hero-success {
    background: #22c55e;
    color: #fff;
}

.btn-hero-success:hover {
    background: #16a34a;
    color: #fff;
}

.btn-hero-warning {
    background: #fbbf24;
    color: #422006;
}

.btn-hero-warning:hover {
    background: #f59e0b;
    color: #422006;
}

.hris-stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 12px rgba(15, 23, 42, 0.04);
}

.hris-stat-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.hris-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    margin: 0.35rem 0 0.5rem;
}

.hris-stat-foot {
    font-size: 0.75rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

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

.hris-stat-icon--blue { background: #eff6ff; color: #2563eb; }
.hris-stat-icon--indigo { background: #eef2ff; color: #4f46e5; }
.hris-stat-icon--amber { background: #fffbeb; color: #d97706; }
.hris-stat-icon--green { background: #ecfdf5; color: #059669; }
.hris-stat-icon--slate { background: #f1f5f9; color: #475569; }
.hris-stat-icon--rose { background: #fff1f2; color: #e11d48; }

@media (max-width: 767.98px) {
    .dashboard-hero-body {
        padding: 1.35rem 1.25rem 1.25rem;
    }

    .dashboard-hero-watermark {
        right: 0.5rem;
        opacity: 0.35;
    }

    .dashboard-hero-actions .btn {
        flex: 1 1 calc(50% - 0.35rem);
        justify-content: center;
    }
}

.dashboard-kpi .hris-stat-value {
    letter-spacing: -0.02em;
}

.dashboard-kpi-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.95rem;
}

.chart-wrap--bar-sm {
    height: 240px;
}

.dashboard-activity .list-group-item {
    border-color: #f1f5f9;
}

.dashboard-activity .smaller {
    font-size: 0.75rem;
}

.hris-mini-stat {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    background: #fff;
}

.hris-mini-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.hris-mini-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.employee-photo-img,
.employee-photo-fallback {
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.employee-photo-fallback {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #e2e8f0;
}

.employee-profile-photo {
    width: 88px !important;
    height: 88px !important;
    font-size: 2.25rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.employee-profile-hero {
    position: relative;
    overflow: hidden;
}

.employee-profile-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 45%, #fff 100%);
    pointer-events: none;
}

.employee-profile-stat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 4.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.employee-profile-stat:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.08);
    color: inherit;
}

.employee-profile-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--app-primary);
}

.employee-profile-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.employee-profile-stat-icon {
    font-size: 1.35rem;
    color: var(--app-primary);
    margin-bottom: 0.15rem;
}

.employee-profile-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    padding: 1rem 1.15rem;
    background: #fafbfc;
}

.employee-profile-panel-title {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    margin-bottom: 0.85rem;
}

.employee-profile-facts li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #e8edf3;
    font-size: 0.875rem;
}

.employee-profile-facts li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.employee-profile-facts li span {
    color: #64748b;
    flex-shrink: 0;
}

.employee-profile-facts li strong {
    text-align: right;
    font-weight: 600;
    color: #0f172a;
}

.employee-profile-notes {
    border-left: 3px solid var(--app-primary);
    background: #f8fafc;
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.85rem 1rem;
}

.employee-dl dt {
    color: #64748b;
    font-weight: 500;
}

.employee-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    background: linear-gradient(180deg, #eef2f7 0%, #e8edf3 100%);
    border-bottom: 1px solid #cbd5e1 !important;
    padding-top: 0.65rem !important;
    padding-bottom: 0 !important;
}

.employee-profile-tabs .nav-item {
    margin-bottom: 0;
}

.employee-profile-tabs .nav-link {
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 0.5rem 0.5rem 0 0;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.55rem 1rem 0.65rem;
    margin-bottom: -1px;
    background: rgba(255, 255, 255, 0.35);
    transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.employee-profile-tabs .nav-link .bi {
    opacity: 0.75;
}

.employee-profile-tabs .nav-link:hover:not(.active) {
    color: #334155;
    background: rgba(255, 255, 255, 0.75);
    border-color: #cbd5e1;
}

.employee-profile-tabs .nav-link.active {
    color: #fff;
    font-weight: 600;
    background: var(--app-primary);
    border-color: var(--app-primary);
    box-shadow: 0 -2px 10px rgba(30, 64, 175, 0.22);
    position: relative;
    z-index: 1;
}

.employee-profile-tabs .nav-link.active .bi {
    opacity: 1;
}

.employee-profile-tabs .nav-link:focus-visible {
    outline: 2px solid var(--app-primary-light);
    outline-offset: 2px;
}

.employee-search-select + .ts-wrapper,
.employee-search-select.ts-hidden-accessible + .ts-wrapper {
    width: 100%;
}

.ts-wrapper.form-select-sm .ts-control {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 0.25rem 2rem 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.ts-wrapper.is-invalid .ts-control {
    border-color: var(--bs-form-invalid-border-color, #dc3545);
}

.employee-select-option {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
}

.employee-select-option-name {
    font-weight: 500;
}

.employee-select-option-code {
    font-size: 0.75rem;
    color: #64748b;
    flex-shrink: 0;
}

.ts-dropdown .dropdown-input-wrap input {
    font-size: 0.875rem;
}

.mapping-part-row:hover {
    background: #f8fafc;
    cursor: pointer;
}

.profile-photo-preview .user-avatar-img,
.profile-photo-preview .user-avatar-fallback,
.profile-photo-preview-inner {
    width: 96px !important;
    height: 96px !important;
    font-size: 2rem;
}

.competency-level-badge {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.competency-level-badge--0 { background: #e2e8f0; color: #475569; }
.competency-level-badge--1 { background: #fee2e2; color: #b91c1c; }
.competency-level-badge--2 { background: #ffedd5; color: #c2410c; }
.competency-level-badge--3 { background: #fef9c3; color: #a16207; }
.competency-level-badge--4 { background: #dcfce7; color: #15803d; }
.competency-level-badge--5 { background: #dbeafe; color: #1d4ed8; }

.skill-matrix-scroll {
    overflow: auto;
    max-height: min(70vh, 720px);
    -webkit-overflow-scrolling: touch;
}

.skill-matrix-table {
    font-size: 0.8125rem;
    border-collapse: separate;
    border-spacing: 0;
    min-width: max-content;
}

.skill-matrix-table th,
.skill-matrix-table td {
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

.skill-matrix-sticky-head {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafc;
    font-weight: 600;
    white-space: nowrap;
    padding: 0.45rem 0.5rem;
}

.skill-matrix-sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    min-width: 160px;
    max-width: 200px;
    box-shadow: 2px 0 4px rgba(15, 23, 42, 0.06);
}

.skill-matrix-sticky-col.skill-matrix-sticky-head {
    z-index: 4;
    left: 0;
}

.skill-matrix-process {
    padding: 0.5rem 0.65rem;
    text-align: left;
}

.skill-matrix-cell {
    min-width: 52px;
    padding: 0.35rem 0.25rem;
    font-weight: 600;
    font-size: 0.8125rem;
    line-height: 1.2;
}

.skill-matrix-cell-btn {
    cursor: pointer;
    transition: filter 0.12s ease, transform 0.12s ease;
}

.skill-matrix-cell-btn:hover {
    filter: brightness(0.95);
}

.skill-matrix-cell--na {
    background: #f1f5f9;
    color: #94a3b8;
}

.skill-matrix-cell--empty {
    background: #f8fafc;
    color: #64748b;
}

.skill-matrix-cell--level-0,
.skill-matrix-legend-item.skill-matrix-cell--level-0 {
    background: #e2e8f0;
    color: #475569;
}

.skill-matrix-cell--level-1,
.skill-matrix-legend-item.skill-matrix-cell--level-1 {
    background: #fecaca;
    color: #991b1b;
}

.skill-matrix-cell--level-2,
.skill-matrix-legend-item.skill-matrix-cell--level-2 {
    background: #fed7aa;
    color: #c2410c;
}

.skill-matrix-cell--level-3,
.skill-matrix-legend-item.skill-matrix-cell--level-3 {
    background: #fef08a;
    color: #a16207;
}

.skill-matrix-cell--level-4,
.skill-matrix-legend-item.skill-matrix-cell--level-4 {
    background: #bbf7d0;
    color: #15803d;
}

.skill-matrix-cell--level-5,
.skill-matrix-legend-item.skill-matrix-cell--level-5 {
    background: #bfdbfe;
    color: #1d4ed8;
}

.skill-matrix-legend-item {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 0.375rem;
    font-weight: 600;
}

.skill-matrix-detail-dl dt {
    color: #64748b;
}

.report-hub-card {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.report-hub-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.report-hub-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: #eff6ff;
    color: var(--app-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.report-print-area .sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 1;
}

@media print {
    .app-sidebar-shell,
    .app-topbar,
    .report-no-print,
    .breadcrumb,
    .card-footer {
        display: none !important;
    }

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

    .report-print-only {
        display: block !important;
    }

    .report-print-area {
        box-shadow: none !important;
        border: none !important;
    }

    .report-print-area .table {
        font-size: 0.75rem;
    }
}
