/* ESG-EHSQ · Water Management — Pixel-matched to reference design */
:root {
    --sidebar-bg: #F8FAFC;
    --sidebar-hover: #EAF2FF;
    --sidebar-active: #0D6EFD;
    --primary: #1A73E8;
    --primary-2: #0D6EFD;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --info: #17A2B8;
    --teal: #20C997;
    --purple: #6F42C1;
    --orange: #FD7E14;
    --bg: #F4F6FB;
    --card: #FFFFFF;
    --border: #E5E7EB;
    --border-2: #EEF1F6;
    --text: #1F2937;
    --text-2: #374151;
    --muted: #6B7280;
    --muted-2: #9CA3AF;
    --shadow: 0 1px 3px rgba(15, 23, 42, .06);
    --shadow-lg: 0 8px 24px -12px rgba(15, 23, 42, .15);
    --radius-card: 10px;
    --radius-input: 6px;
    --radius-btn: 6px;
    --radius-pill: 20px;

    --sidebar-w: 260px;
    --header-h: 64px;
}

* {
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent
}

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

*::-webkit-scrollbar-track {
    background: transparent
}

*::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 0 !important
}

*::-webkit-scrollbar-thumb:hover {
    background: #94a3b8
}

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

html {
    font-size: var(--app-root-font-size, 16px);
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: var(--app-font-size, 14px);
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border: 0;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

button.status-badge {
    cursor: pointer;
}

button.status-badge:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.status-badge.is-active {
    background: #DCFCE7;
    color: #15803D;
}

.status-badge.is-inactive {
    background: #FEE2E2;
    color: #B91C1C;
}

button.status-badge:disabled {
    cursor: wait;
    opacity: .7;
}

.password-toggle-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle-wrapper > input {
    padding-right: 42px;
}

.password-toggle-button {
    position: absolute;
    top: 50%;
    right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.password-toggle-button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

body.sidebar-drawer-open {
    overflow: hidden
}

a {
    text-decoration: none;
    color: inherit
}

.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip
}

.app-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left .25s ease
}

.app-content {
    padding: 24px;
    flex: 1
}

/* ===== Sidebar ===== */
.app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    color: #1f2937;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: visible;
    border-right: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .06);
    transition: width .25s ease, transform .25s ease;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    background: var(--sidebar-bg);
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1A73E8, #22D3EE);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15
}

.brand-title {
    color: #0f172a;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .3px
}

.brand-sub {
    color: #64748b;
    font-size: 10.5px;
    margin-top: 2px;
    font-weight: 500
}

.sidebar-nav {
    padding: 10px 10px;
    flex: 1;
    min-width: 0;
    overflow-x: clip;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #d5d9e2;
    border-radius: 6px
}

.sidebar-section {
    padding: 14px 14px 6px;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;
    height: 44px;
    padding: 0 14px;
    color: #334155;
    font-weight: 500;
    font-size: 13.5px;
    border-radius: 8px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.nav-item i.fa-solid,
.nav-item i.fa-regular {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: #64748b
}

.nav-item .nav-chev {
    margin-left: auto;
    font-size: 10px;
    color: #64748b;
    transition: transform .2s ease
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #0f172a
}

.nav-item:hover i {
    color: #0f172a
}

.nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px -6px rgba(13, 110, 253, .5);
}

.nav-item.active i {
    color: #fff
}

.nav-group.open .nav-chev {
    transform: rotate(180deg)
}

.nav-sub {
    padding: 4px 0 4px 36px;
    display: none
}

.nav-group.open .nav-sub {
    display: block
}

.nav-sub a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    height: auto;
    padding: 8px 12px 8px 18px;
    font-size: 12.5px;
    line-height: 1.25;
    color: #475569;
    border-radius: 6px;
    margin-bottom: 2px;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.nav-sub a:before {
    content: "";
    position: absolute;
    left: 7px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #94a3b8;
    transform: translateY(-50%);
}

.nav-sub a:hover,
.nav-sub a:focus-visible {
    background: var(--sidebar-hover);
    color: #0f172a;
    outline: none
}

.nav-sub a.active {
    color: #0f172a;
    font-weight: 600;
    background: rgba(13, 110, 253, .12);
    box-shadow: inset 3px 0 0 var(--primary-2), 0 2px 8px rgba(13, 110, 253, .12);
}

.nav-sub a.active:before {
    left: 6px;
    width: 4px;
    height: 18px;
    border-radius: 3px;
    background: #5da0ff
}

.sidebar-foot {
    padding: 14px 16px;
    border-top: 1px solid rgba(15, 23, 42, .06);
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--sidebar-bg);
    color: #1f2937;
}

.sidebar-foot .avatar {
    width: 36px;
    height: 36px;
    font-size: 12px
}

.sidebar-foot .u-name {
    color: #0f172a;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1
}

.sidebar-foot .u-role {
    color: #64748b;
    font-size: 11px;
    line-height: 1.1;
    margin-top: 2px
}

.sidebar-foot .u-caret {
    color: #64748b;
    font-size: 11px;
    margin-left: auto
}

.sidebar-backdrop {
    display: none
}

/* ===== Header ===== */
.app-header {
    height: var(--header-h);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    position: sticky;
    top: 0;
    z-index: 900;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px
}

.hamburger {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text);
    letter-spacing: -.1px
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px
}

.header-font-picker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
}

.header-font-picker select {
    max-width: 128px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-2);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.header-font-picker--size select {
    max-width: 78px;
}

.theme-toggle {
    width: 36px;
    padding: 0;
    justify-content: center;
}

.h-date {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-2);
    background: #fff;
    font-size: 12.5px;
}

.h-date i {
    color: var(--muted)
}

.h-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
}

.h-btn:hover {
    background: #F9FAFB
}

.h-btn.primary {
    background: var(--primary-2);
    border-color: var(--primary-2);
    color: #fff
}

.h-btn.primary:hover {
    background: #0a58ca
}

.h-bell {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #F3F4F6;
    border: none;
    color: var(--text-2);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.h-bell .badge-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: #fff;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    padding: 0 4px;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--border);
    border-radius: 24px;
    background: #fff;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1A73E8, #22D3EE);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
}

.u-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    color: var(--text)
}

.u-role {
    display: block;
    font-size: 11px;
    color: var(--muted);
    line-height: 1;
    margin-top: 2px
}

/* ===== Breadcrumb ===== */
.bc {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 8px
}

.bc a {
    color: var(--primary-2)
}

.bc a:hover {
    text-decoration: underline
}

.bc .sep {
    color: #cbd5e1;
    font-size: 10px
}

.bc .active {
    color: var(--text);
    font-weight: 500
}

/* ===== Cards ===== */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
}

.card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-2);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--text)
}

.card-sub {
    font-size: 12px;
    color: var(--muted);
    margin: 2px 0 0
}

.card-body {
    padding: 20px
}

/* ===== KPI cards ===== */
.kpi-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 18px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-height: 108px;
}

.kpi-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.kpi-icon.b {
    background: rgba(26, 115, 232, .10);
    color: var(--primary)
}

.kpi-icon.g {
    background: rgba(40, 167, 69, .12);
    color: var(--success)
}

.kpi-icon.p {
    background: rgba(111, 66, 193, .12);
    color: var(--purple)
}

.kpi-icon.o {
    background: rgba(253, 126, 20, .12);
    color: var(--orange)
}

.kpi-icon.r {
    background: rgba(220, 53, 69, .12);
    color: var(--danger)
}

.kpi-body {
    flex: 1;
    min-width: 0
}

.kpi-label {
    font-size: 12.5px;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 6px
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -.3px
}

.kpi-value small {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
    margin-left: 3px
}

.kpi-foot {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.kpi-foot .delta {
    font-weight: 600
}

.kpi-foot .delta.up {
    color: var(--success)
}

.kpi-foot .delta.down {
    color: var(--success)
}

/* per ref: â†“ improvements shown in green */
.kpi-foot .delta.warn {
    color: var(--danger)
}

.kpi-foot .sep {
    color: #d1d5db
}

/* ===== Buttons ===== */
.btn {
    border-radius: var(--radius-btn);
    font-weight: 500;
    font-size: 13px;
    padding: 0 14px;
    height: 38px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    background: #fff;
    color: var(--text-2)
}

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

.btn-primary:hover {
    background: #0a58ca;
    border-color: #0a58ca;
    color: #fff
}

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

.btn-outline:hover {
    background: rgba(13, 110, 253, .06)
}

.btn-light {
    background: #fff;
    border-color: var(--border);
    color: var(--text-2)
}

.btn-light:hover {
    background: #F9FAFB
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12px
}

.btn-icon-sm {
    background: transparent;
    border: none;
    color: var(--muted);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

.btn-icon-sm:hover {
    background: #F3F4F6;
    color: var(--text)
}

/* ===== Forms ===== */
.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 6px;
    display: block
}

.form-label .req {
    color: var(--danger);
    margin-left: 2px
}

.form-control,
.form-select {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #D5DAE3;
    border-radius: var(--radius-input);
    font-size: 13px;
    color: var(--text);
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-select {
    appearance: none;
    background: url("data:image/svg+xml;utf8,<svg fill='%236B7280' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.5 7.5L10 12l4.5-4.5'/></svg>") no-repeat right 12px center;
    background-size: 12px;
    padding-right: 32px
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-2);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .10);
    outline: none
}

.form-control[readonly] {
    background: #F3F4F6;
    color: var(--muted)
}

textarea.form-control {
    height: auto;
    min-height: 90px;
    padding: 10px 12px;
    resize: vertical
}

