:root {
    --brand-color: #04a9f5;
    --primary: var(--brand-color);
    --primary-dark: #0387c4;
    --bg: #f4f7fa;
    --surface: #ffffff;
    --text: #1f2d3d;
    --muted: #6c757d;
    --border: #e7edf3;
    --danger: #ff5252;
    --warning: #ffba57;
    --success: #2ed8b6;
    --info: #4099ff;
    --purple: #7759de;
    --header-start: #17243a;
    --header-end: #263f64;
    --sidebar-width: 264px;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(31, 45, 61, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body.hse-app,
body.hse-auth-page {
    min-height: 100vh;
    color: var(--text);
    background: var(--bg);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

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

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

button,
input,
select,
textarea {
    font: inherit;
}

.loader-bg .loader-track .loader-fill {
    background: var(--primary);
}

.pcoded-navbar.hse-sidebar {
    color: #3f4d67;
    background: #ffffff;
    box-shadow: 1px 0 20px rgba(69, 90, 100, 0.08);
}

.hse-sidebar .navbar-content {
    padding-bottom: 28px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.hse-sidebar-brand {
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px 12px;
    color: #3f4d67;
    border-bottom: 1px solid #edf1f5;
}

.hse-sidebar-brand:hover {
    color: #3f4d67;
}

.brand-logo-frame,
.navbar-logo-frame {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #e4e9ef;
    box-shadow: 0 4px 12px rgba(31, 45, 61, 0.08);
}

.brand-logo-frame img,
.navbar-logo-frame img,
.hse-mobile-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-copy {
    min-width: 0;
    display: grid;
    line-height: 1.2;
}

.brand-copy b {
    overflow: hidden;
    color: #263544;
    font-size: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy small {
    margin-top: 4px;
    overflow: hidden;
    color: #8492a6;
    font-size: 10px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.hse-user-card {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 14px 14px 8px;
    padding: 12px;
    border-radius: var(--radius);
    background: #f7f9fc;
}

.hse-user-card .user-details {
    min-width: 0;
    display: grid;
}

.hse-user-card .user-details b,
.hse-user-card .user-details small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hse-user-card .user-details b {
    color: #3f4d67;
    font-size: 13px;
}

.hse-user-card .user-details small {
    color: #8492a6;
    font-size: 11px;
}

.hse-sidebar .pcoded-inner-navbar {
    padding-top: 2px;
}

.hse-sidebar .pcoded-inner-navbar li.pcoded-menu-caption label {
    color: #a3a9b1;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
}

.hse-sidebar .pcoded-inner-navbar li > a {
    color: #45556c !important;
    border-radius: 0 22px 22px 0;
    margin-right: 14px;
}

.hse-sidebar .pcoded-inner-navbar li.active > a,
.hse-sidebar .pcoded-inner-navbar li > a:hover {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3775dd, #4680ff) !important;
    box-shadow: 0 7px 16px rgba(70, 128, 255, 0.22) !important;
}

.hse-sidebar .pcoded-inner-navbar li.active > a::after {
    border-right-color: var(--primary);
}

.hse-sidebar .pcoded-micon i {
    font-size: 17px;
}

.sidebar-version {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 24px 16px 0;
    padding: 12px;
    color: #526172;
    border: 1px solid #e8edf2;
    border-radius: var(--radius);
    background: #f8fafc;
}

.sidebar-version > i {
    color: var(--primary);
    font-size: 20px;
}

.sidebar-version span {
    display: grid;
}

.sidebar-version b {
    font-size: 11px;
}

.sidebar-version small {
    color: #8996a8;
    font-size: 9px;
}

@media (min-width: 992px) {
    .pcoded-navbar.hse-sidebar.navbar-collapsed,
    .pcoded-navbar.hse-sidebar.navbar-collapsed:hover {
        width: 76px !important;
        overflow: hidden;
    }

    .pcoded-navbar.hse-sidebar.navbar-collapsed .navbar-content,
    .pcoded-navbar.hse-sidebar.navbar-collapsed:hover .navbar-content {
        width: 76px !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
    }

    .hse-sidebar.navbar-collapsed .hse-sidebar-brand {
        min-height: 66px;
        justify-content: center;
        padding: 10px;
    }

    .hse-sidebar.navbar-collapsed .brand-logo-frame {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .hse-sidebar.navbar-collapsed .brand-copy,
    .hse-sidebar.navbar-collapsed .hse-user-card .user-details,
    .hse-sidebar.navbar-collapsed .sidebar-version span,
    .hse-sidebar.navbar-collapsed .pcoded-mtext {
        display: none !important;
    }

    .hse-sidebar.navbar-collapsed .hse-user-card {
        min-height: 58px;
        justify-content: center;
        margin: 10px 9px 5px;
        padding: 8px;
    }

    .hse-sidebar.navbar-collapsed .avatar-lg {
        width: 40px;
        height: 40px;
    }

    .hse-sidebar.navbar-collapsed .pcoded-menu-caption {
        height: 25px;
        min-height: 25px;
        margin: 7px 10px 2px;
        padding: 0;
    }

    .hse-sidebar.navbar-collapsed .pcoded-menu-caption > label {
        display: none !important;
    }

    .hse-sidebar.navbar-collapsed .pcoded-menu-caption::after {
        top: 12px;
        left: 4px;
        width: 48px;
        background: #e4eaf1;
    }

    .hse-sidebar.navbar-collapsed .pcoded-inner-navbar > li:not(.pcoded-menu-caption) > a,
    .hse-sidebar.navbar-collapsed:hover .pcoded-inner-navbar > li:not(.pcoded-menu-caption) > a {
        width: 52px !important;
        min-height: 44px;
        margin: 5px 12px !important;
        padding: 12px !important;
        justify-content: center;
        border-radius: 12px !important;
    }

    .hse-sidebar.navbar-collapsed .pcoded-inner-navbar > li > a > .pcoded-micon {
        margin-right: 0 !important;
    }

    .hse-sidebar.navbar-collapsed .pcoded-inner-navbar > li > a > .pcoded-micon i {
        margin: 0;
        font-size: 19px;
    }

    .hse-sidebar.navbar-collapsed .sidebar-version {
        width: 52px;
        min-height: 48px;
        justify-content: center;
        margin: 18px 12px 0;
        padding: 10px;
    }

    .hse-sidebar.navbar-collapsed ~ .pcoded-main-container {
        margin-left: 76px;
    }

    .hse-sidebar.navbar-collapsed:hover ~ .pcoded-header::before,
    .hse-sidebar.navbar-collapsed:hover ~ .pcoded-main-container::before {
        display: none !important;
    }

    .hse-sidebar.navbar-collapsed ~ .hse-navbar .m-header {
        width: 76px;
        padding: 0;
    }

    .hse-sidebar.navbar-collapsed ~ .hse-navbar .hse-mobile-brand {
        position: absolute;
        left: 7px;
    }

    .hse-sidebar.navbar-collapsed ~ .hse-navbar .hse-mobile-brand img {
        width: 31px;
        height: 31px;
    }

    .hse-sidebar.navbar-collapsed ~ .hse-navbar .hse-mobile-brand span {
        display: none;
    }

    .hse-sidebar.navbar-collapsed ~ .hse-navbar .mobile-menu {
        right: 3px;
        width: 32px;
        padding: 0 7px;
    }
}

.pcoded-header.hse-navbar.header-blue,
.pcoded-header.hse-navbar.header-blue:not(.headerpos-fixed) {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--header-start), var(--header-end)) !important;
    box-shadow: 0 2px 10px rgba(31, 45, 61, 0.12);
}

.hse-navbar .m-header {
    background: rgba(0, 0, 0, 0.04);
}

.hse-navbar .navbar-collapse {
    padding-right: 24px;
}

.navbar-product {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff !important;
}

.navbar-logo-frame {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    border: 2px solid rgba(255, 255, 255, 0.55);
}

.navbar-product > span:last-child {
    display: grid;
    line-height: 1.2;
}

.navbar-product b {
    color: #ffffff !important;
    font-size: 14px;
}

.navbar-product small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 10px;
}

.hse-mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
    font-weight: 700;
}

.hse-mobile-brand img {
    width: 38px;
    height: 38px;
    padding: 3px;
    border-radius: 10px;
    background: #ffffff;
}

.hse-navbar .mob-toggler {
    color: #ffffff !important;
    border: 0;
    background: transparent;
}

.nav-icon-button {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

.nav-icon-button:hover {
    background: rgba(255, 255, 255, 0.22);
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    color: #ffffff !important;
    font-size: 11px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
}

.connection-status.offline {
    background: rgba(255, 82, 82, 0.85);
}

.case-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 10px;
    padding: 5px 8px;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
}

.case-pill:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.case-pill b {
    min-width: 22px;
    padding: 2px 6px;
    color: #8a4b00;
    text-align: center;
    border-radius: 10px;
    background: #fff1d5;
}

.case-pill b.blue {
    color: #075985;
    background: #dff4ff;
}

.case-pill small {
    color: rgba(255, 255, 255, 0.86) !important;
}

.hse-user-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff !important;
}

.hse-user-toggle::after {
    display: none;
}

.avatar {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    color: var(--primary);
    font-weight: 700;
    border-radius: 50%;
    background: #ffffff;
}

.avatar-lg {
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), #7759de);
}

.avatar-inverse {
    margin-right: 9px;
    color: var(--primary);
    background: #ffffff;
}

.user-text {
    display: grid;
    min-width: 0;
    line-height: 1.2;
}

.user-text b {
    color: #ffffff !important;
    font-size: 12px;
}

.user-text small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 10px;
}

