:root {
    --hg-primary: #264041;
    --hg-primary-700: #1d3435;
    --hg-primary-600: #315354;
    --hg-primary-500: #3f6667;
    --hg-primary-100: #dfeae8;
    --hg-primary-050: #eef4f2;
    --hg-accent: #ad9564;
    --hg-accent-soft: #f4efe5;
    --hg-bg: #f5f7f5;
    --hg-bg-alt: #eef2ef;
    --hg-surface: #ffffff;
    --hg-surface-soft: #fafbf9;
    --hg-text: #1e2b2c;
    --hg-text-soft: #475858;
    --hg-muted: #768584;
    --hg-border: #dde5e1;
    --hg-border-strong: #cad6d1;
    --hg-success: #39785e;
    --hg-success-soft: #e8f3ed;
    --hg-danger: #b45151;
    --hg-danger-soft: #faecec;
    --hg-warning: #a9752b;
    --hg-warning-soft: #fbf2e3;
    --hg-info: #477482;
    --hg-info-soft: #eaf2f4;
    --hg-shadow-sm: 0 3px 12px rgba(28, 54, 53, 0.06);
    --hg-shadow-md: 0 10px 28px rgba(28, 54, 53, 0.08);
    --hg-sidebar-width: 276px;
    --hg-topbar-height: 78px;
    --hg-radius-sm: 9px;
    --hg-radius: 14px;
    --hg-radius-lg: 20px;
    --hg-transition: 180ms ease;
}

html {
    font-size: 16px;
    background: var(--hg-bg);
}

body,
button,
input,
select,
textarea,
.dropdown-menu,
.tooltip,
.popover {
    font-family: "Manrope", "Segoe UI", sans-serif !important;
}

body.hg-admin-body {
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--hg-text);
    background: var(--hg-bg);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.hg-admin-body::before {
    position: fixed;
    z-index: -1;
    top: 0;
    right: 0;
    width: 42vw;
    height: 330px;
    border-radius: 0 0 0 100%;
    background: linear-gradient(135deg, rgba(38, 64, 65, 0.035), rgba(173, 149, 100, 0.035));
    content: "";
    pointer-events: none;
}

::selection {
    color: #ffffff;
    background: var(--hg-primary);
}

a {
    color: var(--hg-primary-600);
    transition: color var(--hg-transition), opacity var(--hg-transition), background var(--hg-transition);
}

a:hover {
    color: var(--hg-primary);
    text-decoration: none;
}

.hg-admin-shell {
    min-height: 100vh;
}

.hg-app-area {
    min-height: 100vh;
    margin-left: var(--hg-sidebar-width);
    display: flex;
    flex-direction: column;
    transition: margin-left var(--hg-transition);
}

.hg-main-content {
    flex: 1 0 auto;
    width: 100%;
    margin: 0 !important;
    padding: 30px 30px 24px !important;
}

.hg-content-container {
    width: 100%;
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 !important;
}

/* Sidebar */
.hg-sidebar {
    position: fixed;
    z-index: 1040;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--hg-sidebar-width);
    display: flex;
    overflow: hidden;
    flex-direction: column;
    border-right: 1px solid var(--hg-border);
    background: var(--hg-surface);
    box-shadow: 8px 0 30px rgba(28, 54, 53, 0.04);
    transition: transform var(--hg-transition), width var(--hg-transition);
}

.hg-sidebar-brand {
    min-height: 112px;
    padding: 18px 22px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--hg-border);
}

.hg-brand-link {
    display: flex;
    width: 100%;
    min-height: 80px;
    align-items: center;
    justify-content: center;
}

.hg-brand-link img {
    display: block;
    width: auto;
    max-width: 176px;
    max-height: 82px;
    object-fit: contain;
}

.hg-sidebar-close {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--hg-text-soft);
    border: 1px solid var(--hg-border);
    border-radius: 50%;
    background: var(--hg-surface);
}

.hg-sidebar-panel-label {
    margin: 16px 18px 5px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    color: var(--hg-primary);
    border: 1px solid #d8e5e1;
    border-radius: 11px;
    background: var(--hg-primary-050);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.hg-panel-dot {
    width: 7px;
    height: 7px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--hg-success);
    box-shadow: 0 0 0 4px rgba(57, 120, 94, 0.12);
}

.hg-sidebar-nav {
    flex: 1 1 auto;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 10px 14px 22px;
    scrollbar-width: thin;
    scrollbar-color: var(--hg-border-strong) transparent;
}

.hg-sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.hg-sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background: var(--hg-border-strong);
}

.hg-nav-section+.hg-nav-section {
    margin-top: 20px;
}

.hg-nav-heading {
    display: block;
    margin: 0 9px 8px;
    color: #98a5a3;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hg-nav-link {
    position: relative;
    min-height: 45px;
    margin: 3px 0;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    color: #526261;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 650;
    gap: 12px;
}

