:root {
    --hr-primary: #2563eb;
    --hr-primary-2: #3b82f6;
    --hr-dark: #0f172a;
    --hr-bg: #f8fafc;
    --hr-surface: rgba(255, 255, 255, 0.78);
    --hr-surface-strong: rgba(255, 255, 255, 0.94);
    --hr-border: rgba(226, 232, 240, 0.82);
    --hr-success: #22c55e;
    --hr-danger: #ef4444;
    --hr-warning: #f59e0b;
    --hr-text: #0f172a;
    --hr-muted: #64748b;
    --text-primary: var(--hr-text);
    --text-secondary: #475569;
    --text-muted: var(--hr-muted);
    --text-inverse: #ffffff;
    --text-warning-contrast: var(--text-primary);
    --hr-radius: 20px;
    --hr-radius-sm: 12px;
    --hr-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
    --hr-shadow-soft: 0 14px 38px rgba(15, 23, 42, 0.08);
    --hr-gradient: linear-gradient(135deg, #2563eb, #3b82f6);
    --hr-sidebar: linear-gradient(180deg, #020617 0%, #0f172a 100%);
    --surface-input: rgba(255, 255, 255, 0.88);
    --surface-table-head: rgba(248, 250, 252, 0.96);
    --surface-hover: rgba(37, 99, 235, 0.055);
    --sidebar-text: var(--text-inverse);
    --sidebar-text-muted: rgba(203, 213, 225, 0.72);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.38) transparent;
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.32);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

html {
    background: var(--hr-bg);
}

body {
    min-height: 100%;
    background:
        radial-gradient(circle at 18% -10%, rgba(37, 99, 235, 0.16), transparent 34rem),
        radial-gradient(circle at 92% 8%, rgba(34, 197, 94, 0.10), transparent 26rem),
        linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
    color: var(--text-primary);
    font-family: Inter, "Plus Jakarta Sans", Poppins, "Segoe UI", system-ui, -apple-system, sans-serif;
    letter-spacing: 0;
}

body.premium-enterprise-shell {
    height: auto;
    min-height: 100vh;
}

body,
.page-wrapper,
.content,
.card,
.card-body,
.modal-content,
.dropdown-menu,
.list-group-item {
    color: var(--text-primary);
}

.text-dark,
.text-black,
.text-body,
.dropdown-item,
.card-text,
.page-title,
.form-label,
.col-form-label {
    color: var(--text-primary) !important;
}

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

.text-muted,
.form-text,
small.text-muted,
.breadcrumb,
.breadcrumb-item,
.dataTables_info,
.dataTables_length label,
.dataTables_filter label {
    color: var(--text-muted) !important;
}

.text-white,
.btn-primary,
.btn-success,
.btn-danger,
.btn-info,
.btn-warning,
.badge.bg-primary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-info,
.badge.bg-secondary,
.bg-primary,
.bg-success,
.bg-danger,
.bg-info,
.bg-secondary,
.card-header.bg-primary,
.card-header.bg-success,
.card-header.bg-danger,
.card-header.bg-info {
    color: var(--text-inverse) !important;
}

.bg-warning,
.badge.bg-warning,
.card-header.bg-warning,
.btn-warning {
    color: var(--text-warning-contrast) !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 70%);
    z-index: -1;
}

a {
    color: var(--hr-primary);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-primary);
    font-family: Inter, "Plus Jakarta Sans", Poppins, "Segoe UI", system-ui, sans-serif;
    font-weight: 750;
    letter-spacing: 0;
}

.main-wrapper {
    height: auto;
    min-height: 100vh;
}

.page-wrapper {
    margin-left: 304px;
    padding-top: 88px;
    background: transparent;
    transition: margin 240ms ease;
}

.page-wrapper > .content {
    padding: 28px 30px 44px;
    animation: premiumPageIn 420ms ease both;
}

.container-fluid {
    max-width: 1720px;
}

.header {
    position: fixed;
    top: 18px;
    right: 22px;
    left: 304px;
    z-index: 1000;
    height: 68px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border: 1px solid var(--hr-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(22px);
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
    transition: left 240ms ease, box-shadow 220ms ease, background 220ms ease;
}

.premium-scrolled .header {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 65px rgba(15, 23, 42, 0.16);
}

#toggle_btn,
.mobile_btn,
.premium-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hr-dark);
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    padding: 0;
    font-size: 16px;
    line-height: 1;
    min-height: 42px;
    flex-shrink: 0;
    vertical-align: middle;
    margin: 0;
}

.mobile_btn {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle !important;
    line-height: 1 !important;
    height: 42px !important;
    width: 42px !important;
}

#toggle_btn i,
.mobile_btn i,
.premium-icon-btn i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.premium-topbar-center {
    flex: 1;
    min-width: 0;
    padding: 0 18px;
    display: flex;
    align-items: center;
    height: 100%;
}

.premium-breadcrumb {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
    margin: 0;
}

.premium-page-title {
    display: block;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 3px;
}

.premium-search {
    width: min(430px, 38vw);
    position: relative;
}

