:root {
    --contaro-blue-900: #0f3a63;
    --contaro-blue-700: #195b97;
    --contaro-blue-500: #2f80c6;
    --contaro-blue-100: #e8f2fb;
    --contaro-gray-900: #1d2733;
    --contaro-gray-600: #5b6673;
    --contaro-gray-100: #f3f6f9;
    --contaro-success: #15803d;
    --contaro-danger: #b42318;
}

body {
    background: linear-gradient(140deg, var(--contaro-blue-100), #f7fbff 45%, #eef4fa);
    color: var(--contaro-gray-900);
    min-height: 100vh;
    transition: background 0.2s ease, color 0.2s ease;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.brand-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    transition: width 0.22s ease;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.brand-badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: #ffffff;
    font-size: 1.35rem;
    box-shadow: 0 10px 24px rgba(8, 23, 40, 0.18);
    flex: 0 0 auto;
}

.brand-copy {
    min-width: 0;
}

.brand-title {
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.77rem;
    line-height: 1.15;
    margin-top: 0.14rem;
}

.sidebar {
    width: 270px;
    flex: 0 0 270px;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--contaro-blue-900), var(--contaro-blue-700));
    color: #fff;
    transition: width 0.22s ease, flex-basis 0.22s ease;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 1rem 1rem 0.8rem 1rem;
}

.sidebar-search .input-group-text {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.92);
}

.sidebar-search .form-control {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.sidebar-search .form-control::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-search .form-control:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.45);
    color: #fff;
    box-shadow: 0 0 0 0.15rem rgba(255, 255, 255, 0.16);
}

.sidebar-search .btn {
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-search .btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin-bottom: 0.35rem;
    white-space: nowrap;
}

.sidebar .menu-icon {
    width: 1.1rem;
    text-align: center;
    font-size: 1rem;
}

.sidebar .nav-link-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
}

.sidebar .submenu-chevron {
    transition: transform 0.2s ease;
    font-size: 0.78rem;
}

.sidebar .nav-link-toggle[aria-expanded="true"] .submenu-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    padding-left: 1.35rem;
    margin: -0.1rem 0 0.35rem 0;
}

.sidebar .nav-sublink {
    font-size: 0.92rem;
    margin-bottom: 0.15rem;
    opacity: 0.95;
}

.sidebar .nav-link.active,
.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}

.main-panel {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #ffffff;
    border-bottom: 1px solid #dce6f0;
}

.theme-toggle-btn {
    border-radius: 999px;
    min-width: 2.5rem;
}

.topbar-branding {
    min-width: 0;
}

.topbar-app-name {
    color: var(--contaro-blue-900);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.1;
}

.topbar-company-name {
    color: var(--contaro-gray-600);
    font-size: 0.78rem;
    line-height: 1.15;
}

.workspace-main {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
}

.workspace-tabs-root {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: calc(100vh - 62px);
}

.workspace-tabs {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.5rem 0.75rem;
    background: #fff;
    border-bottom: 1px solid #dce6f0;
}

.workspace-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    border: 1px solid #d2deea;
    border-radius: 10px;
    background: #f5f9ff;
    max-width: 300px;
}

.workspace-tab.active {
    background: #e7f1fc;
    border-color: #7eaad6;
}

.workspace-tab-main {
    border: 0;
    background: transparent;
    color: #0f3a63;
    padding: 0.34rem 0.62rem;
    font-size: 0.86rem;
    font-weight: 600;
    text-align: left;
    min-width: 0;
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.workspace-tab-action {
    border: 0;
    background: transparent;
    color: #38526d;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.18rem;
}

.workspace-tab-action:hover {
    background: rgba(21, 91, 151, 0.15);
    color: #0f3a63;
}

.workspace-tab-action[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}

.workspace-panels {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
}

.workspace-pane {
    display: none;
    position: absolute;
    inset: 0;
    overflow: auto;
}

.workspace-pane.active {
    display: block;
}

.workspace-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #f8fbff;
}

.user-menu-btn {
    border-radius: 999px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--contaro-blue-700), var(--contaro-blue-500));
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
}

