:root {
    --hr-bg: #f4f6f8;
    --hr-surface: #ffffff;
    --hr-surface-subtle: #eef2f5;
    --hr-ink: #1a2430;
    --hr-muted: #647181;
    --hr-border: #dce2e8;
    --hr-border-strong: #cbd3dc;
    --hr-primary: #3158d4;
    --hr-primary-hover: #2749b8;
    --hr-primary-subtle: #eef2ff;
    --hr-success: #19734b;
    --hr-success-subtle: #eaf7f0;
    --hr-warning: #9a5b0a;
    --hr-warning-subtle: #fff5df;
    --hr-danger: #b43b44;
    --hr-danger-subtle: #fff0f1;
    --hr-info: #226a8a;
    --hr-info-subtle: #eaf6fb;
    --hr-topbar: #1b2229;
    --hr-sidebar-width: 248px;
    --hr-topbar-height: 56px;
    --hr-radius: 8px;
    --hr-radius-sm: 6px;
    --hr-transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

body.admin-body {
    margin: 0;
    background: var(--hr-bg);
    color: var(--hr-ink);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
}

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

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    min-height: var(--hr-topbar-height);
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--hr-topbar);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-topbar__start,
.admin-topbar__end,
.admin-user {
    display: flex;
    align-items: center;
}

.admin-topbar__start {
    gap: 10px;
}

.admin-topbar__end {
    gap: 12px;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 650;
    text-decoration: none;
}

.admin-brand:hover {
    color: #fff;
}

.admin-brand__mark {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 7px;
    background: #fff;
    color: var(--hr-topbar);
    font-size: 12px;
    font-weight: 750;
}

.admin-user {
    gap: 8px;
    color: #e8edf2;
    font-size: 13px;
    font-weight: 550;
}

.admin-user__avatar {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: #303a44;
    color: #fff;
}

.admin-user__avatar svg {
    width: 15px;
    height: 15px;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--hr-topbar-height));
}

.admin-sidebar {
    width: var(--hr-sidebar-width) !important;
    min-width: var(--hr-sidebar-width);
    background: var(--hr-surface);
    border-right: 1px solid var(--hr-border);
}

.admin-sidebar__header {
    display: none;
}

.admin-sidebar__body {
    position: sticky;
    top: var(--hr-topbar-height);
    max-height: calc(100vh - var(--hr-topbar-height));
    padding: 18px 14px;
    overflow-y: auto;
}

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

.admin-nav__group + .admin-nav__group {
    margin-top: 18px;
}

.admin-nav__label {
    margin: 0 10px 7px;
    color: #7d8997;
    font-size: 12px;
    font-weight: 600;
}

.admin-nav__link {
    display: flex;
    min-height: 38px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--hr-radius-sm);
    color: #495565;
    font-size: 13.5px;
    font-weight: 520;
    text-decoration: none;
    transition: color var(--hr-transition), background-color var(--hr-transition);
}

.admin-nav__link svg {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
    stroke-width: 1.8;
}

.admin-nav__link:hover {
    background: var(--hr-surface-subtle);
    color: var(--hr-ink);
}

.admin-nav__link.active {
    background: var(--hr-primary-subtle);
    color: #294cb9;
    font-weight: 650;
}

.admin-nav__link--external::after {
    width: 14px;
    height: 14px;
    margin-left: auto;
    content: "";
    background: currentColor;
    opacity: 0.6;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6'/%3E%3Cpath d='M10 14 21 3'/%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.admin-main {
    min-width: 0;
    flex: 1;
    padding: 28px;
}

.admin-content {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
}

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

.page-title {
    margin: 0;
    color: var(--hr-ink);
    font-size: 24px;
    font-weight: 680;
    line-height: 1.25;
    text-wrap: balance;
}

.page-subtitle {
    max-width: 70ch;
    margin: 5px 0 0;
    color: var(--hr-muted);
    font-size: 13.5px;
    text-wrap: pretty;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius);
}

.dashboard-summary__item {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 14px;
    padding: 22px;
    color: var(--hr-ink);
    text-decoration: none;
    transition: background-color var(--hr-transition);
}

.dashboard-summary__item + .dashboard-summary__item {
    border-left: 1px solid var(--hr-border);
}

.dashboard-summary__item:hover {
    background: #f9fafb;
    color: var(--hr-ink);
}

.dashboard-summary__icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 8px;
    background: var(--hr-primary-subtle);
    color: var(--hr-primary);
}

.dashboard-summary__icon--green {
    background: var(--hr-success-subtle);
    color: var(--hr-success);
}

