:root {
    --surface: #f5f7f8;
    --panel: #ffffff;
    --ink: #1b2428;
    --muted: #68747b;
    --line: #d8e0e3;
    --sidebar: #20272c;
    --sidebar-strong: #151a1e;
    --green: #2f7d59;
    --green-strong: #226345;
    --amber: #b7791f;
    --blue: #356b8c;
    --danger: #b24343;
    --input-bg: #ffffff;
    --table-head: #f8fafb;
    --soft: #edf3f5;
    --soft-border: #d7e2e6;
    --success-soft: #eef5f2;
    --warning-soft: #fbf1df;
    --danger-soft: #f7eaea;
    --danger-border: #ebcccc;
    --shadow: rgba(27, 36, 40, 0.08);
}

:root[data-theme="dark"] {
    --surface: #0a0a0a;
    --panel: #101524;
    --ink: #f8fafc;
    --muted: #93a0ba;
    --line: rgba(255, 255, 255, 0.09);
    --sidebar: #0c1020;
    --sidebar-strong: #07080e;
    --green: #5b5cf0;
    --green-strong: #7c3aed;
    --amber: #f59e0b;
    --blue: #8b8cf6;
    --danger: #fb7185;
    --input-bg: #0f1424;
    --table-head: rgba(16, 21, 36, 0.96);
    --soft: rgba(255, 255, 255, 0.05);
    --soft-border: rgba(255, 255, 255, 0.1);
    --success-soft: rgba(34, 197, 94, 0.12);
    --warning-soft: rgba(245, 158, 11, 0.12);
    --danger-soft: rgba(239, 68, 68, 0.1);
    --danger-border: rgba(239, 68, 68, 0.22);
    --shadow: rgba(0, 0, 0, 0.42);
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    letter-spacing: 0;
}

body,
.topbar,
.metric-card,
.module-item,
.empty-state,
.company-card,
.form-panel,
.toolbar-panel,
.table-panel,
.form-control,
.btn,
.nav-link,
.theme-toggle {
    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease,
        box-shadow 0.18s ease;
}

a {
    color: inherit;
}

.auth-body {
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(32, 39, 44, 0.94), rgba(32, 39, 44, 0.78)),
        url("office-workspace.svg");
    background-color: var(--sidebar);
    background-size: cover;
    background-position: center;
}

.login-screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-panel {
    width: min(100%, 420px);
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.brand-mark,
.brand-symbol {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--green);
    color: white;
    font-weight: 800;
}

.brand-mark {
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 24px;
}

h2 {
    font-size: 22px;
    margin-bottom: 0;
}

h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.form-label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 700;
}

.form-control {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    background: var(--input-bg);
    color: var(--ink);
    font: inherit;
}

.form-control:focus {
    border-color: var(--green);
    outline: 3px solid rgba(47, 125, 89, 0.18);
}

.password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 8px;
}

.icon-button {
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--ink);
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 6px;
    border: 1px solid transparent;
    padding: 10px 16px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

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

.login-form .btn-primary {
    margin-top: 22px;
}

.btn-primary:hover {
    background: var(--green-strong);
}

.btn-muted {
    background: var(--soft);
    border-color: var(--soft-border);
    color: var(--ink);
}

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

.btn-compact {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
}

.btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.34);
    background: transparent;
}

.w-100 {
    width: 100%;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.sidebar {
    background: var(--sidebar);
    color: white;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    max-height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: 900;
    text-decoration: none;
}

.sidebar-nav {
    display: grid;
    gap: 22px;
}

.nav-group {
    display: grid;
    gap: 6px;
}

.nav-section {
    display: grid;
    gap: 6px;
}

.nav-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px 4px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.nav-section summary::-webkit-details-marker {
    display: none;
}

.nav-section summary::after {
    content: "+";
    color: rgba(255, 255, 255, 0.48);
    font-size: 15px;
    line-height: 1;
}

.nav-section[open] summary::after {
    content: "-";
}

.nav-section-body {
    display: grid;
    gap: 6px;
}

.nav-group-title {
    display: block;
    padding: 0 12px 4px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Global nav link styles (default: light theme colors) */
.nav-link {
    display: block;
    border-radius: 6px;
    padding: 11px 12px;
    /* default to visible dark text in light mode */
    color: rgba(0, 0, 0, 0.85);
    text-decoration: none;
    line-height: 1.25;
}

/* active state: subtle dark background / stronger text in light mode */
.nav-link.active {
    background: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.95);
}

/* disabled state (light mode) */
.nav-link.disabled {
    color: rgba(0, 0, 0, 0.44);
}

/* Make the user name in the header always visible and consistent:
   - in light mode: dark text (black/grey)
   - in dark mode (see overrides below): light text (white/grey)
*/
.app-header .nav-link {
    color: rgba(0, 0, 0, 0.85);
}

/* Hover state — keep visible and slightly stronger */
.app-header .nav-link:hover,
.nav-link:hover {
    color: rgba(0, 0, 0, 0.95);
    text-decoration: none;
}

/* Dark-theme overrides: keep nav links light and readable */
body[data-theme="dark"] .nav-link {
    color: rgba(255, 255, 255, 0.92);
}

body[data-theme="dark"] .nav-link.active {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.98);
}

body[data-theme="dark"] .nav-link.disabled {
    color: rgba(255, 255, 255, 0.5);
}

/* Ensure header links in dark mode are light as well */
body[data-theme="dark"] .app-header .nav-link,
body[data-theme="dark"] .app-header .nav-link:hover {
    color: rgba(255, 255, 255, 0.92);
}

.sidebar-logout {
    margin-top: auto;
}