.premium-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.premium-search input {
    width: 100%;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(248, 250, 252, 0.85);
    padding: 0 18px 0 44px;
    color: var(--text-primary);
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.premium-search input:focus {
    border-color: rgba(37, 99, 235, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: 0;
}

.header .user-menu {
    margin-left: auto;
    gap: 10px;
    align-items: center;
    border-bottom: 0;
}

.header .user-menu > li > a,
.header .dropdown-toggle {
    min-height: 42px;
    border-radius: 14px;
    color: var(--hr-text);
    padding: 6px 10px;
}

.header .user-img img {
    width: 38px;
    height: 38px;
    border: 2px solid rgba(37, 99, 235, 0.25);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.14);
}

.notification-increase {
    background: var(--hr-danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.dropdown-menu {
    border: 1px solid var(--hr-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(18px);
    box-shadow: var(--hr-shadow-soft);
    overflow: hidden;
}

.sidebar {
    position: fixed;
    top: 18px;
    left: 18px;
    bottom: 18px;
    width: 274px;
    height: auto;
    border-radius: 26px;
    background: var(--hr-sidebar);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.36);
    overflow: hidden;
    transition: width 240ms ease, transform 240ms ease;
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.34), transparent 19rem),
        radial-gradient(circle at 80% 22%, rgba(34, 197, 94, 0.12), transparent 18rem);
}

.sidebar-inner,
.sidebar .slimScrollDiv {
    height: 100% !important;
    background: transparent;
}

.sidebar .header-left {
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.09);
}

.sidebar .logo img {
    max-width: 116px;
    max-height: 54px;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(37, 99, 235, 0.25));
}

.sidebar-menu {
    position: relative;
    z-index: 1;
    padding: 12px 12px 28px;
    margin-top: 0;
}

.sidebar-menu ul {
    padding: 0;
}

.sidebar-menu > ul > li {
    margin: 4px 0;
}

.sidebar-menu li a {
    min-height: 46px;
    border-radius: 16px;
    color: var(--sidebar-text);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0;
    position: relative;
}

.sidebar-menu li a i,
.sidebar-menu li a svg {
    width: 19px;
    min-width: 19px;
    color: rgba(191, 219, 254, 0.88);
    transition: transform 220ms ease, color 220ms ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active > a,
.sidebar-menu li a.active,
.sidebar-menu li a.subdrop {
    color: var(--sidebar-text);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.98), rgba(59, 130, 246, 0.86));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.28);
}

.sidebar-menu li a:hover i,
.sidebar-menu li a:hover svg,
.sidebar-menu li.active > a i,
.sidebar-menu li.active > a svg {
    color: var(--text-inverse);
    transform: scale(1.08);
}

.sidebar-menu ul ul {
    padding: 6px 0 8px 26px;
    background: transparent;
}

/* Level 2 submenu */
.sidebar-menu ul ul {
    padding: 6px 0;
}

.sidebar-menu ul ul li {
    margin: 2px 0;
}

.sidebar-menu ul ul li a {
    min-height: 38px;
    padding: 9px 16px;
    color: var(--sidebar-text-muted);
    font-size: 13px;
    font-weight: 600;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

/* Level 3 submenu */
.sidebar-menu ul ul ul {
    padding: 4px 0 4px 16px;
    margin-left: 0;
    background: transparent;
}

.sidebar-menu ul ul ul li {
    margin: 2px 0;
}

.sidebar-menu ul ul ul li a {
    min-height: 36px;
    padding: 8px 16px;
    color: var(--sidebar-text-muted);
    font-size: 13px;
    font-weight: 500;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.sidebar-menu ul ul ul a:hover,
.sidebar-menu ul ul ul a.active {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: none;
}

.sidebar-menu ul ul a:hover,
.sidebar-menu ul ul a.active {
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.10);
    box-shadow: none;
}

.sidebar-menu .menu-arrow {
    margin-left: auto;
}

body.mini-sidebar .sidebar {
    width: 84px;
}

body.mini-sidebar .page-wrapper {
    margin-left: 112px;
}

body.mini-sidebar .header {
    left: 112px;
}

body.mini-sidebar .sidebar .header-left {
    padding: 0 12px;
}

body.mini-sidebar .sidebar-menu li a span:not(.menu-arrow):not(.badge),
body.mini-sidebar .sidebar-menu .menu-arrow {
    opacity: 0;
    pointer-events: none;
    width: 0;
}

.page-header {
    margin: 0 0 22px;
    padding: 20px 22px;
    border: 1px solid var(--hr-border);
    border-radius: 22px;
    background: var(--hr-surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--hr-shadow-soft);
}

.page-header .breadcrumb {
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
}

.breadcrumb-item.active,
.page-header .breadcrumb a {
    color: var(--hr-muted);
    font-weight: 700;
}

.card,
.modal-content {
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius);
    background: var(--hr-surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--hr-shadow-soft);
}

.card {
    overflow: hidden;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hr-shadow);
    border-color: rgba(37, 99, 235, 0.22);
}

.card-header {
    border-bottom: 1px solid rgba(226, 232, 240, 0.76);
    background: rgba(255, 255, 255, 0.44);
    padding: 18px 20px;
}

.card .card-header .card-title,
.card-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 800;
}

.card-body {
    padding: 20px;
}

.top-stat-box {
    min-height: 128px;
}

.top-stat-box .card-body {
    background:
        radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.20), transparent 10rem),
        linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: var(--text-inverse);
}

.dash-widget-header {
    gap: 16px;
}

.dash-widget-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(34, 197, 94, 0.10));
    border: 1px solid rgba(37, 99, 235, 0.12);
}

.dash-count h3,
.dash-counts h3 {
    margin: 0;
    color: var(--text-inverse);
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 850;
}

.dash-title p,
.dash-title a {
    color: var(--text-inverse);
    font-weight: 700;
    margin: 0;
}