.dashboard-summary__icon--amber {
    background: var(--hr-warning-subtle);
    color: var(--hr-warning);
}

.dashboard-summary__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.8;
}

.dashboard-summary__body {
    min-width: 0;
    flex: 1;
}

.dashboard-summary__value {
    display: block;
    color: var(--hr-ink);
    font-size: 24px;
    font-weight: 690;
    line-height: 1.1;
}

.dashboard-summary__label {
    display: block;
    margin-top: 4px;
    color: var(--hr-muted);
    font-size: 13px;
}

.dashboard-summary__arrow {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #8e99a6;
}

.content-panel,
.card {
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius);
    box-shadow: none;
}

.card-header {
    padding: 14px 16px;
    background: #fafbfc;
    border-bottom: 1px solid var(--hr-border);
    color: var(--hr-ink);
    font-size: 14px;
    font-weight: 650;
}

.card-body {
    padding: 18px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(240px, 1.3fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr) auto;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius);
}

.filter-bar--compact {
    grid-template-columns: minmax(260px, 420px) auto;
    justify-content: start;
}

.form-control,
.form-select,
.ts-control {
    min-height: 38px;
    border-color: var(--hr-border-strong);
    border-radius: var(--hr-radius-sm);
    color: var(--hr-ink);
    font-size: 13.5px;
    transition: border-color var(--hr-transition), box-shadow var(--hr-transition);
}

.form-control::placeholder {
    color: #667383;
    opacity: 1;
}

.form-control:hover,
.form-select:hover,
.ts-control:hover {
    border-color: #aeb8c3;
}

.form-control:focus,
.form-select:focus,
.ts-wrapper.focus .ts-control {
    border-color: var(--hr-primary);
    box-shadow: 0 0 0 3px rgba(49, 88, 212, 0.14);
}

.form-label {
    margin-bottom: 6px;
    color: #3f4b59;
    font-size: 13px;
    font-weight: 600;
}

.form-check-input:checked {
    background-color: var(--hr-primary);
    border-color: var(--hr-primary);
}

.btn {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: var(--hr-radius-sm);
    font-size: 13px;
    font-weight: 620;
    letter-spacing: 0;
    transition: color var(--hr-transition), background-color var(--hr-transition), border-color var(--hr-transition);
}

.btn svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.9;
}

.btn-primary {
    background: var(--hr-primary);
    border-color: var(--hr-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--hr-primary-hover);
    border-color: var(--hr-primary-hover);
}

.btn-outline-primary {
    color: var(--hr-primary);
    border-color: #aebdec;
}

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

.btn-outline-secondary {
    color: #465363;
    border-color: var(--hr-border-strong);
}

.btn-outline-secondary:hover {
    color: var(--hr-ink);
    background: var(--hr-surface-subtle);
    border-color: #aeb8c3;
}

.btn-outline-light {
    color: #e6ebef;
    border-color: #4a5661;
}

.btn-outline-light:hover {
    color: #fff;
    background: #303a44;
    border-color: #5b6874;
}

.btn-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
}

.btn-icon--success,
.btn-icon--warning,
.btn-icon--danger,
.btn-icon--neutral {
    background: transparent;
    border: 1px solid transparent;
}

.btn-icon--success {
    color: var(--hr-success);
}

.btn-icon--success:hover {
    background: var(--hr-success-subtle);
    border-color: #b8dfca;
}

.btn-icon--warning {
    color: var(--hr-warning);
}

.btn-icon--warning:hover {
    background: var(--hr-warning-subtle);
    border-color: #ead19d;
}

.btn-icon--danger {
    color: var(--hr-danger);
}

.btn-icon--danger:hover {
    background: var(--hr-danger-subtle);
    border-color: #efc0c5;
}

.btn-icon--neutral {
    color: #596777;
}

.btn-icon--neutral:hover {
    color: var(--hr-ink);
    background: var(--hr-surface-subtle);
    border-color: var(--hr-border);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.38;
}

.table-panel {
    overflow: hidden;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius);
}

.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: #b8c0c9 transparent;
}

.table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    --bs-table-hover-bg: #f7f9fb;
    margin: 0;
    color: var(--hr-ink);
    font-size: 13px;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 11px 12px;
    border-color: #e7ebef;
}

.table thead th {
    background: #f8fafb;
    color: #536171;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.table tbody tr:last-child > * {
    border-bottom: 0;
}

.table tbody tr {
    transition: background-color var(--hr-transition);
}

.table-bordered > :not(caption) > * {
    border-width: 0;
}

.table-bordered > :not(caption) > * > * {
    border-width: 0 0 1px;
}