.input-with-icon {
    position: relative
}

.input-with-icon .ico {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
    font-size: 13px
}

.char-count {
    text-align: right;
    font-size: 11px;
    color: var(--muted-2);
    margin-top: 4px
}

.form-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px
}

.form-switch input {
    appearance: none;
    width: 42px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: background .2s ease
}

.form-switch input:checked {
    background: var(--success)
}

.form-switch input::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 2px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: transform .2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2)
}

.form-switch input:checked::before {
    transform: translateX(20px)
}

.form-switch label {
    font-size: 13px;
    color: var(--text-2);
    font-weight: 500
}

/* ===== Pills ===== */
.pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 3.5px 10px;
    border-radius: 50px;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: .2px;
    white-space: nowrap;
    border: 1px solid transparent;
}

.pill.sev-high {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.pill.sev-medium {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.pill.sev-low {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

.pill.st-open {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.pill.st-review {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.pill.st-closed {
    background: #f1f5f9;
    color: #475569;
    border-color: #cbd5e1;
}

.pill.st-active {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.pill.st-inactive {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

.pill.st-approved {
    background: #ecfdf5;
    color: #065f46;
    border-color: #a7f3d0;
}

.pill.st-pending {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

.pill.st-active::before,
.pill.st-approved::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    flex-shrink: 0;
}

.pill.st-inactive::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    display: inline-block;
    flex-shrink: 0;
}

.pill.st-pending::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    display: inline-block;
    flex-shrink: 0;
}

.pill.st-review::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    display: inline-block;
    flex-shrink: 0;
}

.pill.st-closed::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #64748b;
    display: inline-block;
    flex-shrink: 0;
}

.pill.dot {
    padding-left: 8px
}

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

/* ===== Tables ===== */
.table-wrap {
    padding: 0 20px 16px;
    max-width: 100%;
    overflow: visible;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch
}

table.esg-table {
    width: 100% !important;
    border-collapse: separate;
    border-spacing: 0
}

#datatble-wrapper {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow: visible;
}

.dt-loader-overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.08);
    z-index: 30;
    pointer-events: all;
}

.dt-loader-overlay .dt-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #fff;
    color: #1d315e;
    border-radius: 999px;
    border: 1px solid #dce4f2;
    box-shadow: 0 8px 18px rgba(30, 41, 59, 0.12);
    font-weight: 700;
}

.dt-loader-overlay .dt-loader i {
    font-size: 16px;
    color: #0969f6;
}

#datatble-wrapper.dt-loading .dt-loader-overlay {
    display: flex;
}

.common-table-pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.common-table-pages .page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 11px;
    border-radius: 8px;
    border: 1px solid #dce4f2;
    background: #fff;
    color: #1d315e;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 180ms ease;
}

.common-table-pages .page-btn i {
    font-size: 12px;
}

.common-table-pages .page-btn:not(:disabled):hover {
    background: #edf4ff;
    border-color: #0969f6;
    color: #0969f6;
}

.common-table-pages .page-btn:disabled {
    cursor: not-allowed;
    opacity: .72;
}

.common-table-pages .page-btn.current-page-button,
.common-table-pages .page-btn.master-page-active {
    background: #0969f6;
    border-color: #0969f6;
    color: #fff;
}

.common-table-pages .page-btn.current-page-button:focus,
.common-table-pages .page-btn.master-page-active:focus {
    box-shadow: 0 0 0 3px rgba(9, 105, 246, 0.18);
}

.common-table-pages .page-btn[aria-label^="Go to page"] {
    background: #fff;
    border-color: #dce4f2;
    color: #1d315e;
}

.common-table-pages .page-btn[aria-label^="Go to page"] i {
    color: #1d315e;
}

.common-table-pages .page-btn[aria-label^="Go to page"]:hover {
    background: #edf4ff;
    border-color: #0969f6;
    color: #0969f6;
}

.dataTables_wrapper,
.master-table-wrap,
.table-responsive {
    width: 100%;
    max-width: 100%;
    position: relative;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.master-table-wrap > .dataTables_wrapper,
.table-responsive > .dataTables_wrapper {
    overflow-x: visible !important;
    overflow-y: visible !important;
}

.dataTables_wrapper::-webkit-scrollbar,
.master-table-wrap::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    height: 7px;
}

.dataTables_wrapper::-webkit-scrollbar-track,
.master-table-wrap::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.dataTables_wrapper::-webkit-scrollbar-thumb,
.master-table-wrap::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dataTables_wrapper::-webkit-scrollbar-thumb:hover,
.master-table-wrap::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

@media (min-width: 768px) {
    .dataTables_wrapper .dataTable {
        width: 100% !important;
        min-width: max-content !important;
        border-collapse: separate !important;
        border-spacing: 0;
        table-layout: auto !important;
    }
}

.dataTables_wrapper .dataTable th,
.dataTables_wrapper .dataTable td {
    box-sizing: border-box !important;
}

table.esg-table thead th,
.dataTables_wrapper .dataTable thead th {
    background: #f8fafc !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: none !important;
    letter-spacing: .25px;
    color: #1e293b !important;
    padding: 12px 16px !important;
    border-top: 1px solid #edf1f7 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    text-align: left;
    vertical-align: middle !important;
    white-space: nowrap !important;
}

table.dataTable thead th.sorting,
table.dataTable thead th.sorting_asc,
table.dataTable thead th.sorting_desc,
.master-data-table thead th.sorting,
.master-data-table thead th.sorting_asc,
.master-data-table thead th.sorting_desc {
    padding-right: 32px !important;
    cursor: pointer !important;
}

table.dataTable thead th.no-sort,
table.dataTable thead th.sorting_disabled,
.master-data-table thead th.no-sort,
.master-data-table thead th.sorting_disabled {
    padding-right: 16px !important;
    cursor: default !important;
}

table.dataTable thead th.sorting:hover,
.master-data-table thead th.sorting:hover {
    background-color: #f8fafc !important;
    color: #1e293b !important;
}

table.dataTable thead>tr>th.sorting:before,
table.dataTable thead>tr>th.sorting:after,
table.dataTable thead>tr>th.sorting_asc:before,
table.dataTable thead>tr>th.sorting_asc:after,
table.dataTable thead>tr>th.sorting_desc:before,
table.dataTable thead>tr>th.sorting_desc:after {
    right: 12px !important;
    font-size: 11px !important;
    opacity: 0.25 !important;
}

table.dataTable thead>tr>th.sorting_asc:before,
table.dataTable thead>tr>th.sorting_desc:after {
    opacity: 1 !important;
    color: #0866f5 !important;
}

table.esg-table tbody td,
.dataTables_wrapper .dataTable tbody td {
    padding: 12px 16px !important;
    font-size: 12.5px !important;
    color: #1e293b !important;
    border-bottom: 1px solid #edf1f7 !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: break-word;
    max-width: 300px;
}

table.esg-table tbody tr:hover,
.dataTables_wrapper .dataTable tbody tr:hover {
    background: #f8fafc !important;
}

table.esg-table tbody tr:last-child td,
.dataTables_wrapper .dataTable tbody tr:last-child td {
    border-bottom: none;
}

/* DataTables tweaks */
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_length {
    margin-bottom: 10px
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #D5DAE3;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
}

.dataTables_wrapper .dataTables_info {
    font-size: 12px;
    color: var(--muted);
    padding-top: 14px
}

.dataTables_wrapper .dataTables_paginate {
    padding-top: 12px
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    font-size: 12px;
    padding: 6px 11px !important;
    margin: 0 2px;
    border: 1px solid var(--border) !important;
    color: var(--text-2) !important;
    background: #fff !important;
}

.dt-mobile-toggle {
    appearance: none;
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(34, 197, 94, .24);
    border-radius: 50%;
    background: rgba(34, 197, 94, .12);
    color: #22c55e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    margin-left: 8px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}

.dt-mobile-toggle i {
    font-size: 11px;
    line-height: 1;
}

.dataTables_wrapper .dataTable tbody tr.mobile-expanded .dt-mobile-toggle {
    background: rgba(220, 53, 69, .10);
    border-color: rgba(220, 53, 69, .24);
    color: var(--danger);
}

@media (max-width:767.98px) {
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        width: 100%;
        float: none;
        text-align: left;
        margin: 0 0 10px;
    }

    .dataTables_wrapper .dataTables_filter input,
    .dataTables_wrapper .dataTables_length select {
        width: 100%;
        min-width: 0;
    }
}

/* ===== Master data pages ===== */
.master-page {
    max-width: 100%;
    color: #172554
}

.master-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 22px
}

.master-title-wrap {
    display: flex;
    align-items: center;
    gap: 16px
}

.master-title-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #eaf2ff;
    color: #0866f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px
}

.master-head h1 {
    font-size: 25px;
    line-height: 1.15;
    margin: 0;
    font-weight: 700;
    letter-spacing: -.5px;
    color: #142452
}

.master-head p {
    margin: 5px 0 0;
    color: #566b96;
    font-size: 12.5px
}

.master-actions {
    display: flex;
    gap: 12px
}

.master-btn {
    height: 39px;
    border: 1px solid #dce4f2;
    border-radius: 7px;
    background: #fff;
    color: #1d315e;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap
}

.master-btn-primary {
    background: #0969f6;
    color: #fff;
    border-color: #0969f6;
    box-shadow: 0 4px 10px rgba(9, 105, 246, .2)
}

.master-btn-primary:hover {
    background: #0758d1
}