.profile-notification .pro-head {
    display: flex;
    align-items: center;
}

.profile-notification .pro-head > span:last-child {
    display: grid;
    min-width: 0;
}

.profile-notification .pro-head small {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.75);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcoded-main-container {
    min-height: calc(100vh - 70px);
}

.pcoded-content {
    min-height: calc(100vh - 70px);
    padding: 24px;
    padding-bottom: 0;
}

.hse-page-header {
    margin-bottom: 18px;
    padding: 0;
    background: transparent;
}

.hse-page-header .page-block {
    padding: 0;
}

.page-heading h1 {
    margin: 0;
    color: #263544;
    font-size: 25px;
    font-weight: 600;
}

.page-heading p {
    margin: 5px 0 0;
    color: #77869b;
}

.hse-content {
    min-height: calc(100vh - 185px);
}

.card,
.stat-card {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card {
    margin-bottom: 20px;
    padding: 20px;
    background: var(--surface);
}

.card > .card-header {
    min-height: auto;
    margin: -20px -20px 18px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    background: transparent;
}

.card > .card-header::after {
    display: none;
}

.card-header h2,
.card h2 {
    margin: 0;
    color: #344258;
    font-size: 16px;
    font-weight: 600;
}

.grid {
    display: grid;
    gap: 20px;
}

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

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

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

.stat-card {
    position: relative;
    min-height: 118px;
    padding: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    background: #ffffff;
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 76px;
    height: 76px;
    right: -30px;
    bottom: -30px;
    border-radius: 50%;
    background: rgba(64, 153, 255, 0.08);
}

.stat-card small {
    color: #8492a6;
    font-weight: 500;
}

.stat-card strong {
    display: block;
    margin-top: 7px;
    color: #263544;
    font-size: 30px;
    font-weight: 600;
    line-height: 1;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    z-index: 1;
    color: #4099ff;
    border-radius: 12px;
    background: #eaf4ff;
    font-size: 21px;
}

.stat-icon.green {
    color: #11a98d;
    background: #e3f8f3;
}

.stat-icon.orange {
    color: #d98516;
    background: #fff2df;
}

.stat-icon.purple {
    color: #7759de;
    background: #eeeafd;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e3e9f0;
    border-radius: 9px;
    background: #ffffff;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #c7d2e0 transparent;
    scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
    height: 7px;
}

.table-responsive::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #c7d2e0;
}

