:root {
    --arc-blue-dark: #1f3b97;
    --arc-blue: #2d55c4;
    --arc-blue-light: #3f7af0;
    --arc-orange: #f7944d;
    --arc-bg: #f3f5fb;
    --arc-card: #ffffff;
    --arc-text: #1e293b;
}

body {
    margin: 0;
    background: var(--arc-bg);
    color: var(--arc-text);
    font-family: Arial, Helvetica, sans-serif;
}

.login-page {
    min-height: 100vh;
}

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

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

.sidebar {
    width: 240px;
    background: linear-gradient(180deg, #233f97, #2448b2);
    color: #fff;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-brand h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
}

.sidebar-brand p {
    margin-top: 8px;
    color: rgba(255,255,255,.78);
    font-size: .95rem;
}

.sidebar-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 12px 10px;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all .2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,.12);
}

.sidebar-nav a.disabled-link {
    opacity: .65;
    cursor: default;
}

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

.page-header {
    background: linear-gradient(90deg, #2448b2, #3c78ee);
    color: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(36, 72, 178, .18);
}

.arc-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .08);
    overflow: hidden;
}

.arc-card-header {
    background: linear-gradient(90deg, #2448b2, #3c78ee);
    color: #fff;
    padding: 14px 18px;
    font-weight: 700;
}

.sidebar-group .sidebar-submenu {
    margin: 4px 0 12px 16px;
}

.sidebar-group .sidebar-submenu a {
    padding: 9px 10px;
    margin-bottom: 6px;
    font-size: .94rem;
    opacity: .92;
}

.dashboard-section-tabs .nav-link {
    border-radius: 999px;
    color: var(--arc-blue-dark);
}

.dashboard-section-tabs .nav-link.active {
    background: rgba(45,85,196,.12);
    color: var(--arc-blue-dark);
    font-weight: 600;
}

.dashboard-soft-card {
    background: #fff;
    border: 1px solid rgba(45,85,196,.08);
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}

.summary-card-soft {
    background: linear-gradient(180deg, #ffffff, #fbfcff);
    border: 1px solid rgba(37, 99, 235, .08);
    border-radius: 14px;
    padding: 16px;
}

.summary-card-soft .summary-label {
    color: #64748b;
    font-size: .85rem;
    font-weight: 500;
}

.summary-card-soft .summary-value {
    color: #334155;
    font-size: 1.55rem;
    font-weight: 600;
}

.grid-config-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(37, 99, 235, .08);
    background: #f8fbff;
    border-radius: 12px;
    padding: 12px 14px;
    color: #334155;
    font-weight: 600;
}

.grid-config-toggle .toggle-arrow {
    transition: transform .2s ease;
}

.grid-config-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.grid-config-panel {
    border: 1px solid rgba(37, 99, 235, .08);
    border-radius: 12px;
    background: #fbfdff;
    padding: 14px;
}

#dashboardGridTable {
    font-size: .94rem;
    color: #475569;
}

#dashboardGridTable thead th {
    color: #64748b;
    font-weight: 600;
    border-bottom-color: rgba(37,99,235,.12);
    background: #f8fbff;
    cursor: pointer;
}

#dashboardGridTable thead th.sorted-col,
#dashboardGridTable tbody td.sorted-col {
    background: rgba(45,85,196,.08);
}

#dashboardGridTable tbody tr:hover td {
    background: rgba(148, 163, 184, .07);
}

/* dropdown dos multiselects acima de tudo, sem deslocar layout */
.dashboard-filters-block,
.dashboard-filters-block .row,
.dashboard-filters-block [class*='col-'],
.dashboard-filters-block .form-group,
.dashboard-filters-block .mb-3,
.dashboard-filters-block .mb-2 {
    overflow: visible !important;
}

.dashboard-filters-block {
    position: relative;
    isolation: isolate;
    z-index: 10;
}

.dashboard-filters-block [class*='col-'] {
    position: relative;
    z-index: 1;
}

.dashboard-filters-block [class*='col-'].ts-open-layer-host {
    z-index: 2200;
}

.ts-wrapper {
    position: relative;
    z-index: 1;
}

.ts-wrapper.ts-open-layer,
.ts-wrapper.focus {
    z-index: 2201;
}

.ts-control {
    min-height: 38px;
}

.ts-dropdown {
    z-index: 2202 !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
    border-radius: 12px;
    overflow: hidden;
}


/* TomSelect: manter dropdown no tamanho correto e com rolagem interna */
.ts-dropdown {
    min-width: 100%;
    max-width: 100%;
}

.ts-dropdown .ts-dropdown-content {
    max-height: min(320px, calc(100vh - 180px));
    overflow-y: auto;
    overflow-x: hidden;
}

.ts-wrapper.multi .ts-control > input {
    min-width: 2ch !important;
}

.dashboard-last-update {
    color: #64748b;
    font-size: .88rem;
    font-weight: 500;
}