.hg-nav-link::after {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: transparent;
    content: "";
    transform: translateY(-50%);
}

.hg-nav-link i {
    width: 22px;
    flex: 0 0 22px;
    color: #82918f;
    font-size: 18px;
    text-align: center;
    transition: color var(--hg-transition);
}

.hg-nav-link:hover {
    color: var(--hg-primary);
    background: var(--hg-primary-050);
}

.hg-nav-link:hover i {
    color: var(--hg-primary);
}

.hg-nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--hg-primary), var(--hg-primary-600));
    box-shadow: 0 7px 16px rgba(38, 64, 65, 0.18);
}

.hg-nav-link.active i {
    color: #ffffff;
}

.hg-nav-link.active::after {
    background: #d6c7a3;
}

.hg-sidebar-footer {
    min-height: 72px;
    margin: 0 14px 14px;
    padding: 13px;
    display: flex;
    align-items: center;
    border: 1px solid var(--hg-border);
    border-radius: var(--hg-radius);
    background: var(--hg-surface-soft);
    gap: 11px;
}

.hg-sidebar-footer-icon {
    width: 38px;
    height: 38px;
    display: flex;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    color: var(--hg-primary);
    border-radius: 10px;
    background: var(--hg-primary-100);
    font-size: 18px;
}

.hg-sidebar-footer strong,
.hg-sidebar-footer small {
    display: block;
}

.hg-sidebar-footer strong {
    color: var(--hg-text);
    font-size: 12px;
    font-weight: 800;
}

.hg-sidebar-footer small {
    margin-top: 2px;
    color: var(--hg-muted);
    font-size: 10px;
}

.hg-sidebar-backdrop {
    position: fixed;
    z-index: 1030;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(19, 37, 37, 0.42);
    backdrop-filter: blur(2px);
}

/* Header */
.hg-topbar {
    position: sticky;
    z-index: 1020;
    top: 0;
    min-height: var(--hg-topbar-height);
    padding: 12px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--hg-border);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 4px 18px rgba(30, 53, 52, 0.035);
    backdrop-filter: blur(13px);
}

.hg-topbar-left,
.hg-topbar-actions {
    display: flex;
    align-items: center;
}

.hg-topbar-left {
    min-width: 0;
    gap: 14px;
}

.hg-sidebar-toggle {
    width: 43px;
    height: 43px;
    display: none;
    flex: 0 0 43px;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: var(--hg-primary);
    border: 1px solid var(--hg-border);
    border-radius: 12px;
    background: var(--hg-surface-soft);
    font-size: 20px;
    cursor: pointer;
}

.hg-topbar-title-wrap {
    min-width: 0;
}