.top-stat-box .dash-title p,
.top-stat-box .dash-title a,
.top-stat-box .dash-count h3,
.top-stat-box .dash-counts h3,
.top-stat-box .dash-top-text p {
    color: var(--text-inverse) !important;
}

.table-responsive {
    border-radius: 18px;
}

.table,
table.dataTable {
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.table thead th,
table.dataTable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    border: 0;
    background: var(--surface-table-head);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 14px 16px;
}

.table tbody td,
table.dataTable tbody td {
    border-top: 1px solid rgba(226, 232, 240, 0.74);
    padding: 14px 16px;
    vertical-align: middle;
    color: var(--text-secondary);
}

.table-hover tbody tr,
table.dataTable tbody tr {
    transition: background 150ms ease, transform 150ms ease;
}

.table-hover tbody tr:hover,
table.dataTable tbody tr:hover {
    background: rgba(37, 99, 235, 0.055);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 999px;
    border: 1px solid var(--hr-border);
    background: var(--surface-input);
    min-height: 38px;
    padding: 6px 14px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 0 !important;
    border-radius: 12px !important;
    margin: 0 2px;
    color: var(--text-muted) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: var(--text-inverse) !important;
    background: var(--hr-gradient) !important;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
}

.form-control,
.form-select,
select,
textarea,
.select2-container .select2-selection--single,
.select2-container .select2-selection--multiple {
    border: 1px solid var(--hr-border) !important;
    border-radius: 14px !important;
    background: var(--surface-input) !important;
    color: var(--text-primary) !important;
    min-height: 44px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.form-control:focus,
.form-select:focus,
select:focus,
textarea:focus,
.select2-container--open .select2-selection {
    border-color: rgba(37, 99, 235, 0.55) !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12) !important;
}

label {
    color: var(--text-secondary);
    font-weight: 750;
    font-size: 13px;
}

.invalid-feedback {
    font-weight: 700;
}

.btn {
    border-radius: 14px;
    font-weight: 800;
    letter-spacing: 0;
    border: 0;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    inset: auto auto 50% 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.28);
    transform: translate(-50%, 50%);
    transition: width 260ms ease, height 260ms ease;
}

.btn:hover::after {
    width: 180%;
    height: 180%;
}

.btn-primary,
.login-do-btn {
    background: var(--hr-gradient) !important;
    color: var(--text-inverse) !important;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.26);
}

.btn-primary:hover,
.login-do-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.34);
}

.btn-secondary,
.btn-outline-primary {
    color: var(--hr-primary) !important;
    background: rgba(37, 99, 235, 0.08) !important;
    border: 1px solid rgba(37, 99, 235, 0.16) !important;
}

.btn-success {
    background: linear-gradient(135deg, #16a34a, #22c55e) !important;
    color: var(--text-inverse) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444) !important;
    color: var(--text-inverse) !important;
}

.badge {
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 800;
}

.modal {
    backdrop-filter: blur(10px);
}

.modal-header,
.modal-footer {
    border-color: var(--hr-border);
}

.modal-footer.text-center {
    margin-left: 304px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    justify-content: center;
}

.premium-dashboard-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 24px;
    color: var(--text-inverse);
    background:
        radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.26), transparent 14rem),
        linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #3b82f6 100%);
    box-shadow: 0 28px 80px rgba(37, 99, 235, 0.28);
}

.premium-dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 27px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    pointer-events: none;
}

.premium-dashboard-hero h1,
.premium-dashboard-hero p {
    color: var(--text-inverse);
}

.premium-dashboard-hero h1 {
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1.04;
    margin-bottom: 12px;
}

.premium-dashboard-hero p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 15px;
}

.premium-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.premium-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 800;
}

.premium-insight-card {
    height: 100%;
    border-radius: 22px;
    padding: 20px;
    border: 1px solid var(--hr-border);
    background: var(--hr-surface);
    box-shadow: var(--hr-shadow-soft);
}

.premium-insight-card .eyebrow {
    color: var(--hr-primary);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.premium-insight-card h3 {
    margin: 8px 0;
    font-size: 18px;
}

.premium-insight-card p {
    color: var(--text-muted);
    margin: 0;
}

.error-page .auth-wrapper,
.auth-wrapper {
    min-height: 100vh;
}

.premium-login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    background:
        radial-gradient(circle at 10% 12%, rgba(59, 130, 246, 0.30), transparent 24rem),
        radial-gradient(circle at 82% 85%, rgba(34, 197, 94, 0.18), transparent 22rem),
        linear-gradient(135deg, #0f172a 0%, #172554 46%, #f8fafc 46%, #eef4ff 100%);
}

.premium-login-visual {
    position: relative;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.premium-login-visual::before,
.premium-login-visual::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(4px);
    background: rgba(255, 255, 255, 0.12);
}

.premium-login-visual::before {
    width: 360px;
    height: 360px;
    right: 10%;
    top: 12%;
}

.premium-login-visual::after {
    width: 220px;
    height: 220px;
    left: 12%;
    bottom: 14%;
}

.premium-login-brand,
.premium-login-copy,
.premium-login-metrics {
    position: relative;
    z-index: 1;
}

.premium-login-brand img {
    max-height: 58px;
    width: auto;
    filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.18));
}

.premium-login-copy h1 {
    max-width: 720px;
    color: var(--text-inverse);
    font-size: clamp(38px, 5vw, 68px);
    line-height: 0.98;
    margin-bottom: 18px;
}

.premium-login-copy p {
    max-width: 560px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 17px;
}