.master-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 26px
}

.master-kpis-four {
    grid-template-columns: repeat(4, 1fr)
}

.master-kpi {
    min-height: 100px;
    border: 1px solid #e4eaf4;
    border-radius: 8px;
    background: #fff;
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 18px
}

.master-kpi-icon {
    width: 54px;
    height: 54px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    flex-shrink: 0
}

.master-kpi-icon.blue {
    background: #edf4ff;
    color: #0866f5
}

.master-kpi-icon.green {
    background: #e8f8ed;
    color: #0ca83f
}

.master-kpi-icon.orange {
    background: #fff2e4;
    color: #f28700
}

.master-kpi-icon.purple {
    background: #f2eaff;
    color: #713cf0
}

.master-kpi strong {
    display: block;
    font-size: 11.5px;
    color: #18264e;
    margin-bottom: 7px
}

.master-kpi b {
    display: block;
    font-size: 22px;
    line-height: 1;
    color: #1465ed
}

.master-kpi small {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: #536791
}

.master-kpi .green-text {
    color: #0ca83f
}

.master-kpi .orange-text {
    color: #f28700
}

.master-kpi .purple-text {
    color: #713cf0
}

.master-table-card {
    border: 1px solid #e4eaf4;
    border-radius: 8px;
    background: #fff;
    overflow: hidden
}

.master-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 10px 14px
}

.master-search {
    height: 37px;
    border: 1px solid #dce4f2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 13px;
    flex: 1;
    max-width: 340px;
    color: #66799f
}

.master-search input {
    border: 0;
    outline: 0;
    width: 100%;
    font-size: 11.5px;
    color: #1e315c
}

.master-select {
    height: 37px;
    border: 1px solid #dce4f2;
    border-radius: 6px;
    background: #fff;
    color: #1e315c;
    padding: 0 30px 0 13px;
    font-size: 11.5px;
    min-width: 150px
}

.master-sort {
    margin-left: auto;
    min-width: 245px
}

.master-toolbar .master-btn {
    height: 37px
}

.master-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.master-data-table {
    margin: 0 !important;
    border: 0 !important;
    width: 100% !important;
    min-width: max-content !important;
    table-layout: auto !important;
}

.master-data-table thead th {
    background: #f8fafc !important;
    color: #1e293b !important;
    border-top: 1px solid #edf1f7 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 12px 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    letter-spacing: 0.2px !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    line-height: 1.4 !important;
}

.master-data-table thead th.sorting,
.master-data-table thead th.sorting_asc,
.master-data-table thead th.sorting_desc {
    padding-right: 32px !important;
}

.master-data-table tbody td {
    padding: 12px 16px !important;
    color: #1e293b !important;
    font-size: 12.5px !important;
    border-bottom: 1px solid #edf1f7 !important;
    white-space: normal !important;
    vertical-align: middle !important;
    word-break: break-word;
    max-width: 300px;
}

.master-data-table tbody tr:hover {
    background: #f8fafc !important;
}

.master-data-table .strong-cell {
    font-weight: 500;
    color: #182a55 !important
}

.actions-cell {
    display: flex;
    align-items: center;
    gap: 10px
}

.master-icon-btn {
    width: 29px;
    height: 29px;
    border: 1px solid #dce4f2;
    border-radius: 6px;
    background: #fff;
    color: #1b315d;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer
}

.master-icon-btn:hover {
    background: #edf4ff;
    color: #0866f5
}

.master-icon-btn+.master-icon-btn {
    border: 0;
    font-size: 15px
}

.role-name {
    display: flex;
    align-items: center;
    gap: 10px
}

.role-avatar {
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: #1769f5;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600
}

.number-cell {
    color: #0866f5 !important;
    font-weight: 600
}

.permission-count {
    font-size: 10.5px;
    color: #536791
}

.permission-count i {
    color: #16ad4a;
    margin-right: 3px
}

.empty-cell {
    text-align: center !important;
    padding: 36px !important;
    color: #64748b !important
}

.master-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: #52668f;
    font-size: 11px
}

.master-pages {
    display: flex;
    gap: 6px
}

.master-pagination label {
    display: flex;
    align-items: center;
    gap: 8px
}

.master-page-length {
    height: 30px;
    border: 1px solid #dce4f2;
    border-radius: 5px;
    padding: 0 8px;
    color: #1d315e;
    background: #fff
}

.master-page-active {
    background: #0969f6;
    color: #fff
}

.master-page .pill.st-active {
    background: #ecfdf5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0 !important;
}

.master-page .pill.st-inactive {
    background: #fef2f2 !important;
    color: #991b1b !important;
    border-color: #fecaca !important;
}

.master-page .dataTables_wrapper .dataTables_length,
.master-page .dataTables_wrapper .dataTables_filter,
.master-page .dataTables_wrapper .dataTables_info,
.master-page .dataTables_wrapper .dataTables_paginate {
    display: none !important
}

@media(max-width:900px) {

    .master-kpis,
    .master-kpis-four {
        grid-template-columns: repeat(2, 1fr)
    }

    .master-toolbar {
        flex-wrap: wrap
    }

    .master-sort {
        margin-left: 0
    }
}

@media(max-width:600px) {
    .master-head {
        align-items: flex-start;
        flex-direction: column
    }

    .master-actions {
        width: 100%
    }

    .master-actions .master-btn {
        flex: 1;
        justify-content: center
    }

    .master-kpis,
    .master-kpis-four {
        grid-template-columns: 1fr
    }

    .master-toolbar {
        padding: 14px;
        gap: 8px
    }

    .master-search,
    .master-select,
    .master-sort {
        max-width: none;
        flex: 1;
        min-width: 140px
    }

    .master-pagination {
        gap: 10px;
        flex-wrap: wrap
    }
}

@media(max-width:575.98px) {
    .master-head {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .master-actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .master-actions .master-btn,
    .master-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 120px;
    }

    .master-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px;
        gap: 10px;
    }

    .master-search,
    .master-select,
    .master-sort {
        max-width: 100% !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .master-toolbar .master-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== User Access Controls ===== */
.access-page {
    color: #172554;
}

.access-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.access-title {
    display: flex;
    gap: 14px;
    align-items: center;
}

.access-icon {
    font-size: 28px;
    color: #0866f5;
}

.access-head h1 {
    font-size: 24px;
    margin: 0;
    color: #142452;
}

.access-head p {
    margin: 4px 0 0;
    color: #566b96;
    font-size: 12px;
}

.access-actions {
    display: flex;
    gap: 10px;
}

.access-btn {
    height: 38px;
    border: 1px solid #dce4f2;
    background: #fff;
    border-radius: 6px;
    padding: 0 14px;
    color: #1d315e;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    white-space: nowrap;
}

.access-btn.primary {
    background: #0969f6;
    color: #fff;
    border-color: #0969f6;
}

.access-kpis {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.access-kpis > div {
    border: 1px solid #e4eaf4;
    border-radius: 7px;
    background: #fff;
    padding: 15px 14px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.access-kpis > div > i {
    font-size: 21px;
    color: #0866f5;
    background: #edf4ff;
    padding: 13px;
    border-radius: 9px;
}

.access-kpis > div:nth-child(2) > i {
    color: #0ca83f;
    background: #e8f8ed;
}

.access-kpis > div:nth-child(3) > i {
    color: #713cf0;
    background: #f2eaff;
}

.access-kpis > div:nth-child(4) > i {
    color: #f28700;
    background: #fff2e4;
}

.access-kpis > div:nth-child(5) > i {
    color: #16a7b8;
    background: #e9fbfc;
}

.access-kpis strong,
.access-kpis small {
    display: block;
    font-size: 10px;
}

.access-kpis b {
    display: block;
    font-size: 20px;
    color: #1465ed;
    margin: 4px 0;
}

.access-kpis small {
    color: #536791;
}

.access-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 14px;
}

.access-panel {
    background: #fff;
    border: 1px solid #e4eaf4;
    border-radius: 7px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.access-tabs {
    display: flex;
    align-items: center;
    gap: 23px;
    padding: 14px;
    border-bottom: 1px solid #e7edf5;
    font-size: 11px;
}

.access-tabs button {
    border: 0;
    background: transparent;
    color: #52668f;
    padding: 0 0 13px;
    margin-bottom: -15px;
}

.access-tabs button.active {
    color: #0866f5;
    border-bottom: 2px solid #0866f5;
}

.access-filter {
    display: flex;
    gap: 8px;
    padding: 14px;
}

.access-filter label {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #dce4f2;
    border-radius: 6px;
    padding: 0 10px;
    flex: 1;
}

.access-filter input,
.access-filter select {
    height: 34px;
    border: 1px solid #dce4f2;
    border-radius: 6px;
    padding: 0 8px;
    color: #1d315e;
    font-size: 11px;
}

.access-filter input {
    border: 0;
    outline: 0;
    width: 100%;
}

.access-filter button {
    border: 1px solid #dce4f2;
    background: #fff;
    border-radius: 6px;
    width: 35px;
}

.access-table,
.matrix-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10.5px;
}

.access-table th,
.matrix-table th {
    background: #f7f9fc;
    padding: 11px 12px;
    text-align: left;
    border-block: 1px solid #e6edf5;
    font-weight: 600;
}

.access-table td,
.matrix-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #edf1f7;
    white-space: nowrap;
}

.access-table td:first-child {
    vertical-align: middle;
}

.access-table td:first-child small {
    color: #7384a5;
    font-size: 9px;
}

.user-avatar,
.role-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #64748b;
    color: #fff;
    font-size: 9px;
}