.hg-topbar-eyebrow {
    display: block;
    margin-bottom: 1px;
    color: var(--hg-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.hg-topbar-title {
    overflow: hidden;
    margin: 0;
    color: var(--hg-text);
    font-size: 19px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-user-button {
    min-width: 202px;
    padding: 7px 11px 7px 8px;
    display: flex;
    align-items: center;
    color: var(--hg-text);
    border: 1px solid var(--hg-border);
    border-radius: 14px;
    background: var(--hg-surface);
    box-shadow: var(--hg-shadow-sm);
    cursor: pointer;
    gap: 10px;
}

.hg-user-button::after {
    display: none;
}

.hg-user-button:hover,
.hg-user-button:focus {
    color: var(--hg-text);
    border-color: var(--hg-border-strong);
    background: var(--hg-surface-soft);
    outline: none;
}

.hg-user-avatar {
    width: 38px;
    height: 38px;
    display: inline-flex;
    overflow: hidden;
    flex: 0 0 38px;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    border-radius: 11px;
    background: var(--hg-primary);
    font-size: 14px;
    font-weight: 800;
}

.hg-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hg-user-avatar-lg {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
}

.hg-user-meta {
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
}

.hg-user-meta strong,
.hg-user-meta small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hg-user-meta strong {
    color: var(--hg-text);
    font-size: 12px;
    font-weight: 800;
}

.hg-user-meta small {
    margin-top: 1px;
    color: var(--hg-muted);
    font-size: 10px;
}

.hg-user-chevron {
    color: #879492;
    font-size: 15px;
}

.hg-user-menu {
    min-width: 250px;
    margin-top: 9px;
    padding: 8px;
    border: 1px solid var(--hg-border);
    border-radius: 15px;
    box-shadow: var(--hg-shadow-md);
}

.hg-user-menu-head {
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.hg-user-menu-head strong,
.hg-user-menu-head small {
    display: block;
}

.hg-user-menu-head strong {
    color: var(--hg-text);
    font-size: 13px;
    font-weight: 800;
}

.hg-user-menu-head small {
    width: auto;
    margin-top: 2px;
    overflow: hidden;
    color: var(--hg-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;

    /* max-width: 155px;
    margin-top: 2px;
    color: var(--hg-muted);
    font-size: 10px;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word; */
}

.hg-user-menu .dropdown-divider {
    margin: 5px 0;
    border-color: var(--hg-border);
}

.hg-user-menu .dropdown-item {
    padding: 10px 11px;
    display: flex;
    align-items: center;
    color: var(--hg-text-soft);
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    gap: 10px;
}

.hg-user-menu .dropdown-item:hover {
    color: var(--hg-danger);
    background: var(--hg-danger-soft);
}

/* Typography and page headers */
.page-title,
.main-content h2.page-title {
    margin-bottom: 6px !important;
    color: var(--hg-text) !important;
    font-size: clamp(1.35rem, 2vw, 1.8rem) !important;
    font-weight: 800 !important;
    letter-spacing: -0.035em;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6 {
    color: var(--hg-text);
    font-weight: 750;
}

.main-content .card-text,
.main-content .text-muted {
    color: var(--hg-muted) !important;
}

.main-content .row.my-4,
.main-content>.row>.col-12>.row.my-4 {
    margin-top: 0 !important;
    margin-bottom: 22px !important;
}

.main-content .row.align-items-center.my-4 {
    margin-top: 0 !important;
}

/* Cards */
.card {
    border: 1px solid var(--hg-border) !important;
    border-radius: var(--hg-radius) !important;
    background: var(--hg-surface) !important;
    box-shadow: var(--hg-shadow-sm) !important;
}

.card.shadow,
.card.shadow-sm,
.card.shadow-lg {
    box-shadow: var(--hg-shadow-sm) !important;
}

.card:hover {
    border-color: #d3ded9 !important;
}

.card-header,
.card-footer {
    border-color: var(--hg-border) !important;
    background: var(--hg-surface) !important;
}

.card-header {
    min-height: 58px;
    padding: 16px 20px !important;
    display: flex;
    align-items: center;
}

.card-header strong {
    color: var(--hg-text);
    font-size: 13px;
    font-weight: 800;
}

.card-body {
    padding: 20px !important;
}

.card-footer {
    padding: 14px 20px !important;
}

.card .border.rounded {
    border-color: var(--hg-border) !important;
    border-radius: 12px !important;
    background: var(--hg-surface-soft);
}

.circle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 13px !important;
}

.circle-md {
    width: 48px !important;
    height: 48px !important;
}

.circle-lg {
    width: 58px !important;
    height: 58px !important;
}

.bg-primary-light {
    background: var(--hg-primary-100) !important;
}

.bg-success-light {
    background: var(--hg-success-soft) !important;
}

.bg-danger-light {
    background: var(--hg-danger-soft) !important;
}

.bg-warning-light {
    background: var(--hg-warning-soft) !important;
}

.bg-info-light {
    background: var(--hg-info-soft) !important;
}

/* Buttons */
.btn {
    min-height: 40px;
    padding: 9px 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-width: 1px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 750;
    line-height: 1.25;
    white-space: nowrap;
    box-shadow: none !important;
    transition: transform var(--hg-transition), background var(--hg-transition), border-color var(--hg-transition), color var(--hg-transition);
    gap: 7px;
}

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

.btn:active {
    transform: translateY(0);
}

.btn:focus,
.btn.focus {
    box-shadow: 0 0 0 3px rgba(38, 64, 65, 0.12) !important;
}

.btn-sm {
    min-height: 33px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
}

.btn-lg {
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 13px;
}

.btn i {
    margin: 0 !important;
    font-size: 1.05em;
}

.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active {
    color: #ffffff;
    border-color: var(--hg-primary);
    background: var(--hg-primary);
}

.btn-primary:hover {
    border-color: var(--hg-primary-700);
    background: var(--hg-primary-700);
}

.btn-outline-primary {
    color: var(--hg-primary);
    border-color: #aebfba;
    background: #ffffff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:not(:disabled):not(.disabled):active {
    color: #ffffff;
    border-color: var(--hg-primary);
    background: var(--hg-primary);
}

.btn-secondary,
.btn-outline-secondary:hover {
    color: #ffffff;
    border-color: #667675;
    background: #667675;
}

.btn-outline-secondary,
.btn-light {
    color: var(--hg-text-soft);
    border-color: var(--hg-border-strong);
    background: #ffffff;
}

.btn-outline-secondary:hover,
.btn-light:hover {
    color: var(--hg-primary);
    border-color: #afbfba;
    background: var(--hg-primary-050);
}

.btn-success,
.btn-success:hover,
.btn-success:focus,
.btn-success:not(:disabled):not(.disabled):active {
    color: #ffffff;
    border-color: var(--hg-success);
    background: var(--hg-success);
}

.btn-success:hover {
    border-color: #2f674f;
    background: #2f674f;
}

.btn-danger,
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:not(:disabled):not(.disabled):active {
    color: #ffffff;
    border-color: var(--hg-danger);
    background: var(--hg-danger);
}

.btn-danger:hover {
    border-color: #994242;
    background: #994242;
}

.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:not(:disabled):not(.disabled):active {
    color: #ffffff;
    border-color: var(--hg-warning);
    background: var(--hg-warning);
}

.btn-info,
.btn-info:hover,
.btn-info:focus,
.btn-info:not(:disabled):not(.disabled):active {
    color: #ffffff;
    border-color: var(--hg-info);
    background: var(--hg-info);
}

.btn-link {
    color: var(--hg-primary);
}

.btn-block {
    width: 100%;
}

/* Forms */
label,
.form-label {
    margin-bottom: 7px;
    color: #4d5d5c;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.01em;
}

.form-control,
.custom-select {
    min-height: 43px;
    padding: 9px 12px;
    color: var(--hg-text);
    border: 1px solid var(--hg-border-strong);
    border-radius: 9px;
    background-color: #ffffff;
    font-size: 12px;
    transition: border-color var(--hg-transition), box-shadow var(--hg-transition), background var(--hg-transition);
}

textarea.form-control {
    min-height: 96px;
    resize: vertical;
}

.form-control:focus,
.custom-select:focus {
    color: var(--hg-text);
    border-color: var(--hg-primary-500);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(38, 64, 65, 0.1);
}

.form-control::placeholder {
    color: #a0adaa;
}

.form-control:disabled,
.form-control[readonly],
.custom-select:disabled {
    color: #7c8987;
    background: var(--hg-bg-alt);
}

.form-text,
small.text-muted {
    color: var(--hg-muted) !important;
    font-size: 10px;
}

.form-group {
    margin-bottom: 17px;
}

.input-group-text {
    min-height: 43px;
    color: var(--hg-primary);
    border-color: var(--hg-border-strong);
    background: var(--hg-primary-050);
    font-size: 12px;
}

.custom-control-label {
    padding-top: 1px;
}

.custom-control-input:checked~.custom-control-label::before {
    border-color: var(--hg-primary);
    background-color: var(--hg-primary);
}

.custom-file-label {
    min-height: 43px;
    padding-top: 10px;
    border-color: var(--hg-border-strong);
    border-radius: 9px;
    font-size: 12px;
}

.custom-file-label::after {
    min-height: 41px;
    padding-top: 10px;
    color: var(--hg-primary);
    border-left-color: var(--hg-border);
    background: var(--hg-primary-050);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--hg-danger);
}

.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--hg-success);
}

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

.select2-container--bootstrap4 .select2-selection {
    min-height: 43px !important;
    border-color: var(--hg-border-strong) !important;
    border-radius: 9px !important;
    background: #ffffff;
    box-shadow: none !important;
}

.select2-container--bootstrap4 .select2-selection--single .select2-selection__rendered {
    padding-left: 12px !important;
    color: var(--hg-text) !important;
    font-size: 12px;
    line-height: 41px !important;
}

/* .select2-container--bootstrap4 .select2-selection--single .select2-selection__arrow {
    height: 41px !important;
} */

.select2-container--bootstrap4.select2-container--focus .select2-selection,
.select2-container--bootstrap4.select2-container--open .select2-selection {
    border-color: var(--hg-primary-500) !important;
    box-shadow: 0 0 0 3px rgba(38, 64, 65, 0.1) !important;
}

.select2-dropdown {
    overflow: hidden;
    border-color: var(--hg-border-strong) !important;
    border-radius: 10px !important;
    box-shadow: var(--hg-shadow-md);
}

.select2-results__option {
    padding: 9px 12px;
    font-size: 12px;
}

.select2-container--bootstrap4 .select2-results__option--highlighted,
.select2-container--bootstrap4 .select2-results__option--highlighted.select2-results__option[aria-selected=true] {
    color: #ffffff;
    background: var(--hg-primary) !important;
}

/* Tables and DataTables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100% !important;
    margin-bottom: 0;
    color: var(--hg-text-soft);
    font-size: 12px;
}

.table thead th {
    padding: 12px 13px;
    color: #596866;
    border-top: 0;
    border-bottom: 1px solid var(--hg-border-strong) !important;
    background: #f6f8f6;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.table tbody td {
    padding: 13px;
    border-top: 1px solid #e8ece9;
    vertical-align: middle;
}

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

.table-hover tbody tr:hover {
    color: var(--hg-text);
    background: #fafcfb;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: #fafbf9;
}

.table-warning,
.table-warning>td,
.table-warning>th {
    background: var(--hg-warning-soft) !important;
}

.table-success,
.table-success>td,
.table-success>th {
    background: var(--hg-success-soft) !important;
}

.table-danger,
.table-danger>td,
.table-danger>th {
    background: var(--hg-danger-soft) !important;
}

.table td .btn+.btn,
.table td form+.btn,
.table td .btn+form,
.table td form+form {
    margin-left: 3px;
}

.dataTables_wrapper .row:first-child,
.dataTables_wrapper .row:last-child {
    align-items: center;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 14px;
}

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

.dataTables_wrapper .dataTables_filter label,
.dataTables_wrapper .dataTables_length label {
    margin: 0;
    color: var(--hg-muted);
    font-size: 10px;
    font-weight: 700;
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 190px;
    min-height: 36px;
    margin-left: 7px;
    border: 1px solid var(--hg-border-strong);
    border-radius: 8px;
}

.dataTables_wrapper .dataTables_length select {
    min-height: 36px;
    margin: 0 5px;
    border: 1px solid var(--hg-border-strong);
    border-radius: 8px;
}

.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    padding-top: 15px !important;
    color: var(--hg-muted) !important;
    font-size: 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    margin-left: 3px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

.page-item .page-link,
.dataTables_wrapper .page-link {
    min-width: 34px;
    height: 34px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--hg-text-soft);
    border: 1px solid var(--hg-border);
    border-radius: 8px !important;
    background: #ffffff;
    font-size: 11px;
}

.page-item.active .page-link,
.dataTables_wrapper .page-item.active .page-link {
    color: #ffffff;
    border-color: var(--hg-primary);
    background: var(--hg-primary);
}

/* Tabs */
.nav-tabs {
    border-bottom-color: var(--hg-border);
}

.nav-tabs .nav-link {
    padding: 11px 14px;
    color: var(--hg-muted);
    border: 0;
    border-bottom: 2px solid transparent;
    font-size: 11px;
    font-weight: 750;
}

.nav-tabs .nav-link:hover {
    color: var(--hg-primary);
    border-color: transparent;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
    color: var(--hg-primary);
    border-color: var(--hg-primary);
    background: transparent;
}

.nav-pills .nav-link {
    border-radius: 9px;
    color: var(--hg-text-soft);
    font-size: 12px;
    font-weight: 700;
}

.nav-pills .nav-link.active {
    background: var(--hg-primary);
}

/* Badges and status */
.badge {
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.025em;
}

.badge-primary,
.badge-info {
    color: var(--hg-primary);
    background: var(--hg-primary-100);
}

.badge-success {
    color: var(--hg-success);
    background: var(--hg-success-soft);
}

.badge-danger {
    color: var(--hg-danger);
    background: var(--hg-danger-soft);
}

.badge-warning {
    color: #8b5d1b;
    background: var(--hg-warning-soft);
}

.badge-secondary,
.badge-light {
    color: #667573;
    background: #edf1ef;
}

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

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

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

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

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

/* Alerts */
.alert {
    padding: 13px 15px;
    display: flex;
    align-items: flex-start;
    border-width: 1px;
    border-radius: 11px;
    font-size: 11px;
    gap: 9px;
}

.alert-success {
    color: #2e6a50;
    border-color: #cce2d5;
    background: var(--hg-success-soft);
}

.alert-danger {
    color: #913d3d;
    border-color: #efcece;
    background: var(--hg-danger-soft);
}

.alert-warning {
    color: #80591c;
    border-color: #ead6b2;
    background: var(--hg-warning-soft);
}

.alert-info {
    color: #365f6a;
    border-color: #cee0e5;
    background: var(--hg-info-soft);
}

/* Dropdowns */
.dropdown-menu {
    padding: 7px;
    border: 1px solid var(--hg-border);
    border-radius: 12px;
    box-shadow: var(--hg-shadow-md);
    font-size: 12px;
}

.dropdown-item {
    padding: 9px 11px;
    color: var(--hg-text-soft);
    border-radius: 8px;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--hg-primary);
    background: var(--hg-primary-050);
}

/* Modals */
.modal-backdrop.show {
    opacity: 0.38;
}

.modal-content {
    overflow: hidden;
    border: 1px solid var(--hg-border);
    border-radius: 16px;
    box-shadow: 0 20px 55px rgba(26, 49, 48, 0.18);
}

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

.modal-header {
    padding: 18px 20px;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 14px 20px;
}

.modal-title {
    font-size: 15px;
    font-weight: 800;
}

.hg-confirm-modal .modal-dialog {
    max-width: 430px;
}

.hg-confirm-content {
    padding: 24px 24px 18px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.hg-confirm-icon {
    width: 48px;
    height: 48px;
    display: flex;
    flex: 0 0 48px;
    align-items: center;
    justify-content: center;
    color: var(--hg-warning);
    border-radius: 14px;
    background: var(--hg-warning-soft);
    font-size: 21px;
}

.hg-confirm-icon.danger {
    color: var(--hg-danger);
    background: var(--hg-danger-soft);
}

.hg-confirm-icon.success {
    color: var(--hg-success);
    background: var(--hg-success-soft);
}

.hg-confirm-copy h5 {
    margin: 1px 0 7px;
}

.hg-confirm-copy p {
    margin: 0;
    color: var(--hg-muted);
    font-size: 11px;
    line-height: 1.65;
}

.hg-confirm-actions {
    padding: 14px 24px 20px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--hg-border);
    gap: 8px;
}

/* Calendar, list groups, utility surfaces */
.list-group-item {
    padding: 12px 14px;
    color: var(--hg-text-soft);
    border-color: var(--hg-border);
    background: #ffffff;
    font-size: 12px;
}

.list-group-item.active {
    color: #ffffff;
    border-color: var(--hg-primary);
    background: var(--hg-primary);
}

.breadcrumb {
    padding: 0;
    background: transparent;
    font-size: 11px;
}

.breadcrumb-item+.breadcrumb-item::before {
    color: #a0acab;
}

.progress {
    height: 8px;
    border-radius: 999px;
    background: #e9eeeb;
}

.progress-bar {
    border-radius: 999px;
    background: var(--hg-primary);
}

.fc-unthemed td,
.fc-unthemed th,
.fc-unthemed thead,
.fc-unthemed tbody,
.fc-unthemed .fc-divider,
.fc-unthemed .fc-row,
.fc-unthemed .fc-content,
.fc-unthemed .fc-popover,
.fc-unthemed .fc-list-view,
.fc-unthemed .fc-list-heading td {
    border-color: var(--hg-border) !important;
}

.fc-button-primary {
    border-color: var(--hg-primary) !important;
    background: var(--hg-primary) !important;
}

/* .fc-event {
    border-color: var(--hg-primary) !important;
    border-radius: 6px !important;
    background: var(--hg-primary) !important;
} */

/* Toastr and SweetAlert visual matching */
#toast-container>div {
    border-radius: 11px;
    box-shadow: var(--hg-shadow-md);
    font-size: 11px;
}