.module-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(140deg, #d9e9f9, #f1f8ff);
    color: var(--contaro-blue-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

body.sidebar-collapsed .sidebar {
    width: 86px;
    flex-basis: 86px;
}

body.sidebar-collapsed .sidebar .brand-logo {
    width: 56px;
}

body.sidebar-collapsed .sidebar .brand-lockup {
    justify-content: center;
}

body.sidebar-collapsed .sidebar .brand-copy {
    display: none;
}

body.sidebar-collapsed .sidebar .menu-label {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

body.sidebar-collapsed .sidebar .sidebar-search,
body.sidebar-collapsed .sidebar .sidebar-search-empty {
    display: none !important;
}

body.sidebar-collapsed .sidebar .nav-link {
    justify-content: center;
    gap: 0;
}

body.sidebar-collapsed .sidebar .menu-icon {
    font-size: 1.1rem;
}

body.sidebar-collapsed .sidebar .submenu-chevron,
body.sidebar-collapsed .sidebar .sidebar-submenu {
    display: none !important;
}

.content-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 8px 26px rgba(18, 53, 92, 0.08);
}

.kpi-card {
    border: 0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 24px rgba(22, 56, 92, 0.1);
}

.install-instructions {
    text-align: left;
}

.install-instructions strong {
    color: var(--contaro-blue-900);
}

body.theme-dark {
    background: radial-gradient(circle at top, #17365a 0%, #0b1420 48%, #070d15 100%);
    color: #e4edf8;
}

body.theme-dark .main-panel,
body.theme-dark .workspace-main,
body.theme-dark .workspace-panels,
body.theme-dark .workspace-pane,
body.theme-dark .workspace-initial-content {
    background: transparent;
}

body.theme-dark .topbar,
body.theme-dark .workspace-tabs,
body.theme-dark .workspace-tab,
body.theme-dark .card,
body.theme-dark .content-card,
body.theme-dark .kpi-card,
body.theme-dark .modal-content,
body.theme-dark .dropdown-menu,
body.theme-dark .offcanvas,
body.theme-dark .table,
body.theme-dark .workspace-iframe {
    background-color: #102133;
    color: #e4edf8;
}

body.theme-dark .topbar,
body.theme-dark .workspace-tabs,
body.theme-dark .workspace-tab,
body.theme-dark .card,
body.theme-dark .content-card,
body.theme-dark .kpi-card,
body.theme-dark .dropdown-menu,
body.theme-dark .offcanvas,
body.theme-dark .modal-content,
body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .input-group-text,
body.theme-dark .table,
body.theme-dark .list-group-item,
body.theme-dark .nav-tabs,
body.theme-dark .accordion-item,
body.theme-dark .card-header,
body.theme-dark .card-footer,
body.theme-dark .table thead th,
body.theme-dark .table tfoot th,
body.theme-dark .table tfoot td,
body.theme-dark .page-link,
body.theme-dark .dropdown-divider,
body.theme-dark .alert,
body.theme-dark .progress,
body.theme-dark .select2-container--default .select2-selection--single,
body.theme-dark .select2-container--default .select2-selection--multiple,
body.theme-dark .select2-dropdown,
body.theme-dark .dataTables_wrapper .dataTables_filter input,
body.theme-dark .dataTables_wrapper .dataTables_length select {
    border-color: #29415a !important;
}

body.theme-dark .topbar-app-name,
body.theme-dark .workspace-tab-main,
body.theme-dark .kpi-value,
body.theme-dark .dropdown-item,
body.theme-dark .card-title,
body.theme-dark .form-label,
body.theme-dark .table,
body.theme-dark .nav-link,
body.theme-dark .page-link,
body.theme-dark .accordion-button,
body.theme-dark .text-dark,
body.theme-dark .card-header,
body.theme-dark .card-footer,
body.theme-dark .table thead th,
body.theme-dark .table tbody td,
body.theme-dark .table tbody th,
body.theme-dark .table tfoot th,
body.theme-dark .table tfoot td,
body.theme-dark .list-group-item,
body.theme-dark .select2-container--default .select2-selection--single .select2-selection__rendered,
body.theme-dark .select2-container--default .select2-selection--multiple .select2-selection__choice,
body.theme-dark .select2-results__option,
body.theme-dark .dataTables_wrapper,
body.theme-dark .dataTables_wrapper .dataTables_info,
body.theme-dark .dataTables_wrapper .dataTables_length,
body.theme-dark .dataTables_wrapper .dataTables_filter,
body.theme-dark .dataTables_wrapper .dataTables_filter label,
body.theme-dark .dataTables_wrapper .dataTables_length label,
body.theme-dark .dataTables_wrapper .dataTables_paginate,
body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    color: #e4edf8 !important;
}

body.theme-dark .text-muted,
body.theme-dark .kpi-title,
body.theme-dark .topbar-company-name,
body.theme-dark small,
body.theme-dark .small,
body.theme-dark .form-text,
body.theme-dark .dropdown-header,
body.theme-dark .select2-container--default .select2-selection--single .select2-selection__placeholder,
body.theme-dark .dataTables_wrapper .dataTables_info,
body.theme-dark .dataTables_wrapper .dataTables_length label,
body.theme-dark .dataTables_wrapper .dataTables_filter label {
    color: #9fb4ca !important;
}

body.theme-dark .workspace-tab {
    background: #12283d;
}

body.theme-dark .workspace-tab.active {
    background: #183652;
    border-color: #4b749a;
}

body.theme-dark .workspace-tab-action {
    color: #bcd0e3;
}

body.theme-dark .workspace-tab-action:hover {
    background: rgba(143, 185, 227, 0.14);
    color: #ffffff;
}

body.theme-dark .btn-light,
body.theme-dark .btn-outline-primary,
body.theme-dark .btn-outline-info,
body.theme-dark .btn-outline-secondary,
body.theme-dark .btn-outline-success,
body.theme-dark .btn-outline-warning,
body.theme-dark .btn-outline-danger,
body.theme-dark .btn-outline-dark,
body.theme-dark .btn-outline-light {
    background: #12283d;
    color: #e4edf8;
    border-color: #34526f;
}

body.theme-dark .btn-light:hover,
body.theme-dark .btn-outline-primary:hover,
body.theme-dark .btn-outline-info:hover,
body.theme-dark .btn-outline-secondary:hover,
body.theme-dark .btn-outline-success:hover,
body.theme-dark .btn-outline-warning:hover,
body.theme-dark .btn-outline-danger:hover,
body.theme-dark .btn-outline-dark:hover,
body.theme-dark .btn-outline-light:hover {
    background: #183652;
    color: #ffffff;
    border-color: #4b749a;
}

body.theme-dark .form-control,
body.theme-dark .form-select,
body.theme-dark .input-group-text,
body.theme-dark textarea,
body.theme-dark .select2-container--default .select2-selection--single,
body.theme-dark .select2-container--default .select2-selection--multiple,
body.theme-dark .select2-dropdown,
body.theme-dark .dataTables_wrapper .dataTables_filter input,
body.theme-dark .dataTables_wrapper .dataTables_length select {
    background-color: #0d1c2c;
    color: #e4edf8;
}

body.theme-dark .form-control::placeholder,
body.theme-dark textarea::placeholder,
body.theme-dark .dataTables_wrapper .dataTables_filter input::placeholder {
    color: #88a2bc;
}

body.theme-dark .form-control:focus,
body.theme-dark .form-select:focus,
body.theme-dark textarea:focus,
body.theme-dark .dataTables_wrapper .dataTables_filter input:focus,
body.theme-dark .dataTables_wrapper .dataTables_length select:focus {
    background-color: #12283d;
    color: #ffffff;
    border-color: #4b749a !important;
    box-shadow: 0 0 0 0.2rem rgba(75, 116, 154, 0.2);
}

body.theme-dark .form-check-input {
    background-color: #0d1c2c;
    border-color: #4b749a;
}

body.theme-dark .form-check-input:checked {
    background-color: #2f80c6;
    border-color: #2f80c6;
}

body.theme-dark .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(75, 116, 154, 0.2);
}

body.theme-dark .table-striped > tbody > tr:nth-of-type(odd) > * {
    color: #e4edf8;
    background-color: rgba(255, 255, 255, 0.02);
}

body.theme-dark .table-hover > tbody > tr:hover > * {
    color: #ffffff;
    background-color: rgba(143, 185, 227, 0.08);
}

body.theme-dark .dropdown-item:hover,
body.theme-dark .dropdown-item:focus,
body.theme-dark .list-group-item,
body.theme-dark .accordion-button:not(.collapsed),
body.theme-dark .select2-results__option--highlighted.select2-results__option--selectable,
body.theme-dark .list-group-item-action:hover,
body.theme-dark .list-group-item-action:focus {
    background-color: #17314b;
    color: #ffffff !important;
}

body.theme-dark .card-header.bg-white,
body.theme-dark .card-footer.bg-white,
body.theme-dark .table-light,
body.theme-dark .table-light > th,
body.theme-dark .table-light > td {
    background-color: #17314b !important;
    color: #e4edf8 !important;
}

body.theme-dark .table {
    --bs-table-bg: #102133;
    --bs-table-color: #e4edf8;
    --bs-table-border-color: #29415a;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02);
    --bs-table-striped-color: #e4edf8;
    --bs-table-hover-bg: rgba(143, 185, 227, 0.08);
    --bs-table-hover-color: #ffffff;
}

body.theme-dark .table-responsive {
    background: transparent;
}

body.theme-dark .table > :not(caption) > * > * {
    background-color: #102133 !important;
    color: #e4edf8 !important;
    box-shadow: inset 0 0 0 9999px #102133;
}

body.theme-dark .table > thead > tr > th,
body.theme-dark .table > tfoot > tr > th,
body.theme-dark .table > tfoot > tr > td,
body.theme-dark .table.table-striped > thead > tr > th,
body.theme-dark .table.table-hover > thead > tr > th {
    background-color: #17314b !important;
    color: #f4f8fc !important;
    box-shadow: inset 0 0 0 9999px #17314b;
}

body.theme-dark .table > tbody > tr > td[colspan],
body.theme-dark .table > tbody > tr > th[colspan] {
    color: #bcd0e3 !important;
}

body.theme-dark .alert {
    background-color: #12283d;
    color: #e4edf8;
}

body.theme-dark .alert-info {
    background-color: rgba(47, 128, 198, 0.14);
    border-color: rgba(47, 128, 198, 0.3) !important;
    color: #d9ecff;
}

body.theme-dark .alert-warning {
    background-color: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #ffe8b3;
}

body.theme-dark .alert-danger {
    background-color: rgba(180, 35, 24, 0.14);
    border-color: rgba(180, 35, 24, 0.3) !important;
    color: #ffd0ca;
}

body.theme-dark .alert-success {
    background-color: rgba(21, 128, 61, 0.14);
    border-color: rgba(21, 128, 61, 0.3) !important;
    color: #d2ffe2;
}

body.theme-dark .badge.text-bg-light {
    background-color: #d9ecff !important;
    color: #0f3a63 !important;
}

body.theme-dark .badge.text-bg-dark {
    background-color: #29415a !important;
    color: #f8fbff !important;
}

body.theme-dark .badge.text-bg-primary {
    background-color: #2f80c6 !important;
    color: #ffffff !important;
}

body.theme-dark .badge.text-bg-secondary {
    background-color: #4c6074 !important;
    color: #ffffff !important;
}

body.theme-dark .badge.text-bg-success {
    background-color: #15803d !important;
    color: #ffffff !important;
}

body.theme-dark .badge.text-bg-danger {
    background-color: #b42318 !important;
    color: #ffffff !important;
}

body.theme-dark .badge.text-bg-warning {
    background-color: #f59e0b !important;
    color: #1f2937 !important;
}

body.theme-dark .badge.text-bg-info {
    background-color: #0ea5e9 !important;
    color: #082f49 !important;
}

body.theme-dark .page-link {
    background-color: #12283d;
}

body.theme-dark .page-item.active .page-link {
    background-color: #2f80c6;
    border-color: #2f80c6 !important;
    color: #ffffff !important;
}

body.theme-dark .page-item.disabled .page-link {
    background-color: #0d1c2c;
    color: #6f89a3 !important;
}

body.theme-dark .progress {
    background-color: #0d1c2c;
}

body.theme-dark .accordion-button {
    background-color: #102133;
}

body.theme-dark .accordion-button::after {
    filter: invert(1) brightness(1.4);
}

body.theme-dark .nav-tabs .nav-link {
    border-color: transparent;
    color: #bcd0e3 !important;
}

body.theme-dark .nav-tabs .nav-link.active,
body.theme-dark .nav-tabs .nav-item.show .nav-link {
    background-color: #17314b;
    border-color: #29415a #29415a #17314b !important;
    color: #ffffff !important;
}

body.theme-dark .list-group-flush > .list-group-item {
    background-color: transparent;
}

body.theme-dark .select2-container--default .select2-selection--single {
    height: calc(2.25rem + 2px);
}

body.theme-dark .select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: calc(2.25rem + 2px);
    color: #e4edf8 !important;
}