.premium-login-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 720px;
}

.premium-login-metric {
    padding: 16px;
    border-radius: 20px;
    color: var(--text-inverse);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.premium-login-metric strong {
    display: block;
    font-size: 24px;
}

.premium-login-metric span {
    color: rgba(255, 255, 255, 0.70);
    font-size: 12px;
    font-weight: 750;
}

.premium-login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px;
}

.premium-login-card {
    width: min(100%, 500px);
    border-radius: 28px;
    padding: 34px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(24px);
    box-shadow: 0 34px 90px rgba(15, 23, 42, 0.18);
}

.premium-login-card h2 {
    font-size: 30px;
    margin-bottom: 8px;
}

.premium-login-card .form-group {
    margin-bottom: 18px;
}

.premium-login-card .form-control {
    min-height: 52px;
    border-radius: 16px !important;
}

.premium-social-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.premium-social-row .btn {
    background: rgba(15, 23, 42, 0.04);
    border: 1px solid var(--hr-border);
    color: var(--text-primary);
}

.premium-theme-toggle-active {
    color: var(--text-inverse) !important;
    background: var(--hr-gradient) !important;
}

.premium-skeleton,
.skeleton-loader {
    position: relative;
    overflow: hidden;
    min-height: 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
}

/* ============================================
   DARWINBOX-STYLE WIDGET ENHANCEMENTS
   ============================================ */

/* Modern Stat Cards - Compact Horizontal */
.darwinbox-stat-card {
    border-radius: 16px;
    padding: 16px 20px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    box-shadow: var(--hr-shadow-soft);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.darwinbox-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hr-shadow);
    border-color: rgba(37, 99, 235, 0.22);
}

.darwinbox-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.darwinbox-stat-icon.primary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.1));
    color: var(--hr-primary);
}

.darwinbox-stat-icon.success {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
    color: var(--hr-success);
}

.darwinbox-stat-icon.warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
    color: var(--hr-warning);
}

.darwinbox-stat-icon.danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(220, 38, 38, 0.1));
    color: var(--hr-danger);
}

.darwinbox-stat-content {
    flex: 1;
    min-width: 0;
}

.darwinbox-stat-value {
    font-size: 24px;
    font-weight: 850;
    color: var(--text-primary);
    line-height: 1.2;
}

.darwinbox-stat-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* KPI Card with Status Badge */
.kpi-card {
    border-radius: 16px;
    padding: 18px 20px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    box-shadow: var(--hr-shadow-soft);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--hr-gradient);
}

.kpi-card.status-warning::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.kpi-card.status-danger::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.kpi-card.status-success::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.kpi-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-status-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.kpi-status-badge.success {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}

.kpi-status-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}

.kpi-status-badge.danger {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}

.kpi-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 4px;
}

.kpi-description {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Circular Progress Widget */
.circular-progress-widget {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
}

.circular-progress-ring {
    position: relative;
    width: 90px;
    height: 90px;
    flex-shrink: 0;
}

.circular-progress-ring svg {
    transform: rotate(-90deg);
}

.circular-progress-ring .bg-ring {
    fill: none;
    stroke: rgba(148, 163, 184, 0.15);
    stroke-width: 8;
}

.circular-progress-ring .progress-ring {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.6s ease;
}

.circular-progress-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
    color: var(--text-primary);
}

.circular-progress-info {
    flex: 1;
}

.circular-progress-main {
    font-size: 22px;
    font-weight: 850;
    color: var(--text-primary);
    line-height: 1.2;
}

.circular-progress-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 4px;
}

/* Activity Timeline Feed */
.activity-timeline {
    position: relative;
    padding-left: 24px;
}

.activity-timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.3), rgba(148, 163, 184, 0.15));
    border-radius: 2px;
}

.activity-item {
    position: relative;
    padding-bottom: 16px;
}

.activity-item:last-child {
    padding-bottom: 0;
}

.activity-dot {
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--hr-primary);
    border: 2px solid var(--hr-surface);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.activity-dot.warning {
    background: var(--hr-warning);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.activity-dot.success {
    background: var(--hr-success);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.activity-dot.danger {
    background: var(--hr-danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.activity-content {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.activity-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.activity-meta {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Employee Card with Avatar */
.employee-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: all 0.2s ease;
}

.employee-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(37, 99, 235, 0.2);
    transform: translateX(4px);
}

.employee-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(37, 99, 235, 0.15);
    flex-shrink: 0;
}

.employee-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(59, 130, 246, 0.1));
    color: var(--hr-primary);
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    min-width: 0;
}

.employee-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.employee-detail {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

/* Clean Table with Status Badges */
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.modern-table thead th {
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    padding: 10px 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(248, 250, 252, 0.5);
}

.modern-table tbody td {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
    vertical-align: middle;
}

.modern-table tbody tr {
    transition: background 0.15s ease;
}

.modern-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.04);
}

.modern-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.approved {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-badge.rejected {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.status-badge.active {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

/* Birthday Card */
.birthday-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.5));
    border: 1px solid var(--hr-border);
    position: relative;
    overflow: hidden;
}

.birthday-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #f59e0b, #fbbf24);
}

.birthday-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    object-fit: cover;
    border: 2px solid rgba(245, 158, 11, 0.2);
    flex-shrink: 0;
}

.birthday-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
    color: #d97706;
    font-size: 18px;
    flex-shrink: 0;
}

.birthday-info {
    flex: 1;
    min-width: 0;
}