.main-panel {
    min-width: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.topbar,
.page-heading,
.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.topbar {
    min-height: 62px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
}

.company-switch {
    display: grid;
    gap: 4px;
    min-width: 240px;
}

.company-switch select {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 6px 10px;
    background: var(--input-bg);
    color: var(--ink);
    font: inherit;
}

.topbar-label {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.topbar-badge,
.status-pill,
.module-state {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 800;
}

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

.status-pill {
    background: var(--success-soft);
    color: var(--green);
}

.topbar-tools,
.heading-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.topbar-user {
    min-width: 160px;
    text-align: right;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 5px 11px;
    background: var(--soft);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.theme-toggle:hover {
    border-color: rgba(47, 125, 89, 0.5);
}

.theme-toggle-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--panel);
}

.page-heading {
    margin-bottom: 20px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.metric-card,
.module-item,
.empty-state,
.company-card,
.form-panel,
.toolbar-panel,
.table-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metric-card {
    min-height: 126px;
    padding: 18px;
    display: grid;
    align-content: space-between;
    gap: 8px;
}

.metric-card strong {
    font-size: 22px;
}

.metric-card span:last-child,
.module-item p {
    color: var(--muted);
}

.metric-label {
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.module-section {
    margin-top: 6px;
}

.module-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.report-section {
    margin-bottom: 24px;
}

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

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

.report-card {
    min-height: 150px;
    display: grid;
    align-content: space-between;
    gap: 18px;
    padding: 16px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.report-card h3 {
    margin: 12px 0 6px;
}

.report-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.dictionary-card {
    min-height: 170px;
    display: grid;
    align-content: space-between;
    gap: 16px;
    padding: 18px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.dictionary-card.special {
    opacity: 0.84;
}

.dictionary-card h3 {
    margin: 12px 0 6px;
}

.dictionary-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.dictionary-meta {
    margin-top: 10px;
    font-size: 13px;
}

.report-card-actions,
.report-pager {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.report-pager {
    justify-content: flex-end;
    margin-top: 14px;
}

.report-result {
    margin-top: 18px;
}

.report-table td {
    max-width: 420px;
}

.report-print-paper-header,
.report-print-paper-footer {
    display: none;
}

.dashboard-wizard-modal .modal-dialog {
    max-width: min(1500px, calc(100vw - 2rem));
}

.dashboard-wizard-modal .modal-content {
    min-height: min(900px, calc(100vh - 2rem));
    overflow: hidden;
}

.dashboard-wizard-modal .modal-header {
    align-items: center;
    display: flex;
    flex-shrink: 0;
    gap: 1rem;
}

.dashboard-wizard-modal-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-wizard-modal-actions {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    margin-left: auto;
}

.dashboard-wizard-modal .modal-body {
    background: var(--surface);
    min-height: min(820px, calc(100vh - 7rem));
}

.dashboard-wizard-frame {
    border: 0;
    display: block;
    height: min(820px, calc(100vh - 7rem));
    width: 100%;
}

body.app-embedded {
    background: var(--surface) !important;
    min-height: 100vh;
}

body.app-embedded .app-header,
body.app-embedded .app-sidebar,
body.app-embedded .app-toolbar,
body.app-embedded .app-footer,
body.app-embedded > .app-wrapper > .position-fixed.start-0.bottom-0,
body.app-embedded #accountModal,
body.app-embedded #commandPaletteModal,
body.app-embedded .sidebar-rail-flyout {
    display: none !important;
}

body.app-embedded .app-wrapper {
    display: block !important;
    min-height: 100vh;
}

body.app-embedded .app-main {
    margin-left: 0 !important;
    min-height: 100vh;
    padding: 0 !important;
    width: 100% !important;
}

body.app-embedded .app-content-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem 1rem 0.75rem;
}

body.app-embedded .app-content {
    padding: 1rem;
}

body.app-embedded .container-fluid {
    max-width: 1440px;
}

body.app-embedded .flash-stack.in-flow {
    padding: 1rem 1rem 0 !important;
}

@media (max-width: 991.98px) {
    .dashboard-wizard-modal .modal-content,
    .dashboard-wizard-modal .modal-body,
    .dashboard-wizard-frame {
        height: 100vh;
        min-height: 100vh;
    }
}

.report-print-document {
    background: #ffffff;
    border: 1px solid #d7dee8;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    color: #111827;
    font-family: Arial, "Segoe UI", sans-serif;
    margin-bottom: 28px;
    max-width: 1280px;
    padding: 22px;
}

.report-print-document h1 {
    color: #111827;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 18px;
}

.report-print-document .legacy-generated-line {
    align-items: center;
    color: #7a7f87;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    gap: 12px;
    margin-bottom: 18px;
}

.report-print-document .legacy-generated-line img {
    display: block;
    height: 44px;
    object-fit: contain;
    width: 44px;
}

.report-print-document .legacy-generated-line span {
    border-bottom: 1px dashed #9ca3af;
    padding-bottom: 2px;
}

.report-print-document .legacy-report-meta {
    border: 1px solid #d1d5db;
    display: grid;
    gap: 8px 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 0 0 18px;
    padding: 12px 14px;
}

.report-print-document .legacy-report-meta div {
    color: #111827;
    font-size: 13px;
    line-height: 1.35;
}

.report-print-document .legacy-report-meta strong {
    font-weight: 700;
}

.report-print-document .print-table {
    border-collapse: collapse;
    color: #111827;
    font-family: Arial, "Segoe UI", sans-serif;
    font-size: 11px;
    margin-top: 16px;
    width: 100%;
}

.report-print-document .print-table th,
.report-print-document .print-table td {
    border: 1px solid #cbd5e1;
    padding: 7px 8px;
    text-align: left;
    vertical-align: top;
}

.report-print-document .print-table th {
    background: #eef2f7;
    color: #111827;
    font-size: 10px;
    font-weight: 700;
}

.report-print-document .print-empty {
    color: #64748b;
    text-align: center;
}

.report-print-document .legacy-report-signature {
    margin-top: 80px;
    text-align: center;
}

.report-print-document .legacy-report-signature span {
    border-top: 1px dashed #111827;
    display: inline-block;
    margin-top: 42px;
    width: 260px;
}

.report-print-document .print-footer {
    border-top: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 11px;
    margin-top: 22px;
    padding-top: 10px;
    text-align: right;
}

.module-item {
    min-height: 86px;
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 14px;
}

.module-item-link {
    color: inherit;
    text-decoration: none;
}

.module-item-link:hover {
    border-color: rgba(47, 125, 89, 0.42);
    box-shadow: 0 10px 24px var(--shadow);
}

.module-index {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: var(--soft);
    color: var(--blue);
    font-weight: 900;
}

.module-state.ready {
    background: var(--success-soft);
    color: var(--green);
}

.module-state.pending {
    background: var(--warning-soft);
    color: var(--amber);
}

.empty-state {
    max-width: 680px;
    padding: 24px;
}

.empty-state p {
    color: var(--muted);
}

.company-list {
    display: grid;
    gap: 12px;
}

.company-card {
    min-height: 112px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 18px;
}

.company-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.company-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.company-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.company-actions form {
    margin: 0;
}

.form-panel {
    max-width: 720px;
    padding: 24px;
}

.stacked-form {
    margin-top: 18px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.toolbar-panel {
    padding: 14px;
    margin-bottom: 14px;
}

.dictionary-toolbar-copy {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
}

.report-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.report-empty-state {
    margin-bottom: 18px;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

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

.table-panel {
    overflow: hidden;
}

.table-summary {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
}

.table-summary strong {
    font-size: 22px;
}

.table-summary span {
    color: var(--muted);
}

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

.data-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.data-table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background: var(--table-head);
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.data-table td {
    max-width: 320px;
}

.id-cell {
    width: 72px;
    color: var(--blue);
    font-weight: 900;
}

.actions-cell {
    width: 250px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.actions-cell form {
    margin: 0;
}

.empty-cell {
    color: var(--muted);
    text-align: center;
}

.wide-form {
    max-width: none;
}

.record-form {
    margin-top: 18px;
}

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

.field-block.span-2 {
    grid-column: span 2;
}

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

.print-meta > div,
.detail-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.print-meta > div {
    min-height: 82px;
    padding: 14px 16px;
    display: grid;
    align-content: center;
    gap: 4px;
}

.print-meta span,
.detail-item dt {
    color: var(--green);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.print-meta strong {
    font-size: 18px;
}

.detail-stack {
    display: grid;
    gap: 14px;
}

.detail-section {
    padding: 20px;
}

.detail-section h2 {
    margin-bottom: 16px;
}

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

.detail-item {
    min-height: 96px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: var(--surface);
}

.detail-item dt {
    margin-bottom: 8px;
}

.detail-item dd {
    margin: 0;
    color: var(--ink);
    white-space: normal;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.flash-stack {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 10;
    width: min(360px, calc(100vw - 36px));
}

.flash-stack.in-flow {
    position: static;
    width: auto;
    margin-bottom: 18px;
}

.app-footer {
    margin-top: auto;
    padding: 28px 0 4px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.alert {
    border-radius: 8px;
    border: 1px solid var(--line);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: var(--panel);
}

.alert-danger {
    border-color: rgba(178, 67, 67, 0.28);
    color: var(--danger);
}

.alert-success {
    border-color: rgba(47, 125, 89, 0.28);
    color: var(--green);
}

.app-adminlte-body {
    font-family: "Segoe UI", sans-serif;
}

.theme-toggle-button {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: none !important;
    transform: none !important;
    transition:
        background-color 0.12s ease,
        border-color 0.12s ease,
        color 0.12s ease !important;
}

.theme-toggle-button:hover,
.theme-toggle-button:focus,
.theme-toggle-button:active,
.theme-toggle-button.show {
    box-shadow: none !important;
    transform: none !important;
}

.theme-toggle-button:focus-visible {
    outline: 2px solid rgba(13, 110, 253, 0.32);
    outline-offset: 2px;
}

.modal .btn-close {
    border: 1px solid transparent;
    border-radius: 0.45rem;
    opacity: 0.72;
    transition:
        background-color 0.14s ease,
        border-color 0.14s ease,
        filter 0.14s ease,
        opacity 0.14s ease,
        transform 0.14s ease;
}

.modal .btn-close:hover,
.modal .btn-close:focus {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: rgba(220, 53, 69, 0.32);
    filter: invert(27%) sepia(95%) saturate(1927%) hue-rotate(334deg) brightness(92%) contrast(96%);
    opacity: 1;
    transform: rotate(90deg) scale(1.06);
}

.account-logout-button {
    background: rgba(220, 53, 69, 0.06) !important;
    border-color: rgba(220, 53, 69, 0.28) !important;
    box-shadow: none !important;
    color: #c92a3a !important;
    overflow: hidden;
    position: relative;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease !important;
}

.account-logout-button::before {
    background: currentColor;
    border-radius: 999px;
    content: "";
    height: 0.38rem;
    left: 0.55rem;
    opacity: 0.18;
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    transition: transform 0.18s ease;
    width: 1.25rem;
}

.account-logout-button i {
    position: relative;
    transition: transform 0.16s ease;
    z-index: 1;
}

.account-logout-button:hover,
.account-logout-button:focus {
    background: rgba(220, 53, 69, 0.11) !important;
    border-color: rgba(220, 53, 69, 0.48) !important;
    color: #a71d2a !important;
    transform: translateY(-1px);
}

.account-logout-button:hover::before,
.account-logout-button:focus::before {
    transform: translateY(-50%) scaleX(1);
}

.account-logout-button:hover i,
.account-logout-button:focus i {
    transform: translateX(3px);
}

body[data-theme="dark"] {
    background:
        radial-gradient(circle at top left, rgba(91, 92, 240, 0.16), transparent 28%),
        radial-gradient(circle at 82% 12%, rgba(124, 58, 237, 0.13), transparent 24%),
        linear-gradient(180deg, #07080e 0%, #0a0a0a 55%, #11131a 100%);
    color: #f8fafc;
}

body[data-theme="dark"]::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 38px 38px;
    content: "";
    inset: 0;
    opacity: 0.34;
    pointer-events: none;
    position: fixed;
    z-index: 0;
}

body[data-theme="dark"] .app-wrapper {
    isolation: isolate;
    position: relative;
    z-index: 1;
}

body[data-theme="dark"] .app-wrapper,
body[data-theme="dark"] .app-main,
body[data-theme="dark"] .app-content,
body[data-theme="dark"] .container-fluid {
    background: transparent;
}

body[data-theme="dark"] .btn-primary,
body[data-theme="dark"] .btn-success {
    background: linear-gradient(135deg, #5b5cf0 0%, #7c3aed 100%) !important;
    border-color: rgba(91, 92, 240, 0.64) !important;
    box-shadow: 0 16px 34px rgba(91, 92, 240, 0.22);
    color: #ffffff !important;
}

body[data-theme="dark"] .btn-primary:hover,
body[data-theme="dark"] .btn-primary:focus,
body[data-theme="dark"] .btn-success:hover,
body[data-theme="dark"] .btn-success:focus {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

body[data-theme="dark"] .form-check-input:checked {
    background-color: #5b5cf0;
    border-color: #7c3aed;
}

body[data-theme="dark"] .app-header.navbar,
body[data-theme="dark"] .app-toolbar,
body[data-theme="dark"] .app-footer,
body[data-theme="dark"] .login-card-body,
body[data-theme="dark"] .card,
body[data-theme="dark"] .info-box,
body[data-theme="dark"] .small-box,
body[data-theme="dark"] .callout,
body[data-theme="dark"] .alert,
body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .dropdown-menu,
body[data-theme="dark"] .border.rounded.p-3.h-100.bg-body-tertiary-subtle {
    background-color: rgba(16, 21, 36, 0.96) !important;
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

body[data-theme="dark"] .app-header.navbar {
    background-color: rgba(12, 16, 28, 0.92) !important;
    backdrop-filter: blur(18px);
    border-color: rgba(255, 255, 255, 0.09) !important;
}

body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-footer,
body[data-theme="dark"] .input-group-text,
body[data-theme="dark"] .table > :not(caption) > * > * {
    background-color: rgba(16, 21, 36, 0.96) !important;
    color: #e6eaf4;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

body[data-theme="dark"] .card-header {
    background:
        linear-gradient(90deg, rgba(91, 92, 240, 0.12), rgba(124, 58, 237, 0.04)),
        rgba(16, 21, 36, 0.96) !important;
}

body[data-theme="dark"] .card-title,
body[data-theme="dark"] .card-header h1,
body[data-theme="dark"] .card-header h2,
body[data-theme="dark"] .card-header h3 {
    color: #c7d2fe !important;
}

body[data-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(91, 92, 240, 0.1) !important;
    color: #ffffff;
}

body[data-theme="dark"] .text-body-secondary,
body[data-theme="dark"] .small,
body[data-theme="dark"] .info-box-text,
body[data-theme="dark"] .card-title,
body[data-theme="dark"] .breadcrumb-item,
body[data-theme="dark"] .form-text {
    color: #93a0ba !important;
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] .input-group-text {
    background-color: rgba(16, 21, 36, 0.96) !important;
    color: #f8fafc !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
}

body[data-theme="dark"] .form-control::placeholder {
    color: rgba(147, 160, 186, 0.76);
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus {
    background-color: rgba(16, 21, 36, 0.98) !important;
    color: #ffffff !important;
    border-color: rgba(91, 92, 240, 0.64) !important;
    box-shadow: 0 0 0 0.22rem rgba(91, 92, 240, 0.16) !important;
}

body[data-theme="dark"] .btn-outline-secondary {
    background-color: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: none;
    color: #f8fafc;
}

body[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.18);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
}

body[data-theme="dark"] .theme-toggle-button {
    background-color: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
    color: #f8fafc !important;
}

body[data-theme="dark"] .theme-toggle-button:hover,
body[data-theme="dark"] .theme-toggle-button:focus,
body[data-theme="dark"] .theme-toggle-button:active {
    background-color: rgba(91, 92, 240, 0.16) !important;
    border-color: rgba(91, 92, 240, 0.38) !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .btn-outline-primary {
    background-color: rgba(91, 92, 240, 0.08);
    border-color: rgba(91, 92, 240, 0.36);
    box-shadow: none;
    color: #c7d2fe;
}

body[data-theme="dark"] .btn-outline-primary:hover {
    background-color: rgba(91, 92, 240, 0.2);
    color: #ffffff;
    border-color: rgba(124, 58, 237, 0.62);
    box-shadow: 0 16px 34px rgba(91, 92, 240, 0.22);
}

body[data-theme="dark"] .btn-outline-success {
    background-color: rgba(91, 92, 240, 0.08);
    border-color: rgba(91, 92, 240, 0.36);
    box-shadow: none;
    color: #c7d2fe;
}

body[data-theme="dark"] .btn-outline-success:hover {
    background-color: rgba(91, 92, 240, 0.2);
    border-color: rgba(124, 58, 237, 0.62);
    box-shadow: 0 16px 34px rgba(91, 92, 240, 0.22);
    color: #ffffff;
}

body[data-theme="dark"] .btn-outline-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.24);
    box-shadow: none;
    color: #fb7185;
}

body[data-theme="dark"] .btn-outline-danger:hover {
    background-color: rgba(239, 68, 68, 0.14);
    border-color: rgba(251, 113, 133, 0.44);
    box-shadow: 0 14px 28px rgba(239, 68, 68, 0.14);
    color: #ffffff;
}

body[data-theme="dark"] .btn-tool {
    color: #b8c1d9 !important;
    opacity: 0.92;
}

body[data-theme="dark"] .btn-tool:hover,
body[data-theme="dark"] .btn-tool:focus {
    background-color: rgba(91, 92, 240, 0.14) !important;
    border-color: rgba(91, 92, 240, 0.28) !important;
    box-shadow: none !important;
    color: #ffffff !important;
    opacity: 1;
}

body[data-theme="dark"] .modal-footer .btn-outline-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.24);
    box-shadow: none;
    color: #fb7185;
}

body[data-theme="dark"] .modal-footer .btn-outline-danger:hover,
body[data-theme="dark"] .modal-footer .btn-outline-danger:focus {
    background-color: #5b1f2b;
    border-color: #ff93a0;
    box-shadow: 0 0.45rem 1rem rgba(0, 0, 0, 0.24);
    color: #ffffff;
}

body[data-theme="dark"] .account-logout-button {
    background: rgba(255, 111, 127, 0.08) !important;
    border-color: rgba(255, 111, 127, 0.32) !important;
    box-shadow: none !important;
    color: #ff8d99 !important;
}

body[data-theme="dark"] .account-logout-button:hover,
body[data-theme="dark"] .account-logout-button:focus {
    background: rgba(255, 111, 127, 0.15) !important;
    border-color: rgba(255, 111, 127, 0.58) !important;
    color: #ffd2d8 !important;
}

body[data-theme="dark"] .modal .btn-close {
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: 0.45rem;
    filter: invert(1) grayscale(100%) brightness(1.5);
    opacity: 0.72;
    transition:
        background-color 0.14s ease,
        border-color 0.14s ease,
        filter 0.14s ease,
        opacity 0.14s ease,
        transform 0.14s ease;
}

body[data-theme="dark"] .modal .btn-close:hover,
body[data-theme="dark"] .modal .btn-close:focus {
    background-color: rgba(255, 111, 127, 0.16);
    border-color: rgba(255, 111, 127, 0.4);
    filter: invert(54%) sepia(74%) saturate(681%) hue-rotate(308deg) brightness(108%) contrast(103%);
    opacity: 1;
    transform: rotate(90deg) scale(1.06);
}

body[data-theme="dark"] .btn-warning {
    color: #1a1f22;
}

body[data-theme="dark"] .badge.text-bg-light,
body[data-theme="dark"] .bg-body-tertiary,
body[data-theme="dark"] .bg-body-secondary {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #e6eaf4 !important;
}

body[data-theme="dark"] .app-sidebar,
body[data-theme="dark"] .main-sidebar,
body[data-theme="dark"] .sidebar-wrapper {
    background-color: rgba(12, 16, 28, 0.94) !important;
    color: #e6eaf4;
}

body[data-theme="dark"] .sidebar-brand,
body[data-theme="dark"] .brand-link,
body[data-theme="dark"] .nav-sidebar > .nav-item > .nav-link,
body[data-theme="dark"] .nav-treeview > .nav-item > .nav-link,
body[data-theme="dark"] .app-header .nav-link,
body[data-theme="dark"] .breadcrumb-item.active {
    color: #f8fafc !important;
}

body[data-theme="dark"] .nav-sidebar .nav-link.active,
body[data-theme="dark"] .nav-sidebar .nav-link:hover,
body[data-theme="dark"] .nav-treeview .nav-link.active,
body[data-theme="dark"] .nav-treeview .nav-link:hover {
    background-color: rgba(91, 92, 240, 0.16) !important;
    border-color: rgba(91, 92, 240, 0.28) !important;
    box-shadow: inset 3px 0 0 rgba(124, 58, 237, 0.85);
    color: #ffffff !important;
}

body[data-theme="dark"] .nav-sidebar .nav-icon,
body[data-theme="dark"] .nav-treeview .nav-icon,
body[data-theme="dark"] .app-header .nav-link i,
body[data-theme="dark"] .bi {
    color: #c7d2fe;
}

body[data-theme="dark"] .nav-sidebar .nav-link.active .nav-icon,
body[data-theme="dark"] .nav-sidebar .nav-link:hover .nav-icon,
body[data-theme="dark"] .nav-treeview .nav-link.active .nav-icon,
body[data-theme="dark"] .nav-treeview .nav-link:hover .nav-icon {
    color: #ffffff;
}

body[data-theme="dark"] .nav-sidebar .nav-header,
body[data-theme="dark"] .nav-arrow,
body[data-theme="dark"] .login-logo,
body[data-theme="dark"] .app-footer .float-end {
    color: #93a0ba !important;
}

body[data-theme="dark"] .sidebar-rail-flyout {
    background: rgba(16, 21, 36, 0.98);
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: 0 26px 80px rgba(0, 0, 0, 0.42);
}

body[data-theme="dark"] .sidebar-rail-flyout-title {
    color: #93a0ba;
}

body[data-theme="dark"] .sidebar-rail-flyout-links a {
    color: #e6eaf4;
}

body[data-theme="dark"] .sidebar-rail-flyout-links a:hover,
body[data-theme="dark"] .sidebar-rail-flyout-links a:focus {
    background: rgba(91, 92, 240, 0.13);
    border-color: rgba(91, 92, 240, 0.26);
    color: #ffffff;
}

body[data-theme="dark"] .sidebar-rail-flyout-links a.active {
    background: rgba(91, 92, 240, 0.2);
    border-color: rgba(91, 92, 240, 0.38);
    color: #c7d2fe;
}

body[data-theme="dark"] .callout.callout-info {
    border-left-color: #5b5cf0 !important;
}

body[data-theme="dark"] .small-box.text-bg-primary,
body[data-theme="dark"] .small-box.text-bg-success,
body[data-theme="dark"] .small-box.text-bg-warning,
body[data-theme="dark"] .small-box.text-bg-secondary {
    color: #ffffff !important;
}

body[data-theme="dark"] .small-box.text-bg-primary {
    background:
        radial-gradient(circle at top right, rgba(124, 58, 237, 0.38), transparent 45%),
        linear-gradient(135deg, rgba(40, 48, 92, 0.98), rgba(23, 29, 48, 0.98)) !important;
    border: 1px solid rgba(91, 92, 240, 0.32);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 16px 34px rgba(91, 92, 240, 0.12);
}

body[data-theme="dark"] .small-box.text-bg-success {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.26), transparent 45%),
        linear-gradient(135deg, rgba(30, 70, 44, 0.96), rgba(20, 48, 30, 0.98)) !important;
    border: 1px solid rgba(34, 197, 94, 0.24);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 16px 34px rgba(34, 197, 94, 0.1);
}

body[data-theme="dark"] .small-box.text-bg-warning {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.24), transparent 42%),
        linear-gradient(180deg, rgba(86, 58, 24, 0.96), rgba(58, 36, 14, 0.98)) !important;
    border: 1px solid rgba(245, 158, 11, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    color: #fff4d7 !important;
}

body[data-theme="dark"] .small-box.text-bg-secondary {
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.26), transparent 45%),
        linear-gradient(135deg, rgba(52, 60, 78, 0.96), rgba(32, 37, 52, 0.98)) !important;
    border: 1px solid rgba(59, 130, 246, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 16px 34px rgba(59, 130, 246, 0.1);
}

body[data-theme="dark"] .small-box h3,
body[data-theme="dark"] .small-box p {
    color: inherit !important;
}

body[data-theme="dark"] .text-bg-light {
    background-color: rgba(255, 255, 255, 0.06) !important;
    color: #f8fafc !important;
}

body[data-theme="dark"] .list-group-item {
    background-color: rgba(16, 21, 36, 0.96);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.09);
}

body[data-theme="dark"] .list-group-item:hover,
body[data-theme="dark"] .list-group-item:focus {
    background-color: rgba(91, 92, 240, 0.1);
    color: #ffffff;
}

body[data-theme="dark"] .login-page {
    background-color: #0a0a0a !important;
}

:root[data-theme="dark"] body.login-page {
    background-color: #0a0a0a !important;
    color: #f8fafc;
}

:root[data-theme="dark"] body.login-page .card,
:root[data-theme="dark"] body.login-page .login-card-body,
:root[data-theme="dark"] body.login-page .login-panel {
    background-color: rgba(16, 21, 36, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    color: #f8fafc;
}

:root[data-theme="dark"] body.login-page .form-control,
:root[data-theme="dark"] body.login-page .input-group-text {
    background-color: rgba(16, 21, 36, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
    color: #f8fafc !important;
}

:root[data-theme="dark"] body.login-page .form-control::placeholder {
    color: rgba(147, 160, 186, 0.76);
}

.app-main .page-heading,
.app-main .toolbar-panel,
.app-main .table-panel,
.app-main .form-panel,
.app-main .module-section,
.app-main .print-meta,
.app-main .detail-section {
    margin: 1rem;
}

.flash-stack.in-flow {
    max-width: none;
}

.sidebar-menu .nav-link p {
    margin-bottom: 0;
}

.rodolider-brand-link {
    align-items: center;
    display: flex;
    gap: 10px;
    min-height: 58px;
    padding-inline: 14px;
}

.rodolider-brand-logo {
    display: block;
    flex: 0 0 auto;
    height: 34px;
    width: auto;
}

.rodolider-brand-link .brand-text {
    letter-spacing: 0;
}

.app-sidebar,
.app-header,
.app-main,
.app-footer {
    transition:
        margin-left 0.18s ease,
        width 0.18s ease,
        transform 0.18s ease;
}

body.sidebar-mini-rail .app-sidebar {
    min-width: 74px !important;
    width: 74px !important;
}

body.sidebar-mini-rail .sidebar-brand {
    justify-content: center;
    min-height: 64px;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-mini-rail .rodolider-brand-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

body.sidebar-mini-rail .rodolider-brand-logo {
    height: 38px;
    max-width: 44px;
    object-fit: contain;
}

body.sidebar-mini-rail .brand-text,
body.sidebar-mini-rail .sidebar-menu .nav-link p,
body.sidebar-mini-rail .nav-arrow {
    opacity: 0;
    pointer-events: none;
    position: absolute;
    width: 0;
}

body.sidebar-mini-rail .sidebar-wrapper {
    overflow-x: visible !important;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

body.sidebar-mini-rail .sidebar-menu > .nav-item > .nav-link {
    border-radius: 0.65rem;
    justify-content: center;
    min-height: 46px;
    padding-left: 0;
    padding-right: 0;
    position: relative;
}

body.sidebar-mini-rail .sidebar-menu .nav-icon {
    font-size: 1.1rem;
    margin: 0 !important;
    min-width: 0;
}

body.sidebar-mini-rail .nav-treeview {
    display: none !important;
}

body.sidebar-mini-rail .nav-item.menu-open {
    display: block;
}

.sidebar-rail-flyout {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.16);
    left: 84px;
    min-width: 310px;
    max-width: 380px;
    padding: 0.7rem;
    position: fixed;
    top: 88px;
    z-index: 1045;
}

.sidebar-rail-flyout[hidden] {
    display: none !important;
}

.sidebar-rail-flyout-title {
    color: var(--bs-secondary-color);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    padding: 0.4rem 0.55rem 0.6rem;
    text-transform: uppercase;
}

.sidebar-rail-flyout-links {
    display: grid;
    gap: 0.2rem;
    max-height: min(70vh, 620px);
    overflow-y: auto;
}

.sidebar-rail-flyout-links a {
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: var(--bs-body-color);
    display: block;
    font-size: 0.92rem;
    line-height: 1.25;
    padding: 0.58rem 0.65rem;
    text-decoration: none;
}

.sidebar-rail-flyout-links a:hover,
.sidebar-rail-flyout-links a:focus {
    background: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.18);
    color: var(--bs-body-color);
}

.sidebar-rail-flyout-links a.active {
    background: rgba(13, 110, 253, 0.12);
    border-color: rgba(13, 110, 253, 0.28);
    color: #0d6efd;
    font-weight: 800;
}

body:not(.sidebar-mini-rail) .sidebar-rail-flyout {
    display: none !important;
}

body.sidebar-mini-rail .app-main,
body.sidebar-mini-rail .app-header,
body.sidebar-mini-rail .app-footer {
    margin-left: 74px !important;
}

body.sidebar-mini-rail .sidebar-logout,
body.sidebar-mini-rail .position-fixed.start-0.bottom-0 {
    display: none !important;
}

@media (max-width: 991.98px) {
    body.sidebar-mini-rail .app-sidebar {
        transform: translateX(0) !important;
    }

    body.sidebar-mini-rail .app-main,
    body.sidebar-mini-rail .app-header,
    body.sidebar-mini-rail .app-footer {
        margin-left: 74px !important;
    }
}

.login-brand-logo {
    display: block;
    height: 56px;
    width: auto;
}

.app-toolbar .form-select {
    min-width: 240px;
}

.checklist-pills .nav-link {
    border-radius: 0;
    padding: 1rem;
}

.checklist-pills .nav-link.active .text-body-secondary {
    color: rgba(255, 255, 255, 0.82) !important;
}

.checklist-attachment-panel {
    align-items: center;
    background: rgba(13, 110, 253, 0.06);
    border: 1px solid rgba(13, 110, 253, 0.18);
    border-radius: 0.5rem;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.checklist-attachment-actions,
.checklist-upload-form {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.checklist-upload-form .form-control {
    min-width: 260px;
}

.record-attachment-form {
    align-items: end;
}

.record-attachment-field .form-control {
    min-height: 44px;
}

.record-attachment-submit {
    display: flex;
    align-items: flex-end;
}

.record-attachment-submit-button {
    min-height: 44px;
    white-space: nowrap;
}

.checklist-row-card .card-header {
    background: rgba(13, 110, 253, 0.04);
}

.checklist-editor-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.checklist-editor-row {
    border-color: rgba(148, 163, 184, 0.28);
}

.checklist-editor-row.is-defined {
    border-color: rgba(25, 135, 84, 0.34);
}

.checklist-editor-row.is-empty {
    background: rgba(148, 163, 184, 0.06);
}

.checklist-editor-row textarea {
    min-height: 92px;
}

.help-card {
    border: 1px solid rgba(13, 110, 253, 0.18);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.help-card:hover {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.12);
    transform: translateY(-2px);
}

.help-card-icon {
    align-items: center;
    background: rgba(13, 110, 253, 0.1);
    border-radius: 0.5rem;
    color: #0d6efd;
    display: inline-flex;
    flex: 0 0 48px;
    font-size: 1.45rem;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.expert-hint-button {
    border-radius: 999px;
    box-shadow: none !important;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.55rem;
    min-height: 0;
    padding: 0;
    width: 1.55rem;
}

.expert-hint-button:hover,
.expert-hint-button:focus {
    transform: none !important;
}

.tooltip {
    --bs-tooltip-max-width: 360px;
}

.record-edit-card .card-header {
    overflow-x: auto;
}

.record-form-tabs {
    flex-wrap: nowrap;
    min-width: max-content;
}

.record-form-tabs .nav-link {
    border-radius: 0;
    color: var(--bs-body-color);
    font-weight: 700;
    min-height: 48px;
}

.record-form-tabs .nav-link.active {
    color: #0d6efd !important;
}

.record-field-shell {
    background: rgba(248, 250, 252, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.5rem;
    height: 100%;
    padding: 0.9rem;
}

.record-form-field {
    min-height: 44px;
}

textarea.record-form-field {
    min-height: 128px;
    resize: vertical;
}

.record-quick-choices {
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    padding-top: 0.75rem;
}

.record-quick-choices-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.45rem;
    text-transform: uppercase;
}

.record-quick-choice {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    color: #1e293b;
    font-weight: 650;
}

.record-quick-choice:hover,
.record-quick-choice.is-active {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
}

.record-side-panel {
    position: sticky;
    top: 1rem;
}

.record-expert-panel {
    background: rgba(13, 202, 240, 0.08);
    border: 1px solid rgba(13, 202, 240, 0.22);
    border-radius: 0.5rem;
    color: var(--bs-body-color);
    font-size: 0.92rem;
    line-height: 1.45;
    min-height: 120px;
    padding: 0.85rem;
}

.record-sticky-actions {
    border-color: rgba(25, 135, 84, 0.28);
}

.dashboard-quick-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.dashboard-quick-action {
    align-items: center;
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    color: var(--bs-body-color);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    justify-content: center;
    min-height: 158px;
    padding: 1rem;
    position: relative;
    text-align: center;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.dashboard-quick-action:hover {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.1);
    color: var(--bs-body-color);
    transform: translateY(-2px);
}

.dashboard-quick-icon {
    align-items: center;
    color: #5d6670;
    display: inline-flex;
    font-size: 1.55rem;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.dashboard-quick-title {
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-quick-desc {
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    line-height: 1.25;
}

.dashboard-quick-badge {
    font-size: 0.72rem;
    margin-top: 0.25rem;
    max-width: 100%;
    white-space: normal;
}

.dashboard-news-item {
    color: inherit;
    min-height: 76px;
    text-decoration: none;
}

.dashboard-news-item:hover {
    background: rgba(13, 110, 253, 0.04);
    color: inherit;
}

.dashboard-news-text {
    color: var(--bs-body-color);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dashboard-checklist-card {
    margin-top: 0;
}

.dashboard-checklist-strip {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
}

.dashboard-checklist-item {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    color: var(--bs-body-color);
    min-height: 112px;
    padding: 0.9rem;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.dashboard-checklist-item:hover {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.1);
    color: var(--bs-body-color);
    transform: translateY(-2px);
}

.dashboard-checklist-title {
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-checklist-progress {
    height: 0.35rem;
}

.audit-log-table {
    min-width: 1080px;
}

.audit-log-table td,
.audit-log-table th {
    vertical-align: top;
}

body[data-theme="dark"] .checklist-attachment-panel {
    background: rgba(91, 92, 240, 0.1);
    border-color: rgba(91, 92, 240, 0.28);
}

body[data-theme="dark"] .checklist-editor-row,
:root[data-theme="dark"] .checklist-editor-row {
    background: #242528;
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .checklist-editor-row.is-defined,
:root[data-theme="dark"] .checklist-editor-row.is-defined {
    border-color: rgba(34, 197, 94, 0.42);
}

body[data-theme="dark"] .checklist-editor-row.is-empty,
:root[data-theme="dark"] .checklist-editor-row.is-empty {
    background: rgba(36, 37, 40, 0.72);
}

body[data-theme="dark"] .help-card {
    border-color: rgba(91, 92, 240, 0.24);
}

body[data-theme="dark"] .help-card:hover {
    border-color: rgba(91, 92, 240, 0.5);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

body[data-theme="dark"] .help-card-icon {
    background: rgba(91, 92, 240, 0.16);
    color: #c7d2fe;
}

body[data-theme="dark"] .dashboard-quick-action {
    background:
        radial-gradient(circle at top, rgba(91, 92, 240, 0.12), transparent 46%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(91, 92, 240, 0.24);
    color: #f8fafc !important;
}

body[data-theme="dark"] .dashboard-quick-action:nth-child(2) {
    background:
        radial-gradient(circle at top, rgba(244, 63, 94, 0.14), transparent 46%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(244, 63, 94, 0.24);
}

body[data-theme="dark"] .dashboard-quick-action:nth-child(3) {
    background:
        radial-gradient(circle at top, rgba(34, 197, 94, 0.14), transparent 46%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(34, 197, 94, 0.22);
}

body[data-theme="dark"] .dashboard-quick-action:nth-child(4),
body[data-theme="dark"] .dashboard-quick-action:nth-child(5) {
    background:
        radial-gradient(circle at top, rgba(20, 184, 166, 0.14), transparent 46%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(20, 184, 166, 0.22);
}

body[data-theme="dark"] .dashboard-quick-action:hover {
    border-color: rgba(91, 92, 240, 0.5);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    color: #ffffff !important;
}

body[data-theme="dark"] .dashboard-quick-icon {
    color: #c7d2fe;
    filter: drop-shadow(0 0 10px rgba(91, 92, 240, 0.32));
}

body[data-theme="dark"] .dashboard-quick-action:nth-child(2) .dashboard-quick-icon {
    color: #fda4af;
    filter: drop-shadow(0 0 10px rgba(244, 63, 94, 0.26));
}

body[data-theme="dark"] .dashboard-quick-action:nth-child(3) .dashboard-quick-icon {
    color: #86efac;
    filter: drop-shadow(0 0 10px rgba(34, 197, 94, 0.24));
}

body[data-theme="dark"] .dashboard-quick-action:nth-child(4) .dashboard-quick-icon,
body[data-theme="dark"] .dashboard-quick-action:nth-child(5) .dashboard-quick-icon {
    color: #67e8f9;
    filter: drop-shadow(0 0 10px rgba(20, 184, 166, 0.24));
}

body[data-theme="dark"] .dashboard-quick-title {
    color: #ffffff;
}

body[data-theme="dark"] .dashboard-quick-desc {
    color: #93a0ba;
}

body[data-theme="dark"] .dashboard-quick-badge {
    background: linear-gradient(135deg, rgba(91, 92, 240, 0.92), rgba(124, 58, 237, 0.92)) !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(91, 92, 240, 0.18);
}

body[data-theme="dark"] .badge.text-bg-info {
    background: linear-gradient(135deg, #06b6d4, #22d3ee) !important;
    color: #06111b !important;
}

body[data-theme="dark"] .badge.text-bg-success {
    background: linear-gradient(135deg, #22c55e, #86efac) !important;
    color: #06140b !important;
}

body[data-theme="dark"] .badge.text-bg-warning {
    background: linear-gradient(135deg, #f59e0b, #fbbf24) !important;
    color: #1f1300 !important;
}

body[data-theme="dark"] .badge.text-bg-danger {
    background: linear-gradient(135deg, #f43f5e, #fb7185) !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .dashboard-news-item:hover {
    background: rgba(91, 92, 240, 0.1);
}

body[data-theme="dark"] .dashboard-news-text {
    color: #e6eaf4;
}

body[data-theme="dark"] .record-field-shell {
    background:
        linear-gradient(180deg, rgba(20, 26, 44, 0.96), rgba(12, 16, 28, 0.9));
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.035),
        0 10px 24px rgba(0, 0, 0, 0.14);
}

body[data-theme="dark"] .record-edit-card {
    background: rgba(16, 21, 36, 0.96) !important;
    border-color: rgba(91, 92, 240, 0.2) !important;
}

body[data-theme="dark"] .record-edit-card .card-body {
    background: rgba(16, 21, 36, 0.96);
}

body[data-theme="dark"] .record-form-tabs {
    border-bottom-color: rgba(255, 255, 255, 0.11);
}

body[data-theme="dark"] .record-form-tabs .nav-link {
    background: rgba(255, 255, 255, 0.055);
    border-color: transparent rgba(255, 255, 255, 0.11) rgba(255, 255, 255, 0.13) transparent;
    color: #e6eaf4 !important;
}

body[data-theme="dark"] .record-form-tabs .nav-link:hover {
    background: rgba(91, 92, 240, 0.12);
    border-color: rgba(91, 92, 240, 0.3);
    color: #ffffff !important;
}

body[data-theme="dark"] .record-form-tabs .nav-link.active {
    background: linear-gradient(135deg, rgba(91, 92, 240, 0.96), rgba(124, 58, 237, 0.96)) !important;
    border-color: rgba(91, 92, 240, 0.64) rgba(91, 92, 240, 0.64) transparent !important;
    color: #ffffff !important;
}

body[data-theme="dark"] .record-form-tabs .badge.text-bg-light {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #f0f9ff !important;
}

body[data-theme="dark"] .record-expert-panel {
    background:
        radial-gradient(circle at top right, rgba(91, 92, 240, 0.22), transparent 46%),
        rgba(91, 92, 240, 0.1);
    border-color: rgba(91, 92, 240, 0.34);
    color: #e6eaf4;
}

body[data-theme="dark"] .record-side-panel .card {
    background: rgba(16, 21, 36, 0.96) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
}

body[data-theme="dark"] .record-sticky-actions {
    background: rgba(12, 16, 28, 0.9) !important;
    border-color: rgba(91, 92, 240, 0.28) !important;
}

body[data-theme="dark"] .record-form-field,
body[data-theme="dark"] .record-field-shell .form-control {
    background-color: rgba(8, 12, 24, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #f8fafc !important;
}

body[data-theme="dark"] .record-field-shell .form-label {
    color: #f5f8fb;
}

body[data-theme="dark"] .record-field-shell .input-group .btn {
    background-color: rgba(91, 92, 240, 0.08);
}

body[data-theme="dark"] .record-side-panel .progress {
    background-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .record-side-panel .progress-bar {
    background: linear-gradient(135deg, #5b5cf0, #7c3aed);
}

body[data-theme="dark"] .record-side-panel .alert-warning {
    background-color: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.26) !important;
    color: #f7d794 !important;
}

body[data-theme="dark"] .dashboard-checklist-item {
    background:
        radial-gradient(circle at top right, rgba(91, 92, 240, 0.1), transparent 42%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(91, 92, 240, 0.18);
    color: #f8fafc !important;
}

body[data-theme="dark"] .dashboard-checklist-item:nth-child(2n) {
    background:
        radial-gradient(circle at top right, rgba(6, 182, 212, 0.11), transparent 42%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(6, 182, 212, 0.18);
}

body[data-theme="dark"] .dashboard-checklist-item:nth-child(3n) {
    background:
        radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 42%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(245, 158, 11, 0.17);
}

body[data-theme="dark"] .dashboard-checklist-item:hover {
    border-color: rgba(91, 92, 240, 0.5);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    color: #ffffff !important;
}

body[data-theme="dark"] .dashboard-checklist-title {
    color: #ffffff;
}

body[data-theme="dark"] .dashboard-checklist-item .text-body-secondary,
body[data-theme="dark"] .dashboard-checklist-item .small {
    color: #93a0ba !important;
}

body[data-theme="dark"] .dashboard-checklist-progress {
    background-color: rgba(255, 255, 255, 0.08);
}

.super-admin-hero {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    box-shadow: 0 0.35rem 1rem var(--shadow);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.super-admin-hero h2 {
    font-size: 1.35rem;
    font-weight: 750;
}

.super-admin-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.super-admin-metrics {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.super-admin-metric {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    box-shadow: 0 0.35rem 1rem var(--shadow);
    display: flex;
    gap: 0.85rem;
    min-height: 84px;
    padding: 0.9rem;
}

.super-admin-metric-icon {
    align-items: center;
    border-radius: 0.5rem;
    display: inline-flex;
    flex: 0 0 2.75rem;
    font-size: 1.35rem;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.super-admin-metric strong {
    display: block;
    font-size: 1.5rem;
    line-height: 1.1;
}

.super-admin-metric span:not(.super-admin-metric-icon) {
    color: var(--muted);
    display: block;
    font-size: 0.9rem;
}

.super-admin-sections {
    display: grid;
    gap: 0.8rem;
}

.super-admin-section {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
    box-shadow: 0 0.35rem 1rem var(--shadow);
    overflow: hidden;
}

.super-admin-section > summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 0.85rem;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    list-style: none;
    min-height: 74px;
    padding: 0.95rem 1rem;
}

.super-admin-section > summary::-webkit-details-marker,
.super-admin-list-item > summary::-webkit-details-marker {
    display: none;
}

.super-admin-section > summary::after {
    color: var(--muted);
    content: "\F282";
    font-family: "bootstrap-icons";
    font-size: 0.9rem;
    transition: transform 0.16s ease;
}

.super-admin-section[open] > summary::after {
    transform: rotate(180deg);
}

.super-admin-section-icon {
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--soft-border);
    border-radius: 0.5rem;
    color: var(--blue);
    display: inline-flex;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

.super-admin-section summary strong {
    display: block;
    font-size: 1.02rem;
}

.super-admin-section summary small {
    color: var(--muted);
    display: block;
    margin-top: 0.15rem;
}

.super-admin-section-count {
    background: var(--soft);
    border: 1px solid var(--soft-border);
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.78rem;
    font-weight: 800;
    justify-self: end;
    min-width: 2.1rem;
    padding: 0.2rem 0.55rem;
    text-align: center;
}

.super-admin-section-body {
    border-top: 1px solid var(--line);
    padding: 1rem;
}

.super-admin-form-panel,
.super-admin-table,
.super-admin-list,
.super-admin-shortcuts a {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 0.5rem;
}

.super-admin-form-panel {
    padding: 1rem;
}

.super-admin-form-panel h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.super-admin-list {
    overflow: hidden;
}

.super-admin-list-item + .super-admin-list-item {
    border-top: 1px solid var(--line);
}

.super-admin-list-item > summary {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 0.7rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    list-style: none;
    padding: 0.85rem 1rem;
}

.super-admin-list-title {
    font-weight: 750;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.super-admin-list-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.super-admin-list-body {
    border-top: 1px solid var(--line);
    padding: 1rem;
}

.super-admin-inline-actions {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 0.9rem;
}

.super-admin-empty {
    color: var(--muted);
    padding: 1rem;
}

.super-admin-shortcuts {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.super-admin-shortcuts a {
    color: var(--ink);
    display: grid;
    gap: 0.35rem;
    min-height: 132px;
    padding: 1rem;
    text-decoration: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.super-admin-shortcuts a:hover,
.super-admin-shortcuts a:focus {
    border-color: var(--blue);
    box-shadow: 0 0.75rem 1.75rem var(--shadow);
    transform: translateY(-2px);
}

.super-admin-shortcuts i {
    color: var(--blue);
    font-size: 1.55rem;
}

.super-admin-shortcuts span {
    color: var(--muted);
    font-size: 0.9rem;
}

.btn-rcp-risk-filled {
    --bs-btn-color: #1f1306;
    --bs-btn-bg: #fb923c;
    --bs-btn-border-color: #fb923c;
    --bs-btn-hover-color: #111827;
    --bs-btn-hover-bg: #f97316;
    --bs-btn-hover-border-color: #f97316;
    --bs-btn-focus-shadow-rgb: 249, 115, 22;
    --bs-btn-active-color: #111827;
    --bs-btn-active-bg: #ea580c;
    --bs-btn-active-border-color: #ea580c;
}

.module-permissions-panel {
    border: 1px solid var(--bs-border-color);
    border-radius: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.02);
}

.module-permissions-panel > summary {
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}

.module-permissions-panel > summary::-webkit-details-marker {
    display: none;
}

.module-permissions-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.module-permissions-section h4 {
    grid-column: 1 / -1;
    margin: 0 0 2px;
    color: var(--bs-secondary-color);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.module-permission-option {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    min-height: 64px;
    padding: 10px;
    border: 1px solid var(--bs-border-color);
    border-radius: 10px;
    background: var(--bs-body-bg);
}

.module-permission-option input {
    margin-top: 4px;
}

.module-permission-option span {
    display: grid;
    gap: 2px;
}

.module-permission-option strong {
    font-size: 0.92rem;
}

.module-permission-option small {
    color: var(--bs-secondary-color);
}

.nis2-module-card {
    height: 100%;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    background: var(--bs-body-bg);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background-color 0.18s ease;
}

.dashboard-quick-action:hover .nis2-module-card,
.dashboard-quick-action:focus-visible .nis2-module-card {
    transform: translateY(-2px);
}

.nis2-module-count {
    flex: 0 0 auto;
    padding: 0.16rem 0.46rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 999px;
    color: var(--bs-secondary-color);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.nis2-module-card.is-volume-1 {
    border-color: rgba(37, 99, 235, 0.34);
    background: rgba(37, 99, 235, 0.035);
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.nis2-module-card.is-volume-10 {
    border-color: rgba(245, 158, 11, 0.42);
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 8px 22px rgba(245, 158, 11, 0.1);
}

.nis2-module-card.is-volume-20 {
    border-color: rgba(249, 115, 22, 0.48);
    background: rgba(249, 115, 22, 0.06);
    box-shadow: 0 8px 24px rgba(249, 115, 22, 0.12);
}

.nis2-module-card.is-volume-1 .nis2-module-count {
    color: #1d4ed8;
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.22);
}

.nis2-module-card.is-volume-10 .nis2-module-count {
    color: #92400e;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
}

.nis2-module-card.is-volume-20 .nis2-module-count {
    color: #9a3412;
    background: rgba(249, 115, 22, 0.14);
    border-color: rgba(249, 115, 22, 0.3);
}

body[data-theme="dark"] .nis2-module-card {
    background: #242528;
    border-color: rgba(255, 255, 255, 0.11);
    box-shadow: none;
}

body[data-theme="dark"] .nis2-module-card.is-volume-1 {
    background: #252a2e;
    border-color: rgba(96, 165, 250, 0.32);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
}

body[data-theme="dark"] .nis2-module-card.is-volume-10 {
    background: #2b2922;
    border-color: rgba(245, 158, 11, 0.36);
}

body[data-theme="dark"] .nis2-module-card.is-volume-20 {
    background: #2d2622;
    border-color: rgba(251, 146, 60, 0.42);
}

body[data-theme="dark"] .nis2-module-count {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

body[data-theme="dark"] .nis2-module-card.is-volume-1 .nis2-module-count {
    color: #bfdbfe;
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.22);
}

body[data-theme="dark"] .nis2-module-card.is-volume-10 .nis2-module-count {
    color: #fde68a;
    background: rgba(245, 158, 11, 0.13);
    border-color: rgba(245, 158, 11, 0.24);
}

body[data-theme="dark"] .nis2-module-card.is-volume-20 .nis2-module-count {
    color: #fed7aa;
    background: rgba(251, 146, 60, 0.15);
    border-color: rgba(251, 146, 60, 0.28);
}

body[data-theme="dark"] .super-admin-hero,
body[data-theme="dark"] .super-admin-metric,
body[data-theme="dark"] .super-admin-section {
    background:
        radial-gradient(circle at top right, rgba(91, 92, 240, 0.12), transparent 42%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(91, 92, 240, 0.18);
}

body[data-theme="dark"] .super-admin-form-panel,
body[data-theme="dark"] .super-admin-table,
body[data-theme="dark"] .super-admin-list,
body[data-theme="dark"] .super-admin-shortcuts a {
    background: rgba(12, 16, 28, 0.88);
    border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="dark"] .super-admin-section-icon,
body[data-theme="dark"] .super-admin-section-count {
    background: linear-gradient(135deg, rgba(91, 92, 240, 0.18), rgba(124, 58, 237, 0.14));
    border-color: rgba(91, 92, 240, 0.3);
    color: #c7d2fe;
}

body[data-theme="dark"] .super-admin-list-item + .super-admin-list-item,
body[data-theme="dark"] .super-admin-list-body,
body[data-theme="dark"] .super-admin-section-body {
    border-color: rgba(255, 255, 255, 0.09);
}

.dbviewer-hero {
    align-items: center;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    box-shadow: 0 0.35rem 1rem var(--shadow);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.dbviewer-hero h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.dbviewer-source {
    align-items: center;
    display: grid;
    gap: 0.4rem;
    min-width: min(100%, 340px);
}

.dbviewer-metrics {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.dbviewer-metric {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    box-shadow: 0 0.35rem 1rem var(--shadow);
    min-height: 108px;
    padding: 0.95rem;
}

.dbviewer-metric i {
    color: var(--blue);
    display: block;
    font-size: 1.45rem;
    margin-bottom: 0.45rem;
}

.dbviewer-metric strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.1;
    word-break: break-word;
}

.dbviewer-metric span {
    color: var(--muted);
    display: block;
    font-size: 0.88rem;
    margin-top: 0.25rem;
}

.dbviewer-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
}

.dbviewer-sidebar,
.dbviewer-main,
.dbviewer-data-card,
.dbviewer-schema,
.dbviewer-empty {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 0.65rem;
    box-shadow: 0 0.35rem 1rem var(--shadow);
}

.dbviewer-sidebar {
    align-self: start;
    max-height: calc(100vh - 220px);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.dbviewer-sidebar-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.dbviewer-sidebar-head span,
.dbviewer-table-list small,
.dbviewer-data-head span {
    color: var(--muted);
    display: block;
    font-size: 0.82rem;
}

.dbviewer-table-list {
    max-height: calc(100vh - 300px);
    overflow: auto;
    padding: 0.55rem;
}

.dbviewer-table-list a {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    color: var(--ink);
    display: grid;
    gap: 0.65rem;
    grid-template-columns: auto minmax(0, 1fr);
    padding: 0.65rem 0.7rem;
    text-decoration: none;
}

.dbviewer-table-list a:hover,
.dbviewer-table-list a.active {
    background: var(--soft);
    border-color: var(--soft-border);
}

.dbviewer-table-list i {
    color: var(--blue);
}

.dbviewer-table-list strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dbviewer-main {
    min-width: 0;
    padding: 1rem;
}

.dbviewer-empty {
    align-items: center;
    display: grid;
    justify-items: center;
    min-height: 420px;
    padding: 2rem;
    text-align: center;
}

.dbviewer-empty i {
    color: var(--blue);
    font-size: 3rem;
}

.dbviewer-toolbar {
    align-items: end;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.dbviewer-toolbar h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 0;
}

.dbviewer-search {
    align-items: end;
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 120px minmax(220px, 1fr) auto auto;
    min-width: min(100%, 720px);
}

.dbviewer-schema {
    margin-bottom: 1rem;
    overflow: hidden;
}

.dbviewer-schema > summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 0.6rem;
    list-style: none;
    padding: 0.8rem 1rem;
}

.dbviewer-schema > summary::-webkit-details-marker {
    display: none;
}

.dbviewer-schema > summary i {
    color: var(--blue);
}

.dbviewer-schema > summary span {
    color: var(--muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.dbviewer-schema-body {
    border-top: 1px solid var(--line);
    padding: 1rem;
}

.dbviewer-sql {
    background: var(--input-bg);
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    color: var(--ink);
    margin: 0.75rem 0 0;
    max-height: 260px;
    overflow: auto;
    padding: 0.9rem;
    white-space: pre-wrap;
}

.dbviewer-data-card {
    overflow: hidden;
}

.dbviewer-data-head {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 0.9rem 1rem;
}

.dbviewer-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dbviewer-table-wrap {
    max-height: 62vh;
}

.dbviewer-data-table {
    min-width: 960px;
}

.dbviewer-data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.dbviewer-data-table td,
.dbviewer-data-table th {
    max-width: 360px;
    vertical-align: top;
}

.dbviewer-data-table td {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.82rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.dbviewer-null {
    color: var(--muted) !important;
    font-style: italic;
}

body[data-theme="dark"] .dbviewer-hero,
body[data-theme="dark"] .dbviewer-metric,
body[data-theme="dark"] .dbviewer-sidebar,
body[data-theme="dark"] .dbviewer-main,
body[data-theme="dark"] .dbviewer-data-card,
body[data-theme="dark"] .dbviewer-schema,
body[data-theme="dark"] .dbviewer-empty {
    background:
        radial-gradient(circle at top right, rgba(91, 92, 240, 0.1), transparent 42%),
        rgba(16, 21, 36, 0.96);
    border-color: rgba(91, 92, 240, 0.18);
}

body[data-theme="dark"] .dbviewer-table-list a:hover,
body[data-theme="dark"] .dbviewer-table-list a.active {
    background: rgba(91, 92, 240, 0.14);
    border-color: rgba(91, 92, 240, 0.32);
}

body[data-theme="dark"] .dbviewer-metric:nth-child(2) i,
body[data-theme="dark"] .dbviewer-table-list a:nth-child(2n) i {
    color: #67e8f9;
}

body[data-theme="dark"] .dbviewer-metric:nth-child(3) i,
body[data-theme="dark"] .dbviewer-table-list a:nth-child(3n) i {
    color: #fbbf24;
}

body[data-theme="dark"] .dbviewer-metric:nth-child(4) i,
body[data-theme="dark"] .dbviewer-table-list a:nth-child(4n) i {
    color: #86efac;
}

body[data-theme="dark"] .dbviewer-sql {
    background: rgba(8, 12, 24, 0.92);
    border-color: rgba(255, 255, 255, 0.12);
    color: #c7d2fe;
}

@media (max-width: 768px) {
    .checklist-editor-grid {
        grid-template-columns: 1fr;
    }

    .checklist-attachment-panel,
    .checklist-attachment-actions,
    .checklist-upload-form {
        align-items: stretch;
        flex-direction: column;
    }

    .checklist-upload-form .form-control {
        min-width: 0;
        width: 100%;
    }

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

    .super-admin-hero,
    .super-admin-inline-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .super-admin-hero-actions {
        justify-content: flex-start;
    }

    .super-admin-metrics,
    .super-admin-shortcuts,
    .dbviewer-metrics {
        grid-template-columns: 1fr;
    }

    .dbviewer-hero,
    .dbviewer-toolbar,
    .dbviewer-data-head {
        align-items: stretch;
        flex-direction: column;
    }

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

    .dbviewer-sidebar {
        max-height: none;
        position: static;
    }

    .dbviewer-table-list {
        max-height: 360px;
    }

    .dbviewer-search {
        grid-template-columns: 1fr;
        min-width: 0;
    }

    .super-admin-section > summary,
    .super-admin-list-item > summary {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .super-admin-section > summary::after,
    .super-admin-section-count,
    .super-admin-list-meta {
        display: none;
    }

    .record-side-panel {
        position: static;
    }
}

@media (max-width: 1200px) {
    .dashboard-quick-grid,
    .dashboard-checklist-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .super-admin-metrics,
    .super-admin-shortcuts,
    .dbviewer-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-quick-grid,
    .dashboard-checklist-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .super-admin-metrics,
    .super-admin-shortcuts,
    .dbviewer-metrics {
        grid-template-columns: 1fr;
    }
}

.lookup-button-group {
    max-width: 100%;
    flex-wrap: wrap;
}

.lookup-picker-results {
    max-height: 440px;
    overflow-y: auto;
}

.lookup-picker-item {
    white-space: normal;
    text-align: left;
}

.login-box .login-panel,
.login-box .login-screen {
    min-height: auto;
    padding: 0;
}

.login-box .login-panel {
    width: 100%;
    box-shadow: none;
    border: 0;
    padding: 0;
}

.login-box h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.login-box .brand-mark {
    margin-bottom: 1rem;
}

@media (max-width: 980px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        gap: 18px;
    }

    .sidebar-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

@media (max-width: 640px) {
    .login-panel,
    .main-panel,
    .sidebar {
        padding: 18px;
    }

    .topbar,
    .page-heading,
    .section-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-grid,
    .sidebar-nav,
    .dictionary-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .topbar-tools {
        justify-content: flex-start;
    }

    .topbar-user {
        min-width: 0;
        text-align: left;
    }

    .module-item {
        grid-template-columns: 52px minmax(0, 1fr);
    }

    .module-state {
        grid-column: 2;
        justify-self: start;
    }

    .company-card {
        grid-template-columns: 1fr;
    }

    .company-meta {
        justify-content: flex-start;
    }

    .company-actions {
        justify-content: flex-start;
    }

    .company-switch {
        width: 100%;
    }

    .search-form,
    .report-search,
    .record-grid,
    .print-meta,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .field-block.span-2 {
        grid-column: auto;
    }
}

/* Application design system based on www/design.md */
:root {
    --surface: #ffffff;
    --panel: #ffffff;
    --ink: #181d26;
    --muted: #333840;
    --line: #dddddd;
    --sidebar: #ffffff;
    --sidebar-strong: #ffffff;
    --green: #181d26;
    --green-strong: #0d1218;
    --amber: #f5e9d4;
    --blue: #1b61c9;
    --danger: #aa2d00;
    --input-bg: #ffffff;
    --table-head: #f8fafc;
    --soft: #f8fafc;
    --soft-border: #dddddd;
    --success-soft: #eef6f0;
    --warning-soft: #f5e9d4;
    --danger-soft: #fff0eb;
    --danger-border: #d9a28e;
    --shadow: 0 10px 30px rgba(24, 29, 38, 0.04);
    --signature-coral: #aa2d00;
    --signature-forest: #0a2e0e;
    --signature-cream: #f5e9d4;
    --signature-peach: #fcab79;
    --signature-mint: #a8d8c4;
    --signature-yellow: #f4d35e;
    --signature-mustard: #d9a441;
    --surface-strong: #e0e2e6;
    --surface-dark: #181d26;
    --surface-dark-elevated: #1d1f25;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --font-sans:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Fira Sans",
        "Droid Sans",
        "Helvetica Neue",
        sans-serif;
    --font-display:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Oxygen,
        Ubuntu,
        Cantarell,
        "Fira Sans",
        "Droid Sans",
        "Helvetica Neue",
        sans-serif;
}

:root[data-theme="dark"] {
    --surface: #181d26;
    --panel: #1d1f25;
    --ink: #ffffff;
    --muted: rgba(255, 255, 255, 0.72);
    --line: rgba(255, 255, 255, 0.1);
    --sidebar: #181d26;
    --sidebar-strong: #181d26;
    --green: #ffffff;
    --green-strong: rgba(255, 255, 255, 0.92);
    --amber: rgba(245, 233, 212, 0.14);
    --blue: #458fff;
    --danger: #ffd4c6;
    --input-bg: rgba(255, 255, 255, 0.05);
    --table-head: rgba(255, 255, 255, 0.03);
    --soft: rgba(255, 255, 255, 0.04);
    --soft-border: rgba(255, 255, 255, 0.12);
    --success-soft: rgba(10, 46, 14, 0.34);
    --warning-soft: rgba(245, 233, 212, 0.1);
    --danger-soft: rgba(170, 45, 0, 0.18);
    --danger-border: rgba(252, 171, 121, 0.26);
    --surface-strong: rgba(255, 255, 255, 0.08);
    --shadow: none;
}

body {
    background: var(--surface);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.45;
}

h1,
h2,
h3,
.card-title,
.page-title,
.app-content-header h1 {
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2rem);
    line-height: 1.2;
}

h3 {
    font-size: 1.125rem;
    line-height: 1.4;
}

.app-header.navbar,
.app-toolbar,
.app-footer,
.app-sidebar,
.main-sidebar,
.sidebar-wrapper,
.sidebar-brand,
.brand-link {
    background: var(--surface) !important;
    border-color: var(--line) !important;
}

.app-header.navbar,
.app-toolbar,
.app-footer {
    box-shadow: none !important;
}

.nav-link,
.app-header .nav-link,
.breadcrumb-item.active,
.topbar-user,
.topbar-user strong,
.topbar-label,
.topbar-badge {
    color: var(--ink) !important;
}

.app-content-header {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
}

:root[data-theme="dark"] .app-content-header {
    background: rgba(24, 29, 38, 0.94);
}

.nav-sidebar > .nav-item > .nav-link,
.nav-treeview > .nav-item > .nav-link {
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--ink) !important;
    font-weight: 500;
}

.nav-sidebar > .nav-item > .nav-link {
    min-height: 44px;
}

.nav-sidebar .nav-link.active,
.nav-treeview .nav-link.active {
    background: var(--soft) !important;
    border-color: var(--soft-border) !important;
    color: var(--ink) !important;
}

.nav-sidebar .nav-link:hover,
.nav-treeview .nav-link:hover,
.app-header .nav-link:hover {
    background: rgba(24, 29, 38, 0.04) !important;
    border-color: rgba(24, 29, 38, 0.05) !important;
    color: var(--ink) !important;
}

:root[data-theme="dark"] .nav-sidebar .nav-link:hover,
:root[data-theme="dark"] .nav-treeview .nav-link:hover,
:root[data-theme="dark"] .app-header .nav-link:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.card,
.info-box,
.callout,
.modal-content,
.dropdown-menu,
.dashboard-quick-action,
.dashboard-checklist-item,
.super-admin-hero,
.super-admin-metric,
.super-admin-section,
.super-admin-form-panel,
.super-admin-table,
.super-admin-list,
.super-admin-shortcuts a,
.dbviewer-hero,
.dbviewer-metric,
.dbviewer-sidebar,
.dbviewer-main,
.dbviewer-data-card,
.dbviewer-schema,
.dbviewer-empty,
.record-edit-card,
.record-side-panel .card {
    background: var(--panel) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
    color: var(--ink) !important;
}

.card-header,
.card-footer,
.dbviewer-sidebar-head,
.dbviewer-data-head,
.dbviewer-schema-body,
.super-admin-list-body,
.super-admin-section-body {
    background: transparent !important;
    border-color: var(--line) !important;
}

.card-outline.card-primary,
.card-outline.card-info,
.card-outline.card-secondary {
    border-top: 1px solid var(--line) !important;
}

.login-page {
    background: var(--surface) !important;
}

.login-box .card,
.login-card-body {
    background: var(--panel) !important;
    border: 1px solid var(--line) !important;
    box-shadow: none !important;
    color: var(--ink) !important;
}

.login-logo a,
.login-card-body .login-box-msg {
    color: var(--ink) !important;
}

:root[data-theme="dark"] .login-page {
    background: #181d26 !important;
}

.small-box {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: none !important;
}

.small-box.text-bg-primary {
    background: var(--surface-dark) !important;
    border: 1px solid var(--surface-dark) !important;
    color: #ffffff !important;
}

.small-box.text-bg-warning {
    background: var(--signature-coral) !important;
    border: 1px solid var(--signature-coral) !important;
    color: #ffffff !important;
}

.small-box.text-bg-secondary {
    background: var(--signature-cream) !important;
    border: 1px solid var(--signature-cream) !important;
    color: var(--ink) !important;
}

.small-box.text-bg-success {
    background: var(--signature-forest) !important;
    border: 1px solid var(--signature-forest) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .small-box.text-bg-primary {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="dark"] .small-box.text-bg-warning {
    background: rgba(170, 45, 0, 0.78) !important;
    border-color: rgba(252, 171, 121, 0.24) !important;
}

:root[data-theme="dark"] .small-box.text-bg-secondary {
    background: rgba(245, 233, 212, 0.12) !important;
    border-color: rgba(245, 233, 212, 0.18) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .small-box.text-bg-success {
    background: rgba(10, 46, 14, 0.88) !important;
    border-color: rgba(168, 216, 196, 0.2) !important;
}

.form-control,
.form-select,
.record-form-field,
.record-field-shell .form-control,
.dbviewer-sql {
    background: var(--input-bg) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--ink) !important;
    font-family: var(--font-sans);
    min-height: 44px;
}

.form-control::placeholder,
.form-select::placeholder {
    color: rgba(65, 69, 77, 0.72);
}

:root[data-theme="dark"] .form-control::placeholder,
:root[data-theme="dark"] .form-select::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

.form-control:focus,
.form-select:focus {
    background: var(--input-bg) !important;
    border-color: var(--blue) !important;
    box-shadow: 0 0 0 3px rgba(69, 143, 255, 0.16) !important;
    color: var(--ink) !important;
}

.btn,
button,
.theme-toggle-button,
.dashboard-quick-badge,
.badge,
.super-admin-section-count {
    border-radius: var(--radius-lg) !important;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.btn-primary,
.btn-success {
    background: var(--surface-dark) !important;
    border: 1px solid var(--surface-dark) !important;
    color: #ffffff !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-success:hover,
.btn-success:focus {
    background: #0d1218 !important;
    border-color: #0d1218 !important;
    color: #ffffff !important;
    transform: none;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-muted,
.theme-toggle-button,
.account-logout-button {
    background: #ffffff !important;
    border: 1px solid var(--line) !important;
    color: var(--ink) !important;
}

.btn-outline-primary:hover,
.btn-outline-secondary:hover,
.btn-outline-success:hover,
.btn-outline-danger:hover,
.btn-muted:hover,
.theme-toggle-button:hover,
.account-logout-button:hover {
    background: var(--soft) !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
    transform: none;
}

:root[data-theme="dark"] .btn-outline-primary,
:root[data-theme="dark"] .btn-outline-secondary,
:root[data-theme="dark"] .btn-outline-success,
:root[data-theme="dark"] .btn-outline-danger,
:root[data-theme="dark"] .btn-muted,
:root[data-theme="dark"] .theme-toggle-button,
:root[data-theme="dark"] .account-logout-button {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .btn-outline-primary:hover,
:root[data-theme="dark"] .btn-outline-secondary:hover,
:root[data-theme="dark"] .btn-outline-success:hover,
:root[data-theme="dark"] .btn-outline-danger:hover,
:root[data-theme="dark"] .btn-muted:hover,
:root[data-theme="dark"] .theme-toggle-button:hover,
:root[data-theme="dark"] .account-logout-button:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
}

.btn-tool {
    border-radius: var(--radius-lg) !important;
}

.badge,
.badge.text-bg-info,
.badge.text-bg-success,
.badge.text-bg-warning,
.badge.text-bg-danger,
.badge.text-bg-light,
.dashboard-quick-badge {
    background: transparent !important;
    border: 1px solid var(--soft-border) !important;
    color: var(--ink) !important;
}

.badge.text-bg-info {
    background: rgba(27, 97, 201, 0.08) !important;
    border-color: rgba(27, 97, 201, 0.16) !important;
    color: var(--blue) !important;
}

.badge.text-bg-success {
    background: rgba(10, 46, 14, 0.08) !important;
    border-color: rgba(10, 46, 14, 0.15) !important;
    color: #0a2e0e !important;
}

.badge.text-bg-warning {
    background: rgba(244, 211, 94, 0.22) !important;
    border-color: rgba(217, 164, 65, 0.22) !important;
    color: #8a5e0a !important;
}

.badge.text-bg-danger {
    background: rgba(170, 45, 0, 0.1) !important;
    border-color: rgba(170, 45, 0, 0.18) !important;
    color: var(--danger) !important;
}

:root[data-theme="dark"] .badge.text-bg-info {
    background: rgba(69, 143, 255, 0.16) !important;
    border-color: rgba(69, 143, 255, 0.26) !important;
    color: #cfe2ff !important;
}

:root[data-theme="dark"] .badge.text-bg-success {
    background: rgba(168, 216, 196, 0.12) !important;
    border-color: rgba(168, 216, 196, 0.18) !important;
    color: #d7f3e9 !important;
}

:root[data-theme="dark"] .badge.text-bg-warning {
    background: rgba(245, 211, 94, 0.15) !important;
    border-color: rgba(245, 211, 94, 0.2) !important;
    color: #ffebb0 !important;
}

:root[data-theme="dark"] .badge.text-bg-danger {
    background: rgba(252, 171, 121, 0.14) !important;
    border-color: rgba(252, 171, 121, 0.22) !important;
    color: #ffd9c7 !important;
}

.dashboard-news-item,
.dashboard-quick-action,
.dashboard-checklist-item,
.super-admin-shortcuts a,
.dbviewer-table-list a {
    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease;
}

.dashboard-quick-action,
.dashboard-checklist-item {
    background: #ffffff !important;
}

.dashboard-quick-action:nth-child(5n + 1) {
    background: rgba(245, 233, 212, 0.42) !important;
}

.dashboard-quick-action:nth-child(5n + 2) {
    background: rgba(252, 171, 121, 0.18) !important;
}

.dashboard-quick-action:nth-child(5n + 3) {
    background: rgba(168, 216, 196, 0.24) !important;
}

.dashboard-quick-action:nth-child(5n + 4) {
    background: rgba(244, 211, 94, 0.2) !important;
}

.dashboard-quick-action:nth-child(5n + 5) {
    background: rgba(224, 226, 230, 0.42) !important;
}

.dashboard-checklist-item:nth-child(5n + 1) {
    background: rgba(245, 233, 212, 0.34) !important;
}

.dashboard-checklist-item:nth-child(5n + 2) {
    background: rgba(168, 216, 196, 0.18) !important;
}

.dashboard-checklist-item:nth-child(5n + 3) {
    background: rgba(252, 171, 121, 0.14) !important;
}

.dashboard-checklist-item:nth-child(5n + 4) {
    background: rgba(244, 211, 94, 0.16) !important;
}

.dashboard-checklist-item:nth-child(5n + 5) {
    background: rgba(224, 226, 230, 0.34) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5n + 1),
:root[data-theme="dark"] .dashboard-checklist-item:nth-child(5n + 1) {
    background: rgba(245, 233, 212, 0.07) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5n + 2),
:root[data-theme="dark"] .dashboard-checklist-item:nth-child(5n + 2) {
    background: rgba(252, 171, 121, 0.08) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5n + 3),
:root[data-theme="dark"] .dashboard-checklist-item:nth-child(5n + 3) {
    background: rgba(168, 216, 196, 0.08) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5n + 4),
:root[data-theme="dark"] .dashboard-checklist-item:nth-child(5n + 4) {
    background: rgba(244, 211, 94, 0.08) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5n + 5),
:root[data-theme="dark"] .dashboard-checklist-item:nth-child(5n + 5) {
    background: rgba(224, 226, 230, 0.06) !important;
}

.dashboard-quick-action:hover,
.dashboard-checklist-item:hover,
.super-admin-shortcuts a:hover,
.dbviewer-table-list a:hover,
.dbviewer-table-list a.active {
    background: var(--soft) !important;
    border-color: var(--soft-border) !important;
    color: var(--ink) !important;
    transform: none;
}

.dashboard-quick-icon,
.dbviewer-metric i,
.dbviewer-table-list i,
.super-admin-section-icon,
.super-admin-shortcuts i,
.nav-icon,
.app-header .bi {
    color: var(--ink) !important;
    filter: none !important;
}

.dashboard-news-item:hover {
    background: transparent !important;
    color: var(--muted) !important;
}

.dashboard-news-card .list-group-item:nth-child(3n + 1) {
    border-left: 3px solid var(--signature-coral);
}

.dashboard-news-card .list-group-item:nth-child(3n + 2) {
    border-left: 3px solid var(--blue);
}

.dashboard-news-card .list-group-item:nth-child(3n + 3) {
    border-left: 3px solid var(--signature-forest);
}

.dashboard-news-card .list-group-item {
    padding-left: calc(1rem + 3px);
}

:root[data-theme="dark"] .dashboard-news-card .list-group-item:nth-child(3n + 1) {
    border-left: 3px solid #ff8a45 !important;
}

:root[data-theme="dark"] .dashboard-news-card .list-group-item:nth-child(3n + 2) {
    border-left: 3px solid #6ea8ff !important;
}

:root[data-theme="dark"] .dashboard-news-card .list-group-item:nth-child(3n + 3) {
    border-left: 3px solid #52c878 !important;
}

.record-edit-card {
    background: #ffffff !important;
}

.record-form-tabs {
    border-bottom-color: var(--line) !important;
    padding-inline: 12px;
    padding-top: 8px;
    gap: 6px;
}

.record-form-tabs .nav-link {
    background: var(--soft) !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
    color: var(--muted) !important;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 16px;
}

.record-form-tabs .nav-link.active {
    background: #ffffff !important;
    border-color: var(--line) !important;
    color: var(--ink) !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .record-form-tabs .nav-link {
    background: rgba(255, 255, 255, 0.04) !important;
}

:root[data-theme="dark"] .record-form-tabs .nav-link.active {
    background: rgba(245, 233, 212, 0.08) !important;
    border-color: rgba(245, 233, 212, 0.16) !important;
}

.record-field-shell {
    background: var(--soft) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-md) !important;
    padding: 16px;
}

.record-edit-card .card-body {
    background:
        linear-gradient(180deg, rgba(248, 250, 252, 0.82), rgba(255, 255, 255, 0.98)) !important;
}

.record-side-panel .card:first-child {
    background: rgba(245, 233, 212, 0.52) !important;
}

.record-side-panel .card:nth-child(2) {
    background: rgba(168, 216, 196, 0.2) !important;
}

.record-sticky-actions {
    background: rgba(224, 226, 230, 0.28) !important;
}

:root[data-theme="dark"] .record-edit-card,
:root[data-theme="dark"] .record-edit-card .card-body,
:root[data-theme="dark"] .record-side-panel .card {
    background: rgba(255, 255, 255, 0.02) !important;
}

:root[data-theme="dark"] .record-side-panel .card:first-child {
    background: rgba(245, 233, 212, 0.06) !important;
}

:root[data-theme="dark"] .record-side-panel .card:nth-child(2) {
    background: rgba(168, 216, 196, 0.06) !important;
}

:root[data-theme="dark"] .record-sticky-actions {
    background: rgba(224, 226, 230, 0.04) !important;
}

.progress,
.record-side-panel .progress,
.dashboard-checklist-progress {
    background: rgba(24, 29, 38, 0.08) !important;
    border-radius: 999px !important;
}

.progress-bar,
.record-side-panel .progress-bar {
    background: var(--surface-dark) !important;
    border-radius: 999px !important;
}

:root[data-theme="dark"] .progress,
:root[data-theme="dark"] .record-side-panel .progress,
:root[data-theme="dark"] .dashboard-checklist-progress {
    background: rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="dark"] .progress-bar,
:root[data-theme="dark"] .record-side-panel .progress-bar {
    background: rgba(255, 255, 255, 0.84) !important;
}

.super-admin-hero,
.dbviewer-hero {
    background:
        linear-gradient(135deg, rgba(245, 233, 212, 0.55), rgba(255, 255, 255, 0.98)) !important;
}

.super-admin-metric:nth-child(1),
.dbviewer-metric:nth-child(1) {
    background: rgba(252, 171, 121, 0.18) !important;
}

.super-admin-metric:nth-child(2),
.dbviewer-metric:nth-child(2) {
    background: rgba(168, 216, 196, 0.2) !important;
}

.super-admin-metric:nth-child(3),
.dbviewer-metric:nth-child(3) {
    background: rgba(244, 211, 94, 0.2) !important;
}

.super-admin-metric:nth-child(4),
.dbviewer-metric:nth-child(4) {
    background: rgba(224, 226, 230, 0.44) !important;
}

:root[data-theme="dark"] .super-admin-hero,
:root[data-theme="dark"] .dbviewer-hero {
    background:
        linear-gradient(135deg, rgba(245, 233, 212, 0.05), rgba(255, 255, 255, 0.02)) !important;
}

:root[data-theme="dark"] .super-admin-metric:nth-child(1),
:root[data-theme="dark"] .dbviewer-metric:nth-child(1) {
    background: rgba(252, 171, 121, 0.08) !important;
}

:root[data-theme="dark"] .super-admin-metric:nth-child(2),
:root[data-theme="dark"] .dbviewer-metric:nth-child(2) {
    background: rgba(168, 216, 196, 0.08) !important;
}

:root[data-theme="dark"] .super-admin-metric:nth-child(3),
:root[data-theme="dark"] .dbviewer-metric:nth-child(3) {
    background: rgba(244, 211, 94, 0.08) !important;
}

:root[data-theme="dark"] .super-admin-metric:nth-child(4),
:root[data-theme="dark"] .dbviewer-metric:nth-child(4) {
    background: rgba(224, 226, 230, 0.06) !important;
}

.dbviewer-sql,
.dbviewer-data-table td {
    font-family:
        "Inter",
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Consolas,
        "Liberation Mono",
        monospace;
}

:root[data-theme="dark"] body {
    background: #181d26;
    color: #ffffff;
}

:root[data-theme="dark"] .app-header.navbar,
:root[data-theme="dark"] .app-toolbar,
:root[data-theme="dark"] .app-footer,
:root[data-theme="dark"] .app-sidebar,
:root[data-theme="dark"] .main-sidebar,
:root[data-theme="dark"] .sidebar-wrapper,
:root[data-theme="dark"] .sidebar-brand,
:root[data-theme="dark"] .brand-link {
    background: #181d26 !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Final UI refinements */
.small-box .inner h3,
.small-box .inner p {
    color: inherit !important;
}

.small-box.text-bg-primary {
    background: #315f8a !important;
    border-color: #315f8a !important;
    color: #ffffff !important;
}

.small-box.text-bg-warning {
    background: #d9a441 !important;
    border-color: #d9a441 !important;
    color: #181d26 !important;
}

.small-box.text-bg-secondary {
    background: #0a7a36 !important;
    border-color: #0a7a36 !important;
    color: #ffffff !important;
}

.small-box.text-bg-success {
    background: #0a7a36 !important;
    border-color: #0a7a36 !important;
    color: #ffffff !important;
}

.help-card {
    border-radius: var(--radius-md) !important;
    border: 1px solid var(--line) !important;
    background: #ffffff !important;
}

.help-card:hover {
    border-color: rgba(24, 29, 38, 0.14) !important;
    box-shadow: none !important;
}

.help-card-icon {
    align-items: center;
    background: rgba(49, 95, 138, 0.12) !important;
    border-radius: 12px;
    color: #315f8a !important;
    display: inline-flex;
    height: 48px;
    justify-content: center;
    width: 48px;
}

.toolbar-panel,
.table-panel {
    background: #ffffff !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: none !important;
}

.audit-log-table thead th {
    background: #f8fafc !important;
    color: var(--ink) !important;
    font-weight: 500;
}

.audit-log-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.72);
}

.nav-treeview > .nav-item > .nav-link,
.nav-treeview > .nav-item > .nav-link p,
.nav-treeview > .nav-item > .nav-link .nav-icon,
.nav-treeview > .nav-item > .nav-link .nav-icon::before,
.nav-treeview .nav-link.active,
.nav-treeview .nav-link.active p,
.nav-treeview .nav-link:hover,
.nav-treeview .nav-link:hover p {
    font-weight: 400 !important;
}

.nav-sidebar > .nav-item.menu-open > .nav-link,
.nav-sidebar > .nav-item.menu-open > .nav-link p,
.nav-sidebar > .nav-item > .nav-link,
.nav-sidebar > .nav-item > .nav-link p {
    font-weight: 400 !important;
}

:root[data-theme="dark"] .small-box.text-bg-primary {
    background:
        linear-gradient(135deg, rgba(49, 95, 138, 0.92), rgba(34, 72, 109, 0.96)) !important;
    border-color: rgba(120, 175, 226, 0.18) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .small-box.text-bg-warning {
    background:
        linear-gradient(135deg, rgba(217, 164, 65, 0.92), rgba(165, 117, 24, 0.96)) !important;
    border-color: rgba(255, 226, 151, 0.18) !important;
    color: #fff6df !important;
}

:root[data-theme="dark"] .small-box.text-bg-secondary {
    background:
        linear-gradient(135deg, rgba(10, 122, 54, 0.92), rgba(8, 87, 39, 0.96)) !important;
    border-color: rgba(134, 239, 172, 0.16) !important;
    color: #f3fff6 !important;
}

:root[data-theme="dark"] .small-box.text-bg-success {
    background:
        linear-gradient(135deg, rgba(10, 122, 54, 0.92), rgba(8, 87, 39, 0.96)) !important;
    border-color: rgba(134, 239, 172, 0.16) !important;
    color: #f3fff6 !important;
}

:root[data-theme="dark"] .dashboard-quick-card .card-header {
    background: rgba(255, 255, 255, 0.02) !important;
}

:root[data-theme="dark"] .dashboard-quick-action {
    color: #f8fafc !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(1) {
    background:
        linear-gradient(135deg, rgba(49, 95, 138, 0.22), rgba(25, 33, 53, 0.96)) !important;
    border-color: rgba(120, 175, 226, 0.16) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(2) {
    background:
        linear-gradient(135deg, rgba(170, 45, 0, 0.2), rgba(38, 26, 32, 0.96)) !important;
    border-color: rgba(252, 171, 121, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(3) {
    background:
        linear-gradient(135deg, rgba(10, 122, 54, 0.18), rgba(22, 36, 42, 0.96)) !important;
    border-color: rgba(134, 239, 172, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(4) {
    background:
        linear-gradient(135deg, rgba(217, 164, 65, 0.18), rgba(38, 36, 30, 0.96)) !important;
    border-color: rgba(255, 226, 151, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5) {
    background:
        linear-gradient(135deg, rgba(124, 58, 237, 0.18), rgba(28, 30, 52, 0.96)) !important;
    border-color: rgba(196, 181, 253, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(1) .dashboard-quick-icon {
    color: #b7d6f5 !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(2) .dashboard-quick-icon {
    color: #ffb993 !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(3) .dashboard-quick-icon {
    color: #9ae8b3 !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(4) .dashboard-quick-icon {
    color: #f8d984 !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5) .dashboard-quick-icon {
    color: #cdbdff !important;
}

:root[data-theme="dark"] .dashboard-quick-badge {
    background: rgba(255, 255, 255, 0.09) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .help-card {
    background: rgba(255, 255, 255, 0.025) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="dark"] .help-card:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
}

:root[data-theme="dark"] .help-card-icon {
    background: rgba(49, 95, 138, 0.2) !important;
    color: #c6ddf3 !important;
}

:root[data-theme="dark"] .toolbar-panel,
:root[data-theme="dark"] .table-panel {
    background: rgba(255, 255, 255, 0.025) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="dark"] .audit-log-table thead th {
    background: rgba(255, 255, 255, 0.04) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .audit-log-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.018) !important;
}

/* Neutral dark containers per design.md */
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .info-box,
:root[data-theme="dark"] .callout,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .dashboard-quick-card,
:root[data-theme="dark"] .dashboard-news-card,
:root[data-theme="dark"] .dashboard-checklist-card,
:root[data-theme="dark"] .super-admin-hero,
:root[data-theme="dark"] .super-admin-metric,
:root[data-theme="dark"] .super-admin-section,
:root[data-theme="dark"] .super-admin-form-panel,
:root[data-theme="dark"] .super-admin-table,
:root[data-theme="dark"] .super-admin-list,
:root[data-theme="dark"] .super-admin-shortcuts a,
:root[data-theme="dark"] .dbviewer-hero,
:root[data-theme="dark"] .dbviewer-metric,
:root[data-theme="dark"] .dbviewer-sidebar,
:root[data-theme="dark"] .dbviewer-main,
:root[data-theme="dark"] .dbviewer-data-card,
:root[data-theme="dark"] .dbviewer-schema,
:root[data-theme="dark"] .dbviewer-empty,
:root[data-theme="dark"] .record-edit-card,
:root[data-theme="dark"] .record-side-panel .card,
:root[data-theme="dark"] .toolbar-panel,
:root[data-theme="dark"] .table-panel {
    background: #1d1f25 !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .card-footer,
:root[data-theme="dark"] .dbviewer-sidebar-head,
:root[data-theme="dark"] .dbviewer-data-head,
:root[data-theme="dark"] .dbviewer-schema-body,
:root[data-theme="dark"] .super-admin-list-body,
:root[data-theme="dark"] .super-admin-section-body,
:root[data-theme="dark"] .dashboard-quick-card .card-header,
:root[data-theme="dark"] .dashboard-news-card .card-header,
:root[data-theme="dark"] .dashboard-checklist-card .card-header {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="dark"] .record-edit-card .card-body,
:root[data-theme="dark"] .table-panel .table-responsive,
:root[data-theme="dark"] .dbviewer-table-wrap {
    background: transparent !important;
}

:root[data-theme="dark"] .record-field-shell {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .record-form-field,
:root[data-theme="dark"] .record-field-shell .form-control,
:root[data-theme="dark"] .dbviewer-sql {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

:root[data-theme="dark"] .record-quick-choices {
    border-top-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] .record-quick-choices-label {
    color: rgba(248, 250, 252, 0.66);
}

:root[data-theme="dark"] .record-quick-choice {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.14);
    color: #f8fafc;
}

:root[data-theme="dark"] .record-quick-choice:hover,
:root[data-theme="dark"] .record-quick-choice.is-active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: #ffffff;
}

:root[data-theme="dark"] .dashboard-news-item,
:root[data-theme="dark"] .list-group-item {
    background: transparent !important;
}

/* Dark mode cleanup closer to design.md */
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .info-box,
:root[data-theme="dark"] .callout,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .dashboard-quick-card,
:root[data-theme="dark"] .dashboard-news-card,
:root[data-theme="dark"] .dashboard-checklist-card,
:root[data-theme="dark"] .super-admin-hero,
:root[data-theme="dark"] .super-admin-metric,
:root[data-theme="dark"] .super-admin-section,
:root[data-theme="dark"] .super-admin-form-panel,
:root[data-theme="dark"] .super-admin-table,
:root[data-theme="dark"] .super-admin-list,
:root[data-theme="dark"] .super-admin-shortcuts a,
:root[data-theme="dark"] .dbviewer-hero,
:root[data-theme="dark"] .dbviewer-metric,
:root[data-theme="dark"] .dbviewer-sidebar,
:root[data-theme="dark"] .dbviewer-main,
:root[data-theme="dark"] .dbviewer-data-card,
:root[data-theme="dark"] .dbviewer-schema,
:root[data-theme="dark"] .dbviewer-empty,
:root[data-theme="dark"] .record-edit-card,
:root[data-theme="dark"] .record-side-panel .card,
:root[data-theme="dark"] .toolbar-panel,
:root[data-theme="dark"] .table-panel,
:root[data-theme="dark"] .report-card,
:root[data-theme="dark"] .dictionary-card,
:root[data-theme="dark"] .module-item,
:root[data-theme="dark"] .empty-state {
    background: #1d1f25 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .card-footer,
:root[data-theme="dark"] .dbviewer-sidebar-head,
:root[data-theme="dark"] .dbviewer-data-head,
:root[data-theme="dark"] .dbviewer-schema-body,
:root[data-theme="dark"] .super-admin-list-body,
:root[data-theme="dark"] .super-admin-section-body,
:root[data-theme="dark"] .dashboard-quick-card .card-header,
:root[data-theme="dark"] .dashboard-news-card .card-header,
:root[data-theme="dark"] .dashboard-checklist-card .card-header {
    background: rgba(255, 255, 255, 0.02) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

:root[data-theme="dark"] .record-edit-card .card-body,
:root[data-theme="dark"] .table-panel .table-responsive,
:root[data-theme="dark"] .dbviewer-table-wrap,
:root[data-theme="dark"] .dashboard-news-item,
:root[data-theme="dark"] .list-group-item {
    background: transparent !important;
    background-image: none !important;
}

:root[data-theme="dark"] .record-field-shell,
:root[data-theme="dark"] .record-expert-panel,
:root[data-theme="dark"] .checklist-attachment-panel {
    background: rgba(255, 255, 255, 0.03) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .record-form-field,
:root[data-theme="dark"] .record-field-shell .form-control,
:root[data-theme="dark"] .dbviewer-sql {
    background: rgba(255, 255, 255, 0.03) !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

:root[data-theme="dark"] .text-body-secondary,
:root[data-theme="dark"] .small.text-body-secondary,
:root[data-theme="dark"] .dashboard-news-text,
:root[data-theme="dark"] .dashboard-quick-desc,
:root[data-theme="dark"] .dashboard-checklist-item .small,
:root[data-theme="dark"] .dashboard-checklist-item .text-body-secondary,
:root[data-theme="dark"] .table-summary span,
:root[data-theme="dark"] .empty-cell {
    color: rgba(255, 255, 255, 0.82) !important;
}

:root[data-theme="dark"] .dashboard-checklist-title,
:root[data-theme="dark"] .dashboard-quick-title,
:root[data-theme="dark"] .card-title,
:root[data-theme="dark"] .table-summary strong,
:root[data-theme="dark"] .data-table td,
:root[data-theme="dark"] .data-table th,
:root[data-theme="dark"] .audit-log-table td,
:root[data-theme="dark"] .audit-log-table th {
    color: #f6f8fc !important;
}

:root[data-theme="dark"] .small-box.text-bg-primary {
    background: #315f8a !important;
    background-image: none !important;
    border-color: rgba(120, 175, 226, 0.18) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .small-box.text-bg-warning {
    background: #c67a1f !important;
    background-image: none !important;
    border-color: rgba(255, 196, 121, 0.16) !important;
    color: #fff5e9 !important;
}

:root[data-theme="dark"] .small-box.text-bg-secondary {
    background: #0a7a36 !important;
    background-image: none !important;
    border-color: rgba(134, 239, 172, 0.16) !important;
    color: #f3fff6 !important;
}

:root[data-theme="dark"] .small-box.text-bg-success {
    background: #7a4b16 !important;
    background-image: none !important;
    border-color: rgba(252, 171, 121, 0.16) !important;
    color: #fff5ea !important;
}

:root[data-theme="dark"] .dashboard-quick-action {
    color: #f8fafc !important;
    background-image: none !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(1) {
    background: rgba(49, 95, 138, 0.16) !important;
    border-color: rgba(120, 175, 226, 0.16) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(2) {
    background: rgba(198, 102, 22, 0.14) !important;
    border-color: rgba(252, 178, 110, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(3) {
    background: rgba(10, 122, 54, 0.14) !important;
    border-color: rgba(134, 239, 172, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(4) {
    background: rgba(198, 132, 32, 0.14) !important;
    border-color: rgba(255, 214, 126, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(5) {
    background: rgba(88, 69, 149, 0.16) !important;
    border-color: rgba(196, 181, 253, 0.14) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item {
    background-image: none !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 1) {
    background: rgba(49, 95, 138, 0.12) !important;
    border-color: rgba(120, 175, 226, 0.12) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 2) {
    background: rgba(198, 102, 22, 0.11) !important;
    border-color: rgba(252, 178, 110, 0.11) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 3) {
    background: rgba(10, 122, 54, 0.11) !important;
    border-color: rgba(134, 239, 172, 0.11) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 4) {
    background: rgba(198, 132, 32, 0.11) !important;
    border-color: rgba(255, 214, 126, 0.11) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 5) {
    background: rgba(88, 69, 149, 0.12) !important;
    border-color: rgba(196, 181, 253, 0.12) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 6) {
    background: rgba(18, 110, 111, 0.12) !important;
    border-color: rgba(103, 232, 249, 0.12) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 7) {
    background: rgba(164, 101, 28, 0.12) !important;
    border-color: rgba(253, 186, 116, 0.12) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 8) {
    background: rgba(123, 46, 95, 0.12) !important;
    border-color: rgba(244, 114, 182, 0.12) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 9) {
    background: rgba(63, 74, 86, 0.18) !important;
    border-color: rgba(203, 213, 225, 0.12) !important;
}

:root[data-theme="dark"] .dashboard-checklist-item:nth-child(10n + 10) {
    background: rgba(167, 123, 34, 0.11) !important;
    border-color: rgba(250, 204, 21, 0.12) !important;
}

:root[data-theme="dark"] .btn-warning,
:root[data-theme="dark"] .btn-warning i,
:root[data-theme="dark"] .btn-warning .bi {
    color: #181d26 !important;
}

:root[data-theme="dark"] .btn-warning {
    background: #ffbf1f !important;
    border-color: rgba(255, 214, 126, 0.24) !important;
}

:root[data-theme="dark"] .btn-warning:hover,
:root[data-theme="dark"] .btn-warning:focus {
    background: #f1b31b !important;
    border-color: rgba(255, 214, 126, 0.3) !important;
    color: #181d26 !important;
}

:root[data-theme="dark"] .table-panel,
:root[data-theme="dark"] .table-scroll,
:root[data-theme="dark"] .data-table,
:root[data-theme="dark"] .audit-log-table,
:root[data-theme="dark"] .dbviewer-data-table {
    background: #24262c !important;
}

:root[data-theme="dark"] .data-table th,
:root[data-theme="dark"] .audit-log-table th,
:root[data-theme="dark"] .dbviewer-data-table thead th {
    background: #1f2127 !important;
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

:root[data-theme="dark"] .data-table td,
:root[data-theme="dark"] .audit-log-table td,
:root[data-theme="dark"] .dbviewer-data-table td {
    background: #24262c !important;
    border-bottom-color: rgba(255, 255, 255, 0.06) !important;
}

:root[data-theme="dark"] .data-table tbody tr:nth-child(even) td,
:root[data-theme="dark"] .audit-log-table tbody tr:nth-child(even) td,
:root[data-theme="dark"] .dbviewer-data-table tbody tr:nth-child(even) td {
    background: #272a31 !important;
}

:root[data-theme="dark"] .table-panel {
    background: #24262c !important;
    background-image: none !important;
}

:root[data-theme="dark"] .table-panel .table-responsive,
:root[data-theme="dark"] .table-panel table,
:root[data-theme="dark"] .table-panel .table,
:root[data-theme="dark"] .table-panel .table > :not(caption) > * > * {
    background-color: #24262c !important;
    background-image: none !important;
    color: #f6f8fc !important;
}

:root[data-theme="dark"] .table-panel thead,
:root[data-theme="dark"] .table-panel thead tr,
:root[data-theme="dark"] .table-panel thead th,
:root[data-theme="dark"] .table-panel .table thead th {
    background-color: #1f2127 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

:root[data-theme="dark"] .table-panel tbody tr,
:root[data-theme="dark"] .table-panel tbody td,
:root[data-theme="dark"] .table-panel .table tbody td {
    background-color: #24262c !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

:root[data-theme="dark"] .table-panel tbody tr:nth-child(even),
:root[data-theme="dark"] .table-panel tbody tr:nth-child(even) td,
:root[data-theme="dark"] .table-panel .table tbody tr:nth-child(even) td {
    background-color: #272a31 !important;
}

:root[data-theme="dark"] .table-panel .table-hover > tbody > tr:hover > * {
    background-color: #2d3037 !important;
    color: #ffffff !important;
}

/* CRUD record listings use the same neutral dark surface as the surrounding card. */
:root[data-theme="dark"] .crud-record-listing,
:root[data-theme="dark"] .crud-record-listing .table,
:root[data-theme="dark"] .crud-record-listing .crud-record-table,
:root[data-theme="dark"] .crud-record-listing .table > :not(caption) > * > * {
    background-color: #1d1f25 !important;
    background-image: none !important;
    color: #f6f8fc !important;
}

:root[data-theme="dark"] .crud-record-listing thead,
:root[data-theme="dark"] .crud-record-listing thead tr,
:root[data-theme="dark"] .crud-record-listing thead th {
    background-color: #24262c !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .crud-record-listing tbody tr,
:root[data-theme="dark"] .crud-record-listing tbody td {
    background-color: #1d1f25 !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

:root[data-theme="dark"] .crud-record-listing tbody tr:nth-child(even),
:root[data-theme="dark"] .crud-record-listing tbody tr:nth-child(even) td {
    background-color: #212329 !important;
}

:root[data-theme="dark"] .crud-record-listing .table-hover > tbody > tr:hover > * {
    background-color: #2a2d34 !important;
    color: #ffffff !important;
}

@media print {
    :root,
    :root[data-theme="dark"] {
        --surface: #ffffff;
        --panel: #ffffff;
        --ink: #111111;
        --muted: #555555;
        --line: #cfcfcf;
        --green: #111111;
        --soft: #ffffff;
        --table-head: #f1f1f1;
    }

    body {
        background: #ffffff;
        color: #111111;
    }

    .sidebar,
    .topbar,
    .flash-stack,
    .app-footer,
    .toolbar-panel,
    .no-print {
        display: none !important;
    }

    .app-shell {
        display: block;
        min-height: auto;
    }

    .main-panel {
        display: block;
        padding: 0;
    }

    .page-heading {
        align-items: flex-start;
        border-bottom: 2px solid #111111;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 0;
    }

    h2 {
        font-size: 16px;
    }

    .print-meta,
    .detail-stack {
        gap: 8px;
    }

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

    .print-meta > div,
    .detail-section,
    .detail-item,
    .table-panel {
        border-color: #cfcfcf;
        box-shadow: none;
        break-inside: avoid;
    }

    .detail-section {
        padding: 12px;
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .detail-item {
        min-height: 72px;
        padding: 10px;
    }

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

    .data-table th,
    .data-table td {
        padding: 7px;
    }

    .data-table th:last-child,
    .actions-cell {
        display: none;
    }

    .report-grid {
        display: block;
    }

    .report-card {
        break-inside: avoid;
        margin-bottom: 8px;
    }

    body:has(.report-print-grid) {
        background: #ffffff !important;
    }

    body:has(.report-print-grid) .app-header,
    body:has(.report-print-grid) .app-sidebar,
    body:has(.report-print-grid) .app-content-header,
    body:has(.report-print-grid) .info-box,
    body:has(.report-print-grid) .app-footer,
    body:has(.report-print-grid) .no-print,
    body:has(.report-print-grid) .report-print-grid .card-footer,
    body:has(.report-print-grid) .report-print-grid .card-body > .alert,
    body:has(.report-print-grid) .report-print-grid .card-body > .d-flex {
        display: none !important;
    }

    body:has(.report-print-grid) .app-main,
    body:has(.report-print-grid) .app-content,
    body:has(.report-print-grid) .container-fluid,
    body:has(.report-print-grid) .print-document,
    body:has(.report-print-grid) .report-print-document,
    body:has(.report-print-grid) .card-body,
    body:has(.report-print-grid) .report-print-grid,
    body:has(.report-print-grid) .report-print-table-wrap {
        background: #ffffff !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    body:has(.report-print-grid) .report-print-grid {
        display: block !important;
        break-inside: auto;
    }

    body:has(.report-print-grid) .report-print-paper-header,
    body:has(.report-print-grid) .report-print-paper-footer {
        color: #111827 !important;
        display: block !important;
        font-family: Arial, "Segoe UI", sans-serif !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    body:has(.report-print-grid) .report-print-paper-header {
        margin-bottom: 18px !important;
    }

    body:has(.report-print-grid) .report-print-paper-header h1 {
        color: #111827 !important;
        font-size: 20px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        margin: 0 0 18px !important;
    }

    body:has(.report-print-grid) .legacy-generated-line {
        align-items: center !important;
        color: #6b7280 !important;
        display: flex !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        gap: 12px !important;
        margin: 0 0 18px !important;
    }

    body:has(.report-print-grid) .legacy-generated-line img {
        display: block !important;
        height: 44px !important;
        object-fit: contain !important;
        width: 44px !important;
    }

    body:has(.report-print-grid) .legacy-generated-line span {
        border-bottom: 1px dashed #9ca3af !important;
        padding-bottom: 2px !important;
    }

    body:has(.report-print-grid) .legacy-report-meta {
        border: 1px solid #d1d5db !important;
        display: grid !important;
        gap: 8px 18px !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        margin: 0 0 18px !important;
        padding: 12px 14px !important;
    }

    body:has(.report-print-grid) .legacy-report-meta div {
        color: #111827 !important;
        font-size: 12px !important;
        line-height: 1.35 !important;
    }

    body:has(.report-print-grid) .legacy-report-meta strong {
        font-weight: 800 !important;
    }

    body:has(.report-print-grid) .report-print-table {
        border-collapse: collapse !important;
        color: #111111 !important;
        font-size: 10px;
        min-width: 0 !important;
        width: 100% !important;
    }

    body:has(.report-print-grid) .report-print-table th,
    body:has(.report-print-grid) .report-print-table td {
        background: #ffffff !important;
        border: 1px solid #d0d0d0 !important;
        color: #111111 !important;
        padding: 6px !important;
        vertical-align: top;
    }

    body:has(.report-print-grid) .report-print-table th {
        background: #f1f1f1 !important;
        font-weight: 700;
    }

    body:has(.report-print-grid) .legacy-report-signature {
        color: #111827 !important;
        margin-top: 60px !important;
        text-align: center !important;
    }

    body:has(.report-print-grid) .legacy-report-signature span {
        border-top: 1px dashed #111827 !important;
        display: inline-block !important;
        margin-top: 36px !important;
        width: 260px !important;
    }

    body:has(.report-print-grid) .print-footer {
        border-top: 1px solid #d1d5db !important;
        color: #64748b !important;
        font-size: 11px !important;
        margin-top: 22px !important;
        padding-top: 10px !important;
        text-align: right !important;
    }
}

@media (max-width: 767.98px) {
    .record-attachment-submit {
        width: 100%;
    }

    .record-attachment-submit-button {
        width: 100%;
    }
}

body[data-theme="dark"] .app-wrapper {
    isolation: auto !important;
    z-index: auto !important;
}

body[data-theme="dark"] .modal-backdrop {
    z-index: 1990 !important;
}

body[data-theme="dark"] .modal {
    z-index: 2000 !important;
}

.account-logout-button {
    align-items: center !important;
    background: rgba(217, 119, 6, 0.06) !important;
    border-color: rgba(217, 119, 6, 0.24) !important;
    color: #8a5208 !important;
    display: inline-flex !important;
    gap: 0.5rem !important;
    overflow: hidden;
}

.account-logout-button::before {
    display: none !important;
}

.account-logout-button i {
    flex: 0 0 auto;
    margin-right: 0 !important;
    transition: transform 0.16s ease;
}

.account-logout-button .account-logout-label {
    transition: transform 0.16s ease;
}

.account-logout-button:hover,
.account-logout-button:focus {
    background: rgba(217, 119, 6, 0.1) !important;
    border-color: rgba(217, 119, 6, 0.34) !important;
    color: #6f4308 !important;
}

.account-logout-button:hover i,
.account-logout-button:focus i {
    transform: translateX(-1px);
}

.account-logout-button:hover .account-logout-label,
.account-logout-button:focus .account-logout-label {
    transform: translateX(1px);
}

:root[data-theme="dark"] .account-logout-button,
body[data-theme="dark"] .account-logout-button {
    background: rgba(245, 158, 11, 0.08) !important;
    border-color: rgba(245, 158, 11, 0.24) !important;
    color: #f4bc63 !important;
}

:root[data-theme="dark"] .account-logout-button:hover,
:root[data-theme="dark"] .account-logout-button:focus,
body[data-theme="dark"] .account-logout-button:hover,
body[data-theme="dark"] .account-logout-button:focus {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.36) !important;
    color: #ffe0a8 !important;
}

/* Final gray dark-mode pass: structural surfaces stay neutral, not blue. */
:root[data-theme="dark"] {
    --surface: #202123;
    --panel: #242528;
    --ink: #f4f5f6;
    --muted: #b7bbc2;
    --line: rgba(255, 255, 255, 0.1);
    --sidebar: #202123;
    --sidebar-strong: #1a1b1d;
    --input-bg: #232427;
    --table-head: #28292c;
    --soft: #2a2b2e;
    --soft-border: #383a3e;
}

:root[data-theme="dark"] body,
body[data-theme="dark"] {
    background: #202123 !important;
    color: #f4f5f6 !important;
}

body[data-theme="dark"]::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.026) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px) !important;
    opacity: 0.42 !important;
}

:root[data-theme="dark"] .app-wrapper,
:root[data-theme="dark"] .app-main,
:root[data-theme="dark"] .app-content,
:root[data-theme="dark"] .container-fluid,
body[data-theme="dark"] .app-wrapper,
body[data-theme="dark"] .app-main,
body[data-theme="dark"] .app-content,
body[data-theme="dark"] .container-fluid {
    background: transparent !important;
}

:root[data-theme="dark"] .app-header.navbar,
:root[data-theme="dark"] .app-sidebar,
:root[data-theme="dark"] .main-sidebar,
:root[data-theme="dark"] .sidebar-wrapper,
:root[data-theme="dark"] .sidebar-brand,
body[data-theme="dark"] .app-header.navbar,
body[data-theme="dark"] .app-sidebar,
body[data-theme="dark"] .main-sidebar,
body[data-theme="dark"] .sidebar-wrapper,
body[data-theme="dark"] .sidebar-brand {
    background-color: #202123 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] .app-content-header,
:root[data-theme="dark"] .app-content-header .container-fluid,
body[data-theme="dark"] .app-content-header,
body[data-theme="dark"] .app-content-header .container-fluid {
    background: #202123 !important;
    background-image: none !important;
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .card-footer,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .form-panel,
:root[data-theme="dark"] .toolbar-panel,
:root[data-theme="dark"] .table-panel,
:root[data-theme="dark"] .record-edit-shell,
:root[data-theme="dark"] .record-edit-panel,
:root[data-theme="dark"] .record-edit-sidebar,
:root[data-theme="dark"] .dashboard-panel,
:root[data-theme="dark"] .dashboard-news,
:root[data-theme="dark"] .dashboard-checklist-panel,
:root[data-theme="dark"] .dbviewer-hero,
:root[data-theme="dark"] .dbviewer-metric,
:root[data-theme="dark"] .dbviewer-sidebar,
:root[data-theme="dark"] .dbviewer-main,
:root[data-theme="dark"] .dbviewer-data-card,
:root[data-theme="dark"] .dbviewer-schema,
:root[data-theme="dark"] .dbviewer-empty,
body[data-theme="dark"] .card,
body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-footer,
body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .dropdown-menu,
body[data-theme="dark"] .form-panel,
body[data-theme="dark"] .toolbar-panel,
body[data-theme="dark"] .table-panel,
body[data-theme="dark"] .record-edit-shell,
body[data-theme="dark"] .record-edit-panel,
body[data-theme="dark"] .record-edit-sidebar,
body[data-theme="dark"] .dashboard-panel,
body[data-theme="dark"] .dashboard-news,
body[data-theme="dark"] .dashboard-checklist-panel,
body[data-theme="dark"] .dbviewer-hero,
body[data-theme="dark"] .dbviewer-metric,
body[data-theme="dark"] .dbviewer-sidebar,
body[data-theme="dark"] .dbviewer-main,
body[data-theme="dark"] .dbviewer-data-card,
body[data-theme="dark"] .dbviewer-schema,
body[data-theme="dark"] .dbviewer-empty {
    background: #242528 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .card-footer,
:root[data-theme="dark"] .dbviewer-sidebar-head,
:root[data-theme="dark"] .dbviewer-data-head,
:root[data-theme="dark"] .dbviewer-schema-body,
body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-footer,
body[data-theme="dark"] .dbviewer-sidebar-head,
body[data-theme="dark"] .dbviewer-data-head,
body[data-theme="dark"] .dbviewer-schema-body {
    background: #28292c !important;
    background-image: none !important;
}

:root[data-theme="dark"] .form-control,
:root[data-theme="dark"] .form-select,
:root[data-theme="dark"] .input-group-text,
body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] .input-group-text {
    background-color: #232427 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] .nav-sidebar > .nav-item > .nav-link,
:root[data-theme="dark"] .sidebar-menu > .nav-item > .nav-link,
:root[data-theme="dark"] .nav-treeview > .nav-item > .nav-link,
body[data-theme="dark"] .nav-sidebar > .nav-item > .nav-link,
body[data-theme="dark"] .sidebar-menu > .nav-item > .nav-link,
body[data-theme="dark"] .nav-treeview > .nav-item > .nav-link {
    background: transparent !important;
    color: #e8eaed !important;
    font-weight: 400 !important;
}

:root[data-theme="dark"] .nav-sidebar > .nav-item > .nav-link.active,
:root[data-theme="dark"] .sidebar-menu > .nav-item > .nav-link.active,
:root[data-theme="dark"] .nav-treeview .nav-link.active,
body[data-theme="dark"] .nav-sidebar > .nav-item > .nav-link.active,
body[data-theme="dark"] .sidebar-menu > .nav-item > .nav-link.active,
body[data-theme="dark"] .nav-treeview .nav-link.active {
    background: #303236 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .nav-sidebar > .nav-item > .nav-link:hover,
:root[data-theme="dark"] .sidebar-menu > .nav-item > .nav-link:hover,
:root[data-theme="dark"] .nav-treeview .nav-link:hover,
body[data-theme="dark"] .nav-sidebar > .nav-item > .nav-link:hover,
body[data-theme="dark"] .sidebar-menu > .nav-item > .nav-link:hover,
body[data-theme="dark"] .nav-treeview .nav-link:hover {
    background: #2a2b2e !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .nav-treeview > .nav-item > .nav-link p,
:root[data-theme="dark"] .nav-treeview > .nav-item > .nav-link .nav-icon,
body[data-theme="dark"] .nav-treeview > .nav-item > .nav-link p,
body[data-theme="dark"] .nav-treeview > .nav-item > .nav-link .nav-icon {
    color: inherit !important;
    font-weight: 400 !important;
}

:root[data-theme="dark"] .table,
:root[data-theme="dark"] .table-responsive,
:root[data-theme="dark"] .data-table,
:root[data-theme="dark"] .audit-log-table,
:root[data-theme="dark"] .dbviewer-data-table,
:root[data-theme="dark"] .crud-record-listing,
:root[data-theme="dark"] .crud-record-listing .table,
:root[data-theme="dark"] .crud-record-listing .crud-record-table,
body[data-theme="dark"] .table,
body[data-theme="dark"] .table-responsive,
body[data-theme="dark"] .data-table,
body[data-theme="dark"] .audit-log-table,
body[data-theme="dark"] .dbviewer-data-table,
body[data-theme="dark"] .crud-record-listing,
body[data-theme="dark"] .crud-record-listing .table,
body[data-theme="dark"] .crud-record-listing .crud-record-table {
    background: #242528 !important;
    background-image: none !important;
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] .table > :not(caption) > * > *,
:root[data-theme="dark"] .data-table td,
:root[data-theme="dark"] .data-table th,
:root[data-theme="dark"] .audit-log-table td,
:root[data-theme="dark"] .audit-log-table th,
:root[data-theme="dark"] .dbviewer-data-table td,
:root[data-theme="dark"] .dbviewer-data-table th,
:root[data-theme="dark"] .crud-record-listing .table > :not(caption) > * > *,
body[data-theme="dark"] .table > :not(caption) > * > *,
body[data-theme="dark"] .data-table td,
body[data-theme="dark"] .data-table th,
body[data-theme="dark"] .audit-log-table td,
body[data-theme="dark"] .audit-log-table th,
body[data-theme="dark"] .dbviewer-data-table td,
body[data-theme="dark"] .dbviewer-data-table th,
body[data-theme="dark"] .crud-record-listing .table > :not(caption) > * > * {
    background-color: #242528 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] thead,
:root[data-theme="dark"] thead tr,
:root[data-theme="dark"] thead th,
:root[data-theme="dark"] .crud-record-listing thead,
:root[data-theme="dark"] .crud-record-listing thead tr,
:root[data-theme="dark"] .crud-record-listing thead th,
body[data-theme="dark"] thead,
body[data-theme="dark"] thead tr,
body[data-theme="dark"] thead th,
body[data-theme="dark"] .crud-record-listing thead,
body[data-theme="dark"] .crud-record-listing thead tr,
body[data-theme="dark"] .crud-record-listing thead th {
    background-color: #28292c !important;
    background-image: none !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] tbody tr:nth-child(even) > *,
:root[data-theme="dark"] .crud-record-listing tbody tr:nth-child(even) > *,
body[data-theme="dark"] tbody tr:nth-child(even) > *,
body[data-theme="dark"] .crud-record-listing tbody tr:nth-child(even) > * {
    background-color: #26272a !important;
}

:root[data-theme="dark"] .table-hover > tbody > tr:hover > *,
:root[data-theme="dark"] .crud-record-listing .table-hover > tbody > tr:hover > *,
body[data-theme="dark"] .table-hover > tbody > tr:hover > *,
body[data-theme="dark"] .crud-record-listing .table-hover > tbody > tr:hover > * {
    background-color: #303236 !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .rodolider-brand-link,
:root[data-theme="dark"] .rodolider-brand-link:hover,
:root[data-theme="dark"] .brand-link.rodolider-brand-link,
:root[data-theme="dark"] .brand-link.rodolider-brand-link:hover,
body[data-theme="dark"] .rodolider-brand-link,
body[data-theme="dark"] .rodolider-brand-link:hover,
body[data-theme="dark"] .brand-link.rodolider-brand-link,
body[data-theme="dark"] .brand-link.rodolider-brand-link:hover {
    background: #202123 !important;
    background-color: #202123 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] .rodolider-brand-link .brand-text,
body[data-theme="dark"] .rodolider-brand-link .brand-text {
    color: #f4f5f6 !important;
}

:root[data-theme="dark"] .app-footer,
body[data-theme="dark"] .app-footer {
    background: #202123 !important;
    background-color: #202123 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #b7bbc2 !important;
}

:root[data-theme="dark"] .app-footer strong,
body[data-theme="dark"] .app-footer strong {
    color: #f4f5f6 !important;
}

.app-header .container-fluid {
    position: relative;
}

.app-header-title {
    color: var(--muted);
    font-size: 0.875rem;
    left: 50%;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
}

:root[data-theme="dark"] .app-header-title,
body[data-theme="dark"] .app-header-title {
    color: #b7bbc2;
}

.app-header [data-command-palette-open] {
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: var(--ink) !important;
    font: inherit;
    line-height: inherit;
    padding: var(--bs-nav-link-padding-y) var(--bs-nav-link-padding-x);
}

.app-header [data-command-palette-open]:hover,
.app-header [data-command-palette-open]:focus {
    background: rgba(24, 29, 38, 0.04) !important;
    border-color: rgba(24, 29, 38, 0.05) !important;
    box-shadow: none !important;
    color: var(--ink) !important;
    transform: none !important;
}

:root[data-theme="dark"] .app-header [data-command-palette-open],
body[data-theme="dark"] .app-header [data-command-palette-open] {
    color: #f8fafc !important;
}

:root[data-theme="dark"] .app-header [data-command-palette-open]:hover,
:root[data-theme="dark"] .app-header [data-command-palette-open]:focus,
body[data-theme="dark"] .app-header [data-command-palette-open]:hover,
body[data-theme="dark"] .app-header [data-command-palette-open]:focus {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .rcp-risk-toolbar,
body[data-theme="dark"] .rcp-risk-toolbar {
    background: #242528 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f4f5f6 !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .rcp-risk-shell,
body[data-theme="dark"] .rcp-risk-shell {
    background: #242528 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #f4f5f6 !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .rcp-risk-main,
:root[data-theme="dark"] .rcp-risk-side,
body[data-theme="dark"] .rcp-risk-main,
body[data-theme="dark"] .rcp-risk-side {
    background: #242528 !important;
    background-image: none !important;
}

:root[data-theme="dark"] .rcp-risk-side,
body[data-theme="dark"] .rcp-risk-side {
    border-left-color: rgba(255, 255, 255, 0.1) !important;
}

:root[data-theme="dark"] .rcp-risk-muted,
body[data-theme="dark"] .rcp-risk-muted {
    color: #b7bbc2 !important;
}

:root[data-theme="dark"] .rcp-risk-choice,
body[data-theme="dark"] .rcp-risk-choice {
    background: #28292c !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
    color: #f4f5f6 !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .rcp-risk-choice:hover,
:root[data-theme="dark"] .rcp-risk-choice:has(input:checked),
body[data-theme="dark"] .rcp-risk-choice:hover,
body[data-theme="dark"] .rcp-risk-choice:has(input:checked) {
    background: #303236 !important;
    border-color: rgba(255, 255, 255, 0.24) !important;
}

:root[data-theme="dark"] .rcp-risk-choice:has(input:checked) .rcp-risk-label,
body[data-theme="dark"] .rcp-risk-choice:has(input:checked) .rcp-risk-label {
    color: #ffffff !important;
}

:root[data-theme="dark"] .rcp-risk-cell,
body[data-theme="dark"] .rcp-risk-cell {
    background: #303236 !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .rcp-risk-cell.is-low,
body[data-theme="dark"] .rcp-risk-cell.is-low {
    background: #2f7d59 !important;
}

:root[data-theme="dark"] .rcp-risk-cell.is-hot,
body[data-theme="dark"] .rcp-risk-cell.is-hot {
    background: #d99a2b !important;
}

:root[data-theme="dark"] .rcp-risk-cell.is-danger,
body[data-theme="dark"] .rcp-risk-cell.is-danger {
    background: #c7543f !important;
}

:root[data-theme="dark"] .rcp-risk-score,
body[data-theme="dark"] .rcp-risk-score {
    background: #202123 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.16) !important;
    box-shadow: none !important;
}

.record-attachment-form {
    align-items: flex-start !important;
}

.record-attachment-submit {
    align-self: flex-start !important;
    padding-top: 2rem;
}

.record-attachment-field .form-control,
.record-attachment-submit-button {
    min-height: 46px;
}

@media (max-width: 767.98px) {
    .record-attachment-submit {
        padding-top: 0;
    }
}

.incident-wizard {
    --incident-accent: #6f42c1;
}

.incident-wizard-card {
    overflow: hidden;
    border-color: rgba(15, 23, 42, 0.12);
}

.incident-wizard-card + .incident-wizard-card {
    margin-top: 1rem;
}

.incident-wizard-card .card-header {
    background: rgba(111, 66, 193, 0.06);
}

.incident-wizard-side {
    position: sticky;
    top: 1rem;
}

.incident-mapping-list {
    display: grid;
    gap: 0.6rem;
}

.incident-mapping-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.75rem;
    background: rgba(15, 23, 42, 0.03);
}

.incident-mapping-list span {
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
}

.incident-mapping-list strong {
    color: var(--incident-accent);
    font-size: 0.8rem;
    text-transform: uppercase;
}

:root[data-theme="dark"] .incident-wizard-card,
body[data-theme="dark"] .incident-wizard-card,
:root[data-theme="dark"] .incident-wizard-side .card,
body[data-theme="dark"] .incident-wizard-side .card {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
}

:root[data-theme="dark"] .incident-wizard-card .card-header,
body[data-theme="dark"] .incident-wizard-card .card-header,
:root[data-theme="dark"] .incident-wizard-side .card-header,
body[data-theme="dark"] .incident-wizard-side .card-header {
    background: #28292c !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

:root[data-theme="dark"] .incident-mapping-list > div,
body[data-theme="dark"] .incident-mapping-list > div {
    background: #28292c !important;
    border-color: rgba(255, 255, 255, 0.11) !important;
}

:root[data-theme="dark"] .incident-mapping-list strong,
body[data-theme="dark"] .incident-mapping-list strong {
    color: #a78bfa !important;
}

.wizard-tile {
    border-color: rgba(15, 23, 42, 0.1);
}

.wizard-tile-icon {
    align-items: center;
    background: rgba(111, 66, 193, 0.12);
    border-radius: 0.75rem;
    color: #6f42c1;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.wizard-form-card textarea.form-control {
    min-height: 8rem;
}

.wizard-side-card {
    position: sticky;
    top: 1rem;
}

.wizard-document-preview {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.75rem;
    color: #111827;
    margin: 0 auto;
    max-width: 860px;
    min-height: 860px;
    padding: 2rem 2.5rem;
}

.wizard-generated-line {
    align-items: center;
    color: #6b7280;
    display: flex;
    font-weight: 600;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.wizard-generated-line img {
    height: 42px;
    object-fit: contain;
    width: 42px;
}

.wizard-generated-line span {
    border-bottom: 1px dashed #9ca3af;
    padding-bottom: 0.15rem;
}

.wizard-document-preview h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.wizard-document-fields {
    display: grid;
    gap: 0.85rem;
}

.wizard-document-fields div {
    display: grid;
    gap: 0.25rem;
}

.wizard-document-fields dt {
    font-weight: 700;
}

.wizard-document-fields dd {
    margin: 0;
    min-height: 1.25rem;
}

.wizard-signature {
    margin-top: 8rem;
    text-align: center;
}

.wizard-signature span {
    border-top: 1px dashed #111827;
    display: inline-block;
    margin-top: 2.5rem;
    width: 260px;
}

:root[data-theme="dark"] .wizard-tile,
:root[data-theme="dark"] .wizard-form-card,
:root[data-theme="dark"] .wizard-side-card,
body[data-theme="dark"] .wizard-tile,
body[data-theme="dark"] .wizard-form-card,
body[data-theme="dark"] .wizard-side-card {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

:root[data-theme="dark"] .wizard-tile-icon,
body[data-theme="dark"] .wizard-tile-icon {
    background: rgba(124, 91, 239, 0.18);
    color: #b8a4ff;
}

:root[data-theme="dark"] .wizard-document-preview,
body[data-theme="dark"] .wizard-document-preview {
    background: #f8f9fb;
    color: #111827;
}

.setup-wizard-tile {
    align-items: flex-start;
    background: var(--bs-card-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
}

.setup-wizard-tile-icon,
.setup-wizard-complete-icon {
    align-items: center;
    background: rgba(111, 66, 193, 0.12);
    border-radius: 0.85rem;
    color: #6f42c1;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    height: 3.25rem;
    justify-content: center;
    width: 3.25rem;
}

.setup-wizard-complete-icon {
    background: rgba(25, 135, 84, 0.12);
    color: #198754;
}

.setup-wizard-stepper {
    position: sticky;
    top: 1rem;
}

.setup-wizard-step {
    align-items: flex-start;
    border: 1px solid transparent;
    border-radius: 0.7rem;
    color: inherit;
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem;
    text-decoration: none;
}

.setup-wizard-step + .setup-wizard-step {
    margin-top: 0.5rem;
}

.setup-wizard-step:hover,
.setup-wizard-step.is-active {
    background: rgba(13, 110, 253, 0.08);
    border-color: rgba(13, 110, 253, 0.28);
}

.setup-wizard-step small {
    color: var(--bs-secondary-color);
    display: block;
    line-height: 1.35;
    margin-top: 0.15rem;
}

.setup-wizard-step-dot {
    align-items: center;
    background: rgba(13, 110, 253, 0.12);
    border-radius: 999px;
    color: #0d6efd;
    display: inline-flex;
    flex: 0 0 auto;
    font-weight: 700;
    height: 2rem;
    justify-content: center;
    width: 2rem;
}

.setup-wizard-progress {
    height: 0.65rem;
}

.setup-wizard-check {
    align-items: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 0.7rem;
    display: flex;
    min-height: 3.5rem;
    padding: 1rem 1rem 1rem 2.75rem;
}

.setup-wizard-summary-grid {
    display: grid;
    gap: 0.75rem;
}

.setup-wizard-summary-item {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.7rem;
    padding: 0.9rem 1rem;
}

.setup-wizard-summary-item span {
    color: var(--bs-secondary-color);
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

:root[data-theme="dark"] .setup-wizard-tile,
:root[data-theme="dark"] .setup-wizard-stepper,
body[data-theme="dark"] .setup-wizard-tile,
body[data-theme="dark"] .setup-wizard-stepper {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

:root[data-theme="dark"] .setup-wizard-tile-icon,
body[data-theme="dark"] .setup-wizard-tile-icon {
    background: rgba(124, 91, 239, 0.18);
    color: #c7b8ff;
}

:root[data-theme="dark"] .setup-wizard-step:hover,
:root[data-theme="dark"] .setup-wizard-step.is-active,
body[data-theme="dark"] .setup-wizard-step:hover,
body[data-theme="dark"] .setup-wizard-step.is-active {
    background: rgba(124, 91, 239, 0.16);
    border-color: rgba(124, 91, 239, 0.38);
}

:root[data-theme="dark"] .setup-wizard-step-dot,
body[data-theme="dark"] .setup-wizard-step-dot {
    background: rgba(124, 91, 239, 0.2);
    color: #c7b8ff;
}

/* Dashboard onboarding */
.dashboard-main-header {
    padding-bottom: 1rem;
}

.dashboard-main-cta {
    border-radius: 0.85rem;
    font-weight: 700;
    padding: 0.85rem 1.1rem;
}

.dashboard-onboarding {
    padding-top: 0;
}

.dashboard-onboarding-hero,
.dashboard-card,
.dashboard-metric-card,
.dashboard-path-step,
.dashboard-wizard-tile,
.dashboard-next-action {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.12);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.dashboard-onboarding-hero {
    border-radius: 1rem;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.8fr);
    margin-bottom: 1rem;
    padding: 1.25rem;
}

.dashboard-hero-summary {
    align-content: center;
    display: grid;
    gap: 0.85rem;
}

.dashboard-hero-kicker,
.dashboard-wizard-kind {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.dashboard-hero-title {
    color: #111827;
    font-size: clamp(1.55rem, 2.6vw, 2.35rem);
    font-weight: 850;
    line-height: 1.1;
}

.dashboard-hero-copy {
    color: #475569;
    line-height: 1.45;
    max-width: 38rem;
}

.dashboard-hero-progress,
.dashboard-wizard-progress {
    background: #e5e7eb;
    border-radius: 999px;
    height: 0.65rem;
    overflow: hidden;
}

.dashboard-hero-progress .progress-bar,
.dashboard-wizard-progress .progress-bar {
    background: #6f42c1;
}

.dashboard-path-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dashboard-path-step {
    border-radius: 0.9rem;
    color: inherit;
    display: grid;
    gap: 0.35rem;
    min-height: 12rem;
    padding: 1rem;
    position: relative;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.dashboard-path-step:hover,
.dashboard-wizard-tile:hover,
.dashboard-next-action:hover,
.dashboard-quick-action:hover,
.dashboard-checklist-item:hover {
    border-color: rgba(111, 66, 193, 0.36);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    color: inherit;
    transform: translateY(-1px);
}

.dashboard-path-index {
    align-items: center;
    background: #f1f5f9;
    border-radius: 999px;
    color: #475569;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    height: 1.75rem;
    justify-content: center;
    width: 1.75rem;
}

.dashboard-path-icon {
    color: #6f42c1;
    font-size: 1.25rem;
}

.dashboard-path-title,
.dashboard-wizard-title,
.dashboard-next-action strong {
    color: #111827;
    font-weight: 850;
}

.dashboard-path-desc,
.dashboard-wizard-desc,
.dashboard-next-action small {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.35;
}

.dashboard-status-badge,
.dashboard-path-percent,
.dashboard-wizard-action {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    justify-content: center;
}

.dashboard-status-badge {
    background: #f1f5f9;
    color: #475569;
    margin-top: auto;
    padding: 0.3rem 0.55rem;
    width: fit-content;
}

.dashboard-path-percent {
    background: #ffffff;
    border: 1px solid rgba(17, 24, 39, 0.1);
    padding: 0.25rem 0.5rem;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
}

.dashboard-status-success {
    border-color: rgba(25, 135, 84, 0.3);
}

.dashboard-status-success .dashboard-status-badge,
.dashboard-status-success .dashboard-path-index {
    background: rgba(25, 135, 84, 0.12);
    color: #13734a;
}

.dashboard-status-warning {
    border-color: rgba(198, 102, 22, 0.32);
}

.dashboard-status-warning .dashboard-status-badge,
.dashboard-status-warning .dashboard-path-index {
    background: rgba(198, 102, 22, 0.13);
    color: #9a4f12;
}

.dashboard-metrics-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.dashboard-metric-card {
    border-radius: 0.9rem;
    border-top: 4px solid #6f42c1;
    display: grid;
    gap: 0.2rem;
    min-height: 8rem;
    padding: 1rem;
    position: relative;
}

.dashboard-metric-card.dashboard-tone-success { border-top-color: #198754; }
.dashboard-metric-card.dashboard-tone-warning { border-top-color: #c66616; }
.dashboard-metric-card.dashboard-tone-danger { border-top-color: #dc3545; }
.dashboard-metric-card.dashboard-tone-info { border-top-color: #0dcaf0; }

.dashboard-metric-icon {
    color: #6f42c1;
    font-size: 1.15rem;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.dashboard-tone-success .dashboard-metric-icon { color: #198754; }
.dashboard-tone-warning .dashboard-metric-icon { color: #c66616; }
.dashboard-tone-danger .dashboard-metric-icon { color: #dc3545; }
.dashboard-tone-info .dashboard-metric-icon { color: #087990; }

.dashboard-metric-value {
    color: #111827;
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
}

.dashboard-metric-label {
    color: #111827;
    font-weight: 800;
}

.dashboard-metric-hint {
    color: #64748b;
    font-size: 0.84rem;
}

.dashboard-card {
    border-radius: 0.9rem;
    overflow: hidden;
}

.dashboard-card .card-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid rgba(17, 24, 39, 0.1);
    display: flex;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.dashboard-card .dashboard-card-tools {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: flex-end;
    margin-left: auto;
    position: static !important;
    transform: none !important;
}

.dashboard-card .dashboard-card-tools .btn-tool {
    align-items: center;
    background: #ffffff !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 0.85rem !important;
    box-shadow: 0 0.65rem 1.6rem rgba(15, 23, 42, 0.12) !important;
    color: #6b7280 !important;
    display: inline-flex;
    height: 3rem;
    justify-content: center;
    margin: -0.55rem 0 -0.55rem auto;
    min-width: 3rem;
    padding: 0;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.dashboard-card .dashboard-card-tools .btn-tool:hover,
.dashboard-card .dashboard-card-tools .btn-tool:focus {
    background: #f8fafc !important;
    border-color: rgba(111, 66, 193, 0.24) !important;
    box-shadow: 0 0.85rem 1.8rem rgba(15, 23, 42, 0.14) !important;
    color: #111827 !important;
    transform: translateY(-1px) !important;
}

.dashboard-card .dashboard-work-header {
    align-items: center !important;
    flex-direction: row !important;
    gap: 1rem;
    justify-content: space-between !important;
}

.dashboard-work-switch {
    margin-left: auto;
    min-width: min(260px, 48vw);
}

.dashboard-work-switch .form-select {
    background-color: #ffffff;
    border-color: var(--bs-border-color);
    border-radius: 0.85rem;
    box-shadow: 0 0.55rem 1.4rem rgba(15, 23, 42, 0.08);
    color: var(--bs-body-color);
    font-weight: 650;
    min-height: 2.65rem;
}

[data-dashboard-work-panel][hidden] {
    display: none !important;
}

.dashboard-catalog-tile .dashboard-wizard-action {
    margin-top: auto;
}

.dashboard-wizard-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-wizard-tile {
    border-radius: 0.9rem;
    color: inherit;
    display: grid;
    gap: 0.45rem;
    min-height: 13.5rem;
    padding: 1rem;
    text-decoration: none;
}

.dashboard-wizard-icon,
.dashboard-next-icon {
    align-items: center;
    background: rgba(111, 66, 193, 0.11);
    border-radius: 0.75rem;
    color: #6f42c1;
    display: inline-flex;
    font-size: 1.25rem;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

.dashboard-wizard-desc {
    min-height: 3.6rem;
}

.dashboard-wizard-action {
    align-self: end;
    background: #f1f5f9;
    color: #111827;
    gap: 0.15rem;
    justify-self: start;
    padding: 0.35rem 0.65rem;
}

.dashboard-next-list {
    display: grid;
    gap: 0.75rem;
}

.dashboard-next-action {
    align-items: center;
    border-radius: 0.9rem;
    color: inherit;
    display: grid;
    gap: 0.8rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding: 0.95rem;
    text-decoration: none;
}

.dashboard-next-text {
    display: grid;
    gap: 0.15rem;
}

.dashboard-next-chevron {
    color: #94a3b8;
}

.dashboard-next-action.dashboard-tone-warning .dashboard-next-icon { background: rgba(198, 102, 22, 0.13); color: #c66616; }
.dashboard-next-action.dashboard-tone-success .dashboard-next-icon { background: rgba(25, 135, 84, 0.12); color: #198754; }
.dashboard-next-action.dashboard-tone-danger .dashboard-next-icon { background: rgba(220, 53, 69, 0.12); color: #dc3545; }
.dashboard-next-action.dashboard-tone-info .dashboard-next-icon { background: rgba(13, 202, 240, 0.13); color: #087990; }
.dashboard-next-action.dashboard-tone-secondary .dashboard-next-icon { background: rgba(100, 116, 139, 0.12); color: #475569; }

.dashboard-chart-body {
    min-height: 240px;
}

.dashboard-checklist-card {
    margin-top: 0;
}

.dashboard-checklist-strip {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.dashboard-checklist-item,
.dashboard-quick-action {
    text-decoration: none;
}

@media (max-width: 1500px) {
    .dashboard-path-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

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

@media (max-width: 992px) {
    .dashboard-onboarding-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-path-grid,
    .dashboard-metrics-grid,
    .dashboard-wizard-grid,
    .dashboard-checklist-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 576px) {
    .dashboard-path-grid,
    .dashboard-metrics-grid,
    .dashboard-wizard-grid,
    .dashboard-checklist-strip,
    .dashboard-quick-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-card .dashboard-work-header {
        align-items: stretch !important;
        flex-direction: column !important;
    }

    .dashboard-work-switch {
        margin-left: 0;
        min-width: 100%;
        width: 100%;
    }
}

:root[data-theme="dark"] .dashboard-main-header,
body[data-theme="dark"] .dashboard-main-header {
    background: #181d26;
}

:root[data-theme="dark"] .dashboard-onboarding-hero,
:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .dashboard-metric-card,
:root[data-theme="dark"] .dashboard-path-step,
:root[data-theme="dark"] .dashboard-wizard-tile,
:root[data-theme="dark"] .dashboard-next-action,
body[data-theme="dark"] .dashboard-onboarding-hero,
body[data-theme="dark"] .dashboard-card,
body[data-theme="dark"] .dashboard-metric-card,
body[data-theme="dark"] .dashboard-path-step,
body[data-theme="dark"] .dashboard-wizard-tile,
body[data-theme="dark"] .dashboard-next-action {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none;
}

:root[data-theme="dark"] .dashboard-card .card-header,
body[data-theme="dark"] .dashboard-card .card-header {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}

:root[data-theme="dark"] .dashboard-card .dashboard-card-tools .btn-tool,
body[data-theme="dark"] .dashboard-card .dashboard-card-tools .btn-tool {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 0.65rem 1.6rem rgba(0, 0, 0, 0.28) !important;
    color: #cbd5e1 !important;
}

:root[data-theme="dark"] .dashboard-card .dashboard-card-tools .btn-tool:hover,
:root[data-theme="dark"] .dashboard-card .dashboard-card-tools .btn-tool:focus,
body[data-theme="dark"] .dashboard-card .dashboard-card-tools .btn-tool:hover,
body[data-theme="dark"] .dashboard-card .dashboard-card-tools .btn-tool:focus {
    background: #2b2d31 !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 0.85rem 1.8rem rgba(0, 0, 0, 0.34) !important;
    color: #ffffff !important;
}

:root[data-theme="dark"] .dashboard-work-switch .form-select,
body[data-theme="dark"] .dashboard-work-switch .form-select {
    background-color: #242528;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: 0 0.55rem 1.4rem rgba(0, 0, 0, 0.22);
    color: #f8fafc;
}

:root[data-theme="dark"] .dashboard-hero-title,
:root[data-theme="dark"] .dashboard-path-title,
:root[data-theme="dark"] .dashboard-wizard-title,
:root[data-theme="dark"] .dashboard-next-action strong,
:root[data-theme="dark"] .dashboard-metric-value,
:root[data-theme="dark"] .dashboard-metric-label,
body[data-theme="dark"] .dashboard-hero-title,
body[data-theme="dark"] .dashboard-path-title,
body[data-theme="dark"] .dashboard-wizard-title,
body[data-theme="dark"] .dashboard-next-action strong,
body[data-theme="dark"] .dashboard-metric-value,
body[data-theme="dark"] .dashboard-metric-label {
    color: #f8fafc !important;
}

:root[data-theme="dark"] .dashboard-hero-copy,
:root[data-theme="dark"] .dashboard-path-desc,
:root[data-theme="dark"] .dashboard-wizard-desc,
:root[data-theme="dark"] .dashboard-next-action small,
:root[data-theme="dark"] .dashboard-metric-hint,
:root[data-theme="dark"] .dashboard-hero-kicker,
:root[data-theme="dark"] .dashboard-wizard-kind,
body[data-theme="dark"] .dashboard-hero-copy,
body[data-theme="dark"] .dashboard-path-desc,
body[data-theme="dark"] .dashboard-wizard-desc,
body[data-theme="dark"] .dashboard-next-action small,
body[data-theme="dark"] .dashboard-metric-hint,
body[data-theme="dark"] .dashboard-hero-kicker,
body[data-theme="dark"] .dashboard-wizard-kind {
    color: #cbd5e1 !important;
}

:root[data-theme="dark"] .dashboard-path-index,
:root[data-theme="dark"] .dashboard-status-badge,
:root[data-theme="dark"] .dashboard-path-percent,
:root[data-theme="dark"] .dashboard-wizard-action,
body[data-theme="dark"] .dashboard-path-index,
body[data-theme="dark"] .dashboard-status-badge,
body[data-theme="dark"] .dashboard-path-percent,
body[data-theme="dark"] .dashboard-wizard-action {
    background: #303136;
    border-color: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
}

:root[data-theme="dark"] .dashboard-hero-progress,
:root[data-theme="dark"] .dashboard-wizard-progress,
body[data-theme="dark"] .dashboard-hero-progress,
body[data-theme="dark"] .dashboard-wizard-progress {
    background: #303136;
}

:root[data-theme="dark"] .dashboard-quick-action,
:root[data-theme="dark"] .dashboard-checklist-item,
body[data-theme="dark"] .dashboard-quick-action,
body[data-theme="dark"] .dashboard-checklist-item {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none;
}

:root[data-theme="dark"] .dashboard-quick-action:nth-child(n),
:root[data-theme="dark"] .dashboard-checklist-item:nth-child(n),
body[data-theme="dark"] .dashboard-quick-action:nth-child(n),
body[data-theme="dark"] .dashboard-checklist-item:nth-child(n) {
    background: #242528 !important;
}

:root[data-theme="dark"] .dashboard-quick-title,
:root[data-theme="dark"] .dashboard-checklist-title,
body[data-theme="dark"] .dashboard-quick-title,
body[data-theme="dark"] .dashboard-checklist-title {
    color: #f8fafc !important;
}

/* Dashboard onboarding refinements */
.dashboard-onboarding,
.dashboard-onboarding * {
    font-family: inherit;
}

.dashboard-onboarding {
    padding-top: 1rem;
}

.dashboard-onboarding-hero {
    grid-template-columns: minmax(240px, 0.72fr) minmax(0, 1.8fr);
}

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

.dashboard-path-step {
    min-height: 8.25rem;
}

.dashboard-path-title,
.dashboard-wizard-title,
.dashboard-next-action strong,
.dashboard-metric-label {
    font-weight: 650;
}

.dashboard-hero-title,
.dashboard-metric-value {
    font-weight: 720;
}

.dashboard-section-header {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 0.15rem;
    justify-content: flex-start !important;
}

.dashboard-section-subtitle {
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.35;
}

.dashboard-wizard-tile {
    --wizard-accent: #0d6efd;
    --wizard-accent-bg: rgba(13, 110, 253, 0.12);
    border-left: 4px solid var(--wizard-accent);
    min-height: 10.25rem;
}

.dashboard-wizard-tile:nth-child(8n + 1) { --wizard-accent: #0d6efd; --wizard-accent-bg: rgba(13, 110, 253, 0.12); }
.dashboard-wizard-tile:nth-child(8n + 2) { --wizard-accent: #198754; --wizard-accent-bg: rgba(25, 135, 84, 0.12); }
.dashboard-wizard-tile:nth-child(8n + 3) { --wizard-accent: #c66616; --wizard-accent-bg: rgba(198, 102, 22, 0.14); }
.dashboard-wizard-tile:nth-child(8n + 4) { --wizard-accent: #0dcaf0; --wizard-accent-bg: rgba(13, 202, 240, 0.14); }
.dashboard-wizard-tile:nth-child(8n + 5) { --wizard-accent: #dc3545; --wizard-accent-bg: rgba(220, 53, 69, 0.12); }
.dashboard-wizard-tile:nth-child(8n + 6) { --wizard-accent: #20c997; --wizard-accent-bg: rgba(32, 201, 151, 0.13); }
.dashboard-wizard-tile:nth-child(8n + 7) { --wizard-accent: #6f42c1; --wizard-accent-bg: rgba(111, 66, 193, 0.12); }
.dashboard-wizard-tile:nth-child(8n + 8) { --wizard-accent: #fd7e14; --wizard-accent-bg: rgba(253, 126, 20, 0.14); }

.dashboard-wizard-icon {
    background: var(--wizard-accent-bg);
    color: var(--wizard-accent);
}

.dashboard-wizard-kind {
    font-weight: 650;
    letter-spacing: 0.02em;
}

.dashboard-wizard-action {
    background: #f1f5f9;
    color: #111827;
}

.dashboard-wizard-tile:hover .dashboard-wizard-action {
    background: var(--wizard-accent);
    color: #fff;
}

.setup-wizard-check-label {
    cursor: pointer;
    font-weight: 600;
    line-height: 1.25;
}

.setup-wizard-step strong {
    font-weight: 650;
}

:root[data-theme="dark"] .dashboard-onboarding-hero,
:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .dashboard-metric-card,
:root[data-theme="dark"] .dashboard-path-step,
:root[data-theme="dark"] .dashboard-wizard-tile,
:root[data-theme="dark"] .dashboard-next-action,
body[data-theme="dark"] .dashboard-onboarding-hero,
body[data-theme="dark"] .dashboard-card,
body[data-theme="dark"] .dashboard-metric-card,
body[data-theme="dark"] .dashboard-path-step,
body[data-theme="dark"] .dashboard-wizard-tile,
body[data-theme="dark"] .dashboard-next-action {
    background: #242528 !important;
}

:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 1),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 1) { --wizard-accent: #6ea8fe; --wizard-accent-bg: rgba(110, 168, 254, 0.14); }
:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 2),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 2) { --wizard-accent: #75b798; --wizard-accent-bg: rgba(117, 183, 152, 0.14); }
:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 3),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 3) { --wizard-accent: #ffda6a; --wizard-accent-bg: rgba(255, 218, 106, 0.14); }
:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 4),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 4) { --wizard-accent: #6edff6; --wizard-accent-bg: rgba(110, 223, 246, 0.14); }
:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 5),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 5) { --wizard-accent: #f1aeb5; --wizard-accent-bg: rgba(241, 174, 181, 0.14); }
:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 6),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 6) { --wizard-accent: #79dfc1; --wizard-accent-bg: rgba(121, 223, 193, 0.14); }
:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 7),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 7) { --wizard-accent: #c29ffa; --wizard-accent-bg: rgba(194, 159, 250, 0.14); }
:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 8),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(8n + 8) { --wizard-accent: #feb272; --wizard-accent-bg: rgba(254, 178, 114, 0.14); }

:root[data-theme="dark"] .dashboard-section-subtitle,
body[data-theme="dark"] .dashboard-section-subtitle {
    color: #cbd5e1;
}

@media (max-width: 1500px) {
    .dashboard-path-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* Keep wizard tiles in the same visual family as quick actions and checklist tiles. */
.dashboard-wizard-grid {
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.dashboard-wizard-tile {
    align-items: center;
    background: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color);
    border-left: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    color: var(--bs-body-color);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    justify-content: center;
    min-height: 158px;
    padding: 1rem;
    text-align: center;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.dashboard-wizard-tile:nth-child(5n + 1) {
    background: rgba(245, 233, 212, 0.42) !important;
}

.dashboard-wizard-tile:nth-child(5n + 2) {
    background: rgba(252, 171, 121, 0.18) !important;
}

.dashboard-wizard-tile:nth-child(5n + 3) {
    background: rgba(168, 216, 196, 0.24) !important;
}

.dashboard-wizard-tile:nth-child(5n + 4) {
    background: rgba(244, 211, 94, 0.2) !important;
}

.dashboard-wizard-tile:nth-child(5n + 5) {
    background: rgba(224, 226, 230, 0.42) !important;
}

.dashboard-wizard-tile:hover {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.1);
    color: var(--bs-body-color);
    transform: translateY(-2px);
}

.dashboard-wizard-icon {
    align-items: center;
    background: transparent !important;
    color: #5d6670;
    display: inline-flex;
    font-size: 1.55rem;
    height: 2.75rem;
    justify-content: center;
    width: 2.75rem;
}

.dashboard-wizard-title {
    color: var(--bs-body-color);
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-wizard-kind {
    color: #5f6b7a;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-top: 0.1rem;
    text-transform: none;
}

.dashboard-wizard-action {
    background: #eef2f7;
    border-radius: 999px;
    color: var(--bs-body-color);
    font-size: 0.78rem;
    font-weight: 700;
    margin-top: 0.15rem;
    padding: 0.35rem 0.65rem;
}

.dashboard-wizard-tile:hover .dashboard-wizard-action {
    background: #111827;
    color: #ffffff;
}

.dashboard-wizard-progress {
    height: 0.35rem;
    width: 100%;
}

:root[data-theme="dark"] .dashboard-wizard-tile,
body[data-theme="dark"] .dashboard-wizard-tile {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none;
}

:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 1),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 1) {
    background: rgba(245, 233, 212, 0.07) !important;
}

:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 2),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 2) {
    background: rgba(252, 171, 121, 0.08) !important;
}

:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 3),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 3) {
    background: rgba(168, 216, 196, 0.08) !important;
}

:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 4),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 4) {
    background: rgba(244, 211, 94, 0.08) !important;
}

:root[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 5),
body[data-theme="dark"] .dashboard-wizard-tile:nth-child(5n + 5) {
    background: rgba(224, 226, 230, 0.06) !important;
}

:root[data-theme="dark"] .dashboard-wizard-tile:hover,
body[data-theme="dark"] .dashboard-wizard-tile:hover {
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: none;
}

:root[data-theme="dark"] .dashboard-wizard-icon,
body[data-theme="dark"] .dashboard-wizard-icon {
    color: #e6eaf4 !important;
}

:root[data-theme="dark"] .dashboard-wizard-kind,
body[data-theme="dark"] .dashboard-wizard-kind {
    color: #aab4c3 !important;
}

:root[data-theme="dark"] .dashboard-wizard-action,
body[data-theme="dark"] .dashboard-wizard-action {
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}

:root[data-theme="dark"] .dashboard-wizard-tile:hover .dashboard-wizard-action,
body[data-theme="dark"] .dashboard-wizard-tile:hover .dashboard-wizard-action {
    background: #f8fafc;
    color: #181d26;
}

.search-panel-button {
    align-items: center;
    background: rgba(245, 233, 212, 0.42) !important;
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 0.5rem !important;
    box-shadow: none !important;
    color: var(--ink) !important;
    display: inline-flex;
    font-weight: 700;
    justify-content: center;
    min-height: 48px;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.search-panel-button:hover,
.search-panel-button:focus {
    background: var(--soft) !important;
    border-color: rgba(111, 66, 193, 0.36) !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08) !important;
    color: var(--ink) !important;
    transform: translateY(-1px) !important;
}

:root[data-theme="dark"] .search-panel-button,
body[data-theme="dark"] .search-panel-button {
    background: #242528 !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
    box-shadow: none !important;
    color: #f8fafc !important;
}

:root[data-theme="dark"] .search-panel-button:hover,
:root[data-theme="dark"] .search-panel-button:focus,
body[data-theme="dark"] .search-panel-button:hover,
body[data-theme="dark"] .search-panel-button:focus {
    background: #2b2d31 !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24) !important;
    color: #ffffff !important;
}

.scrollable-nav-treeview {
    max-height: min(42vh, 410px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 0.15rem;
    scrollbar-color: rgba(100, 116, 139, 0.42) transparent;
    scrollbar-width: thin;
}

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

.scrollable-nav-treeview::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.35);
    border-radius: 999px;
}

.scrollable-nav-treeview::-webkit-scrollbar-track {
    background: transparent;
}

.app-footer {
    margin-top: 2rem;
}

.dashboard-checklist-card {
    margin-top: 0 !important;
}

.dashboard-checklist-card,
.dashboard-checklist-card + .dashboard-card {
    align-self: stretch;
}

/* Final dark-mode gray background pass.
   Keep colorful accents, but remove the old blue/navy page layers. */
:root[data-theme="dark"],
body[data-theme="dark"] {
    --surface: #202123;
    --panel: #242528;
    --input-bg: #232427;
    --table-head: #28292c;
    --sidebar: #202123;
    --sidebar-strong: #202123;
    --soft: #2a2b2e;
    --soft-border: rgba(255, 255, 255, 0.12);
    --bs-body-bg: #202123;
    --bs-body-color: #f4f5f6;
    --bs-tertiary-bg: #202123;
    --bs-secondary-bg: #202123;
    --bs-card-bg: #242528;
    --bs-border-color: rgba(255, 255, 255, 0.1);
}

:root[data-theme="dark"] body,
body[data-theme="dark"] {
    background: #202123 !important;
    background-color: #202123 !important;
    background-image: none !important;
    color: #f4f5f6 !important;
}

body[data-theme="dark"]::before,
:root[data-theme="dark"] body::before {
    background: none !important;
    background-image: none !important;
    opacity: 0 !important;
}

:root[data-theme="dark"] .app-wrapper,
:root[data-theme="dark"] .app-main,
:root[data-theme="dark"] .app-content,
:root[data-theme="dark"] .container-fluid,
body[data-theme="dark"] .app-wrapper,
body[data-theme="dark"] .app-main,
body[data-theme="dark"] .app-content,
body[data-theme="dark"] .container-fluid {
    background: #202123 !important;
    background-color: #202123 !important;
    background-image: none !important;
}

:root[data-theme="dark"] .app-header.navbar,
:root[data-theme="dark"] .app-toolbar,
:root[data-theme="dark"] .app-footer,
:root[data-theme="dark"] .app-sidebar,
:root[data-theme="dark"] .main-sidebar,
:root[data-theme="dark"] .sidebar-wrapper,
:root[data-theme="dark"] .sidebar-brand,
:root[data-theme="dark"] .brand-link,
body[data-theme="dark"] .app-header.navbar,
body[data-theme="dark"] .app-toolbar,
body[data-theme="dark"] .app-footer,
body[data-theme="dark"] .app-sidebar,
body[data-theme="dark"] .main-sidebar,
body[data-theme="dark"] .sidebar-wrapper,
body[data-theme="dark"] .sidebar-brand,
body[data-theme="dark"] .brand-link {
    background: #202123 !important;
    background-color: #202123 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

:root[data-theme="dark"] .app-content-header,
:root[data-theme="dark"] .app-content-header .container-fluid,
:root[data-theme="dark"] .bg-body,
:root[data-theme="dark"] .bg-body-tertiary,
:root[data-theme="dark"] .bg-body-secondary,
body[data-theme="dark"] .app-content-header,
body[data-theme="dark"] .app-content-header .container-fluid,
body[data-theme="dark"] .bg-body,
body[data-theme="dark"] .bg-body-tertiary,
body[data-theme="dark"] .bg-body-secondary {
    background: #202123 !important;
    background-color: #202123 !important;
    background-image: none !important;
}

:root[data-theme="dark"] .card,
:root[data-theme="dark"] .modal-content,
:root[data-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .page-heading,
:root[data-theme="dark"] .module-section,
:root[data-theme="dark"] .detail-section,
:root[data-theme="dark"] .print-meta,
:root[data-theme="dark"] .table-panel,
:root[data-theme="dark"] .toolbar-panel,
:root[data-theme="dark"] .form-panel,
:root[data-theme="dark"] .crud-record-listing,
:root[data-theme="dark"] .crud-record-listing .table,
:root[data-theme="dark"] .record-edit-card,
:root[data-theme="dark"] .record-edit-card .card-body,
:root[data-theme="dark"] .record-side-panel .card,
:root[data-theme="dark"] .rcp-risk-toolbar,
:root[data-theme="dark"] .rcp-risk-shell,
:root[data-theme="dark"] .rcp-risk-main,
:root[data-theme="dark"] .rcp-risk-side,
:root[data-theme="dark"] .dashboard-card,
:root[data-theme="dark"] .dashboard-wizards-card,
:root[data-theme="dark"] .dashboard-quick-card,
:root[data-theme="dark"] .dashboard-checklist-card,
:root[data-theme="dark"] .dashboard-news-card,
:root[data-theme="dark"] .dashboard-context-card,
body[data-theme="dark"] .card,
body[data-theme="dark"] .modal-content,
body[data-theme="dark"] .dropdown-menu,
body[data-theme="dark"] .page-heading,
body[data-theme="dark"] .module-section,
body[data-theme="dark"] .detail-section,
body[data-theme="dark"] .print-meta,
body[data-theme="dark"] .table-panel,
body[data-theme="dark"] .toolbar-panel,
body[data-theme="dark"] .form-panel,
body[data-theme="dark"] .crud-record-listing,
body[data-theme="dark"] .crud-record-listing .table,
body[data-theme="dark"] .record-edit-card,
body[data-theme="dark"] .record-edit-card .card-body,
body[data-theme="dark"] .record-side-panel .card,
body[data-theme="dark"] .rcp-risk-toolbar,
body[data-theme="dark"] .rcp-risk-shell,
body[data-theme="dark"] .rcp-risk-main,
body[data-theme="dark"] .rcp-risk-side,
body[data-theme="dark"] .dashboard-card,
body[data-theme="dark"] .dashboard-wizards-card,
body[data-theme="dark"] .dashboard-quick-card,
body[data-theme="dark"] .dashboard-checklist-card,
body[data-theme="dark"] .dashboard-news-card,
body[data-theme="dark"] .dashboard-context-card {
    background: #242528 !important;
    background-color: #242528 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

:root[data-theme="dark"] .card-header,
:root[data-theme="dark"] .card-footer,
body[data-theme="dark"] .card-header,
body[data-theme="dark"] .card-footer {
    background: #242528 !important;
    background-color: #242528 !important;
    background-image: none !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}