body.theme-dark .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: calc(2.25rem + 2px);
}

body.theme-dark .select2-container--default .select2-selection--single .select2-selection__arrow b {
    border-color: #9fb4ca transparent transparent transparent;
}

body.theme-dark .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #17314b;
    border-color: #34526f !important;
}

body.theme-dark .select2-search--dropdown .select2-search__field,
body.theme-dark .select2-search--inline .select2-search__field {
    background-color: #0d1c2c;
    color: #e4edf8;
    border-color: #29415a;
}

body.theme-dark .select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #12283d;
    color: #e4edf8;
}

body.theme-dark .select2-container,
body.theme-dark .select2-container .select2-selection,
body.theme-dark .select2-container .select2-dropdown {
    color: #e4edf8 !important;
}

body.theme-dark .select2-container--default .select2-selection--single,
body.theme-dark .select2-container--default .select2-selection--multiple {
    background-image: none;
}

body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: #2f80c6 !important;
    border-color: #2f80c6 !important;
    color: #ffffff !important;
}

body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #17314b !important;
    border-color: #34526f !important;
    color: #ffffff !important;
}

body.theme-dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #12283d !important;
    border-color: #29415a !important;
}

body.theme-dark .dataTables_wrapper .dataTables_filter input,
body.theme-dark .dataTables_wrapper .dataTables_length select {
    color-scheme: dark;
}