.swal2-popup {
    border-radius: 16px !important;
    font-family: "Manrope", "Segoe UI", sans-serif !important;
}

.swal2-confirm,
.swal2-cancel {
    min-height: 40px !important;
    padding: 9px 16px !important;
    border-radius: 9px !important;
    font-size: 12px !important;
    font-weight: 750 !important;
}

/* Footer */
.hg-footer {
    min-height: 56px;
    padding: 14px 30px 20px;
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    color: #8b9896;
    font-size: 10px;
    font-weight: 650;
    gap: 10px;
}

.hg-footer-divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--hg-accent);
}

/* Login */
body.hg-login-body {
    min-height: 100vh;
    margin: 0;
    color: var(--hg-text);
    background: var(--hg-bg);
    font-family: "Manrope", "Segoe UI", sans-serif;
}

.hg-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(440px, 0.92fr) minmax(460px, 1.08fr);
}

.hg-login-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 55px clamp(38px, 5vw, 78px);
    display: flex;
    align-items: center;
    color: var(--hg-text);
    border-right: 1px solid var(--hg-border);
    background:
        radial-gradient(circle at 15% 16%, rgba(173, 149, 100, 0.13), transparent 26%),
        radial-gradient(circle at 78% 82%, rgba(38, 64, 65, 0.09), transparent 30%),
        #f0f4f1;
}