.role-chip {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    padding: 3.5px 10px !important;
    border-radius: 50px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    border: 1px solid rgba(29, 78, 216, 0.18) !important;
    display: inline-flex !important;
    align-items: center !important;
    line-height: 1.25 !important;
}

.access-more {
    border: 0;
    background: transparent;
    color: #172554;
}

.table-action-menu {
    position: relative;
    display: inline-flex;
}

.table-action-menu-list {
    position: absolute;
    z-index: 10;
    top: calc(100% + 5px);
    right: 0;
    display: none;
    min-width: 120px;
    padding: 4px;
    border: 1px solid #dce4f2;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(20, 36, 82, .12);
}

.table-action-menu.open .table-action-menu-list {
    display: block;
}

.table-action-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 9px;
    border: 0;
    background: transparent;
    color: #1d315e;
    font-size: 11px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}

.table-action-menu-item:hover {
    background: #edf4ff;
    color: #0866f5;
}

.table-action-menu-item.table-action-delete:hover {
    background: #fff1f2;
    color: #b91c1c;
}

.access-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    font-size: 10px;
    color: #536791;
}

.access-footer select {
    border: 1px solid #dce4f2;
    border-radius: 5px;
    padding: 5px;
}

.role-select-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    padding: 0 14px 12px;
}

.role-select-label select {
    display: block;
    width: 100%;
    height: 34px;
    margin-top: 5px;
    border: 1px solid #dce4f2;
    border-radius: 6px;
    padding: 0 10px;
}

.matrix-wrap {
    height: 420px;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: auto !important;
}

.access-table-wrap {
    height: 420px;
    overflow-y: auto;
    overflow-x: auto;
}

.matrix-table th,
.matrix-table td {
    text-align: center;
}

.matrix-table th:first-child,
.matrix-table td:first-child {
    text-align: left;
}

.matrix-status {
    font-size: 10px;
}

.matrix-status.yes {
    color: #16a34a;
}

.matrix-status.partial {
    color: #f59e0b;
}

.matrix-status.no {
    color: #ef4444;
}

.matrix-legend {
    display: flex;
    gap: 16px;
    padding: 14px;
    font-size: 10px;
    color: #536791;
}

.matrix-legend i {
    margin-right: 4px;
}

.access-empty {
    text-align: center !important;
    padding: 30px !important;
}

@media(max-width:1100px) {
    .access-kpis {
        grid-template-columns: repeat(3, 1fr);
    }

    .access-grid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:650px) {
    .access-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .access-actions {
        width: 100%;
    }

    .access-btn {
        flex: 1;
        justify-content: center;
    }

    .access-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .access-filter {
        flex-wrap: wrap;
    }

    .access-filter label {
        flex-basis: 100%;
    }
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: var(--primary-2) !important;
    color: #fff !important;
    border-color: var(--primary-2) !important;
}

.dataTables_wrapper {
    position: relative;
    min-height: clamp(4rem, 8vw, 5rem)
}

.dataTables_processing {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    z-index: 20 !important;
    transform: translate(-50%, -50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: min(12rem, calc(100% - 2rem));
    min-height: 2.75rem;
    padding: .625rem 1rem !important;
    border: 1px solid #dce4f2 !important;
    border-radius: .5rem !important;
    background: rgba(255, 255, 255, .98) !important;
    color: #52668f !important;
    box-shadow: 0 .375rem 1.125rem rgba(20, 36, 82, .12) !important;
    font-size: clamp(.6875rem, 1.5vw, .75rem) !important;
    font-weight: 500;
    white-space: nowrap
}

.datatable-loading {
    display: inline-flex;
    align-items: center;
    gap: .5rem
}

.datatable-loading i {
    color: #0969f6;
    font-size: .8125rem
}

.dataTables_wrapper table.dataTable tbody td.dataTables_empty {
    height: clamp(6rem, 12vw, 8rem);
    padding: clamp(1.25rem, 4vw, 1.75rem) 1rem !important;
    text-align: center !important;
    vertical-align: middle !important;
    color: #64748b !important;
    font-size: clamp(.6875rem, 1.5vw, .75rem) !important;
    font-weight: 500;
    background: #fff !important
}

.dataTables_wrapper table.dataTable tbody tr:hover td.dataTables_empty {
    background: #fff !important
}

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

.table-actions .delete-form {
    display: inline;
    margin: 0
}

.table-action-delete {
    color: #dc3545
}

.table-action-delete:hover {
    background: #fff1f2;
    color: #b91c1c
}

/* ===== Filter card ===== */
.filter-card {
    padding: 18px 20px;
    margin-bottom: 18px
}

.filter-card .row {
    --bs-gutter-x: .75rem;
    --bs-gutter-y: .75rem
}

/* ===== Tabs ===== */
.esg-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px
}

.esg-tabs .tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
}

.esg-tabs .tab .count {
    min-width: 22px;
    height: 20px;
    border-radius: 10px;
    background: #E5E7EB;
    color: #374151;
    font-size: 11px;
    font-weight: 600;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.esg-tabs .tab.active {
    color: var(--primary-2);
    border-bottom-color: var(--primary-2);
    font-weight: 600
}

.esg-tabs .tab.active .count {
    background: rgba(13, 110, 253, .12);
    color: var(--primary-2)
}

/* ===== Charts ===== */
.chart-host {
    min-height: 300px
}

.chart-filter-select {
    height: 30px;
    padding: 0 28px 0 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-2);
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='%236B7280' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.5 7.5L10 12l4.5-4.5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 11px;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
    min-width: 130px;
}

.chart-filter-select:focus {
    outline: none;
    border-color: var(--primary-2);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .10);
}

.chart-filter-select:hover {
    border-color: #b0bac9;
}

html[data-theme='dark'] .chart-filter-select {
    background-color: #172235;
    color: var(--text);
    border-color: var(--border);
    background-image: url("data:image/svg+xml;utf8,<svg fill='%2394A3B8' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.5 7.5L10 12l4.5-4.5'/></svg>");
}

html[data-theme='dark'] .chart-filter-select option {
    background-color: var(--card);
    color: var(--text);
}

.apexcharts-tooltip {
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, .18) !important;
    border: 1px solid var(--border) !important;
    border-radius: 8px !important
}

.apexcharts-tooltip .apexcharts-tooltip-title {
    background: #F9FAFB !important;
    border-bottom: 1px solid var(--border) !important;
    font-size: 12px !important;
    font-weight: 600 !important
}

/* ===== Report cards ===== */
.report-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 22px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: transform .15s ease, box-shadow .15s ease;
    cursor: pointer;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg)
}

.report-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 14px;
}

.report-card h4 {
    font-size: 14.5px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--text);
    line-height: 1.3
}

.report-card p {
    font-size: 12.5px;
    color: var(--muted);
    margin: 0 0 14px;
    line-height: 1.5;
    flex: 1
}

.report-card .view-link {
    font-size: 12.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-2)
}

.info-strip {
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    color: #1E40AF;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 12.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

/* ===== Investigation panel ===== */
.invest-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 18px;
}

.invest-panel h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 2px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.invest-panel .sub {
    font-size: 12px;
    color: var(--muted)
}

.meta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
    margin: 14px 0;
    font-size: 12px;
    color: var(--muted)
}

.meta-grid strong {
    display: block;
    font-size: 12.5px;
    color: var(--text);
    font-weight: 600;
    margin-top: 2px
}

.attachment-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 12.5px;
}

.attachment-row i.fa-download {
    color: var(--primary-2);
    cursor: pointer
}

/* ===== Dropzone ===== */
.dropzone {
    border: 2px dashed #C7D2E3;
    border-radius: 10px;
    padding: 28px 20px;
    text-align: center;
    background: #FAFBFC;
    color: var(--muted);
    cursor: pointer;
}

.dropzone:hover {
    background: #F3F6FB;
    border-color: var(--primary-2)
}

.dropzone i {
    font-size: 28px;
    color: #9CA3AF;
    margin-bottom: 8px
}

.dropzone h5 {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text);
    margin: 4px 0 2px
}

.dropzone small {
    display: block;
    color: var(--muted);
    font-size: 12px
}

/* ===== Auth ===== */
.auth-body {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 30%, rgba(13, 110, 253, .5), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(34, 211, 238, .3), transparent 55%),
        linear-gradient(135deg, #0A1426 0%, #1A233A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    font-family: 'Inter', sans-serif;
}

.auth-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, .5);
    width: 100%;
    max-width: 960px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    overflow: hidden;
}

.auth-aside {
    background: radial-gradient(circle at 30% 20%, rgba(13, 110, 253, .45), transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(34, 211, 238, .3), transparent 60%), #1A233A;
    color: #cbd5e1;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.auth-aside .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 700;
    font-size: 18px
}

.auth-aside .brand .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px
}

.auth-aside h2 {
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    margin: 24px 0 12px;
    line-height: 1.25
}

.auth-aside p {
    font-size: 13px;
    line-height: 1.6;
    color: #94a3b8
}

.auth-aside ul {
    list-style: none;
    padding: 0;
    margin: 24px 0 0;
    display: grid;
    gap: 12px
}

.auth-aside ul li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #cbd5e1
}

.auth-aside ul li i {
    color: #22D3EE
}

.auth-form {
    padding: 44px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center
}

.auth-form h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px
}

.auth-form .muted {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 20px
}

.demo-hint {
    background: #EFF6FF;
    border: 1px dashed #93C5FD;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 12px;
    color: #1E40AF;
    margin-bottom: 16px
}