body.theme-dark .manual-card-image,
body.theme-dark .manual-detail-image,
body.theme-dark .tutorial-step-image {
    border-color: #29415a;
    background: #0d1c2c;
}

body.theme-dark .manual-icon {
    background: #17314b;
    color: #d9ecff;
}

body.theme-dark .tutorial-step-card {
    border-color: #29415a;
    background: #102133;
}

body.theme-dark .tutorial-step-card.is-complete {
    border-color: rgba(21, 128, 61, 0.45);
    background: rgba(21, 128, 61, 0.14);
    box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.18);
}

body.theme-dark .tour-highlight {
    box-shadow: 0 0 0 4px rgba(143, 185, 227, 0.28), 0 10px 24px rgba(7, 13, 21, 0.46);
}

body.theme-dark .bg-white,
body.theme-dark .bg-light {
    background-color: #102133 !important;
    color: #e4edf8 !important;
}

body.theme-dark .border,
body.theme-dark hr {
    border-color: #29415a !important;
}

body.theme-dark .text-primary {
    color: #7fc3ff !important;
}

body.theme-dark .text-info {
    color: #75d4ff !important;
}

body.theme-dark .text-success {
    color: #63d794 !important;
}

body.theme-dark .text-warning {
    color: #ffcf70 !important;
}