.hg-login-brand-panel::before,
.hg-login-brand-panel::after {
    position: absolute;
    border: 1px solid rgba(38, 64, 65, 0.08);
    border-radius: 50%;
    content: "";
}

.hg-login-brand-panel::before {
    top: -180px;
    right: -190px;
    width: 470px;
    height: 470px;
}

.hg-login-brand-panel::after {
    bottom: -180px;
    left: -160px;
    width: 390px;
    height: 390px;
}

.hg-login-brand-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 590px;
    margin: 0 auto;
}

.hg-login-logo {
    width: auto;
    max-width: 232px;
    max-height: 185px;
    object-fit: contain;
}

.hg-login-brand-copy {
    margin-top: 45px;
}

.hg-login-kicker,
.hg-login-card-kicker {
    color: var(--hg-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hg-login-brand-copy h1 {
    max-width: 560px;
    margin: 13px 0 15px;
    color: var(--hg-primary-700);
    font-size: clamp(2rem, 3.6vw, 3.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.055em;
}

.hg-login-brand-copy p {
    max-width: 500px;
    margin: 0;
    color: #647472;
    font-size: 14px;
    line-height: 1.8;
}

.hg-login-feature-grid {
    margin-top: 42px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hg-login-feature {
    min-height: 92px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--hg-primary);
    border: 1px solid rgba(38, 64, 65, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(5px);
}

.hg-login-feature i {
    font-size: 20px;
}

.hg-login-feature span {
    font-size: 10px;
    font-weight: 750;
    line-height: 1.45;
}

.hg-login-form-panel {
    padding: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
}

.hg-login-card {
    width: 100%;
    max-width: 430px;
}

.hg-login-mobile-logo {
    display: none;
    text-align: center;
}

.hg-login-mobile-logo img {
    width: auto;
    max-width: 170px;
    max-height: 135px;
}

.hg-login-card-head {
    margin-bottom: 30px;
}

.hg-login-card-head h2 {
    margin: 8px 0 8px;
    color: var(--hg-text);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.045em;
}

.hg-login-card-head p {
    margin: 0;
    color: var(--hg-muted);
    font-size: 12px;
}

.hg-login-form .form-group {
    margin-bottom: 19px;
}

.hg-login-form label {
    margin-bottom: 8px;
}

.hg-input-icon-wrap {
    position: relative;
}

.hg-input-icon-wrap>i:first-child {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 14px;
    color: #889593;
    font-size: 17px;
    transform: translateY(-50%);
}

.hg-input-icon-wrap .form-control {
    min-height: 50px;
    padding-right: 45px;
    padding-left: 43px;
    border-radius: 11px;
    font-size: 12px;
}

.hg-password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #879492;
    border: 0;
    border-radius: 8px;
    background: transparent;
    transform: translateY(-50%);
}

.hg-password-toggle:hover {
    color: var(--hg-primary);
    background: var(--hg-primary-050);
}

.hg-login-submit {
    margin-top: 6px;
    justify-content: space-between;
    padding-right: 17px;
    padding-left: 20px;
}

.hg-login-copyright {
    margin: 28px 0 0;
    color: #9aa5a3;
    font-size: 9px;
    text-align: center;
}

/* Laptop */
@media (min-width: 992px) and (max-width: 1199.98px) {
    :root {
        --hg-sidebar-width: 252px;
    }

    .hg-main-content {
        padding: 25px 23px 20px !important;
    }

    .hg-topbar {
        padding-right: 23px;
        padding-left: 23px;
    }

    .card-body {
        padding: 18px !important;
    }

    .table thead th,
    .table tbody td {
        padding-right: 10px;
        padding-left: 10px;
    }

    .hg-login-shell {
        grid-template-columns: minmax(390px, 0.9fr) minmax(430px, 1.1fr);
    }
}

/* Tablet and mobile off-canvas sidebar */
@media (max-width: 991.98px) {
    :root {
        --hg-topbar-height: 70px;
    }

    body.hg-sidebar-open {
        overflow: hidden;
    }

    .hg-sidebar {
        width: 284px;
        max-width: calc(100vw - 42px);
        transform: translateX(-105%);
        box-shadow: 18px 0 50px rgba(21, 42, 41, 0.18);
    }

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

    body.hg-sidebar-open .hg-sidebar-backdrop {
        display: block;
    }

    .hg-sidebar-close,
    .hg-sidebar-toggle {
        display: flex;
    }

    .hg-app-area {
        margin-left: 0;
    }

    .hg-topbar {
        padding: 10px 20px;
    }

    .hg-main-content {
        padding: 23px 20px 18px !important;
    }

    .hg-footer {
        padding-right: 20px;
        padding-left: 20px;
    }

    .hg-login-shell {
        grid-template-columns: minmax(340px, 0.82fr) minmax(390px, 1.18fr);
    }

    .hg-login-brand-panel {
        padding: 42px 32px;
    }

    .hg-login-brand-copy h1 {
        font-size: 2.15rem;
    }

    .hg-login-feature-grid {
        grid-template-columns: 1fr;
    }

    .hg-login-feature {
        min-height: 64px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 12px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 991.98px) {

    .main-content .col-xl-3,
    .main-content .col-lg-3 {
        min-width: 50%;
    }

    .card-header,
    .card-body {
        padding-right: 18px !important;
        padding-left: 18px !important;
    }

    .table {
        min-width: 760px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    html {
        font-size: 15px;
    }

    .hg-topbar {
        padding: 9px 14px;
    }

    .hg-topbar-left {
        gap: 10px;
    }

    .hg-sidebar-toggle {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
        border-radius: 10px;
    }

    .hg-topbar-eyebrow {
        display: none;
    }

    .hg-topbar-title {
        max-width: 150px;
        font-size: 15px;
    }

    .hg-user-button {
        min-width: 0;
        padding: 4px;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .hg-user-button:hover,
    .hg-user-button:focus {
        background: transparent;
    }

    .hg-user-meta,
    .hg-user-chevron {
        display: none;
    }

    .hg-user-avatar {
        width: 39px;
        height: 39px;
        flex-basis: 39px;
        border-radius: 10px;
    }

    .hg-main-content {
        padding: 18px 14px 14px !important;
    }

    .page-title,
    .main-content h2.page-title {
        font-size: 1.35rem !important;
    }

    .main-content .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3 {
        align-items: flex-start !important;
        gap: 12px;
    }

    .main-content .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3>div:last-child {
        width: 100%;
        margin-top: 0 !important;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .main-content .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3>div:last-child>.btn,
    .main-content .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3>div:last-child>form,
    .main-content .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3>div:last-child>form .btn {
        width: 100%;
        margin: 0 !important;
    }

    .card {
        border-radius: 12px !important;
    }

    .card-header {
        min-height: 52px;
        padding: 14px !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .card-body {
        padding: 15px !important;
    }

    .card-footer {
        padding: 12px 15px !important;
    }

    .row>[class*="col-"] {
        min-width: 0;
    }

    .form-inline {
        display: block;
    }

    .form-inline .form-group {
        width: 100%;
        margin-right: 0 !important;
    }

    .form-inline .form-group label {
        width: 100%;
        margin-right: 0 !important;
        margin-bottom: 6px;
        justify-content: flex-start;
    }

    .form-inline .form-control,
    .form-inline .custom-select,
    .form-inline .select2-container {
        width: 100% !important;
    }

    .form-inline>.btn {
        width: calc(50% - 4px);
        margin: 0 4px 8px 0 !important;
    }

    .table {
        min-width: 690px;
        font-size: 11px;
    }

    .table thead th {
        font-size: 9px;
    }

    .table thead th,
    .table tbody td {
        padding: 10px;
    }

    .dataTables_wrapper .row:first-child>div,
    .dataTables_wrapper .row:last-child>div {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
        text-align: left;
    }

    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_paginate {
        margin-top: 8px;
        text-align: left !important;
    }

    .dataTables_wrapper .dataTables_filter label {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: 0;
        margin: 6px 0 0;
    }

    .dataTables_wrapper .dataTables_info {
        padding-top: 10px !important;
    }

    .dataTables_wrapper .dataTables_paginate .pagination {
        flex-wrap: wrap;
        justify-content: flex-start !important;
    }

    .nav-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        scrollbar-width: none;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-link {
        white-space: nowrap;
    }

    .modal-dialog {
        margin: 12px;
    }

    .hg-confirm-content {
        padding: 20px 18px 15px;
    }

    .hg-confirm-actions {
        padding: 12px 18px 18px;
    }

    .hg-confirm-actions .btn {
        flex: 1 1 0;
    }

    .hg-footer {
        padding: 12px 14px 18px;
        flex-wrap: wrap;
        text-align: center;
    }

    .hg-login-shell {
        min-height: 100vh;
        display: block;
    }

    .hg-login-brand-panel {
        display: none;
    }

    .hg-login-form-panel {
        min-height: 100vh;
        padding: 28px 18px;
        background:
            radial-gradient(circle at 8% 3%, rgba(173, 149, 100, 0.12), transparent 25%),
            var(--hg-bg);
    }

    .hg-login-card {
        max-width: 420px;
        padding: 24px 20px;
        border: 1px solid var(--hg-border);
        border-radius: 18px;
        background: #ffffff;
        box-shadow: var(--hg-shadow-md);
    }

    .hg-login-mobile-logo {
        margin-bottom: 22px;
        display: block;
    }

    .hg-login-card-head {
        margin-bottom: 23px;
        text-align: center;
    }

    .hg-login-card-head h2 {
        font-size: 25px;
    }
}

/* Small mobile */
@media (max-width: 575.98px) {
    .hg-sidebar {
        max-width: calc(100vw - 28px);
    }

    .main-content .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3>div:last-child {
        grid-template-columns: 1fr;
    }

    .main-content .row>[class*="col-6"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .form-inline>.btn {
        width: 100%;
        margin-right: 0 !important;
    }

    .btn:not(.btn-sm) {
        min-height: 41px;
    }

    .hg-user-menu {
        min-width: min(250px, calc(100vw - 28px));
    }

    .hg-login-card {
        padding: 22px 16px;
    }
}

/* Wide desktop */
@media (min-width: 1440px) {
    .hg-main-content {
        padding: 34px 38px 26px !important;
    }

    .hg-topbar {
        padding-right: 38px;
        padding-left: 38px;
    }

    .card-body {
        padding: 22px !important;
    }
}

@media print {

    .hg-sidebar,
    .hg-topbar,
    .hg-footer,
    .hg-sidebar-backdrop,
    .btn,
    .dataTables_length,
    .dataTables_filter,
    .dataTables_paginate {
        display: none !important;
    }

    .hg-app-area {
        margin-left: 0;
    }

    .hg-main-content {
        padding: 0 !important;
    }

    .card {
        border: 0 !important;
        box-shadow: none !important;
    }
}



.main-content .card-text,
.main-content .text-muted {
    color: #000000 !important;
}