.birthday-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.birthday-detail {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.birthday-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
    color: #d97706;
    flex-shrink: 0;
}

/* Milestone Timeline */
.milestone-timeline {
    position: relative;
    padding-left: 28px;
}

.milestone-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.3), rgba(148, 163, 184, 0.15));
}

.milestone-item {
    position: relative;
    padding-bottom: 14px;
}

.milestone-item:last-child {
    padding-bottom: 0;
}

.milestone-marker {
    position: absolute;
    left: -24px;
    top: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--hr-surface);
    border: 3px solid var(--hr-primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.milestone-content {
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.milestone-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.milestone-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.milestone-years {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    color: var(--hr-primary);
    font-size: 11px;
    font-weight: 800;
    margin-top: 4px;
}

/* Leave Timeline */
.leave-timeline-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 8px;
}

.leave-timeline-item:last-child {
    margin-bottom: 0;
}

.leave-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.leave-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.1));
    color: #16a34a;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
}

.leave-info {
    flex: 1;
    min-width: 0;
}

.leave-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.leave-dates {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.leave-duration {
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

/* Modern Donut Chart Container */
.donut-chart-card {
    border-radius: 20px;
    padding: 20px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    box-shadow: var(--hr-shadow-soft);
}

.donut-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.donut-chart-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.donut-chart-container {
    position: relative;
    max-width: 280px;
    margin: 0 auto;
}

.donut-chart-legend {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.4);
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legend-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.legend-value {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-primary);
    margin-left: auto;
}

/* Modern Chart Card */
.modern-chart-card {
    border-radius: 20px;
    padding: 20px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    box-shadow: var(--hr-shadow-soft);
}

.modern-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modern-chart-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.modern-chart-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-chart-filter select {
    border-radius: 10px;
    border: 1px solid var(--hr-border);
    background: var(--surface-input);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Country Card with Flag */
.country-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(226, 232, 240, 0.6);
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.country-card:last-child {
    margin-bottom: 0;
}

.country-card:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(37, 99, 235, 0.2);
}

.country-flag {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.country-flag-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    color: var(--hr-primary);
    font-size: 14px;
    font-weight: 800;
    flex-shrink: 0;
}

.country-info {
    flex: 1;
    min-width: 0;
}

.country-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
}

.country-progress {
    height: 6px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.15);
    margin-top: 6px;
    overflow: hidden;
}

.country-progress-bar {
    height: 100%;
    border-radius: 3px;
    background: var(--hr-gradient);
    transition: width 0.4s ease;
}

.country-count {
    font-size: 16px;
    font-weight: 900;
    color: var(--text-primary);
    flex-shrink: 0;
}

.country-percentage {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    min-width: 40px;
    text-align: right;
}

/* Widget Card Enhanced */
.widget-card {
    border-radius: 20px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    box-shadow: var(--hr-shadow-soft);
    overflow: hidden;
    transition: all 0.2s ease;
}

.widget-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hr-shadow);
    border-color: rgba(37, 99, 235, 0.2);
}

.widget-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    background: rgba(255, 255, 255, 0.3);
}

.widget-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
}

.widget-card-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.08));
    color: var(--hr-primary);
}

.widget-card-body {
    padding: 16px 18px;
}

.widget-card-footer {
    padding: 12px 18px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

/* Scrollable Widget Body */
.widget-scrollable {
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(37, 99, 235, 0.2) transparent;
}

.widget-scrollable::-webkit-scrollbar {
    width: 6px;
}

.widget-scrollable::-webkit-scrollbar-thumb {
    background: rgba(37, 99, 235, 0.2);
    border-radius: 3px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 32px 16px;
}

.empty-state-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

.empty-state-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-state-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .darwinbox-stat-card {
        padding: 14px 16px;
    }
    
    .darwinbox-stat-value {
        font-size: 20px;
    }
    
    .kpi-value {
        font-size: 26px;
    }
    
    .circular-progress-ring {
        width: 70px;
        height: 70px;
    }
    
    .circular-progress-value {
        font-size: 14px;
    }
}

.premium-skeleton::after,
.skeleton-loader::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
    animation: premiumShimmer 1.4s infinite;
}

@keyframes premiumPageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes premiumShimmer {
    to {
        transform: translateX(100%);
    }
}