@media (max-width:960px) {
    .auth-card {
        grid-template-columns: 1fr
    }

    .auth-aside {
        display: none
    }
}

/* ===== Flash messages ===== */
.flash {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px
}

.flash.success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0
}

.flash.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA
}

/* ===== Init / Analytics extras ===== */
.mini-stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px;
    box-shadow: var(--shadow)
}

.mini-stat .lbl {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 8px
}

.mini-stat .val {
    font-size: 22px;
    font-weight: 700;
    color: var(--text)
}

.mini-stat .ft {
    font-size: 12px;
    color: var(--muted);
    margin-top: 6px
}

.progress-thin {
    height: 6px;
    background: #EEF1F6;
    border-radius: 6px;
    overflow: hidden
}

.progress-thin>span {
    display: block;
    height: 100%;
    background: var(--primary-2);
    border-radius: 6px
}

/* ===== Responsive ===== */
@media (max-width:991.98px) {
    .app-sidebar:not(.open) .sidebar-toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .app-sidebar.open .sidebar-toggle {
        display: inline-flex !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        min-width: 38px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: #fff;
        color: var(--text-2);
        cursor: pointer;
        font-size: 16px;
        flex-shrink: 0;
        margin-right: 12px;
        transition: all 0.15s ease;
    }

    .hamburger:hover,
    .hamburger:focus {
        background: #f1f5f9;
        color: #0866f5;
        border-color: #b9d3fc;
    }

    .app-sidebar {
        width: min(280px, 86vw);
        height: 100vh;
        height: 100dvh;
        transform: translateX(-100%);
        box-shadow: 0 20px 40px rgba(15, 23, 42, .16);
        border-right: 1px solid rgba(15, 23, 42, .08);
        z-index: 1000;
        transition: transform .25s ease;
    }

    .app-sidebar.open {
        transform: translateX(0) !important;
    }

    .app-main {
        margin-left: 0
    }

    .h-date {
        display: none !important
    }

    .app-header {
        min-width: 0;
        gap: 12px;
        overflow: visible;
    }

    .header-left {
        min-width: 0;
        flex: 1
    }

    .page-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .header-right {
        flex-shrink: 0;
        gap: 6px
    }

    .app-shell.sb-collapsed .app-sidebar {
        width: min(280px, 86vw);
        transform: translateX(-100%)
    }

    .app-shell.sb-collapsed .app-main {
        margin-left: 0
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .42);
        z-index: 950;
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s ease, visibility .25s ease
    }

    body.sidebar-drawer-open .sidebar-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto
    }
}

@media (max-width:575.98px) {
    .app-content {
        padding: 14px
    }

    .page-title {
        font-size: 16px
    }

    .header-user .u-name,
    .header-user .u-role {
        display: none
    }

    .app-header {
        padding: 0 14px
    }

    .sidebar-brand {
        padding: 16px
    }

    .header-right .h-btn {
        width: 36px;
        padding: 0;
        justify-content: center;
        font-size: 0
    }

    .header-right .h-btn i {
        font-size: 14px
    }

    .header-right .h-bell {
        width: 34px;
        height: 34px
    }

    .header-user {
        padding: 0
    }

    .table-wrap {
        padding-left: 0;
        padding-right: 0
    }

    .sidebar-foot .u-role {
        display: none
    }
}

/* Donut chart center text */
.donut-center {
    font-family: Inter, sans-serif
}

/* User-selected appearance preferences */
:root {
    --app-font-family: 'Inter';
}

body,
button,
input,
select,
textarea {
    font-family: var(--app-font-family), sans-serif;
}

html[data-theme='dark'] {
    --sidebar-bg: #111827;
    --sidebar-hover: #1F2937;
    --bg: #0F172A;
    --card: #1E293B;
    --border: #334155;
    --border-2: #273449;
    --text: #E5E7EB;
    --text-2: #CBD5E1;
    --muted: #94A3B8;
    --muted-2: #64748B;
}

html[data-theme='dark'] body {
    background: var(--bg);
    color: var(--text);
}

html[data-theme='dark'] .app-header,
html[data-theme='dark'] .header-font-picker,
html[data-theme='dark'] .h-btn,
html[data-theme='dark'] .header-user,
html[data-theme='dark'] .h-date,
html[data-theme='dark'] .report-card,
html[data-theme='dark'] .invest-panel,
html[data-theme='dark'] .card,
html[data-theme='dark'] .table-wrap {
    background: var(--card);
    color: var(--text);
    border-color: var(--border);
}

html[data-theme='dark'] .header-font-picker select,
html[data-theme='dark'] .h-btn,
html[data-theme='dark'] .header-user,
html[data-theme='dark'] .h-bell {
    color: var(--text-2);
}

html[data-theme='dark'] .h-bell {
    background: #273449;
}

html[data-theme='dark'] .app-sidebar {
    color: var(--text);
    border-color: var(--border);
}

html[data-theme='dark'] .brand-title,
html[data-theme='dark'] .nav-item,
html[data-theme='dark'] .u-name,
html[data-theme='dark'] .page-title,
html[data-theme='dark'] .report-card h4,
html[data-theme='dark'] .invest-panel h3 {
    color: var(--text);
}

html[data-theme='dark'] .nav-item:hover,
html[data-theme='dark'] .h-btn:hover {
    background: var(--sidebar-hover);
}

html[data-theme='dark'] .header-font-picker select option {
    background: var(--card);
    color: var(--text);
}

@media (max-width: 767.98px) {
    .header-font-picker {
        width: 36px;
        justify-content: center;
        padding: 0;
    }

    .header-font-picker select {
        display: none;
    }

    .header-font-picker--size {
        width: auto;
        padding: 0 7px;
    }

    .header-font-picker--size select {
        display: block;
        width: 58px;
        max-width: 58px;
    }
}

html[data-theme='dark'] .nav-sub a,
html[data-theme='dark'] .nav-sub a:hover,
html[data-theme='dark'] .nav-sub a:focus-visible {
    color: var(--text-2);
}

html[data-theme='dark'] .nav-sub a.active {
    color: var(--text) !important;
    background: rgba(59, 130, 246, .2);
}

html[data-theme='dark'] .master-kpi strong,
html[data-theme='dark'] .master-kpi b {
    color: var(--text) !important;
}

/* Keep shared menus and page content readable in dark mode. */
html[data-theme='dark'] {
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-secondary-color: var(--muted);
    --bs-tertiary-bg: #273449;
    --bs-border-color: var(--border);
    --bs-dropdown-bg: var(--card);
    --bs-dropdown-color: var(--text);
    --bs-dropdown-link-color: var(--text);
    --bs-dropdown-link-hover-bg: #273449;
    --bs-dropdown-link-hover-color: #fff;
}

html[data-theme='dark'] .dropdown-menu,
html[data-theme='dark'] .dropdown-item,
html[data-theme='dark'] .dropdown-item-text {
    background-color: var(--card);
    color: var(--text);
    border-color: var(--border);
}

html[data-theme='dark'] .dropdown-item:hover,
html[data-theme='dark'] .dropdown-item:focus {
    background-color: #273449;
    color: #fff;
}

html[data-theme='dark'] .dropdown-divider {
    border-color: var(--border);
}

html[data-theme='dark'] .card,
html[data-theme='dark'] .kpi-card,
html[data-theme='dark'] .table-wrap,
html[data-theme='dark'] .master-table-wrap,
html[data-theme='dark'] .dataTables_wrapper,
html[data-theme='dark'] .table-responsive,
html[data-theme='dark'] .modal-content,
html[data-theme='dark'] .form-panel,
html[data-theme='dark'] .panel,
html[data-theme='dark'] .section-card {
    background-color: var(--card);
    color: var(--text);
    border-color: var(--border);
}