.table {
    width: 100%;
    min-width: 650px;
    margin-bottom: 0;
    color: #405066;
    border-collapse: separate;
    border-spacing: 0;
    white-space: normal;
}

.table th {
    padding: 13px 14px;
    color: #4f5f75;
    background: #f2f5f9;
    border-top: 0;
    border-bottom: 1px solid #dce3eb;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.045em;
    white-space: nowrap;
}

.table td {
    padding: 13px 14px;
    color: #405066;
    vertical-align: middle;
    border-top: 1px solid #e9eef3;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.table tbody tr:first-child td {
    border-top: 0;
}

.table tbody tr:nth-child(even) td {
    background: #fbfcfe;
}

.table tbody tr:hover td {
    background: #f3f7fc;
}

.table th:last-child,
.table td:last-child {
    width: 1%;
    white-space: nowrap;
}

.table td small {
    color: #7c899b;
}

.badge {
    padding: 5px 9px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
}

.text-bg-success {
    color: #08775f;
    background: #d9f7ef;
}

.text-bg-danger {
    color: #a52b2b;
    background: #ffe2e2;
}

.text-bg-warning {
    color: #8a5800;
    background: #fff0cf;
}

.text-bg-info {
    color: #1469ad;
    background: #deefff;
}

.text-bg-secondary {
    color: #526172;
    background: #e9edf2;
}

.text-bg-primary {
    color: #245ca8;
    background: #e4efff;
}

.btn {
    min-height: 38px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: none;
}

.btn-sm {
    min-height: 31px;
    padding: 5px 10px;
    font-size: 11px;
}

.btn.action-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    flex: 0 0 34px;
    padding: 0;
    border-radius: 8px;
    font-size: 14px;
}

.btn.action-icon:hover,
.btn.action-icon:focus {
    transform: translateY(-1px);
    box-shadow: 0 5px 12px rgba(31, 45, 61, 0.12);
}

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

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

.btn-light {
    color: #44546a;
    border-color: #dfe5ec;
    background: #ffffff;
}

.btn-danger {
    color: #b02a37;
    border-color: #ffd4d8;
    background: #fff0f1;
}

.btn-success {
    color: #08775f;
    border-color: #c6f1e6;
    background: #e2f9f3;
}

.btn-warning {
    color: #8a5800;
    border-color: #ffe2ad;
    background: #fff3dc;
}

.btn-block {
    width: 100%;
}

.actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.table .actions {
    align-items: center;
    flex-wrap: nowrap;
}

.table .actions form {
    margin: 0;
}

.fixed-button {
    display: none !important;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    display: grid;
    gap: 7px;
    margin-bottom: 0;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label,
label {
    margin-bottom: 0;
    color: #45556c;
    font-size: 12px;
    font-weight: 600;
}

.form-control,
input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    color: #334155;
    border: 1px solid #d7dee8;
    border-radius: 7px;
    background: #ffffff;
}

textarea {
    min-height: 105px;
    resize: vertical;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    color: #334155;
    border-color: var(--primary);
    outline: 0;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.form-text {
    color: #8492a6;
    font-size: 11px;
}

.form-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 46px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    color: #7b8799;
    border: 0;
    background: transparent;
    cursor: pointer;
}

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

.input-icon-wrap > i:first-child {
    position: absolute;
    top: 50%;
    left: 13px;
    z-index: 1;
    transform: translateY(-50%);
    color: #94a0b2;
}

.input-icon-wrap > .form-control {
    padding-left: 39px;
}

.alert {
    min-height: 45px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 0;
    border-radius: 8px;
}

.alert-success {
    color: #08775f;
    background: #dcf8f1;
}

.alert-danger {
    color: #a52b2b;
    background: #ffe5e5;
}

.alert-warning {
    color: #805400;
    background: #fff1d2;
}

.alert-info {
    color: #1469ad;
    background: #e1f1ff;
}

.alert-close {
    padding: 0;
    color: inherit;
    border: 0;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
}

.muted {
    color: var(--muted);
}

.filters {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.card-header > .filters {
    margin-bottom: 0;
}

.filters input,
.filters select {
    width: auto;
    min-width: 150px;
}

.empty {
    padding: 32px !important;
    color: #8492a6;
    text-align: center;
}

.pagination {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
    margin-top: 16px;
}

.pagination a {
    min-width: 34px;
    padding: 7px 10px;
    color: #53647a;
    text-align: center;
    border: 1px solid #dfe5ec;
    border-radius: 6px;
    background: #ffffff;
}

.pagination a.active {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
}

.tabs {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    margin-bottom: 18px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
}

.tabs a {
    padding: 8px 13px;
    color: #526172;
    white-space: nowrap;
    border: 1px solid #e0e6ed;
    border-radius: 7px;
    background: #ffffff;
}

.tabs a.active {
    color: #ffffff;
    border-color: var(--primary);
    background: var(--primary);
}

.progress {
    height: 7px;
    overflow: hidden;
    border-radius: 10px;
    background: #e9edf2;
}

.progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #2ed8b6);
}

.kpi-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 11px 0;
}

.announcement {
    margin-bottom: 10px;
    padding: 11px 13px;
    border-left: 4px solid var(--primary);
    border-radius: 0 8px 8px 0;
    background: #f7fbff;
}

.announcement h3 {
    margin: 0 0 4px;
    color: #334155;
    font-size: 13px;
}

.announcement p {
    margin: 0;
    color: #66758a;
}

.structure-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.structure-summary > div {
    min-height: 82px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid #e5ebf2;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow);
}

.structure-summary > div > span:last-child {
    display: grid;
}

.structure-summary strong {
    color: #263544;
    font-size: 23px;
    line-height: 1.1;
}

.structure-summary small {
    margin-top: 3px;
    color: #77869b;
}