body.premium-dark {
    --hr-bg: #020617;
    --hr-surface: rgba(15, 23, 42, 0.78);
    --hr-surface-strong: rgba(15, 23, 42, 0.94);
    --hr-border: rgba(71, 85, 105, 0.58);
    --hr-text: #e5e7eb;
    --hr-muted: #94a3b8;
    --text-primary: var(--hr-text);
    --text-secondary: #cbd5e1;
    --text-muted: var(--hr-muted);
    --text-inverse: #ffffff;
    --text-warning-contrast: #1f2937;
    --surface-input: rgba(15, 23, 42, 0.96);
    --surface-table-head: rgba(15, 23, 42, 0.96);
    --surface-hover: rgba(96, 165, 250, 0.12);
    --sidebar-text: var(--text-inverse);
    --sidebar-text-muted: rgba(203, 213, 225, 0.78);
    background:
        radial-gradient(circle at 18% -10%, rgba(37, 99, 235, 0.24), transparent 34rem),
        radial-gradient(circle at 92% 8%, rgba(34, 197, 94, 0.12), transparent 26rem),
        linear-gradient(180deg, #020617 0%, #0f172a 100%);
    color: var(--text-primary);
}

body.premium-dark .header,
body.premium-dark .card,
body.premium-dark .page-header,
body.premium-dark .modal-content,
body.premium-dark .premium-insight-card {
    background: var(--hr-surface);
    border-color: var(--hr-border);
}

body.premium-dark .dropdown-menu,
body.premium-dark .form-control,
body.premium-dark .form-select,
body.premium-dark select,
body.premium-dark textarea,
body.premium-dark .select2-container .select2-selection--single,
body.premium-dark .select2-container .select2-selection--multiple {
    background: var(--surface-input) !important;
    color: var(--text-primary) !important;
    border-color: var(--hr-border) !important;
}

body.premium-dark .table thead th,
body.premium-dark table.dataTable thead th {
    background: var(--surface-table-head);
    color: var(--text-secondary);
}

body.premium-dark .table tbody td,
body.premium-dark table.dataTable tbody td {
    color: var(--text-secondary);
    border-color: rgba(71, 85, 105, 0.46);
}

body.premium-dark .card-header {
    background: rgba(15, 23, 42, 0.42);
    border-color: rgba(71, 85, 105, 0.52);
}

body.premium-dark label,
body.premium-dark .dash-title p,
body.premium-dark .dash-title a,
body.premium-dark .premium-insight-card p {
    color: var(--text-muted);
}

body.premium-dark .table-hover tbody tr:hover,
body.premium-dark table.dataTable tbody tr:hover {
    background: var(--surface-hover);
}

/* ============================================
   DARK THEME: Full-page background continuity
   for ALL backend pages
   ============================================ */
/* Root elements */
body.premium-dark {
    background: #020617 !important;
    min-height: 100vh;
}

/* Prevent light background behind sidebar during scroll */
html {
    background-attachment: fixed;
}
body.premium-dark ~ *,
body.premium-dark html,
html.premium-dark {
    background-color: #020617 !important;
}

/* Main layout wrappers - transparent so gradient shows through */
body.premium-dark .main-wrapper {
    background: transparent !important;
}

body.premium-dark .page-wrapper {
    background: linear-gradient(180deg, #020617 0%, #0f172a 100%) !important;
    min-height: 100vh;
}

body.premium-dark .page-wrapper > .content,
body.premium-dark .content,
body.premium-dark .content.container-fluid {
    background: transparent !important;
}

/* Override all hardcoded white/light backgrounds from style.css */
body.premium-dark .container-fluid,
body.premium-dark .row,
body.premium-dark [class*="col-"],
body.premium-dark .tab-content,
body.premium-dark .card-body,
body.premium-dark .table-responsive,
body.premium-dark .table,
body.premium-dark .table-striped > tbody > tr,
body.premium-dark .table-striped > tbody > tr:nth-of-type(2n+1) {
    background: transparent !important;
}

/* Sidebar inner containers - transparent */
body.premium-dark .sidebar-inner,
body.premium-dark .slimScrollDiv {
    background: transparent !important;
}

/* Footer */
body.premium-dark .modal-footer.text-center {
    background: transparent !important;
}

@media (max-width: 1199px) {
    .premium-search {
        display: none;
    }
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-310px);
        width: 286px;
    }

    .main-wrapper.slide-nav .sidebar {
        transform: translateX(0);
    }

    .page-wrapper,
    body.mini-sidebar .page-wrapper {
        margin-left: 0;
    }

    .header,
    body.mini-sidebar .header {
        left: 14px;
        right: 14px;
        top: 12px;
        gap: 8px;
    }

    .page-wrapper {
        padding-top: 84px;
    }

    .page-wrapper > .content {
        padding: 20px 14px 34px;
    }

    .premium-topbar-center {
        padding: 0 10px;
        flex: 0 1 auto;
        display: none;
    }

    .premium-search {
        display: none;
    }

    .premium-page-title {
        font-size: 15px;
    }

    .header .user-menu .main-drop span:not(.user-img):not(.status) {
        display: none;
    }

    #toggle_btn {
        display: none;
    }

    .header .mobile_btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        height: 42px;
        width: 42px;
        flex-shrink: 0;
        order: -1;
    }

    .modal-footer.text-center {
        margin-left: 0;
    }

    .premium-login {
        grid-template-columns: 1fr;
        background:
            radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.26), transparent 22rem),
            linear-gradient(180deg, #0f172a 0%, #172554 42%, #eef4ff 42%);
    }

    .premium-login-visual {
        min-height: 46vh;
        padding: 30px;
    }

    .premium-login-metrics {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .header {
        height: 62px;
        border-radius: 18px;
        padding: 0 10px;
    }

    .premium-breadcrumb {
        display: none;
    }

    .premium-dashboard-hero {
        padding: 22px;
        border-radius: 22px;
    }

    .table tbody td,
    table.dataTable tbody td,
    .table thead th,
    table.dataTable thead th {
        white-space: nowrap;
        padding: 12px;
    }

    .premium-login-visual {
        min-height: auto;
        gap: 28px;
    }

    .premium-login-copy h1 {
        font-size: 34px;
    }

    .premium-login-panel {
        padding: 18px;
    }

    .premium-login-card {
        padding: 24px;
        border-radius: 22px;
    }
}