html[data-theme='dark'] .card-header,
html[data-theme='dark'] .card-footer,
html[data-theme='dark'] .table thead,
html[data-theme='dark'] table.esg-table thead,
html[data-theme='dark'] .dataTables_wrapper .dataTable thead {
    background-color: #273449 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] .card-title,
html[data-theme='dark'] .card-body,
html[data-theme='dark'] .card-sub,
html[data-theme='dark'] .kpi-label,
html[data-theme='dark'] .kpi-value,
html[data-theme='dark'] .form-label,
html[data-theme='dark'] .table,
html[data-theme='dark'] .table th,
html[data-theme='dark'] .table td,
html[data-theme='dark'] table.esg-table tbody td,
html[data-theme='dark'] .dataTables_wrapper .dataTable tbody td {
    color: var(--text) !important;
}

html[data-theme='dark'] .table > :not(caption) > * > *,
html[data-theme='dark'] table.esg-table tbody td,
html[data-theme='dark'] .dataTables_wrapper .dataTable tbody td {
    background-color: transparent !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] .table tbody tr:hover,
html[data-theme='dark'] table.esg-table tbody tr:hover,
html[data-theme='dark'] .dataTables_wrapper .dataTable tbody tr:hover {
    background-color: #273449 !important;
}

html[data-theme='dark'] .form-control,
html[data-theme='dark'] .form-select,
html[data-theme='dark'] input,
html[data-theme='dark'] textarea,
html[data-theme='dark'] select {
    background-color: #172235;
    color: var(--text);
    border-color: var(--border);
}

html[data-theme='dark'] .password-toggle-wrapper > input {
    color: var(--text) !important;
    -webkit-text-fill-color: var(--text);
    caret-color: var(--text);
}

html[data-theme='dark'] .form-control::placeholder,
html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder {
    color: var(--muted);
}

html[data-theme='dark'] .form-control:focus,
html[data-theme='dark'] .form-select:focus,
html[data-theme='dark'] input:focus,
html[data-theme='dark'] textarea:focus,
html[data-theme='dark'] select:focus {
    background-color: #172235;
    color: var(--text);
    border-color: var(--primary-2);
}

html[data-theme='dark'] .dataTables_wrapper .dataTables_filter input,
html[data-theme='dark'] .dataTables_wrapper .dataTables_length select,
html[data-theme='dark'] .dataTables_wrapper .dataTables_paginate .paginate_button,
html[data-theme='dark'] .common-table-pages .page-btn,
html[data-theme='dark'] .btn-light,
html[data-theme='dark'] .btn-outline-secondary {
    background-color: #172235 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
html[data-theme='dark'] .common-table-pages .page-btn:hover,
html[data-theme='dark'] .btn-light:hover {
    background-color: #273449 !important;
    color: #fff !important;
}

html[data-theme='dark'] .text-dark,
html[data-theme='dark'] .text-body,
html[data-theme='dark'] .text-secondary,
html[data-theme='dark'] [style*='color: #1f2d3d'],
html[data-theme='dark'] [style*='color:#1f2d3d'],
html[data-theme='dark'] [style*='color: #374151'],
html[data-theme='dark'] [style*='color:#374151'] {
    color: var(--text) !important;
}

html[data-theme='dark'] [style*='background: #fff'],
html[data-theme='dark'] [style*='background:#fff'],
html[data-theme='dark'] [style*='background: #f9fafb'],
html[data-theme='dark'] [style*='background:#f9fafb'] {
    background-color: var(--card) !important;
}

/* Bootstrap grid kept lightweight (we already include Bootstrap CDN) */


/* ===== Collapsible Sidebar ===== */
.sidebar-brand {
    position: relative
}

.sidebar-toggle {
    position: absolute;
    right: -13px;
    top: 24px;
    width: 26px;
    height: 26px;
    background: #0D6EFD;
    border: 2px solid var(--sidebar-bg);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 5;
    transition: transform .2s ease;
}

.sidebar-toggle:hover {
    background: #2563EB
}

@media (min-width: 992px) {
    .hamburger {
        display: none !important;
    }
}

.app-shell.sb-collapsed .app-sidebar {
    width: 74px
}

.app-shell.sb-collapsed .app-main {
    margin-left: 74px
}

.app-shell.sb-collapsed .sidebar-brand {
    padding: 18px 0;
    justify-content: center
}

.app-shell.sb-collapsed .sidebar-brand .logo-img {
    width: 48px;
    height: 30px;
    object-fit: contain;
    object-position: left center
}

.app-shell.sb-collapsed .brand-text {
    display: none
}

.app-shell.sb-collapsed .sidebar-toggle {
    right: -13px;
    top: 22px
}

.app-shell.sb-collapsed .sidebar-toggle i {
    transform: rotate(180deg)
}

.app-shell.sb-collapsed .nav-item {
    justify-content: center;
    padding: 0;
    gap: 0;
    position: relative
}

.app-shell.sb-collapsed .nav-item span {
    display: none
}

.app-shell.sb-collapsed .nav-item .nav-chev {
    display: none
}

.app-shell.sb-collapsed .nav-item i.fa-solid,
.app-shell.sb-collapsed .nav-item i.fa-regular {
    width: auto;
    font-size: 16px
}

.app-shell.sb-collapsed .nav-group {
    position: relative
}

.app-shell.sb-collapsed .nav-sub {
    display: none !important;
    position: fixed;
    left: 74px;
    top: var(--flyout-top, 8px);
    width: min(245px, calc(100vw - 82px));
    max-height: calc(100dvh - 16px);
    padding: 8px;
    background: var(--sidebar-bg);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: #526487 #202b46;
    z-index: 1200
}

.app-shell.sb-collapsed .nav-group:hover>.nav-sub,
.app-shell.sb-collapsed .nav-group:focus-within>.nav-sub {
    display: block !important
}

.app-shell.sb-collapsed .nav-sub a {
    min-height: 34px;
    height: auto;
    padding: 8px 12px 8px 18px;
    white-space: normal
}

.app-shell.sb-collapsed .nav-group:hover>.nav-item::after {
    content: none
}

.app-shell.sb-collapsed .nav-sub::-webkit-scrollbar {
    width: 6px
}

.app-shell.sb-collapsed .nav-sub::-webkit-scrollbar-track {
    background: #202b46;
    border-radius: 8px
}

.app-shell.sb-collapsed .nav-sub::-webkit-scrollbar-thumb {
    background: #526487;
    border-radius: 8px
}

.app-shell.sb-collapsed .nav-sub::-webkit-scrollbar-thumb:hover {
    background: #7186b0
}

.app-shell.sb-collapsed .sidebar-section {
    display: none
}

.app-shell.sb-collapsed .sidebar-foot {
    justify-content: center;
    padding: 14px 8px
}

.app-shell.sb-collapsed .sidebar-foot>div,
.app-shell.sb-collapsed .sidebar-foot .u-caret {
    display: none
}

.app-shell.sb-collapsed .sidebar-nav {
    padding: 10px 8px
}

/* Tooltip on hover when collapsed */
.app-shell.sb-collapsed .nav-item:hover::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #1A233A;
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1100;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    pointer-events: none;
}

/* ===== User Avatar ===== */
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #0d6efd;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10.5px;
    font-weight: 600;
    flex-shrink: 0;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: #182a55;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    font-size: 10.5px;
    color: #7384a5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-theme='dark'] .user-name { color: var(--text) !important; }
html[data-theme='dark'] .user-email { color: var(--muted) !important; }

/* ===== Responsive DataTables (Child Row Accordion View) ===== */
.dt-control-btn {
    background: transparent;
    border: none;
    padding: 0;
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.dt-control-btn i.fa-circle-plus {
    color: #0866f5;
    font-size: 16px;
    transition: transform 0.15s ease, color 0.15s ease;
}

.dt-control-btn i.fa-circle-minus {
    color: #ef2e2e;
    font-size: 16px;
    transition: transform 0.15s ease, color 0.15s ease;
}

.dt-control-btn:hover i.fa-circle-plus {
    color: #0652c5;
    transform: scale(1.1);
}

.dt-control-btn:hover i.fa-circle-minus {
    color: #dc2626;
    transform: scale(1.1);
}

/* Child Row Styling matching reference image and project design */
.dt-child-row {
    background: #fbfdff !important;
}

.dt-child-cell {
    padding: 0 !important;
    border-bottom: 2px solid #e2e8f0 !important;
}

.dt-child-wrapper {
    padding: 10px 16px;
    background: #fbfdff;
    border-top: 1px solid #edf1f7;
}

.dt-child-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #edf1f7;
    font-size: 12px;
}

.dt-child-item:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.dt-child-label {
    font-weight: 600;
    color: #1e293b;
    width: 36%;
    min-width: 110px;
    padding-right: 12px;
    letter-spacing: 0.1px;
    line-height: 1.4;
    flex-shrink: 0;
}

.dt-child-val {
    color: #334155;
    width: 64%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.4;
    word-break: break-word;
}

.dt-child-val .table-actions,
.dt-child-val .actions-cell {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

@media (max-width: 767.98px) {
    .master-table-card {
        border: 1px solid #e4eaf4;
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
    }

    table.master-data-table,
    table.esg-datatable,
    table.access-table {
        min-width: 100% !important;
        width: 100% !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
        display: table !important;
    }

    table.master-data-table thead,
    table.esg-datatable thead,
    table.access-table thead {
        display: table-header-group !important;
    }

    table.master-data-table tbody,
    table.esg-datatable tbody,
    table.access-table tbody {
        display: table-row-group !important;
    }

    table.master-data-table tbody tr:not(.dt-child-row),
    table.esg-datatable tbody tr:not(.dt-child-row),
    table.access-table tbody tr:not(.dt-child-row) {
        display: table-row !important;
    }

    /* Ensure no pseudo-element affects cell layout */
    table.master-data-table tbody tr td::before,
    table.esg-datatable tbody tr td::before,
    table.access-table tbody tr td::before {
        content: none !important;
        display: none !important;
    }

    /* Visible header column 1 */
    table.master-data-table thead th:first-child,
    table.esg-datatable thead th:first-child,
    table.access-table thead th:first-child {
        display: table-cell !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 10px 12px !important;
        text-align: left !important;
        background: #f8fafc !important;
        color: #1e293b !important;
        font-size: 11.5px !important;
        font-weight: 600 !important;
        border-bottom: 2px solid #e2e8f0 !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
    }

    /* Visible header column 2 */
    table.master-data-table thead th:nth-child(2),
    table.esg-datatable thead th:nth-child(2),
    table.access-table thead th:nth-child(2) {
        display: table-cell !important;
        width: auto !important;
        padding: 10px 12px !important;
        text-align: left !important;
        background: #f8fafc !important;
        color: #1e293b !important;
        font-size: 11.5px !important;
        font-weight: 600 !important;
        border-bottom: 2px solid #e2e8f0 !important;
        white-space: nowrap !important;
        vertical-align: middle !important;
    }

    table.master-data-table thead th:first-child.sorting,
    table.master-data-table thead th:nth-child(2).sorting,
    table.esg-datatable thead th:first-child.sorting,
    table.esg-datatable thead th:nth-child(2).sorting {
        padding-right: 26px !important;
    }

    /* Visible body cell column 1 (contains [+] button and Code/S.No) */
    table.master-data-table tbody tr:not(.dt-child-row) td:first-child,
    table.esg-datatable tbody tr:not(.dt-child-row) td:first-child,
    table.access-table tbody tr:not(.dt-child-row) td:first-child {
        display: table-cell !important;
        width: auto !important;
        min-width: 0 !important;
        padding: 11px 12px !important;
        font-weight: 600 !important;
        color: #182a55 !important;
        font-size: 12px !important;
        text-align: left !important;
        vertical-align: middle !important;
        white-space: normal !important;
        word-break: break-word;
        cursor: pointer;
    }

    /* Visible body cell column 2 (contains Name) */
    table.master-data-table tbody tr:not(.dt-child-row) td:nth-child(2),
    table.esg-datatable tbody tr:not(.dt-child-row) td:nth-child(2),
    table.access-table tbody tr:not(.dt-child-row) td:nth-child(2) {
        display: table-cell !important;
        width: auto !important;
        padding: 11px 12px !important;
        color: #1e293b !important;
        font-size: 12px !important;
        text-align: left !important;
        vertical-align: middle !important;
        word-break: break-word !important;
    }

    /* Child row cell spans both visible columns */
    td.dt-child-cell,
    tr.dt-child-row td {
        display: table-cell !important;
        width: 100% !important;
        padding: 0 !important;
    }

    /* Highlight expanded parent row */
    tr.dt-row-expanded {
        background: #f4f8ff !important;
    }

    /* Mobile Toolbar */
    .master-toolbar {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 14px 10px 10px !important;
    }

    .master-search {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }

    .master-select:not(.master-sort) {
        flex: 1 1 calc(50% - 6px) !important;
        min-width: 0 !important;
    }

    .master-sort {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
    }

    /* Mobile Pagination */
    .master-pagination,
    .common-table-pagination {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;
        padding: 14px 12px !important;
    }

    .master-info,
    .common-table-info {
        font-size: 11px !important;
        text-align: center !important;
    }

    .master-pages,
    .common-table-pages {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }
}

/* ===== Reusable datatable viewport ===== */
.datatable-wrapper {
    --datatable-sticky-bg: var(--card, #fff);
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    overflow: visible !important;
}

.datatable-wrapper > .datatable-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    flex: 0 0 auto;
    min-width: 0;
    padding: 14px 16px;
}

.datatable-wrapper > .datatable-toolbar > .master-toolbar {
    display: contents;
}

.datatable-wrapper > .master-table-wrap,
.datatable-wrapper > .table-responsive {
    flex: 1 1 auto;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

.datatable-wrapper > .master-table-wrap > .dataTables_wrapper,
.datatable-wrapper > .table-responsive > .dataTables_wrapper {
    min-width: max-content;
    overflow: visible !important;
}

.datatable-wrapper table.master-data-table,
.datatable-wrapper table.esg-table,
.datatable-wrapper table.access-table {
    width: max-content !important;
    min-width: 100% !important;
    table-layout: auto !important;
}

.datatable-wrapper table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--datatable-sticky-bg) !important;
}

.datatable-wrapper > [data-datatable-footer] {
    flex: 0 0 auto;
    min-width: 0;
    background: var(--datatable-sticky-bg) !important;
}

@media (max-width: 991.98px) {
    .datatable-wrapper > [data-datatable-footer] {
        padding: 12px !important;
    }
}

@media (max-width: 767.98px) {
    .datatable-wrapper > .master-table-wrap,
    .datatable-wrapper > .table-responsive {
        min-height: 150px;
        max-height: none;
        overflow: visible !important;
        scrollbar-gutter: auto;
        -webkit-overflow-scrolling: auto;
        scrollbar-width: auto;
        -ms-overflow-style: auto;
    }

    .datatable-wrapper > .master-table-wrap::-webkit-scrollbar,
    .datatable-wrapper > .table-responsive::-webkit-scrollbar {
        display: none;
    }

    .datatable-wrapper table.master-data-table,
    .datatable-wrapper table.esg-table,
    .datatable-wrapper table.access-table {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
    }

    .datatable-wrapper > .master-table-wrap > .dataTables_wrapper,
    .datatable-wrapper > .table-responsive > .dataTables_wrapper {
        width: 100% !important;
        min-width: 0 !important;
    }

    .datatable-wrapper > [data-datatable-footer] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
        text-align: center;
    }

    .datatable-wrapper .datatable-toolbar {
        width: 100%;
        overflow: visible;
		padding: 12px;
    }
}