body.theme-dark .text-danger {
    color: #ff9e95 !important;
}

body.theme-dark .border-primary-subtle,
body.theme-dark .border-info-subtle,
body.theme-dark .border-success-subtle,
body.theme-dark .border-warning-subtle,
body.theme-dark .border-danger-subtle,
body.theme-dark .border-light-subtle,
body.theme-dark .border-dark-subtle {
    border-color: #34526f !important;
}

body.theme-dark .table-bordered > :not(caption) > * {
    border-color: #29415a;
}

body.theme-dark .doc-wrap {
    background: #102133;
    border-color: #29415a;
    color: #e4edf8;
}

body.theme-dark .acta-wrap,
body.theme-dark .etiqueta-card {
    background: #102133;
    border-color: #29415a;
    color: #e4edf8;
}

body.theme-dark .doc-head {
    border-bottom-color: #2f80c6;
}

body.theme-dark .acta-head {
    border-bottom-color: #2f80c6;
}

body.theme-dark .etiqueta-qr {
    background: #ffffff;
    border-color: #4b749a;
}

body.theme-dark .firma-box {
    border-top-color: #6f89a3;
}

body.theme-dark .doc-preview-frame,
body.theme-dark .doc-preview-image,
body.theme-dark .doc-preview-video {
    border-color: #29415a !important;
    background: #0d1c2c !important;
}

body.theme-dark code,
body.theme-dark pre {
    background: #0d1c2c;
    color: #d9ecff;
}

body.theme-dark a:not(.btn):not(.nav-link):not(.page-link):not(.dropdown-item) {
    color: #8fcbff;
}