@media (max-width: 991px) {
    .header .mobile_btn {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   MODERN ANALYTICS CARDS - DARWINBOX STYLE
   ============================================ */

/* Premium Analytics Card */
.analytics-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease;
    height: 100%;
}

.analytics-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Analytics Card Header */
.analytics-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.analytics-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.analytics-card-title i {
    color: var(--hr-primary);
    font-size: 16px;
}

.analytics-card-action {
    font-size: 12px;
    font-weight: 700;
    color: var(--hr-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.analytics-card-action:hover {
    gap: 8px;
    color: var(--hr-primary-2);
}

/* Modern Donut Chart with Center Total */
.modern-donut-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

.modern-donut-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
}

.modern-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.modern-donut-center-value {
    font-size: 32px;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.modern-donut-center-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
}

/* Modern Legend Layout */
.modern-legend {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modern-legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.6);
    transition: background 0.2s ease;
}

.modern-legend-item:hover {
    background: rgba(37, 99, 235, 0.05);
}

.modern-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.modern-legend-info {
    flex: 1;
    min-width: 0;
}

.modern-legend-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.modern-legend-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.modern-legend-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.modern-legend-bar {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
}

.modern-legend-bar-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.modern-legend-percentage {
    font-size: 11px;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 36px;
    text-align: right;
}

/* Country Analytics List */
.country-analytics-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.country-analytics-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.6);
    border: 1px solid rgba(226, 232, 240, 0.5);
    transition: all 0.2s ease;
}

.country-analytics-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(37, 99, 235, 0.15);
    transform: translateX(4px);
}

.country-analytics-flag {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    font-size: 20px;
    flex-shrink: 0;
}

.country-analytics-info {
    flex: 1;
    min-width: 0;
}

.country-analytics-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.country-analytics-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-analytics-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.country-analytics-bar {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(148, 163, 184, 0.15);
    overflow: hidden;
}

.country-analytics-bar-fill {
    height: 100%;
    border-radius: 3px;
    background: var(--hr-gradient);
    transition: width 0.5s ease;
}

.country-analytics-percentage {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    min-width: 42px;
    text-align: right;
}

/* Enhanced Chart Card */
.enhanced-chart-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
    transition: all 0.25s ease;
    height: 100%;
}

.enhanced-chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    border-color: rgba(37, 99, 235, 0.2);
}

.enhanced-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.enhanced-chart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.enhanced-chart-title i {
    color: var(--hr-primary);
}

.enhanced-chart-filter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.enhanced-chart-filter .form-control {
    min-height: 34px;
    border-radius: 10px;
    font-size: 12px;
    padding: 4px 12px;
}

.enhanced-chart-filter .btn {
    min-height: 34px;
    border-radius: 10px;
    padding: 4px 12px;
}

/* Dark mode support for analytics cards */
body.premium-dark .analytics-card,
body.premium-dark .enhanced-chart-card {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(71, 85, 105, 0.5);
}

body.premium-dark .analytics-card-header,
body.premium-dark .enhanced-chart-header {
    border-color: rgba(71, 85, 105, 0.4);
}

body.premium-dark .modern-legend-item {
    background: rgba(255, 255, 255, 0.04);
}

body.premium-dark .modern-legend-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.premium-dark .country-analytics-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(71, 85, 105, 0.4);
}

body.premium-dark .country-analytics-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

body.premium-dark .country-analytics-bar {
    background: rgba(148, 163, 184, 0.2);
}

/* MOM brand perimeter animation for dashboard cards and widgets */
@property --mom-border-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.mom-animated-card {
    --mom-border-angle: 0deg;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
}

.mom-animated-card::before,
.mom-animated-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
}

.mom-animated-card::before {
    padding: 2px;
    background: conic-gradient(
        from var(--mom-border-angle),
        #FF7A00,
        #FFA63D,
        #2563EB,
        #0A2E6D,
        #FF7A00
    );
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: momRotateBorder 4s linear infinite;
    z-index: 2;
}

.mom-animated-card::after {
    border: 1px solid rgba(255, 166, 61, 0.3);
    box-shadow:
        inset 0 0 5px rgba(255, 122, 0, 0.22),
        inset 0 0 8px rgba(37, 99, 235, 0.16);
    z-index: 2;
}

.kpi-card.mom-animated-card::before {
    inset: auto 0 auto 0;
    top: 0;
    height: 3px;
    padding: 0;
    border-radius: 0;
    background: var(--hr-gradient);
    -webkit-mask: none;
    mask: none;
    animation: none;
}