/* Users module dark-mode overrides */
html[data-theme='dark'] .access-page {
    color: var(--text);
}

html[data-theme='dark'] .access-head h1,
html[data-theme='dark'] .access-head p,
html[data-theme='dark'] .access-kpis strong,
html[data-theme='dark'] .access-kpis b,
html[data-theme='dark'] .access-kpis small,
html[data-theme='dark'] .access-tabs,
html[data-theme='dark'] .access-tabs button,
html[data-theme='dark'] .access-table,
html[data-theme='dark'] .access-table th,
html[data-theme='dark'] .access-table td,
html[data-theme='dark'] .access-footer,
html[data-theme='dark'] .access-more {
    color: var(--text) !important;
}

html[data-theme='dark'] .access-panel,
html[data-theme='dark'] .access-kpis > div,
html[data-theme='dark'] .access-filter label,
html[data-theme='dark'] .access-filter input,
html[data-theme='dark'] .access-filter select,
html[data-theme='dark'] .access-filter button,
html[data-theme='dark'] .access-footer select,
html[data-theme='dark'] .access-table-wrap {
    background-color: var(--card) !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] .access-head p,
html[data-theme='dark'] .access-kpis small,
html[data-theme='dark'] .access-table td:first-child small,
html[data-theme='dark'] .access-footer {
    color: var(--muted) !important;
}

html[data-theme='dark'] .access-tabs {
    border-bottom-color: var(--border);
}

html[data-theme='dark'] .access-tabs button.active {
    color: #60a5fa !important;
}

html[data-theme='dark'] .access-filter input,
html[data-theme='dark'] .access-filter select,
html[data-theme='dark'] .access-footer select {
    color: var(--text) !important;
}

html[data-theme='dark'] .access-filter input::placeholder {
    color: var(--muted);
}

html[data-theme='dark'] .access-table th {
    background-color: #273449 !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] .access-table td {
    background-color: transparent !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] .access-table tbody tr:hover {
    background-color: #273449 !important;
}

html[data-theme='dark'] .role-chip {
    background: rgba(59, 130, 246, .2) !important;
    color: #93c5fd !important;
    border-color: rgba(96, 165, 250, .35) !important;
}

html[data-theme='dark'] .table-action-menu-list {
    background-color: var(--card);
    border-color: var(--border);
}

html[data-theme='dark'] .table-action-menu-item {
    color: var(--text);
}

html[data-theme='dark'] .table-action-menu-item:hover {
    background-color: #273449;
    color: #93c5fd;
}

html[data-theme='dark'] .table-action-menu-item.table-action-delete:hover {
    background-color: rgba(220, 38, 38, .18);
    color: #fca5a5;
}

html[data-theme='dark'] table.dataTable thead th.sorting:hover,
html[data-theme='dark'] table.dataTable thead th.sorting_asc:hover,
html[data-theme='dark'] table.dataTable thead th.sorting_desc:hover,
html[data-theme='dark'] .master-data-table thead th.sorting:hover,
html[data-theme='dark'] .master-data-table thead th.sorting_asc:hover,
html[data-theme='dark'] .master-data-table thead th.sorting_desc:hover {
    background-color: #273449 !important;
    color: var(--text) !important;
}

/* Final dark-mode table colors must come after responsive table rules. */
html[data-theme='dark'] table.esg-table,
html[data-theme='dark'] table.esg-table tbody,
html[data-theme='dark'] table.esg-table tr,
html[data-theme='dark'] table.master-data-table,
html[data-theme='dark'] table.master-data-table tbody,
html[data-theme='dark'] table.master-data-table tr,
html[data-theme='dark'] table.access-table,
html[data-theme='dark'] table.access-table tbody,
html[data-theme='dark'] table.access-table tr,
html[data-theme='dark'] .dataTables_wrapper .dataTable {
    color: var(--text) !important;
}