.structure-summary-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    color: #2f6ccf;
    border-radius: 11px;
    background: #eaf2ff;
    font-size: 18px;
}

.structure-summary-icon.green {
    color: #0b8f77;
    background: #e1f7f2;
}

.structure-summary-icon.purple {
    color: #6f52c9;
    background: #eeeafd;
}

.structure-card {
    overflow: hidden;
}

.org-legend {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.org-legend span {
    padding: 6px 9px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #5c6b7f;
    border: 1px solid #e1e7ee;
    border-radius: 20px;
    background: #f8fafc;
    font-size: 11px;
}

.org-legend i {
    color: #3775dd;
}

.org-tree {
    width: 100%;
    overflow-x: auto;
    padding: 4px 4px 18px;
    scrollbar-color: #c7d2e0 transparent;
    scrollbar-width: thin;
}

.org-tree ul {
    position: relative;
    min-width: max-content;
    margin: 0;
    padding-left: 38px;
    list-style: none;
}

.org-tree li {
    position: relative;
    padding: 9px 0;
}

.org-tree li::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 50%;
    left: -22px;
    width: 18px;
    border-left: 2px solid #d6deea;
    border-bottom: 2px solid #d6deea;
    border-radius: 0 0 0 8px;
}

.org-tree > ul {
    padding-left: 0;
}

.org-tree > ul > li::before {
    display: none;
}

.org-node {
    width: 390px;
    padding: 0;
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    border: 1px solid #dce4ed;
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 5px 16px rgba(31, 45, 61, 0.07);
}

.org-node-head {
    min-height: 62px;
    padding: 11px 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e7edf3;
    background: linear-gradient(135deg, #f5f8fc, #eef4fb);
}

.org-node-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    color: #ffffff;
    border-radius: 9px;
    background: linear-gradient(135deg, #3775dd, #4680ff);
}

.org-node-title {
    min-width: 0;
    display: grid;
    flex: 1 1 auto;
}

.org-node-title b,
.org-node-title small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-node-title b {
    color: #2d3c52;
    font-size: 13px;
}

.org-node-title small {
    margin-top: 2px;
    color: #77869b;
    font-size: 10px;
}

.org-employee-count {
    padding: 4px 7px;
    color: #3066b8;
    border-radius: 12px;
    background: #dfebff;
    font-size: 10px;
    font-weight: 700;
}

.org-employees {
    padding: 5px 12px 8px;
}

.org-employee {
    min-height: 51px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-bottom: 1px solid #edf1f5;
}

.org-employee:last-child {
    border-bottom: 0;
}

.org-employee-avatar {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    flex: 0 0 30px;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, #04a9f5, #7759de);
    font-size: 11px;
    font-weight: 700;
}

.org-employee-copy {
    min-width: 0;
    display: grid;
    flex: 1 1 auto;
}

.org-employee-copy b,
.org-employee-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.org-employee-copy b {
    color: #3b4a60;
    font-size: 12px;
}

.org-employee-copy small {
    color: #8492a6;
    font-size: 10px;
}

.org-record-counts {
    display: inline-flex;
    gap: 5px;
}

.org-record-counts span {
    min-width: 37px;
    padding: 4px 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #607086;
    border-radius: 7px;
    background: #f2f5f8;
    font-size: 10px;
}

.org-record-counts i {
    color: #3775dd;
}

.org-empty {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8a97a8;
    font-size: 11px;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    place-items: center;
    overflow-y: auto;
    padding: 20px;
    background: rgba(21, 31, 46, 0.56);
}

.modal.show {
    display: grid;
}

.modal-dialog {
    width: min(650px, 100%);
    max-width: none;
    max-height: 90vh;
    margin: auto;
    overflow-y: auto;
    padding: 21px;
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.2);
    pointer-events: auto;
}

.modal-header {
    min-height: auto;
    margin: -21px -21px 18px;
    padding: 16px 21px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin: 0;
}

.modal-close {
    padding: 0;
    color: #7c899b;
    border: 0;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
}

.hse-footer {
    min-height: 54px;
    padding: 17px 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    color: #8492a6;
    font-size: 11px;
}

.footer-dot {
    color: #c2cad4;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1100;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 15px;
    display: none;
    color: #ffffff;
    border-radius: 8px;
    background: #263544;
    box-shadow: 0 12px 30px rgba(31, 45, 61, 0.2);
}

.toast.show {
    display: block;
}

.install-banner {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1090;
    max-width: min(390px, calc(100vw - 32px));
    padding: 12px 14px;
    display: none;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    border-radius: 10px;
    background: #263544;
    box-shadow: 0 14px 34px rgba(31, 45, 61, 0.24);
}

.install-banner .btn {
    color: #ffffff;
}

.hse-auth-page {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 10% 10%, color-mix(in srgb, var(--primary) 18%, transparent), transparent 35%),
        radial-gradient(circle at 90% 90%, rgba(119, 89, 222, 0.15), transparent 38%),
        #f4f7fa;
}

.hse-auth-wrapper {
    min-height: 100vh;
    padding: 28px 16px;
}

.hse-auth-content {
    width: min(430px, 100%);
}

.hse-auth-card {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-top: 4px solid var(--primary);
    box-shadow: 0 22px 60px rgba(31, 45, 61, 0.15);
}

.hse-auth-card .card-body {
    padding: 32px;
}

.auth-brand {
    width: 82px;
    height: 82px;
    margin: 0 auto 17px;
    padding: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(31, 45, 61, 0.1);
}

.auth-brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-heading small {
    display: block;
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-heading h1 {
    margin: 0;
    color: #263544;
    font-size: 24px;
    font-weight: 600;
}

.auth-heading p {
    margin: 7px 0 24px;
    color: #7a879a;
}

.hse-auth-card form {
    display: grid;
    gap: 16px;
}

.auth-submit {
    min-height: 44px;
    margin-top: 2px;
}

.auth-help {
    margin: 19px 0 0;
    color: #8492a6;
    text-align: center;
    font-size: 11px;
}

.auth-footer {
    margin: 15px 0 0;
    color: #8492a6;
    text-align: center;
    font-size: 11px;
}

.settings-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
    gap: 20px;
}