.kpi-card.status-warning.mom-animated-card::before {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.kpi-card.status-danger.mom-animated-card::before {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.kpi-card.status-success.mom-animated-card::before {
    background: linear-gradient(90deg, #22c55e, #4ade80);
}

.kpi-card.mom-animated-card::after {
    padding: 2px;
    border: 0;
    background: conic-gradient(
        from var(--mom-border-angle),
        #FF7A00,
        #FFA63D,
        #2563EB,
        #0A2E6D,
        #FF7A00
    );
    box-shadow: none;
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    animation: momRotateBorder 4s linear infinite;
}

@keyframes momRotateBorder {
    from {
        --mom-border-angle: 0deg;
    }
    to {
        --mom-border-angle: 360deg;
    }
}

/* Responsive Analytics Grid */
@media (max-width: 991px) {
    .analytics-card,
    .enhanced-chart-card {
        padding: 20px;
    }
    
    .modern-donut-wrapper {
        width: 180px;
        height: 180px;
    }
    
    .modern-donut-center-value {
        font-size: 26px;
    }
}

@media (max-width: 575px) {
    .analytics-card,
    .enhanced-chart-card {
        padding: 18px;
    }
    
    .analytics-card-header,
    .enhanced-chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .modern-donut-wrapper {
        width: 160px;
        height: 160px;
    }
    
    .modern-donut-center-value {
        font-size: 22px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Keep legacy dashboard widget headers consistent with the neutral widget cards. */
[data-mom-dashboard-cards] .card > .card-header {
    background: var(--hr-surface) !important;
    border-color: var(--hr-border) !important;
    color: var(--text-primary) !important;
}

[data-mom-dashboard-cards] .card > .card-header .card-title,
[data-mom-dashboard-cards] .card > .card-header h1,
[data-mom-dashboard-cards] .card > .card-header h2,
[data-mom-dashboard-cards] .card > .card-header h3,
[data-mom-dashboard-cards] .card > .card-header h4,
[data-mom-dashboard-cards] .card > .card-header h5,
[data-mom-dashboard-cards] .card > .card-header h6 {
    color: var(--text-primary) !important;
}

body.premium-dark [data-mom-dashboard-cards] .card > .card-header {
    background: rgba(15, 23, 42, .42) !important;
    border-color: rgba(71, 85, 105, .52) !important;
}

.premium-search {
    z-index: 120;
}

.workspace-search-suggestions {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(520px, 90vw);
    max-height: min(620px, calc(100vh - 120px));
    overflow-y: auto;
    border: 1px solid var(--hr-border);
    border-radius: 20px;
    background: var(--hr-surface-strong);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    backdrop-filter: blur(24px);
    padding: 10px;
}

.workspace-search-suggestions[hidden] {
    display: none;
}

.workspace-search-group + .workspace-search-group {
    border-top: 1px solid var(--hr-border);
    margin-top: 8px;
    padding-top: 8px;
}

.workspace-search-group__title {
    padding: 7px 10px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.workspace-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
    color: var(--text-primary);
    text-decoration: none;
}

.workspace-search-result:hover,
.workspace-search-result.is-active {
    color: var(--text-primary);
    background: var(--surface-hover);
}

.workspace-search-result__icon,
.workspace-search-module-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    color: var(--hr-primary);
    background: rgba(37, 99, 235, 0.10);
}

.workspace-search-result__copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.workspace-search-result__copy strong,
.workspace-search-result__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workspace-search-result__copy strong {
    color: var(--text-primary);
    font-size: 14px;
}

.workspace-search-result__copy small {
    color: var(--text-muted);
    font-size: 12px;
}

.workspace-search-suggestions mark,
.workspace-search-page mark {
    padding: 0;
    border-radius: 3px;
    color: inherit;
    background: rgba(245, 158, 11, 0.30);
}

.workspace-search-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 14px;
    color: var(--text-muted);
}

.workspace-search-state > i {
    width: 38px;
    text-align: center;
    color: var(--hr-primary);
    font-size: 20px;
}

.workspace-search-state strong,
.workspace-search-state small {
    display: block;
}

.workspace-search-state strong {
    color: var(--text-primary);
}

.workspace-search-view-all {
    display: block;
    margin-top: 8px;
    padding: 12px;
    border-top: 1px solid var(--hr-border);
    color: var(--hr-primary);
    font-weight: 800;
    text-align: center;
}

.workspace-search-page {
    display: grid;
    gap: 22px;
}

.workspace-search-page__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border: 1px solid var(--hr-border);
    border-radius: 22px;
    background: var(--hr-surface);
    box-shadow: var(--hr-shadow-soft);
}

.workspace-search-page__header h1 {
    margin: 14px 0 5px;
}

.workspace-search-page__header p {
    margin: 0;
    color: var(--text-muted);
}

.workspace-search-page__form {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(560px, 100%);
}

.workspace-search-page__form > i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
}

.workspace-search-page__form input {
    width: 100%;
    height: 44px;
    padding: 0 16px 0 44px;
    border: 1px solid var(--hr-border);
    border-radius: 999px;
    background: var(--surface-input);
    color: var(--text-primary);
}

.workspace-search-section {
    border: 1px solid var(--hr-border);
    border-radius: 20px;
    background: var(--hr-surface);
    box-shadow: var(--hr-shadow-soft);
    overflow: hidden;
}

.workspace-search-section h2 {
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid var(--hr-border);
    font-size: 16px;
}

.workspace-search-table-wrap {
    overflow-x: auto;
}

.workspace-search-table {
    margin: 0;
}

.workspace-search-table th,
.workspace-search-table td {
    padding: 14px 18px;
    vertical-align: middle;
}

.workspace-search-empty {
    padding: 48px 24px;
    border: 1px dashed var(--hr-border);
    border-radius: 20px;
    color: var(--text-muted);
    text-align: center;
}

.workspace-search-empty > i {
    margin-bottom: 14px;
    color: var(--hr-primary);
    font-size: 30px;
}

.workspace-search-empty h3 {
    margin-bottom: 6px;
}

body.premium-dark .workspace-search-suggestions,
body.premium-dark .workspace-search-page__header,
body.premium-dark .workspace-search-section {
    background: var(--hr-surface-strong);
}

@media (max-width: 991px) {
    .workspace-search-page__header {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-search-page__form {
        width: 100%;
    }
}

@media (max-width: 575px) {
    .workspace-search-page__header {
        padding: 18px;
    }

    .workspace-search-page__form {
        align-items: stretch;
        flex-direction: column;
    }

    .workspace-search-page__form > i {
        top: 14px;
    }

    .workspace-search-suggestions {
        position: fixed;
        top: 88px;
        right: 12px;
        left: 12px;
        width: auto;
        max-height: calc(100vh - 110px);
    }
}