html[data-theme='dark'] table.esg-table thead th,
html[data-theme='dark'] .dataTables_wrapper .dataTable thead th,
html[data-theme='dark'] table.master-data-table thead th,
html[data-theme='dark'] table.access-table thead th,
html[data-theme='dark'] table.master-data-table thead th:first-child,
html[data-theme='dark'] table.master-data-table thead th:nth-child(2),
html[data-theme='dark'] table.esg-datatable thead th:first-child,
html[data-theme='dark'] table.esg-datatable thead th:nth-child(2),
html[data-theme='dark'] table.access-table thead th:first-child,
html[data-theme='dark'] table.access-table thead th:nth-child(2) {
    background-color: #273449 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] table.esg-table tbody td,
html[data-theme='dark'] .dataTables_wrapper .dataTable tbody td,
html[data-theme='dark'] table.master-data-table tbody td,
html[data-theme='dark'] table.access-table tbody td,
html[data-theme='dark'] table.master-data-table tbody tr:not(.dt-child-row) td:first-child,
html[data-theme='dark'] table.master-data-table tbody tr:not(.dt-child-row) td:nth-child(2),
html[data-theme='dark'] table.esg-datatable tbody tr:not(.dt-child-row) td:first-child,
html[data-theme='dark'] table.esg-datatable tbody tr:not(.dt-child-row) td:nth-child(2),
html[data-theme='dark'] table.access-table tbody tr:not(.dt-child-row) td:first-child,
html[data-theme='dark'] table.access-table tbody tr:not(.dt-child-row) td:nth-child(2) {
    background-color: transparent !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] table.esg-table tbody tr:hover,
html[data-theme='dark'] .dataTables_wrapper .dataTable tbody tr:hover,
html[data-theme='dark'] table.master-data-table tbody tr:hover,
html[data-theme='dark'] table.access-table tbody tr:hover,
html[data-theme='dark'] tr.dt-row-expanded {
    background-color: #273449 !important;
}

html[data-theme='dark'] .dt-child-row,
html[data-theme='dark'] .dt-child-cell,
html[data-theme='dark'] .dt-child-wrapper {
    background-color: #172235 !important;
    color: var(--text) !important;
    border-color: var(--border) !important;
}

html[data-theme='dark'] .dt-child-item {
    border-color: var(--border) !important;
}

html[data-theme='dark'] .dt-child-label,
html[data-theme='dark'] .dt-child-val,
html[data-theme='dark'] .dt-child-val strong,
html[data-theme='dark'] .dt-child-val span,
html[data-theme='dark'] .master-data-table .strong-cell {
    color: var(--text) !important;
}

html[data-theme='dark'] table.esg-table a,
html[data-theme='dark'] table.master-data-table a,
html[data-theme='dark'] table.access-table a,
html[data-theme='dark'] .dataTables_wrapper .dataTable a {
    color: #93c5fd;
}

html[data-theme='dark'] .dt-control-btn i.fa-circle-plus,
html[data-theme='dark'] .dt-control-btn i.fa-circle-minus {
    color: #93c5fd !important;
}

/* ===== DataTables Export Dropdown ===== */

.datatable-toolbar div.dt-buttons.dt-buttons-bar {
    margin-left: auto;
    padding: 0;
    display: flex;
    align-items: center;
    position: relative;
}

/* Collection panel */
div.dt-button-collection {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 170px !important;
    padding: 5px !important;
    background: #fff !important;
    border: 1px solid #dce4f2 !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 28px rgba(20,36,82,.15) !important;
    z-index: 9999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

/* Base item */
div.dt-button-collection button.dt-button.dt-drop-item {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 13px !important;
    font-size: 12.5px !important;
    font-weight: 500 !important;
    border: none !important;
    border-radius: 7px !important;
    text-align: left !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    background: transparent !important;
    transition: background .12s ease !important;
}

div.dt-button-collection button.dt-button.dt-drop-item i {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    border-radius: 5px;
    padding: 2px;
}

/* Copy — slate */
div.dt-button-collection button.dt-button.dt-drop-copy { color: #475569 !important; }
div.dt-button-collection button.dt-button.dt-drop-copy i { background: #f1f5f9; color: #475569; }
div.dt-button-collection button.dt-button.dt-drop-copy:hover { background: #f1f5f9 !important; color: #1e293b !important; }

/* CSV — cyan */
div.dt-button-collection button.dt-button.dt-drop-csv { color: #0891b2 !important; }
div.dt-button-collection button.dt-button.dt-drop-csv i { background: #ecfeff; color: #0891b2; }
div.dt-button-collection button.dt-button.dt-drop-csv:hover { background: #ecfeff !important; color: #0e7490 !important; }

/* Excel — green */
div.dt-button-collection button.dt-button.dt-drop-excel { color: #16a34a !important; }
div.dt-button-collection button.dt-button.dt-drop-excel i { background: #f0fdf4; color: #16a34a; }
div.dt-button-collection button.dt-button.dt-drop-excel:hover { background: #f0fdf4 !important; color: #15803d !important; }

/* PDF — red */
div.dt-button-collection button.dt-button.dt-drop-pdf { color: #dc2626 !important; }
div.dt-button-collection button.dt-button.dt-drop-pdf i { background: #fef2f2; color: #dc2626; }
div.dt-button-collection button.dt-button.dt-drop-pdf:hover { background: #fef2f2 !important; color: #b91c1c !important; }

/* Print — purple */
div.dt-button-collection button.dt-button.dt-drop-print { color: #7c3aed !important; }
div.dt-button-collection button.dt-button.dt-drop-print i { background: #f5f3ff; color: #7c3aed; }
div.dt-button-collection button.dt-button.dt-drop-print:hover { background: #f5f3ff !important; color: #6d28d9 !important; }

/* Dark mode */
html[data-theme='dark'] div.dt-buttons button.dt-button.btn.master-btn {
    background: #172235 !important;
    border-color: var(--border) !important;
    color: var(--text) !important;
}

html[data-theme='dark'] div.dt-button-collection {
    background: var(--card) !important;
    border-color: var(--border) !important;
    box-shadow: 0 10px 28px rgba(0,0,0,.35) !important;
}

html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-copy { color: #94a3b8 !important; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-copy i { background: #1e293b; color: #94a3b8; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-copy:hover { background: #1e293b !important; color: #cbd5e1 !important; }

html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-csv { color: #22d3ee !important; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-csv i { background: #164e63; color: #22d3ee; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-csv:hover { background: #164e63 !important; color: #67e8f9 !important; }

html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-excel { color: #4ade80 !important; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-excel i { background: #14532d; color: #4ade80; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-excel:hover { background: #14532d !important; color: #86efac !important; }

html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-pdf { color: #f87171 !important; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-pdf i { background: #450a0a; color: #f87171; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-pdf:hover { background: #450a0a !important; color: #fca5a5 !important; }

html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-print { color: #c4b5fd !important; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-print i { background: #2e1065; color: #c4b5fd; }
html[data-theme='dark'] div.dt-button-collection button.dt-button.dt-drop-print:hover { background: #2e1065 !important; color: #ddd6fe !important; }

/* Responsive tables retain columns until their content would overflow. */
.dt-responsive-wrapper,
.dt-responsive-wrapper .access-table-wrap,
.dt-responsive-wrapper .matrix-wrap,
.dt-responsive-wrapper .table-responsive,
.dt-responsive-wrapper .master-table-wrap,
.dt-responsive-wrapper .dataTables_wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.dt-responsive-wrapper.access-table-wrap,
.dt-responsive-wrapper.matrix-wrap,
.dt-responsive-wrapper .access-table-wrap,
.dt-responsive-wrapper .matrix-wrap,
.dt-responsive-wrapper .table-responsive,
.dt-responsive-wrapper .master-table-wrap,
.dt-responsive-wrapper .dataTables_wrapper {
    height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
}

.dt-responsive-wrapper table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
}

.dt-responsive-wrapper table thead th.dt-column-hidden:nth-child(n),
.dt-responsive-wrapper table tbody tr:not(.dt-child-row) td.dt-column-hidden:nth-child(n),
.dt-responsive-wrapper table colgroup col.dt-column-hidden {
    display: none !important;
    width: 0 !important;
}

.dt-responsive-wrapper table thead th:first-child,
.dt-responsive-wrapper table tbody tr:not(.dt-child-row) td:first-child {
    width: auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.dt-responsive-wrapper table thead th:nth-child(2),
.dt-responsive-wrapper table tbody tr:not(.dt-child-row) td:nth-child(2) {
    width: auto !important;
    min-width: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.dt-responsive-wrapper tr.dt-child-row td {
    display: table-cell !important;
    width: 100% !important;
    padding: 0 !important;
}

.dt-responsive-wrapper .dt-control-btn {
    display: none !important;
}

.dt-responsive-wrapper.dt-has-hidden-columns .dt-control-btn {
    display: inline-flex !important;
}

.dt-responsive-wrapper .datatable-wrapper,
.dt-responsive-wrapper .dataTables_wrapper .dataTable {
    min-width: 0 !important;
}

.datatable-wrapper.dt-responsive-wrapper > .access-table-wrap,
.datatable-wrapper.dt-responsive-wrapper > .master-table-wrap,
.datatable-wrapper.dt-responsive-wrapper > .table-responsive {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

.datatable-wrapper.dt-responsive-wrapper > .access-table-wrap > .dataTables_wrapper,
.datatable-wrapper.dt-responsive-wrapper > .master-table-wrap > .dataTables_wrapper,
.datatable-wrapper.dt-responsive-wrapper > .table-responsive > .dataTables_wrapper {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
}

.datatable-wrapper.dt-responsive-wrapper table.master-data-table,
.datatable-wrapper.dt-responsive-wrapper table.esg-table,
.datatable-wrapper.dt-responsive-wrapper table.access-table,
.dt-responsive-wrapper table.matrix-table {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
}

.datatable-wrapper.dt-responsive-wrapper table.dt-measuring,
.dt-responsive-wrapper.table-responsive table.dt-measuring {
    width: max-content !important;
    min-width: max-content !important;
    max-width: none !important;
    table-layout: auto !important;
}

.datatable-wrapper.dt-responsive-wrapper table.dt-measuring th,
.datatable-wrapper.dt-responsive-wrapper table.dt-measuring td,
.dt-responsive-wrapper.table-responsive table.dt-measuring th,
.dt-responsive-wrapper.table-responsive table.dt-measuring td {
    width: max-content !important;
    min-width: 0 !important;
    max-width: none !important;
    white-space: nowrap !important;
}

.dt-responsive-wrapper table.dt-measuring tr.dt-child-row {
    display: none !important;
}

@media (max-width: 991.98px) {
    .app-shell > .app-main {
        margin-left: 0 !important;
    }
}