body.theme-dark a:not(.btn):not(.nav-link):not(.page-link):not(.dropdown-item):hover {
    color: #c4e4ff;
}

body.theme-dark .btn-close {
    filter: invert(1) brightness(1.4);
}

body.theme-dark .swal2-popup {
    background: #102133;
    color: #e4edf8;
}

body.theme-dark .swal2-title,
body.theme-dark .swal2-html-container {
    color: #e4edf8;
}

.app-form-modal-frame {
    display: block;
    width: 100%;
    min-height: 78vh;
    border: 0;
    background: #ffffff;
}

body.theme-dark #appFormModal .modal-content,
body.theme-dark #appFormModal .modal-header,
body.theme-dark #appFormModal .modal-body {
    background: #102133;
    color: #e4edf8;
    border-color: #29415a;
}

body.theme-dark .app-form-modal-frame {
    background: #102133;
}

body.theme-dark input[type="file"]::file-selector-button {
    background: #17314b;
    color: #e4edf8;
    border: 1px solid #35597c;
}

body.theme-dark input[type="file"]::-webkit-file-upload-button {
    background: #17314b;
    color: #e4edf8;
    border: 1px solid #35597c;
}

body.theme-dark .table-responsive,
body.theme-dark .dataTables_wrapper,
body.theme-dark .chart-card,
body.theme-dark .card-header,
body.theme-dark .card-footer {
    background: #102133;
    color: #e4edf8;
}

body.theme-dark canvas {
    background: transparent;
}

.kpi-title {
    color: var(--contaro-gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.form-label-help-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.form-label-help-wrap .js-field-help {
    color: var(--contaro-blue-700);
    text-decoration: none;
    line-height: 1;
    border: 0;
}

.form-label-help-wrap .js-field-help:hover,
.form-label-help-wrap .js-field-help:focus {
    color: var(--contaro-blue-900);
    text-decoration: none;
}

.kpi-value {
    font-weight: 700;
    font-size: 1.35rem;
}

.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 18px 42px rgba(20, 55, 94, 0.18);
}

.metric-positive {
    color: var(--contaro-success);
}

.metric-negative {
    color: var(--contaro-danger);
}

.table thead th {
    font-size: 0.84rem;
}

.manual-card {
    overflow: hidden;
}

.manual-card-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-bottom: 1px solid #e6eef7;
}

.manual-detail-image {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom: 1px solid #e6eef7;
}

.manual-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: #e8f2fb;
    color: #195b97;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.manual-steps li,
.manual-tips li {
    margin-bottom: 0.55rem;
}

.manual-steps li:last-child,
.manual-tips li:last-child {
    margin-bottom: 0;
}

.tutorial-flow {
    display: grid;
    gap: 1rem;
}

.tutorial-progress-card .progress {
    height: 1.1rem;
}

.tutorial-step-card {
    border: 1px solid #dfeaf6;
    border-radius: 12px;
    padding: 0.85rem;
    background: #fbfdff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tutorial-step-card.is-complete {
    border-color: #8cd6a7;
    background: #f2fbf5;
    box-shadow: inset 0 0 0 1px rgba(21, 128, 61, 0.12);
}

.tutorial-step-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #d9e7f5;
    background: #f3f8fe;
}

.tutorial-checklist {
    list-style: none;
    padding-left: 0;
}

.tutorial-checklist li {
    margin-bottom: 0.52rem;
}

.tutorial-checklist li:last-child {
    margin-bottom: 0;
}

.tour-highlight {
    position: relative;
    z-index: 1080;
    box-shadow: 0 0 0 4px rgba(25, 91, 151, 0.28), 0 10px 24px rgba(15, 58, 99, 0.22);
    border-radius: 10px;
    transition: box-shadow 0.2s ease;
}

@media (max-width: 991px) {
    .sidebar {
        width: auto;
        flex-basis: auto;
        min-height: auto;
    }

    body.sidebar-collapsed .sidebar .menu-label {
        opacity: 1;
        width: auto;
    }
}

@media print {
    .tutorial-progress-card .btn,
    #tutorialPrintBtn,
    #tutorialResetProgressBtn,
    .workspace-tabs,
    .topbar,
    .sidebar,
    #mobileSidebar {
        display: none !important;
    }

    .workspace-pane,
    .workspace-pane.active {
        position: static !important;
        overflow: visible !important;
    }

    .workspace-initial-content {
        padding: 0 !important;
    }
}