.table-primary-text {
    color: var(--hr-ink);
    font-weight: 590;
}

.table-secondary-text {
    display: block;
    margin-top: 2px;
    color: var(--hr-muted);
    font-size: 12px;
}

.employee-email {
    display: flex;
    align-items: center;
    gap: 5px;
}

.employee-email svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    white-space: nowrap;
}

.status-badge {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    gap: 6px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.status-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.status-badge--success {
    background: var(--hr-success-subtle);
    color: var(--hr-success);
}

.status-badge--warning {
    background: var(--hr-warning-subtle);
    color: var(--hr-warning);
}

.status-badge--danger {
    background: var(--hr-danger-subtle);
    color: var(--hr-danger);
}

.status-badge--neutral {
    background: var(--hr-surface-subtle);
    color: #52606f;
}

.verification-state {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--hr-muted);
    white-space: nowrap;
}

.verification-state--verified {
    color: var(--hr-success);
}

.verification-state svg {
    width: 15px;
    height: 15px;
}

.nav-tabs {
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--hr-border);
}

.nav-tabs .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: -1px;
    padding: 9px 12px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: var(--hr-muted);
    font-size: 13.5px;
    font-weight: 600;
}

.nav-tabs .nav-link:hover {
    color: var(--hr-ink);
    border-bottom-color: #aeb8c3;
}

.nav-tabs .nav-link.active {
    color: var(--hr-primary);
    background: transparent;
    border-bottom-color: var(--hr-primary);
}

.nav-tabs .badge {
    min-width: 24px;
    padding: 3px 6px;
    background: var(--hr-surface-subtle) !important;
    color: #536171 !important;
    font-size: 11px;
}

.alert {
    border: 1px solid transparent;
    border-radius: var(--hr-radius);
    font-size: 13.5px;
}

.alert-success {
    color: #135c3c;
    background: var(--hr-success-subtle);
    border-color: #b8dfca;
}

.alert-info {
    color: #1b5874;
    background: var(--hr-info-subtle);
    border-color: #bbdce9;
}

.alert-warning {
    color: #7c4a08;
    background: var(--hr-warning-subtle);
    border-color: #ead19d;
}

.empty-state {
    padding: 36px 20px !important;
    color: var(--hr-muted) !important;
    text-align: center;
}

.pagination {
    gap: 4px;
    margin: 16px 0 0;
}

.page-link {
    min-width: 34px;
    border-color: var(--hr-border);
    border-radius: var(--hr-radius-sm) !important;
    color: #4d5a69;
    text-align: center;
}

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

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background: #edf1f4;
}

.login-panel {
    width: min(100%, 390px);
    padding: 26px;
    background: var(--hr-surface);
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 15px;
    font-weight: 680;
}

.login-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 680;
}

.login-subtitle {
    margin: 0 0 22px;
    color: var(--hr-muted);
    font-size: 13.5px;
}

.ts-wrapper.single .ts-control,
.ts-wrapper.single.input-active .ts-control {
    background: #fff;
}

.ts-dropdown {
    border: 1px solid var(--hr-border);
    border-radius: var(--hr-radius-sm);
    box-shadow: 0 6px 8px rgba(22, 32, 42, 0.1);
}

@media (max-width: 1199.98px) {
    .filter-bar {
        grid-template-columns: minmax(240px, 1fr) minmax(180px, 0.8fr);
    }

    .filter-bar .btn {
        width: max-content;
    }
}

@media (min-width: 992px) {
    .admin-sidebar.offcanvas-lg {
        position: relative;
        visibility: visible !important;
        transform: none !important;
    }
}

@media (max-width: 991.98px) {
    .admin-topbar {
        padding: 0 14px;
    }

    .admin-sidebar__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px;
        border-bottom: 1px solid var(--hr-border);
    }

    .admin-sidebar__body {
        position: static;
        max-height: none;
    }

    .admin-main {
        padding: 22px 18px;
    }

    .dashboard-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-summary__item + .dashboard-summary__item {
        border-top: 1px solid var(--hr-border);
        border-left: 0;
    }
}

@media (max-width: 767.98px) {
    .admin-user__name {
        display: none;
    }

    .admin-main {
        padding: 18px 12px;
    }

    .page-header {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
    }

    .page-title {
        font-size: 21px;
    }

    .page-actions .btn {
        width: 100%;
    }

    .filter-bar,
    .filter-bar--compact {
        grid-template-columns: 1fr;
    }

    .filter-bar .btn {
        width: 100%;
    }

    .dashboard-summary__item {
        padding: 18px;
    }

    .table > :not(caption) > * > * {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