.logo-preview {
    min-height: 220px;
    display: grid;
    place-items: center;
    padding: 24px;
    border: 1px dashed #cdd6e1;
    border-radius: 10px;
    background: #f8fafc;
}

.logo-preview img {
    width: min(180px, 70%);
    max-height: 180px;
    object-fit: contain;
}

.setting-note {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    padding: 12px;
    color: #53647a;
    border-radius: 8px;
    background: #f6f9fc;
}

.setting-note i {
    margin-top: 2px;
    color: var(--primary);
}

@media (max-width: 1199px) {
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .connection-item {
        display: none;
    }
}

@media (max-width: 991px) {
    .hse-navbar .m-header {
        width: 100%;
        justify-content: space-between;
    }

    .hse-navbar .mobile-menu {
        margin-left: 0;
    }

    .hse-navbar-collapse {
        position: absolute;
        top: 70px;
        right: 12px;
        left: 12px;
        padding: 10px 14px !important;
        border-radius: 9px;
        background: #ffffff;
        box-shadow: 0 15px 35px rgba(31, 45, 61, 0.18);
    }

    .hse-navbar-collapse.open {
        display: block;
    }

    .hse-navbar-collapse .navbar-product {
        display: none;
    }

    .hse-navbar-collapse .navbar-nav {
        align-items: stretch !important;
    }

    .hse-navbar-collapse .nav-item {
        margin: 3px 0;
    }

    .hse-navbar-collapse .case-pill,
    .hse-navbar-collapse .hse-user-toggle {
        width: 100%;
        margin: 0;
        color: #3f4d67 !important;
        border-color: #e2e8f0;
        background: #f8fafc;
    }

    .hse-navbar-collapse .case-pill {
        justify-content: flex-start;
    }

    .hse-navbar-collapse .case-pill small {
        color: #718096;
    }

    .hse-navbar-collapse .case-pill > i,
    .hse-navbar-collapse .case-pill > span,
    .hse-navbar-collapse .hse-user-toggle > i,
    .hse-navbar-collapse .user-text b {
        color: #3f4d67 !important;
    }

    .hse-navbar-collapse .user-text small {
        color: #8492a6;
    }

    .hse-navbar-collapse .nav-icon-button {
        color: var(--primary);
        background: #eef6ff;
    }

    .sidebar-overlay.show {
        position: fixed;
        inset: 0;
        z-index: 1025;
        display: block;
        background: rgba(20, 30, 45, 0.45);
    }

    .pcoded-main-container {
        margin-left: 0;
    }

    .pcoded-content {
        padding: 20px 16px 0;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid,
    .structure-summary {
        grid-template-columns: 1fr;
    }

    .form-group.full {
        grid-column: auto;
    }

    .page-heading h1 {
        font-size: 21px;
    }

    .card {
        padding: 16px;
    }

    .card > .card-header {
        margin: -16px -16px 16px;
        padding: 14px 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .card > .card-header .actions,
    .card > .card-header .btn {
        width: 100%;
    }

    .card > .card-header .actions .btn {
        flex: 1 1 auto;
    }

    .filters {
        width: 100%;
        display: grid;
    }

    .filters input,
    .filters select,
    .filters .btn {
        width: 100%;
    }

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

    .table {
        min-width: 610px;
    }

    .org-node {
        width: min(340px, calc(100vw - 76px));
    }

    .org-tree ul {
        padding-left: 31px;
    }

    .org-record-counts span {
        min-width: 32px;
    }

    .stat-card {
        min-height: 104px;
        padding: 18px;
    }

    .stat-card strong {
        font-size: 27px;
    }

    .hse-footer {
        flex-wrap: wrap;
    }
}

@media (max-width: 430px) {
    .pcoded-content {
        padding-right: 12px;
        padding-left: 12px;
    }

    .grid {
        gap: 13px;
    }

    .actions .btn {
        flex: 1 1 auto;
    }

    .actions .btn.action-icon,
    .table .btn.action-icon {
        width: 34px !important;
        min-width: 34px;
        flex: 0 0 34px !important;
    }

    .case-pill span,
    .case-pill small {
        display: none;
    }

    .hse-auth-card .card-body {
        padding: 25px 20px;
    }

    .auth-brand {
        width: 72px;
        height: 72px;
    }
}

@supports (padding: max(0px)) {
    .hse-navbar {
        padding-right: max(0px, env(safe-area-inset-right));
        padding-left: max(0px, env(safe-area-inset-left));
    }

    .pcoded-content {
        padding-right: max(24px, env(safe-area-inset-right));
        padding-left: max(24px, env(safe-area-inset-left));
    }

    .hse-footer {
        padding-bottom: max(17px, env(safe-area-inset-bottom));
    }

    .hse-auth-wrapper {
        padding-top: max(28px, env(safe-area-inset-top));
        padding-right: max(16px, env(safe-area-inset-right));
        padding-bottom: max(28px, env(safe-area-inset-bottom));
        padding-left: max(16px, env(safe-area-inset-left));
    }
}

@media (display-mode: standalone) {
    .hse-navbar {
        padding-top: env(safe-area-inset-top);
    }

    .install-app-button {
        display: none !important;
    }
}

@media print {
    .pcoded-navbar,
    .pcoded-header,
    .page-heading .btn,
    .filters,
    .hse-footer,
    .actions,
    .tabs,
    .install-banner {
        display: none !important;
    }

    .pcoded-main-container {
        margin: 0;
        padding: 0;
    }

    .pcoded-content {
        padding: 0;
    }

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

    .table {
        white-space: normal;
    }
}


/* =====================================================
   HSE PWA MOBILE FINAL FIX V2
   ===================================================== */

/* desktop tetap normal */
@media(max-width:991px){

    html,body{
        overflow-x:hidden;
        width:100%;
    }

    /* hide desktop navbar items on mobile */
    .hse-navbar .navbar-nav.mr-auto,
    .hse-navbar .connection-status,
    .hse-navbar .case-pill{
        display:none !important;
    }

    .hse-navbar{
        height:70px !important;
        min-height:70px !important;
        position:fixed !important;
        top:0;
        left:0;
        right:0;
        z-index:1050;
    }

    .hse-navbar .m-header{
        height:70px !important;
        display:flex;
        align-items:center;
        padding:0 18px;
    }

    .hse-mobile-brand{
        display:flex !important;
        align-items:center;
        gap:10px;
    }

    .hse-mobile-brand img{
        width:42px;
        height:42px;
    }

    /* user button mobile */
    .hse-user-toggle{
        background:transparent !important;
        padding:0 !important;
        min-width:auto !important;
    }

    .hse-user-toggle .user-text{
        display:none !important;
    }

    /* sidebar */
    .pcoded-navbar.hse-sidebar{
        top:70px !important;
        height:calc(100vh - 70px) !important;
        max-width:320px;
        width:320px;
        z-index:1045;
    }

    .pcoded-navbar .navbar-wrapper{
        height:100%;
    }

    .pcoded-navbar .navbar-content{
        padding-top:10px;
    }

    /* hide duplicate sidebar branding */
    .hse-sidebar-brand{
        display:none !important;
    }

    .hse-user-card{
        margin:15px !important;
        border-radius:18px !important;
    }

    .pcoded-inner-navbar li > a{
        min-height:50px !important;
        margin:5px 14px !important;
        border-radius:14px !important;
    }

    /* content */
    .pcoded-main-container{
        margin-left:0 !important;
        padding-top:70px !important;
    }

    .pcoded-content{
        padding:18px !important;
    }

    /* overlay */
    .sidebar-overlay{
        top:70px !important;
    }
}


@media(max-width:600px){

    .page-header h1,
    .dashboard-title{
        font-size:22px !important;
    }

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

    .row{
        margin-left:0 !important;
        margin-right:0 !important;
    }

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

}


/* tablet ipad */
@media(min-width:768px) and (max-width:1200px){

    .pcoded-content{
        padding:22px !important;
    }

    .card{
        border-radius:18px;
    }

}


/* =====================================================
   HSE RESPONSIVE UI FINAL
   Navbar, sidebar, dashboard shortcut, desktop & mobile
   ===================================================== */

html {
    scroll-behavior: smooth;
}

body.hse-app {
    overflow-x: hidden;
}

.hse-navbar {
    height: 70px;
    min-height: 70px;
    box-shadow: 0 5px 22px rgba(15, 23, 42, 0.16) !important;
}

.hse-navbar .hse-navbar-collapse {
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    min-width: 0;
    padding-right: 24px;
}

.hse-navbar .navbar-nav.ml-auto {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-left: auto !important;
    flex-wrap: nowrap;
}

.hse-navbar .navbar-nav.ml-auto .nav-item {
    display: flex;
    align-items: center;
}

.hse-navbar .connection-status,
.hse-navbar .case-pill {
    height: 38px;
    margin: 0;
    padding: 0 13px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #ffffff !important;
    font-size: 12px;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.hse-navbar .case-pill:hover {
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.hse-navbar .case-pill b {
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #7a4600;
    font-size: 11px;
    line-height: 1;
    border-radius: 999px;
    background: #facc15;
}

.hse-navbar .case-pill b.blue {
    color: #ffffff;
    background: #06b6d4;
}

.hse-navbar .case-pill small {
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 10px;
}

.hse-user-toggle {
    min-width: 180px;
    height: 46px;
    padding: 4px 9px 4px 14px;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hse-user-toggle:hover {
    border-color: rgba(255, 255, 255, 0.23);
    background: rgba(255, 255, 255, 0.16);
}

.hse-user-toggle .user-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    text-align: right;
}

.hse-user-toggle .user-text b {
    max-width: 110px;
    overflow: hidden;
    color: #ffffff !important;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hse-user-toggle .user-text small {
    max-width: 110px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.avatar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hse-navbar .avatar {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
}

.profile-notification {
    right: 0 !important;
    margin-top: 10px !important;
    overflow: hidden;
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2) !important;
}

.hse-mobile-actions,
.hse-bottom-nav {
    display: none;
}

body.hse-app .pcoded-navbar.hse-sidebar:not(.navbar-collapsed) .pcoded-inner-navbar li.nav-item > a {
    min-height: 46px;
    margin: 3px 14px !important;
    padding: 11px 15px;
    border-radius: 12px !important;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

body.hse-app .pcoded-navbar.hse-sidebar:not(.navbar-collapsed) .pcoded-inner-navbar li.nav-item > a:hover {
    transform: translateX(3px);
}

body.hse-app .pcoded-navbar.hse-sidebar:not(.navbar-collapsed) .pcoded-inner-navbar li.nav-item.active > a {
    color: #ffffff !important;
    background: linear-gradient(135deg, #3775dd, #4680ff) !important;
    box-shadow: 0 8px 18px rgba(70, 128, 255, 0.25) !important;
}

.pcoded-content {
    width: 100%;
    max-width: 1600px;
    margin-right: auto;
    margin-left: auto;
}

.card,
.stat-card {
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(31, 45, 61, 0.065);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.stat-card:hover,
.quick-shortcut:hover {
    transform: translateY(-3px);
}

.stat-card:hover {
    box-shadow: 0 12px 28px rgba(31, 45, 61, 0.11);
}

.quick-actions-card {
    margin-bottom: 20px;
}

.quick-actions-card > .card-header > div {
    display: grid;
    gap: 4px;
}

.quick-actions-card > .card-header small {
    font-size: 11px;
}

.quick-shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.quick-shortcut {
    min-width: 0;
    min-height: 78px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #344258 !important;
    border: 1px solid #e8edf4;
    border-radius: 13px;
    background: #fbfcfe;
    box-shadow: 0 3px 10px rgba(31, 45, 61, 0.035);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-shortcut:hover {
    color: #263544 !important;
    border-color: #d8e3f0;
    box-shadow: 0 10px 22px rgba(31, 45, 61, 0.09);
}

.quick-shortcut > span:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.quick-shortcut b,
.quick-shortcut small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.quick-shortcut b {
    color: #344258;
    font-size: 13px;
}

.quick-shortcut small {
    color: #8492a6;
    font-size: 10px;
}

.quick-shortcut-icon {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    color: #3775dd;
    font-size: 19px;
    border-radius: 12px;
    background: #e9f2ff;
}

.quick-shortcut.teal .quick-shortcut-icon {
    color: #0f9b83;
    background: #e1f8f3;
}

.quick-shortcut.purple .quick-shortcut-icon {
    color: #7759de;
    background: #eeeafd;
}

.quick-shortcut.indigo .quick-shortcut-icon {
    color: #5367d5;
    background: #e9edff;
}

.quick-shortcut.orange .quick-shortcut-icon {
    color: #d98516;
    background: #fff2df;
}

.quick-shortcut.slate .quick-shortcut-icon {
    color: #53647a;
    background: #edf1f5;
}

.dashboard-stats {
    margin-bottom: 20px;
}

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

.hse-footer {
    min-height: 68px;
    margin-top: 10px;
    padding: 18px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: #8492a6;
    font-size: 12px;
    border-top: 1px solid rgba(31, 45, 61, 0.07);
}

.hse-footer .footer-left strong {
    color: #344258;
}

.hse-footer .footer-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.hse-footer .footer-badge {
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    background: rgba(4, 169, 245, 0.1);
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(4, 169, 245, 0.28);
    outline-offset: 2px;
}

@media (min-width: 992px) {
    .pcoded-main-container {
        width: calc(100% - 264px) !important;
        max-width: none !important;
        margin-left: 264px !important;
        padding-top: 0 !important;
    }

    .pcoded-content {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding-top: 16px !important;
        padding-right: 22px !important;
        padding-left: 22px !important;
    }

    .pcoded-main-container > .pcoded-content > .hse-page-header {
        margin-top: 0 !important;
        margin-bottom: 18px !important;
    }

    .hse-sidebar.navbar-collapsed ~ .pcoded-main-container {
        width: calc(100% - 76px) !important;
        margin-left: 76px !important;
    }

    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed,
    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed:hover {
        width: 76px !important;
    }

    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .navbar-content,
    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed:hover .navbar-content {
        width: 76px !important;
        padding-top: 12px !important;
        overflow-x: hidden !important;
    }

    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .hse-user-card,
    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .pcoded-menu-caption,
    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .pcoded-mtext,
    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .sidebar-version {
        display: none !important;
    }

    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .pcoded-inner-navbar li.nav-item > a,
    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed:hover .pcoded-inner-navbar li.nav-item > a {
        width: 46px !important;
        height: 46px !important;
        min-height: 46px !important;
        margin: 7px auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 13px !important;
    }

    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .pcoded-micon {
        margin: 0 !important;
    }

    body.hse-app .pcoded-navbar.hse-sidebar.navbar-collapsed .pcoded-micon i {
        margin: 0 !important;
        font-size: 20px !important;
    }
}

@media (max-width: 1199px) and (min-width: 992px) {
    .hse-user-toggle {
        min-width: auto;
        padding-left: 8px;
    }

    .hse-user-toggle .user-text,
    .hse-navbar .connection-status span {
        display: none;
    }
}

@media (max-width: 991px) {
    .hse-navbar {
        position: fixed !important;
        top: 0;
        right: 0;
        left: 0;
        z-index: 1050;
        padding: 0 !important;
    }

    .hse-navbar .m-header {
        width: 100% !important;
        height: 70px !important;
        padding: 0 max(14px, env(safe-area-inset-right)) 0 max(14px, env(safe-area-inset-left)) !important;
        display: grid !important;
        grid-template-columns: 40px minmax(0, 1fr) auto;
        align-items: center !important;
        gap: 10px;
        background: transparent !important;
    }

    .hse-navbar .mobile-menu {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        width: 40px !important;
        height: 40px !important;
        margin: 0 !important;
        padding: 0 8px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.08);
    }

    .hse-navbar .hse-mobile-brand,
    .hse-sidebar.navbar-collapsed ~ .hse-navbar .hse-mobile-brand {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        left: auto !important;
        min-width: 0;
        margin: 0 !important;
        display: flex !important;
        align-items: center;
        gap: 9px;
    }

    .hse-mobile-brand img {
        width: 40px !important;
        height: 40px !important;
        flex: 0 0 40px;
        padding: 3px;
        border-radius: 11px;
    }

    .hse-mobile-brand span {
        overflow: hidden;
        color: #ffffff;
        font-size: 16px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hse-mobile-actions {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .mobile-header-action {
        position: relative;
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        color: #ffffff !important;
        font-size: 18px;
        border-radius: 11px;
        background: rgba(255, 255, 255, 0.1);
    }

    .mobile-header-action span {
        position: absolute;
        top: -3px;
        right: -3px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        display: grid;
        place-items: center;
        color: #ffffff;
        font-size: 9px;
        font-weight: 700;
        line-height: 1;
        border: 2px solid #203653;
        border-radius: 999px;
        background: #ff5252;
    }

    /* Desktop controls must never create the white floating panel on mobile. */
    .hse-navbar .hse-navbar-collapse,
    .hse-navbar .hse-navbar-collapse.open,
    .hse-navbar .navbar-collapse.collapse,
    .hse-navbar .navbar-collapse.show {
        width: 0 !important;
        height: 0 !important;
        min-height: 0 !important;
        padding: 0 !important;
        display: none !important;
        overflow: hidden !important;
        box-shadow: none !important;
    }

    .pcoded-navbar.hse-sidebar {
        top: 0 !important;
        width: 320px !important;
        max-width: 86vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        margin-left: -320px !important;
        padding: 70px 0 0 !important;
        overflow: hidden;
        z-index: 1045;
        border-radius: 0 !important;
        box-shadow: 10px 0 35px rgba(15, 23, 42, 0.16);
        transition: margin-left 0.25s ease !important;
    }

    .pcoded-navbar.hse-sidebar.mob-open {
        margin-left: 0 !important;
    }

    .pcoded-navbar.hse-sidebar .navbar-wrapper,
    .pcoded-navbar.hse-sidebar .navbar-content {
        width: 100% !important;
        height: 100%;
        margin: 0 !important;
    }

    .pcoded-navbar.hse-sidebar .navbar-wrapper {
        padding: 0 !important;
    }

    .pcoded-navbar.hse-sidebar .navbar-content {
        padding-top: 10px !important;
        padding-bottom: calc(28px + env(safe-area-inset-bottom)) !important;
        overscroll-behavior: contain;
    }

    .hse-sidebar .hse-user-card {
        margin: 12px 14px 8px !important;
        padding: 11px 12px;
        border-radius: 14px !important;
    }

    body.hse-app .pcoded-navbar.hse-sidebar:not(.navbar-collapsed) .pcoded-inner-navbar li.nav-item > a,
    body.hse-app .pcoded-navbar.hse-sidebar .pcoded-inner-navbar li.nav-item > a {
        min-height: 48px !important;
        margin: 3px 12px !important;
        padding: 11px 14px !important;
        border-radius: 12px !important;
    }

    .hse-sidebar .pcoded-inner-navbar li.active > a {
        color: #ffffff !important;
        background: linear-gradient(135deg, #3775dd, #4680ff) !important;
    }

    .sidebar-version {
        display: none !important;
    }

    .sidebar-overlay.show {
        position: fixed;
        top: 70px !important;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1040;
        display: block;
        background: rgba(15, 23, 42, 0.48);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    .pcoded-main-container {
        min-height: 100vh;
        margin-left: 0 !important;
        padding-top: 70px !important;
        padding-bottom: calc(82px + env(safe-area-inset-bottom)) !important;
    }

    .pcoded-content {
        padding: 20px 16px 0 !important;
    }

    .hse-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1035;
        height: calc(68px + env(safe-area-inset-bottom));
        padding: 7px max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
        display: flex;
        align-items: center;
        justify-content: space-around;
        border-top: 1px solid #e8edf4;
        border-radius: 18px 18px 0 0;
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.1);
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
    }

    .hse-bottom-nav .nav-item {
        min-width: 0;
        height: 54px;
        padding: 4px 2px;
        display: flex;
        flex: 1 1 20%;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        color: #94a3b8 !important;
        font-size: 10px;
        font-weight: 600;
        line-height: 1;
        border-radius: 12px;
        transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    }

    .hse-bottom-nav .nav-item i {
        font-size: 20px;
    }

    .hse-bottom-nav .nav-item.active:not(.center-btn) {
        color: var(--primary) !important;
        background: rgba(4, 169, 245, 0.08);
    }

    .hse-bottom-nav .center-btn {
        position: relative;
        top: -13px;
    }

    .hse-bottom-nav .center-btn-inner {
        width: 52px;
        height: 52px;
        display: grid;
        place-items: center;
        color: #ffffff;
        border: 5px solid #f4f7fa;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
        box-shadow: 0 9px 20px rgba(4, 169, 245, 0.34);
    }

    .hse-bottom-nav .center-btn-inner i {
        color: #ffffff;
        font-size: 23px;
    }

    .hse-bottom-nav .center-btn > span {
        margin-top: 1px;
        color: #8492a6;
    }

    .hse-sidebar.mob-open ~ .hse-bottom-nav {
        z-index: 1030;
    }

    .quick-shortcuts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .pcoded-content {
        padding: 16px 12px 0 !important;
    }

    .hse-page-header {
        margin-bottom: 14px;
    }

    .page-heading h1 {
        font-size: 21px;
    }

    .page-heading p {
        margin-top: 4px;
        font-size: 12px;
    }

    .card {
        padding: 15px;
        border-radius: 14px !important;
    }

    .card > .card-header {
        margin: -15px -15px 15px;
        padding: 14px 15px;
    }

    .quick-shortcuts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .quick-shortcut {
        min-height: 104px;
        padding: 12px 8px;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        text-align: center;
    }

    .quick-shortcut-icon {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .quick-shortcut b,
    .quick-shortcut small {
        white-space: normal;
    }

    .quick-shortcut b {
        font-size: 12px;
        line-height: 1.25;
    }

    .quick-shortcut small {
        display: none;
    }

    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 11px;
    }

    .dashboard-stats .stat-card {
        min-height: 108px;
        padding: 15px;
        align-items: flex-start;
    }

    .dashboard-stats .stat-card small {
        display: block;
        max-width: 90px;
        font-size: 10px;
        line-height: 1.3;
    }

    .dashboard-stats .stat-card strong {
        margin-top: 9px;
        font-size: 25px;
    }

    .dashboard-stats .stat-icon {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        font-size: 18px;
        border-radius: 11px;
    }

    .grid-2 {
        gap: 0;
    }

    .table {
        min-width: 620px;
    }

    .hse-footer {
        padding: 17px 4px;
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hse-footer .footer-right {
        justify-content: center;
    }
}

@media (max-width: 380px) {
    .hse-navbar .m-header {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        gap: 7px;
    }

    .hse-mobile-brand img {
        width: 36px !important;
        height: 36px !important;
        flex-basis: 36px;
    }

    .hse-mobile-brand span {
        font-size: 14px;
    }

    .mobile-header-action {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }

    .dashboard-stats .stat-card {
        padding: 13px;
    }

    .dashboard-stats .stat-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
