html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}
.control-label{
    font-weight: bold;
    font-size: small;
    height:5px;
}
.topbar {
    height: 3.375rem;
}
.modal-loading .modal-dialog{
    display: table;
    position: relative;
    margin: 0 auto;
    top: calc(50% - 24px);
}
body {
    background: #f4f7fb;
    color: #1f2d3d;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

:root {
    --datvs-navy: #19324a;
    --datvs-navy-light: #284862;
    --datvs-blue: #356ae6;
    --datvs-blue-hover: #2857c6;
    --datvs-teal: #118c84;
    --datvs-border: #dce5f0;
    --datvs-muted: #66788d;
    --datvs-surface: #ffffff;
}

a { color: #285fc8; }

/* Authentication */
.auth-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(320px, 43%) 1fr;
    background: #edf3fa;
}

.auth-brand-panel {
    position: relative;
    display: flex;
    align-items: center;
    padding: clamp(2.5rem, 6vw, 7rem);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(145deg, #06294f 0%, #0a4d8d 58%, #176eb0 100%);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    content: "";
}

.auth-brand-panel::before { width: 34rem; height: 34rem; right: -15rem; top: -10rem; }
.auth-brand-panel::after { width: 25rem; height: 25rem; left: -15rem; bottom: -13rem; }
.auth-brand-content { position: relative; z-index: 1; max-width: 28rem; }

.auth-brand-lockup { display: flex; align-items: center; gap: .85rem; margin-bottom: 2.35rem; }
.auth-brand-mark {
    width: 3.65rem;
    height: 3.65rem;
    display: grid;
    place-items: center;
    flex: 0 0 3.65rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 .7rem 1.4rem rgba(0, 20, 48, .25);
}

.auth-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.auth-brand-identity { display: flex; flex-direction: column; gap: .25rem; }
.auth-brand-name { font-size: 1.24rem; font-weight: 850; letter-spacing: .15em; line-height: 1; }
.auth-brand-tagline { max-width: 13rem; color: rgba(255, 255, 255, .72); font-size: .59rem; font-weight: 700; letter-spacing: .075em; line-height: 1.35; text-transform: uppercase; }

.auth-brand-content h1 { font-size: clamp(2rem, 3.1vw, 3.25rem); font-weight: 750; line-height: 1.1; letter-spacing: -.035em; }
.auth-brand-content p { margin: 1.25rem 0 2rem; color: rgba(255, 255, 255, .82); font-size: 1.02rem; line-height: 1.7; }
.auth-brand-points { display: flex; gap: .75rem; flex-wrap: wrap; }
.auth-brand-points span { padding: .45rem .7rem; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(0, 0, 0, .09); font-size: .78rem; }
.auth-brand-points i { margin-right: .25rem; color: #8fe0ff; }

.auth-login-panel {
    display: grid;
    place-items: center;
    padding: 2rem;
    background: radial-gradient(circle at 50% 18%, #fff 0, #f4f7fb 60%, #edf3fa 100%);
}

.auth-login-card {
    width: min(100%, 28.5rem);
    padding: 2.35rem 2.25rem;
    border: 1px solid rgba(206, 218, 232, .78);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 1.25rem 3.5rem rgba(24, 54, 85, .1);
}

.auth-logo-wrap { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-bottom: 1.35rem; }
.auth-logo-wrap img { width: 4.25rem; height: 4.25rem; object-fit: contain; }
.auth-logo-wrap div { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; }
.auth-logo-wrap strong { order: 2; color: #0b3564; font-size: 1.7rem; font-weight: 850; letter-spacing: .1em; line-height: 1; }
.auth-logo-wrap span { order: 1; color: #6784a2; font-size: .55rem; font-weight: 800; letter-spacing: .19em; line-height: 1; }
.auth-login-heading { margin-bottom: 1.75rem; text-align: center; }
.auth-login-heading h2 { margin: 0 0 .35rem; color: #112f50; font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
.auth-login-heading p { margin: 0; color: #718196; font-size: .9rem; }

.auth-validation:empty { display: none; }
.auth-validation { margin-bottom: 1rem; padding: .7rem .8rem; border: 1px solid #f5c5c1; border-radius: .55rem; background: #fff4f3; color: #bd3f36; font-size: .84rem; }
.auth-field { margin-bottom: 1.1rem; }
.auth-field > label { display: block; margin-bottom: .42rem; color: #344b66; font-size: .78rem; font-weight: 700; }
.auth-field .input-group-text { width: 2.8rem; justify-content: center; border-color: #d7e0eb; background: #f8fafc; color: #66809c; }
.auth-field .form-control { height: 2.85rem; border-color: #d7e0eb; font-size: .9rem; }
.auth-field .form-control:focus { border-color: #5b8df0; box-shadow: 0 0 0 .18rem rgba(53, 106, 230, .13); }
.auth-options { margin: 1.25rem 0 1.5rem; }
.auth-options .custom-control-label { color: #52677e; font-size: .82rem; }
.auth-help { color: #5a7fae; font-size: .78rem; font-weight: 600; cursor: help; }
.auth-submit { width: 100%; min-height: 3rem; display: flex; align-items: center; justify-content: center; gap: .6rem; border-radius: .55rem; font-weight: 700; box-shadow: 0 .65rem 1.3rem rgba(39, 95, 200, .22); }
.auth-footer { margin: 1.3rem 0 0; color: #90a0b1; font-size: .73rem; text-align: center; }

@media (max-width: 767.98px) {
    .auth-shell { display: block; background: #fff; }
    .auth-brand-panel { min-height: 8.75rem; padding: 1.5rem; }
    .auth-brand-lockup { margin: 0; }
    .auth-brand-content h1,
    .auth-brand-content p,
    .auth-brand-points { display: none; }
    .auth-login-panel { padding: 1.5rem; background: #fff; }
    .auth-login-card { padding: 1.25rem 0; border: 0; border-radius: 0; box-shadow: none; }
}

.btn-primary {
    background-color: var(--datvs-blue);
    border-color: var(--datvs-blue);
    box-shadow: 0 2px 5px rgba(53, 106, 230, .18);
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:not(:disabled):not(.disabled):active {
    background-color: var(--datvs-blue-hover);
    border-color: var(--datvs-blue-hover);
}

.form-control:focus, .custom-select:focus {
    border-color: #8eacf2;
    box-shadow: 0 0 0 .16rem rgba(53, 106, 230, .14);
}

/* SIDEBAR */
.sandbox-banner {
    background: #a91d2b;
    color: #fff;
    text-align: center;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    padding: .35rem 1rem;
}

.datvs-sandbox .datvs-sidebar {
    background: linear-gradient(180deg, #77232d 0%, #4c1920 100%);
}

.datvs-sandbox .datvs-sidebar .sidebar-brand {
    background: #a91d2b;
}

@media print {
    .sandbox-banner { display: none; }
}

.datvs-sidebar {
    background: linear-gradient(
        180deg,
        #24445f 0%,
        #173047 100%
    );
    width: 250px;
    min-height: 100vh;
    box-shadow: 2px 0 20px rgba(0,0,0,.08);
}

.datvs-sidebar .sidebar-brand {
    color: white;
    height: 78px;
    font-size: 1.15rem;
    font-weight: 700;
    background: #0d4f91;
    border-bottom: 1px solid rgba(255,255,255,.22);
}

.datvs-sidebar .datvs-brand-mark {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    overflow: hidden;
    flex: 0 0 54px;
    background: #fff;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .32);
}

.datvs-sidebar .datvs-brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.datvs-sidebar .sidebar-heading {
    color: #b9c9d9;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 1rem;
    margin-top: 20px;
}

/* MENU */
.datvs-sidebar .nav-link {
    color: #F8FAFC;
    margin: 4px 10px;
    padding: 12px 14px;
    border-radius: 12px;
    transition: .2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.datvs-sidebar .nav-link i {
    width: 18px;
    opacity: .9;
}

.datvs-sidebar .nav-link:hover {
    background: rgba(255,255,255,.10);
}

.datvs-sidebar .nav-link.active {
    background: #f8fbff;
    color: var(--datvs-navy);
    font-weight: 600;
    box-shadow: 0 5px 18px rgba(0,0,0,.08);
}

.datvs-sidebar .nav-link.active i {
    color: var(--datvs-blue);
}

.sidebar-toggle-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1440px) {
    .sidebar-toggle-control { display: none; }
}

/* On notebook-sized screens, reserve the main area for the working table.
   The menu remains available as an icon rail and can be expanded from the top bar. */
@media (min-width: 768px) and (max-width: 1439.98px) {
    .datvs-sidebar.toggled { width: 5.25rem !important; }
    .datvs-sidebar.toggled .sidebar-brand { height: 70px; }
    .datvs-sidebar.toggled .datvs-brand-mark {
        width: 42px;
        height: 42px;
        flex-basis: 42px;
    }
    .datvs-sidebar.toggled .sidebar-heading {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .datvs-sidebar.toggled .sidebar-divider { margin: .55rem .65rem; }
    .datvs-sidebar.toggled .nav-item .nav-link {
        width: auto;
        margin: 4px 8px;
        padding: .75rem .45rem;
        justify-content: center;
        gap: 0;
    }
    .datvs-sidebar.toggled .nav-item .nav-link i {
        width: auto;
        margin: 0;
    }
    .datvs-sidebar.toggled .nav-item .nav-link span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
}

/* DIVIDERS */
.sidebar-divider {
    border-color: rgba(255,255,255,.08);
}

/* TOPBAR */
.topbar.datvs {
    background: rgba(255,255,255,.97) !important;
    border-bottom: 1px solid var(--datvs-border);
    height: 70px;
    box-shadow: 0 1px 0 rgba(25, 50, 74, .03) !important;
}

.topbar h4 {
    font-weight: 600;
    color: #2D3748;
}

/* USER PHOTO */
.img-profile {
    width: 38px;
    height: 38px;
}

/* CONTENT */
.container-fluid {
    padding: 28px;
}

.datvs-badge {
    font-size: 14px;
    padding: 6px 9px;
}

/* The application footer follows content; it should not reserve a blank page-sized band. */
footer.sticky-footer {
    padding: .75rem 0;
    border-top: 1px solid var(--datvs-border);
}

/* Orders index */
.orders-index-card {
    border: 1px solid var(--datvs-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30, 55, 80, .07) !important;
}

.orders-index-header {
    padding: 1.15rem 1.25rem 1rem;
    background: linear-gradient(135deg, #fff 0%, #f7faff 100%);
    border-bottom: 1px solid var(--datvs-border);
}

.orders-index-eyebrow {
    margin-bottom: .2rem;
    color: var(--datvs-teal);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.orders-index-title { color: var(--datvs-navy); }
.orders-index-title i { color: var(--datvs-blue); }
.orders-index-count { color: var(--datvs-muted); }
.orders-index-add { padding: .43rem .72rem; font-weight: 600; }
.orders-filter-button { position: relative; }
.orders-filter-dot { position: absolute; width: .42rem; height: .42rem; right: -.12rem; top: -.12rem; border-radius: 50%; background: #dc3545; border: 1px solid #fff; }
.orders-active-filters { margin-top: .7rem; color: #53657a; font-size: .76rem; }
.orders-active-filters .btn-link { color: var(--datvs-blue); font-size: inherit; vertical-align: baseline; }
.orders-columns-menu { min-width: 15rem; padding: .35rem; }
.orders-columns-menu .dropdown-item { padding: .42rem .55rem; cursor: pointer; font-size: .82rem; }
.orders-columns-menu input { margin-right: .45rem; vertical-align: middle; }

.orders-table-list {
    max-height: calc(100vh - 20.75rem);
    min-height: 11rem;
    margin-top: 0;
    overflow: auto;
    scrollbar-color: #b5c4d7 transparent;
}

.orders-table { color: #293a4e; }
.orders-table [data-orders-column].is-hidden { display: none; }
.orders-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: .68rem .6rem;
    background: #edf3fb;
    border-top: 0;
    border-bottom: 1px solid #d6e1ef;
    color: #40536b;
    font-size: .73rem;
    font-weight: 750;
    letter-spacing: .01em;
    white-space: nowrap;
}

.orders-table thead a { color: #40536b !important; }
.orders-table thead a:hover { color: var(--datvs-blue) !important; text-decoration: none; }
.orders-table thead th:nth-child(8),
.orders-table thead th:nth-child(9),
.orders-table thead th:nth-child(10),
.orders-table thead th:nth-child(12) { text-align: right; }
.orders-table thead th:nth-child(8) a,
.orders-table thead th:nth-child(9) a,
.orders-table thead th:nth-child(10) a,
.orders-table thead th:nth-child(12) a { display: inline-block; }
.orders-table td { padding: .62rem .6rem; border-color: #e8eef6; }
.orders-table tbody tr:nth-of-type(odd) { background-color: #fbfcfe; }
.orders-table tbody tr:hover { background-color: #eef5ff !important; }
.orders-table tbody td:first-child { border-left: 3px solid transparent; }
.orders-table tbody tr:hover td:first-child { border-left-color: var(--datvs-teal); }
.orders-table .btn-outline-primary { border-color: #99b4ed; color: var(--datvs-blue); }
.orders-table .btn-outline-primary:hover { background: var(--datvs-blue); border-color: var(--datvs-blue); }
.orders-table .badge-info { background-color: #277b9f; }
.orders-status-badge { display: inline-block; padding: .36rem .55rem; font-size: .72rem; font-weight: 700; letter-spacing: .01em; }

.orders-index-footer {
    min-height: 3.75rem;
    padding: .65rem 1rem;
    background: #fff;
    border-top: 1px solid var(--datvs-border);
}

.orders-pagination-summary { color: var(--datvs-muted); }
.orders-index-footer .pagination { flex-wrap: nowrap; }
.orders-index-footer .page-link { min-width: 2rem; text-align: center; border-color: var(--datvs-border); color: #45607e; }
.orders-index-footer .page-item.active .page-link { background-color: var(--datvs-blue); border-color: var(--datvs-blue); }

/* Shared list-workspace pattern. Applied only to cards that contain a list table. */
.datvs-index-workspace {
    border: 1px solid var(--datvs-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30, 55, 80, .06) !important;
}

.datvs-index-workspace > .card-header {
    padding: .9rem 1rem;
    background: linear-gradient(135deg, #fff 0%, #f7faff 100%) !important;
    border-bottom: 1px solid var(--datvs-border);
}

.datvs-index-workspace > .card-header h5,
.datvs-index-workspace > .card-header h6 { color: var(--datvs-navy) !important; }

.datvs-index-workspace > .card-header .text-primary,
.datvs-index-workspace > .card-header h5 i,
.datvs-index-workspace > .card-header h6 i { color: var(--datvs-blue) !important; }

.datvs-index-workspace > .card-body {
    background: #fff;
}

.datvs-index-workspace .form-control-sm,
.datvs-index-workspace .custom-select-sm {
    min-height: 2rem;
    border-color: #d3dfed;
}

.datvs-index-workspace .input-group-text {
    border-color: #d3dfed;
    background: #f7faff;
    color: var(--datvs-muted);
}

.datvs-index-workspace .table { margin-bottom: 0; color: #293a4e; }
.datvs-index-workspace .table thead th {
    padding: .65rem .6rem;
    background: #edf3fb;
    border-top: 0;
    border-bottom: 1px solid #d6e1ef;
    color: #40536b;
    font-size: .73rem;
    font-weight: 750;
    letter-spacing: .01em;
    white-space: nowrap;
}

.datvs-index-workspace .table tbody td { border-color: #e8eef6; }
.datvs-index-workspace .table-hover tbody tr:hover { background-color: #eef5ff; }
.datvs-index-workspace .badge { font-weight: 700; letter-spacing: .01em; }
.datvs-index-workspace .pagination { margin-bottom: 0; }

/* Applied to every Views/**/Index.cshtml page by the shared layout. */
.index-view-content .container-fluid > .card,
.index-view-content .container-fluid > form > .card {
    border: 1px solid var(--datvs-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30, 55, 80, .06) !important;
}

.index-view-content .container-fluid > .card > .card-header,
.index-view-content .container-fluid > form > .card > .card-header {
    padding: .9rem 1rem;
    background: linear-gradient(135deg, #fff 0%, #f7faff 100%) !important;
    border-bottom: 1px solid var(--datvs-border);
}

.index-view-content .container-fluid .card-header h5,
.index-view-content .container-fluid .card-header h6 { color: var(--datvs-navy) !important; }
.index-view-content .container-fluid .card-header .text-primary,
.index-view-content .container-fluid .card-header h5 i,
.index-view-content .container-fluid .card-header h6 i { color: var(--datvs-blue) !important; }
.index-view-content .container-fluid .card-body { background: #fff; }
.index-view-content .container-fluid .table thead th { background: #edf3fb; border-top: 0; color: #40536b; }
.index-view-content .container-fluid .table td { border-color: #e8eef6; }
.index-view-content .container-fluid .table-hover tbody tr:hover { background-color: #eef5ff; }
.index-view-content .container-fluid .form-control:focus,
.index-view-content .container-fluid .custom-select:focus { border-color: #8eacf2; }

/* Order form workspace */
.order-form .alert { border-radius: 10px; border-width: 1px; }
.order-form-card {
    border: 1px solid var(--datvs-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(30, 55, 80, .07) !important;
}

.order-form-header {
    padding: .9rem 1.15rem;
    background: linear-gradient(135deg, #fff 0%, #f6f9ff 100%);
    border-bottom: 1px solid var(--datvs-border);
}

.order-form-header h5 { color: var(--datvs-navy) !important; }
.order-form-header h5 i { color: var(--datvs-blue); }
.order-form-header .badge { border-radius: 999px; padding: .42rem .7rem !important; font-weight: 700; }

.order-form-body { padding: 1rem 1.15rem; }
.order-form label { color: #40536b; font-size: .74rem; font-weight: 700; letter-spacing: .01em; }
.order-form .form-control,
.order-form .input-group-text { border-color: #d3dfed; }
.order-form fieldset:disabled .form-control,
.order-form fieldset:disabled .input-group-text { background: #f2f5fa; color: #5c6d82; }

.order-customer-panel {
    padding: .8rem .9rem;
    border: 1px solid #dce6f2;
    border-radius: 10px;
    background: linear-gradient(135deg, #fafcff, #f3f7fc);
}

.order-customer-panel .font-weight-bold.text-primary { color: var(--datvs-blue) !important; }
.order-customer-panel .border-right { border-color: #dce6f2 !important; }

.order-work-section {
    margin-top: .25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--datvs-border);
}

.order-form .table-responsive { border: 1px solid #dce6f2; border-radius: 9px; }
.order-form .table thead th { background: #edf3fb; border-top: 0; color: #40536b; font-size: .74rem; }
.order-form .table td { border-color: #e7eef6; }
.order-form .table tfoot td { background: #f8faff !important; border-color: #dce6f2; }

.order-form .card.border { border-color: #dce6f2 !important; border-radius: 9px; overflow: hidden; }
.order-form .card.border .card-header { background: #f7faff !important; border-bottom-color: #dce6f2; }
.quick-client-modal { border: 1px solid #d6e2f0; border-radius: 10px; overflow: hidden; }
.quick-client-modal .modal-header { align-items: flex-start; padding: .8rem 1rem; background: linear-gradient(110deg, #f7fbff, #f1f8f5); border-bottom-color: #dce6f2; }
.quick-client-modal .modal-body { padding: 1rem; }
.quick-client-modal .modal-footer { padding: .7rem 1rem; background: #fbfcff; border-top-color: #dce6f2; }
.quick-client-modal label { color: #405873; font-size: .68rem !important; letter-spacing: .025em; text-transform: uppercase; }
.quick-client-modal .form-control { border-color: #c6d5e6; }

.order-actions-card {
    position: sticky;
    top: 1rem;
    border: 1px solid var(--datvs-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(30, 55, 80, .08) !important;
}

.order-actions-header { padding: .8rem .9rem; background: #f7faff; border-bottom: 1px solid var(--datvs-border); }
.order-actions-header .text-primary { color: var(--datvs-blue) !important; }
.order-actions-card .card-body { padding: .75rem; }
.order-actions-card .btn { font-weight: 600; }
.order-summary-card { padding: .8rem; background: #f8faff; border-top: 1px solid var(--datvs-border); }
.order-summary-card .text-primary { color: var(--datvs-blue) !important; }

/* Accounts payable / receivable workspace */
.finance-index-card { border: 1px solid var(--datvs-border); border-radius: 12px; overflow: hidden; box-shadow: 0 8px 24px rgba(30, 55, 80, .07) !important; }
.finance-index-header { padding: .85rem 1rem; background: linear-gradient(135deg, #fff, #f6f9ff); border-bottom: 1px solid var(--datvs-border); }
.finance-index-eyebrow { color: var(--datvs-teal); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.finance-index-header h5 { color: var(--datvs-navy); }
.finance-index-header h5 i { color: var(--datvs-blue); }

/* Customer/supplier selector: keep the dialog steady while live search replaces
   its result rows. The result list, not the dialog, owns vertical scrolling. */
#pessoaFiltroModal #pessoasSelecionadasResumo {
    min-height: 1.75rem;
    max-height: 4.75rem;
    overflow-y: auto;
}
#pessoaFiltroModal .table-responsive {
    height: 34rem;
    max-height: calc(100dvh - 16rem);
    overflow-y: auto;
    border-top: 1px solid #dce6f2;
}
#pessoaFiltroModal .table-responsive thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #edf3fb;
}
.finance-index-count { color: var(--datvs-muted); }
.finance-hidden-badge { color: #53657a; background: #f8faff; }
.finance-filter-row { margin: 0; padding: .8rem 1rem .65rem; background: #fff; border-bottom: 1px solid var(--datvs-border); }
.finance-filter-row .form-group { margin-bottom: .35rem !important; }
.finance-table-list { max-height: calc(100vh - 20.75rem); min-height: 14rem; margin: 0; overflow: auto; }
.finance-table thead th { position: sticky; top: 0; z-index: 2; background: #edf3fb; }
.finance-table th:nth-child(10) { text-align: right; }
.finance-table td { border-color: #e8eef6; }
.finance-table .badge { min-width: 5.7rem; border-radius: 6px; font-weight: 700; }
.finance-table .finance-origin-badge {
    min-width: 1.6rem;
    padding: .25rem .45rem;
    border-radius: 999px;
}
.finance-index-footer { min-height: 3.75rem; padding: .65rem 1rem; background: #fff; border-top: 1px solid var(--datvs-border); }

/* Accounts list filter layout: reserve a real action area instead of squeezing buttons into one Bootstrap column. */
.finance-filter-row {
    display: grid !important;
    grid-template-columns: minmax(76px, .7fr) minmax(92px, .8fr) minmax(185px, 1.7fr) minmax(175px, 1.55fr) minmax(238px, 1.25fr) minmax(238px, 1.25fr) minmax(72px, .6fr) auto;
    gap: .55rem;
    align-items: end !important;
}
.finance-filter-row > .form-group {
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    margin: 0 !important;
    padding: 0 !important;
}
.finance-filter-row > .form-group:last-child { min-width: 9.7rem; }
.finance-filter-row > .form-group:last-child .btn { white-space: nowrap; }
.finance-table.table-striped tbody tr:nth-of-type(odd) { background-color: #fbfcff; }
.finance-table.table-striped tbody tr:nth-of-type(even) { background-color: #fff; }
.finance-table td { padding-top: .48rem !important; padding-bottom: .48rem !important; }
.finance-table td .badge-danger { border-radius: 999px; font-size: .63rem; letter-spacing: .02em; }
.finance-table td .badge { box-shadow: none; }

/* The width available to this card is smaller than the browser viewport whenever
   the navigation rail is visible. Keep the primary filters in two calm, readable
   rows before date and amount fields have to truncate their values. */
@media (max-width: 1679.98px) {
    .finance-filter-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .finance-filter-row > .form-group:last-child { min-width: 0; }
}

@media (max-width: 991.98px) {
    .finance-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .finance-filter-row > .form-group:last-child { grid-column: 1 / -1; }
    .finance-filter-row > .form-group:last-child .btn { flex: 1 1 0; }
}

/* Let the accounts card fill the viewport that remains above the footer. This
   keeps the table's own scroll area in sync with a one- or two-row filter form
   without relying on a fixed height subtraction. */
@media (min-width: 768px) {
    #wrapper #content-wrapper:has(.finance-index-card) {
        height: 100dvh;
        min-height: 0;
    }

    #wrapper #content-wrapper:has(.finance-index-card) #content,
    #wrapper #content-wrapper:has(.finance-index-card) #content > .container-fluid,
    .finance-index-card,
    .finance-index-card > .card-body {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    #wrapper #content-wrapper:has(.finance-index-card) #content {
        overflow: hidden;
    }

    .finance-index-card { margin-bottom: 0 !important; }
    .finance-index-card > .card-body > #filterForm,
    .finance-index-footer { flex: 0 0 auto; }
    .finance-table-list { flex: 1 1 auto; min-height: 0; max-height: none; }
}

/* Dashboard navigation cards */
.boleto-status-linha { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem 1.1rem; }
.boleto-status-titulo { color: #355fe3; white-space: nowrap; }
.boleto-status-acoes { margin-left: auto; }
.boleto-status-detalhe { overflow-wrap: anywhere; }
.pedido-boleto-tooltip button:disabled, #pedidoBoletosImprimirTooltip button:disabled { pointer-events: none; }
@media (max-width: 575.98px) { .boleto-status-acoes { margin-left: 0; } }

/* Dashboard navigation cards */
.monitor-boletos > .card-body { padding: 1rem 1.15rem; }
.monitor-heading, .monitor-results-heading, .monitor-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.monitor-heading p, .monitor-results-heading small { font-size: .79rem; }
.monitor-controls { flex: 0 0 auto; margin: .85rem 0; padding: .8rem; border: 1px solid #dfe7f3; border-radius: .55rem; background: #f7f9fd; }
.monitor-filters { display: grid; grid-template-columns: minmax(100px, 160px) minmax(100px, 160px) minmax(180px, 270px) auto; align-items: end; gap: .65rem; }
.monitor-filters label { font-size: .75rem; font-weight: 600; margin-bottom: .25rem; }
.monitor-filter-actions { display: flex; gap: .35rem; }
.monitor-query { margin-top: .7rem; font-size: .8rem; }
.monitor-query summary, .monitor-error-details summary { color: #355fe3; cursor: pointer; }
.monitor-query[open] summary { margin-bottom: .45rem; }
.monitor-query-form { display: flex; gap: .5rem; max-width: 650px; }
.monitor-query-form button { white-space: nowrap; }
.monitor-reconcile-form { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; }
.monitor-reconcile-form > div:first-child { min-width: 240px; }
.monitor-reconcile-form label { display: block; margin-bottom: .2rem; font-size: .75rem; font-weight: 600; }
.monitor-results-heading { flex: 0 0 auto; padding: .1rem 0 .6rem; }
.monitor-count { margin-left: .35rem; font-size: .73rem; font-weight: 600; color: #536981; background: #edf2f9; border-radius: 999px; padding: .2rem .55rem; }
.monitor-table-scroll { border: 1px solid #e0e7f1; border-radius: .4rem; }
.monitor-table { min-width: 1080px; font-size: .78rem; }
.monitor-table thead th { position: sticky; top: 0; z-index: 1; background: #edf2fa; color: #52657e; border-top: 0; white-space: nowrap; }
.monitor-table td, .monitor-table th { padding: .65rem .6rem !important; vertical-align: top; }
.monitor-table tbody tr:nth-child(even) { background: #f9fbfe; }
.monitor-status { display: inline-block; padding: .23rem .55rem; border-radius: 999px; font-size: .69rem; font-weight: 700; white-space: nowrap; }
.monitor-status-success { color: #087451; background: #dcf5e9; }
.monitor-status-warning { color: #805500; background: #fff0c7; }
.monitor-status-danger { color: #a72c38; background: #fde5e8; }
.monitor-status-info { color: #2f59a4; background: #e6efff; }
.monitor-status-neutral { color: #566578; background: #edf0f4; }
.monitor-title-number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.monitor-message { min-width: 200px; max-width: 380px; overflow-wrap: anywhere; }
.monitor-attention { color: #9c3d12; font-weight: 600; margin-bottom: .3rem; }
.monitor-error-details { margin-top: .3rem; font-size: .72rem; }
.monitor-error-details pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 9rem; overflow: auto; margin: .3rem 0 0; padding: .5rem; background: #f2f4f7; border-radius: .3rem; }
.monitor-footer { padding-top: .7rem; }
@media (max-width: 767.98px) {
    .monitor-filters { grid-template-columns: 1fr 1fr; }
    .monitor-query-form { flex-wrap: wrap; }
    .monitor-table-scroll { max-height: 55vh; }
}

/* Dashboard navigation cards */
.dashboard-section > h6 {
    color: var(--datvs-navy) !important;
    font-size: .83rem;
    letter-spacing: .02em;
}

.dashboard-section > h6 i { color: var(--datvs-blue); }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .9rem;
}

.dashboard-grid > a {
    display: block;
    padding: 0 !important;
}

.admin-card {
    border: 1px solid var(--datvs-border);
    border-radius: 10px;
    color: #53657a;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.admin-card i { color: var(--datvs-blue); }
.admin-card:hover {
    border-color: #a9c0ed;
    box-shadow: 0 8px 20px rgba(30, 55, 80, .10);
    transform: translateY(-2px);
}

.admin-card:hover i, .admin-card:hover .card-title { color: var(--datvs-navy); }

/* Menu hubs */
.menu-page { width: 100%; max-width: none; padding: .6rem 0 1.2rem; }
.menu-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    min-height: 6.9rem;
    margin-bottom: 1.05rem;
    padding: 1rem 1.2rem;
    background: linear-gradient(112deg, #fff 0%, #f7faff 66%, #eef5ff 100%);
    border: 1px solid var(--datvs-border);
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(30, 55, 80, .06);
}
.menu-eyebrow { color: var(--datvs-teal); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.menu-hero h1 { margin: .15rem 0; color: var(--datvs-navy); font-size: 1.38rem; font-weight: 750; }
.menu-hero p { margin: 0; color: var(--datvs-muted); font-size: .88rem; }
.menu-hero::after { display: none; }
.menu-hero-context { display: flex; flex-direction: column; align-items: flex-end; gap: .08rem; padding: .35rem 1.05rem; border-left: 1px solid #d7e4f3; color: #59708a; font-size: .72rem; }
.menu-hero-context strong { color: var(--datvs-navy); font-size: 1.05rem; line-height: 1.1; }
.menu-hero-context small { color: #72869d; }
.menu-page .dashboard-section { margin-bottom: 1.35rem !important; }
.menu-page .dashboard-section > h6 { display: flex; align-items: center; margin-bottom: .55rem !important; color: var(--datvs-navy) !important; font-size: .82rem; letter-spacing: .01em; }
.menu-page .dashboard-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .8rem; }
.menu-page .dashboard-grid > a { position: relative; }
.menu-page .dashboard-grid > a::after { display: none; }
.menu-page .admin-card { height: 100%; overflow: hidden; text-align: center !important; border-color: #d9e4f1; box-shadow: 0 2px 7px rgba(30, 55, 80, .035); }
.menu-page .admin-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: #7da5e7; opacity: .7; }
.menu-page .admin-card .card-body { min-height: 9.3rem; padding: .95rem 1rem .7rem !important; position: relative; display: flex; flex-direction: column; align-items: center; }
.menu-page .admin-card i { display: grid; flex: 0 0 auto; width: 2.65rem; height: 2.65rem; margin: 0 auto .48rem; place-items: center; border-radius: 9px; background: #edf3ff; font-size: 1.12rem !important; }
.menu-page .admin-card .card-title { color: var(--datvs-navy); font-size: .9rem; line-height: 1.25; }
.menu-page .admin-card .card-text { color: #6f8098 !important; font-size: .73rem; line-height: 1.35; max-width: 15rem; }
.menu-page .admin-card .card-body::after { content: "Acessar  →"; margin-top: auto; color: #4b7fd6; font-size: .68rem; font-weight: 700; letter-spacing: .015em; }
.menu-page .dashboard-grid > a:hover .admin-card { border-color: #8fb2e8; box-shadow: 0 10px 22px rgba(30, 55, 80, .12); transform: translateY(-3px); }
.menu-page .dashboard-grid > a:hover .admin-card::before { background: var(--datvs-blue); opacity: 1; }
.menu-page .dashboard-grid > a:hover .admin-card .card-body::after { color: var(--datvs-navy); }
.menu-catalog { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)) !important; gap: .85rem; margin: 0 !important; max-width: none; }
.menu-catalog > a { display: block; width: auto !important; max-width: none !important; min-width: 0; flex: none !important; padding: 0 !important; }

/* Home workspace */
.datvs-workspace {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1.25rem 0 2.2rem;
}

.workspace-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(14rem, 17rem);
    gap: 2.25rem;
    align-items: center;
    min-height: 13.6rem;
    padding: clamp(1.45rem, 2.8vw, 2.35rem);
    overflow: hidden;
    border: 1px solid rgba(51, 120, 205, .32);
    border-radius: 1.2rem;
    color: #fff;
    background: linear-gradient(125deg, #082d55 0%, #0d579c 60%, #1772bb 100%);
    box-shadow: 0 1rem 2.8rem rgba(14, 66, 123, .18);
}

.workspace-hero::before,
.workspace-hero::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.workspace-hero::before { width: 25rem; height: 25rem; right: 11rem; top: -18rem; }
.workspace-hero::after { width: 19rem; height: 19rem; left: -11rem; bottom: -14rem; }
.workspace-hero-content { position: relative; z-index: 1; }

.workspace-brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: 1.15rem;
}

.workspace-brand-mark {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .52);
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 .55rem 1rem rgba(2, 31, 63, .22);
}

.workspace-brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.workspace-brand-lockup > span:last-child { display: flex; flex-direction: column; gap: .2rem; }
.workspace-brand-name { font-size: .96rem; font-weight: 850; letter-spacing: .14em; line-height: 1; }
.workspace-brand-label { color: rgba(255, 255, 255, .72); font-size: .56rem; font-weight: 750; letter-spacing: .12em; line-height: 1; text-transform: uppercase; }

.workspace-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: #a8e7ff;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.workspace-hero h1 { margin: .32rem 0; color: #fff; font-size: clamp(1.7rem, 2.45vw, 2.35rem); font-weight: 780; letter-spacing: -.035em; }
.workspace-hero p { margin: 0; color: rgba(255, 255, 255, .8); font-size: .95rem; }
.workspace-hero-tags { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.25rem; }
.workspace-hero-tags span { padding: .38rem .62rem; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: rgba(1, 28, 59, .15); color: rgba(255, 255, 255, .91); font-size: .7rem; font-weight: 650; }
.workspace-hero-tags i { margin-right: .2rem; color: #9ce9ff; }

.workspace-hero-summary {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, .26);
    border-radius: .95rem;
    background: rgba(255, 255, 255, .12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
}

.workspace-summary-label { color: rgba(255, 255, 255, .76); font-size: .67rem; font-weight: 700; }
.workspace-hero-summary strong { margin-top: .2rem; color: #fff; font-size: 2.45rem; font-weight: 800; line-height: .95; letter-spacing: -.06em; }
.workspace-summary-title { margin-top: .23rem; color: #fff; font-size: .82rem; font-weight: 730; }
.workspace-summary-divider { width: 100%; height: 1px; margin: .8rem 0 .6rem; background: rgba(255, 255, 255, .22); }
.workspace-hero-summary small { color: rgba(255, 255, 255, .74); font-size: .7rem; line-height: 1.35; }

.workspace-sections { display: grid; gap: 1.15rem; margin-top: 1.15rem; }
.workspace-section { --workspace-accent: #356ae6; --workspace-accent-soft: #edf3ff; --workspace-accent-strong: #1e55c7; --workspace-accent-border: rgba(53, 106, 230, .25); --workspace-accent-shadow: rgba(53, 106, 230, .16); padding: 1.1rem; border: 1px solid #dbe6f2; border-radius: 1rem; background: rgba(255, 255, 255, .8); box-shadow: 0 .55rem 1.45rem rgba(30, 55, 80, .045); }
.workspace-section--financial { --workspace-accent: #118c84; --workspace-accent-soft: #e7f8f5; --workspace-accent-strong: #087c75; --workspace-accent-border: rgba(17, 140, 132, .28); --workspace-accent-shadow: rgba(17, 140, 132, .16); }
.workspace-section--system { --workspace-accent: #7a5bd0; --workspace-accent-soft: #f1edff; --workspace-accent-strong: #6346bb; --workspace-accent-border: rgba(122, 91, 208, .28); --workspace-accent-shadow: rgba(122, 91, 208, .16); }

.workspace-priorities { margin-top: 1.15rem; padding: 1.05rem 1.1rem; border: 1px solid #dbe6f2; border-radius: 1rem; background: linear-gradient(135deg, #fff, #f8fbff); box-shadow: 0 .55rem 1.45rem rgba(30, 55, 80, .045); }
.workspace-priorities-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: .85rem; }
.workspace-priorities-header > div > span { display: block; margin-bottom: .12rem; color: var(--datvs-blue); font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.workspace-priorities-header h2 { margin: 0; color: var(--datvs-navy); font-size: 1.08rem; font-weight: 780; line-height: 1.1; }
.workspace-priorities-header small { max-width: 18rem; color: #718196; font-size: .7rem; line-height: 1.35; text-align: right; }
.workspace-priority-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: .25rem .7rem; }
.workspace-priority-item { --priority-accent: #356ae6; --priority-soft: #edf3ff; display: grid; min-width: 0; grid-template-columns: 2.35rem minmax(0, 1fr) auto auto; column-gap: .6rem; align-items: center; padding: .52rem .6rem; border-radius: .65rem; color: inherit; text-decoration: none !important; transition: background .16s ease; }
.workspace-priority-item--warning { --priority-accent: #bb7800; --priority-soft: #fff5dd; }
.workspace-priority-item--success { --priority-accent: #0b8274; --priority-soft: #e7f8f5; }
.workspace-priority-icon { display: grid; width: 2.45rem; height: 2.45rem; place-items: center; border-radius: .65rem; color: var(--priority-accent); background: var(--priority-soft); font-size: .96rem; }
.workspace-priority-copy { display: flex; min-width: 0; flex-direction: column; gap: .22rem; }
.workspace-priority-copy strong { color: var(--datvs-navy); font-size: .8rem; font-weight: 770; line-height: 1.25; }
.workspace-priority-copy small { color: #718196; font-size: .67rem; line-height: 1.34; }
.workspace-priority-count { min-width: 2rem; padding: .28rem .42rem; border-radius: 999px; color: var(--priority-accent); background: var(--priority-soft); font-size: .82rem; font-weight: 800; line-height: 1; text-align: center; }
.workspace-priority-arrow { color: var(--priority-accent); font-size: .72rem; transition: transform .16s ease; }
.workspace-priority-item:hover { color: inherit; background: var(--priority-soft); }
.workspace-priority-item:hover .workspace-priority-arrow { transform: translateX(3px); }
.workspace-priority-item:focus-visible { outline: 3px solid rgba(53, 106, 230, .32); outline-offset: 2px; }
.workspace-empty-state { display: flex; align-items: center; gap: 1rem; padding: 1.25rem; border: 1px dashed #bed0e3; border-radius: 1rem; color: #718196; background: #fbfdff; }
.workspace-empty-state > span { display: grid; width: 2.7rem; height: 2.7rem; flex: 0 0 auto; place-items: center; border-radius: .75rem; color: var(--datvs-blue); background: #edf3ff; }
.workspace-empty-state h2 { margin: 0 0 .18rem; color: var(--datvs-navy); font-size: .98rem; font-weight: 760; }
.workspace-empty-state p { margin: 0; font-size: .75rem; }

.workspace-section-header { display: flex; align-items: center; gap: .8rem; margin: 0 0 1rem; padding: 0 .1rem; }
.workspace-section-icon { display: grid; width: 2.65rem; height: 2.65rem; flex: 0 0 2.65rem; place-items: center; border-radius: .75rem; background: var(--workspace-accent-soft); color: var(--workspace-accent); font-size: 1rem; }
.workspace-section-copy { min-width: 0; }
.workspace-section-copy > span { display: block; margin-bottom: .12rem; color: var(--workspace-accent-strong); font-size: .61rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.workspace-section-copy h2 { margin: 0; color: var(--datvs-navy); font-size: 1.08rem; font-weight: 780; line-height: 1.1; }
.workspace-section-copy p { margin: .22rem 0 0; color: #718196; font-size: .76rem; }
.workspace-section-count { margin-left: auto; padding: .32rem .58rem; border: 1px solid var(--workspace-accent-border); border-radius: 999px; background: var(--workspace-accent-soft); color: var(--workspace-accent-strong); font-size: .67rem; font-weight: 750; white-space: nowrap; }

.workspace-module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .25rem .7rem; }
.workspace-module {
    display: grid;
    min-width: 0;
    grid-template-columns: 2.35rem minmax(0, 1fr) auto;
    column-gap: .6rem;
    align-items: center;
    padding: .52rem .6rem;
    border-radius: .65rem;
    color: inherit;
    text-decoration: none !important;
    transition: background .16s ease;
}

.workspace-module-icon { display: grid; width: 2.35rem; height: 2.35rem; place-items: center; border-radius: .65rem; background: var(--workspace-accent-soft); color: var(--workspace-accent); font-size: .96rem; }
.workspace-module-copy { display: flex; min-width: 0; flex-direction: column; gap: .22rem; }
.workspace-module-copy strong { color: var(--datvs-navy); font-size: .88rem; font-weight: 770; line-height: 1.25; }
.workspace-module-copy small { color: #718196; font-size: .7rem; line-height: 1.34; }
.workspace-module-arrow { color: var(--workspace-accent-strong); font-size: .72rem; transition: transform .16s ease; }
.workspace-module:hover { color: inherit; background: var(--workspace-accent-soft); }
.workspace-module:hover .workspace-module-arrow { transform: translateX(3px); }
.workspace-module:focus-visible { outline: 3px solid rgba(53, 106, 230, .32); outline-offset: 2px; }

/* Wide displays can still have a short usable height (for example a laptop at 1366×768).
   Compact the Home workspace rather than hiding page overflow, so every module remains reachable. */
@media (min-width: 1200px) and (max-height: 800px) {
    .home-dashboard-page .container-fluid { padding: .6rem 1.25rem 0; }
    .home-dashboard-page footer.sticky-footer { padding: .42rem 0; }

    .datvs-workspace { padding: .45rem 0 .65rem; }
    .workspace-hero {
        min-height: 7.2rem;
        gap: 1.25rem;
        padding: .8rem 1.1rem;
        border-radius: .95rem;
    }

    .workspace-brand-lockup,
    .workspace-hero p,
    .workspace-hero-tags,
    .workspace-summary-divider,
    .workspace-hero-summary small,
    .workspace-section-copy > span,
    .workspace-section-copy p,
    .workspace-module-copy small { display: none; }

    .workspace-eyebrow { font-size: .58rem; }
    .workspace-hero h1 { margin: .12rem 0 0; font-size: 1.7rem; }
    .workspace-hero-summary { padding: .55rem .8rem; border-radius: .72rem; }
    .workspace-summary-label { font-size: .58rem; }
    .workspace-hero-summary strong { margin-top: .12rem; font-size: 1.72rem; }
    .workspace-summary-title { margin-top: .15rem; font-size: .66rem; }

    .workspace-sections { gap: .55rem; margin-top: .55rem; }
    .workspace-priorities { margin-top: .55rem; padding: .6rem .7rem; border-radius: .75rem; }
    .workspace-priorities-header { margin-bottom: .45rem; }
    .workspace-priorities-header > div > span, .workspace-priority-copy small { display: none; }
    .workspace-priorities-header h2 { font-size: .95rem; }
    .workspace-priorities-header small { font-size: .58rem; }
    .workspace-priority-list { gap: .2rem .45rem; }
    .workspace-priority-item { grid-template-columns: 1.9rem minmax(0, 1fr) auto auto; padding: .42rem .5rem; border-radius: .55rem; }
    .workspace-priority-icon { width: 1.9rem; height: 1.9rem; border-radius: .55rem; font-size: .76rem; }
    .workspace-priority-copy strong { font-size: .7rem; line-height: 1.18; }
    .workspace-priority-count { min-width: 1.65rem; padding: .2rem .35rem; font-size: .7rem; }
    .workspace-section { padding: .6rem .7rem; border-radius: .75rem; }
    .workspace-section-header { gap: .5rem; margin-bottom: .45rem; }
    .workspace-section-icon { width: 2rem; height: 2rem; flex-basis: 2rem; border-radius: .6rem; font-size: .8rem; }
    .workspace-section-copy h2 { font-size: .95rem; }
    .workspace-section-count { padding: .2rem .45rem; font-size: .6rem; }

    .home-dashboard-page .workspace-module-grid { gap: .2rem .45rem; }
    .workspace-module { grid-template-columns: 1.9rem minmax(0, 1fr) auto; padding: .42rem .5rem; border-radius: .55rem; }
    .workspace-module-icon { width: 1.9rem; height: 1.9rem; border-radius: .55rem; font-size: .8rem; }
    .workspace-module-copy { gap: .12rem; }
    .workspace-module-copy strong { font-size: .76rem; line-height: 1.18; }
}

@media (max-width: 991.98px) {
    .datvs-workspace { padding-top: 1rem; }
    .workspace-hero { grid-template-columns: 1fr; gap: 1rem; }
    .workspace-hero-summary { display: grid; grid-template-columns: auto 1fr; column-gap: .65rem; align-items: center; padding: .82rem 1rem; }
    .workspace-summary-label { grid-column: 1 / -1; }
    .workspace-hero-summary strong { grid-row: 2 / span 2; margin: 0; }
    .workspace-summary-title { margin: 0; }
    .workspace-summary-divider { display: none; }
    .workspace-hero-summary small { align-self: start; }
    .workspace-priorities-header { align-items: flex-start; flex-direction: column; }
    .workspace-priorities-header small { max-width: none; text-align: left; }
}

@media (max-width: 767.98px) {
    .datvs-workspace { padding: .75rem 0 1.4rem; }
    .workspace-hero { padding: 1.35rem; border-radius: .95rem; }
    .workspace-hero-tags span:nth-child(3) { display: none; }
    .workspace-section { padding: .85rem; border-radius: .9rem; }
    .workspace-priorities { padding: .85rem; border-radius: .9rem; }
    .workspace-section-header { align-items: flex-start; }
    .workspace-section-copy p { display: none; }
    .workspace-section-count { margin-top: .1rem; }
    .workspace-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem .5rem; }
    .workspace-module { grid-template-columns: 2rem minmax(0, 1fr) auto; padding: .5rem; }
    .workspace-module-icon { width: 2rem; height: 2rem; }
    .workspace-priority-list { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .workspace-hero h1 { font-size: 1.65rem; }
    .workspace-brand-lockup { margin-bottom: .9rem; }
    .workspace-section-count { display: none; }
    .workspace-module-grid { grid-template-columns: 1fr; }
}

/* Account exit */
.logout-page { display: grid; min-height: calc(100dvh - 10rem); place-items: center; padding: 2rem 1rem; }
.logout-card { width: min(100%, 29rem); padding: 2rem; text-align: center; background: #fff; border: 1px solid var(--datvs-border); border-radius: 14px; box-shadow: 0 16px 40px rgba(30, 55, 80, .12); }
.logout-icon { display: grid; width: 3.4rem; height: 3.4rem; margin: 0 auto 1rem; place-items: center; color: var(--datvs-blue); background: #eaf1ff; border-radius: 50%; font-size: 1.35rem; }
.logout-icon.success { color: #16895b; background: #e7f7ef; }
.logout-card h1 { margin-bottom: .55rem; color: var(--datvs-navy); font-size: 1.45rem; font-weight: 750; }
.logout-card p { margin-bottom: 1.45rem; color: var(--datvs-muted); }
.logout-actions { display: flex; justify-content: center; gap: .6rem; }

/* Batch payment and receipt workspace */
.finance-batch-page { max-width: none; }
.finance-batch-header {
    margin-top: .45rem;
    padding: .8rem 1rem;
    background: linear-gradient(115deg, #fff, #f5f8ff);
    border: 1px solid var(--datvs-border);
    border-radius: 11px;
    box-shadow: 0 5px 16px rgba(30, 55, 80, .06);
}
.finance-batch-header h1 { margin-top: .1rem !important; color: var(--datvs-navy) !important; font-size: 1.16rem; font-weight: 750; }
.finance-batch-header h1 i { color: var(--datvs-blue); }
.finance-batch-eyebrow { color: var(--datvs-teal); font-size: .66rem; font-weight: 800; letter-spacing: .085em; text-transform: uppercase; }
.finance-batch-switch .btn { min-width: 4.15rem; font-weight: 650; }
.finance-batch-filters, .finance-batch-table-card { border: 1px solid var(--datvs-border); border-radius: 10px; box-shadow: 0 5px 16px rgba(30, 55, 80, .07) !important; }
.finance-batch-filters { border-left: 3px solid var(--datvs-blue); }
.finance-batch-filters .card-body { padding: .75rem 1rem !important; }
.finance-batch-filters label { color: #53657a; font-size: .67rem !important; letter-spacing: .03em; text-transform: uppercase; }
.finance-batch-filters .form-control { border-color: #cbd8e8; }
.finance-batch-filters .custom-control-label { color: var(--datvs-navy); font-size: .75rem !important; letter-spacing: 0; text-transform: none; }
.finance-batch-table-card { overflow: hidden; }
.finance-batch-table-card #tabelaContas thead th { background: #edf3fb; color: #53657a; border-bottom: 1px solid #cbd8e8; font-size: .68rem; letter-spacing: .025em; text-transform: uppercase; }
.finance-batch-table-card #tabelaContas tbody tr:hover { background: #f4f8ff; }
.finance-batch-table-card #tabelaContas td:last-child { color: var(--datvs-navy); }
.finance-batch-pagination { background: #fbfcff; border-top: 1px solid var(--datvs-border); }
.finance-batch-selection { margin: 0 -1rem; border-top: 1px solid var(--datvs-border) !important; box-shadow: 0 -5px 15px rgba(30, 55, 80, .05); }
.finance-batch-selection .selection-inner { padding: 0 1rem !important; }
.finance-batch-selection #qtdSelecionada, .finance-batch-selection #valorSelecionado { color: var(--datvs-navy); }
.finance-batch-selection #btnBaixar { min-width: 9.6rem; font-weight: 700; }

/* Loading order workspace */
.loading-order-page { max-width: 1600px; padding-top: .5rem !important; }
.loading-order-page { color: #1b334d; }
.loading-order-page .alert { border-radius: 9px; font-weight: 550; }
.loading-order-page .alert-success { color: #075f48; background: #e5f7ef; border-color: #a9e2ca; }
.loading-order-page .card { border: 1px solid var(--datvs-border); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 16px rgba(30, 55, 80, .07) !important; }
.loading-order-page .card-header { padding: .62rem .85rem !important; background: #f5f8fc; border-bottom: 1px solid #cbd8e8; }
.loading-order-page .card-header h6 { color: #173047 !important; font-weight: 750 !important; }
.loading-order-summary-card { border-left: 3px solid var(--datvs-blue) !important; }
.loading-order-summary-card .card-body { padding: .8rem 1rem !important; }
.loading-order-summary-card label, .loading-order-available-card label { color: #38516c; font-size: .67rem !important; font-weight: 750 !important; letter-spacing: .03em; text-transform: uppercase; }
.loading-order-summary-card .form-control, .loading-order-available-card .form-control { border-color: #cbd8e8; }
.loading-order-summary-card strong { color: #102c47; }
.loading-order-selected-card { border-left: 3px solid #1dc98a !important; }
.loading-order-selected-card .card-header { background: #eaf8f1; border-bottom-color: #b9e7d0; }
.loading-order-selected-card .card-header h6 { color: #086545 !important; }
.loading-order-selected-card .badge { min-width: 1.5rem; }
.loading-order-available-card { border-left: 3px solid var(--datvs-blue) !important; }
.loading-order-available-card .card-body { padding: .65rem .85rem !important; background: #fff; }
/* Bootstrap gives card bodies a flexible height by default. In this card that
   would let the filter row collapse beneath the table when space is tight. */
.loading-order-available-card > .card-header,
.loading-order-available-card > .card-body { flex: 0 0 auto; }
.loading-order-selected-table {
    height: clamp(5.5rem, 12dvh, 8rem);
    overflow-y: auto;
    overflow-x: auto;
}
.loading-order-available-table {
    height: clamp(9.5rem, calc(100dvh - 39rem), 13.75rem);
    overflow-y: auto;
    overflow-x: auto;
}
/* Sticky table sections are positioned against the wrong scroll context in
   Chromium here, covering the filter inputs. The table itself is deliberately
   short, so keeping its header in normal flow is clearer and reliable. */
.loading-order-available-table > .table > thead { position: static !important; }
.loading-order-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end !important;
    width: 100%;
    gap: .4rem;
    min-height: 3.5rem;
    padding: .55rem .2rem;
    border-top: 1px solid #d7e2ef;
    background: #f4f7fb;
    box-shadow: 0 -5px 13px rgba(30, 55, 80, .06);
    z-index: 4;
}
.loading-order-back { margin-left: .35rem; }
.loading-order-page .table thead th { background: #e5eef9; color: #243e59; border-color: #cbd8e8; font-size: .68rem; font-weight: 750; letter-spacing: .025em; text-transform: uppercase; }
.loading-order-page .table tbody td { color: #314862; }
.loading-order-page .table tbody tr:hover { background: #edf5ff !important; }
.loading-order-page .table a { color: #1856bd; font-weight: 700; }
.loading-route-hint { padding: .42rem .55rem; color: #38516c; background: #f1f6fc; border: 1px solid #cadbec; border-radius: 6px; }
.loading-route-hint i { color: var(--datvs-teal); }

@media (min-width: 768px) {
    /* Keep this workspace inside the same flex area as the top bar and footer.
       The available-orders table is the only region that may give up height. */
    #wrapper #content-wrapper:has(.loading-order-page) {
        height: 100dvh;
        min-height: 0;
    }

    #wrapper #content-wrapper:has(.loading-order-page) #content,
    #wrapper #content-wrapper:has(.loading-order-page) #content > .container-fluid,
    .loading-order-page {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .loading-order-page {
        height: auto;
        padding-bottom: 0 !important;
    }

    .loading-order-page > form {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .loading-order-page > form > fieldset {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
        overflow: hidden;
    }

    .loading-order-summary-card,
    .loading-order-selected-card {
        flex: 0 0 auto;
    }

    .loading-order-available-card {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    .loading-order-available-table {
        flex: 1 1 auto;
        height: auto;
        min-height: 5rem;
    }

    .loading-order-actions {
        position: static;
        min-height: 3.5rem;
        margin-top: .25rem;
        padding: .55rem .2rem;
        border-top-color: #cbd8e8;
        background: #f4f7fb;
        box-shadow: 0 -5px 13px rgba(30, 55, 80, .06);
    }
}

@media (max-width: 767.98px) {
    .loading-order-available-table { height: 14rem; }
    .loading-order-actions { position: static; }
}

/* Financial report workspace */
.report-workspace { max-width: 1360px; padding-top: .7rem; }
.report-page-header { padding: .85rem 1rem; background: linear-gradient(115deg, #fff, #f6f9ff); border: 1px solid var(--datvs-border); border-radius: 11px; box-shadow: 0 5px 16px rgba(30, 55, 80, .06); }
.report-page-header h1 { color: var(--datvs-navy) !important; font-weight: 750; }
.report-filter-card { border: 1px solid var(--datvs-border) !important; border-radius: 11px; overflow: hidden; box-shadow: 0 7px 20px rgba(30, 55, 80, .07) !important; }
.report-filter-card .card-header { border-bottom: 1px solid var(--datvs-border); background: #f8faff !important; }
.report-filter-card .card-body { padding: 1.15rem; }
.report-date-presets .btn { font-size: .72rem; }
.report-period-panel { border-color: #dce6f2 !important; background: #fbfcff; }
.report-period-panel > .font-weight-bold { color: var(--datvs-navy); font-size: .8rem; }
.report-filter-card label { color: #53657a; font-size: .7rem !important; letter-spacing: .025em; text-transform: uppercase; }
.report-filter-card .form-control { border-color: #cbd8e8; }
.report-filter-summary { min-height: 3.2rem; }
.report-filter-summary small { color: #61748a !important; }
.report-pdf-modal { max-width: min(96vw, 1440px); }
.report-pdf-modal .modal-content { border: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 48px rgba(15, 31, 48, .28); }
.report-pdf-modal .modal-header { background: #fbfcff; border-bottom: 1px solid var(--datvs-border); }

/* Account form workspace */
.account-form-workspace { max-width: 1640px; margin: 0 auto; }
.account-form-header { padding: .75rem 0 .6rem; }
.account-form-header h1 { color: var(--datvs-navy) !important; font-weight: 750; }
.account-form-header .badge { border-radius: 999px; font-size: .72rem; }
.account-form-card { border: 1px solid var(--datvs-border) !important; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 16px rgba(30, 55, 80, .07) !important; }
.account-form-card .card-header { padding: .58rem .85rem !important; background: #f8faff !important; border-bottom: 1px solid var(--datvs-border); }
.account-form-card .card-header h6 { color: var(--datvs-navy) !important; }
.account-details-card { border-left: 3px solid var(--datvs-blue) !important; }
.account-payment-card { border-left: 3px solid #18ad78 !important; }
.account-payment-card .card-header { background: #f4fcf8 !important; }
.account-form-card .card-body { padding: .8rem 1rem !important; }
.account-form-card label { color: #53657a; font-size: .67rem !important; letter-spacing: .03em; text-transform: uppercase; }
.account-form-card .form-control, .account-form-card .custom-select { border-color: #cbd8e8; }
.account-form-card .form-control[readonly], .account-form-card .form-control:disabled { background: #f4f7fb !important; }
.account-form-card #pessoaDetalhes { border-color: #dce6f2 !important; background: #f8faff !important; padding: .5rem .65rem !important; }
.account-payment-card .alert-success { margin-bottom: .7rem !important; border-color: #bae9d5; background: #edfaf4; }
.account-payment-card #ValorLiquido { color: #087f58; font-size: 1rem; }
.account-notes-card textarea { min-height: 3.7rem; }
.account-history-card .card-header { background: #fbfcff !important; }

/* Shared edit/create form pattern */
.datvs-form-card,
.datvs-form-workspace > .card {
    border: 1px solid var(--datvs-border) !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 16px rgba(30, 55, 80, .07) !important;
}
.datvs-form-card > .card-header,
.datvs-form-workspace > .card > .card-header {
    padding: .62rem .85rem !important;
    background: #f5f8fc !important;
    border-bottom: 1px solid #cbd8e8 !important;
}
.datvs-form-card > .card-header h5,
.datvs-form-card > .card-header h6,
.datvs-form-workspace > .card > .card-header h5,
.datvs-form-workspace > .card > .card-header h6 {
    color: #173047 !important;
    font-weight: 750 !important;
}
.datvs-form-card > .card-body,
.datvs-form-workspace > .card > .card-body { padding: .85rem 1rem !important; }
.datvs-form-workspace label,
.datvs-form-card label {
    color: #38516c;
    font-size: .69rem !important;
    font-weight: 750 !important;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.datvs-form-workspace .form-control,
.datvs-form-workspace .custom-select,
.datvs-form-card .form-control,
.datvs-form-card .custom-select { border-color: #c5d4e5; color: #1f3852; }
.datvs-form-workspace .form-control:disabled,
.datvs-form-workspace .form-control[readonly],
.datvs-form-card .form-control:disabled,
.datvs-form-card .form-control[readonly] { color: #526981; background: #f2f5f9 !important; }
.datvs-form-workspace .card-footer,
.datvs-form-card .card-footer { background: #fbfcff !important; border-top-color: #dce6f2 !important; }

/* Pessoa (customer/supplier) record workspace */
.person-form-workspace {
    max-width: 1640px;
    margin: 0 auto;
    padding-bottom: 4.5rem;
}
.person-form-card { border-color: #d7e3f0 !important; }
.person-form-header {
    padding: .78rem 1rem !important;
    background: linear-gradient(100deg, #fff, #f3f7fd) !important;
}
.person-form-header h5 { color: var(--datvs-navy) !important; }
.person-form-header .badge { border-radius: 999px; font-size: .72rem; }
.person-form-body { padding: .9rem 1rem .7rem !important; }
.person-form-section-heading {
    display: flex;
    align-items: center;
    min-height: 1.9rem;
    gap: .15rem;
    margin: 0 0 .65rem;
    padding: 0 0 .42rem;
    border-bottom: 1px solid #dce6f2;
}
.person-form-section-heading i:first-child {
    color: var(--datvs-blue) !important;
    font-size: .92rem;
}
.person-form-section-heading strong {
    color: #31506f !important;
    font-size: .7rem !important;
    font-weight: 750 !important;
    letter-spacing: .055em;
}
.person-form-section-heading .text-muted { color: #657a91 !important; }
.person-form-body > .row { margin-bottom: .1rem; }
.person-form-body .form-control:focus,
.person-form-body .custom-select:focus {
    border-color: #7fa7e4;
    box-shadow: 0 0 0 .15rem rgba(50, 104, 207, .12);
}
.person-finance-panel,
.person-sellers-panel {
    height: 100%;
    padding: .2rem .75rem .3rem;
    border: 1px solid #dce6f2;
    border-radius: 8px;
    background: #fbfcff;
}
.person-finance-panel { border-left: 3px solid #14a874; }
.person-sellers-panel { border-left: 3px solid var(--datvs-blue); }
.person-sellers-panel .badge {
    color: #29445f;
    background: #fff !important;
    border-color: #cfdbeb !important;
    border-radius: 6px;
}
.person-form-actions {
    position: sticky;
    bottom: .35rem;
    z-index: 4;
    margin: 0 -.05rem -.05rem;
    padding: .65rem .9rem !important;
    border: 1px solid #d7e3f0 !important;
    border-radius: 0 0 9px 9px;
    box-shadow: 0 -6px 18px rgba(30, 55, 80, .08);
}
.person-form-actions .btn { min-width: 5.6rem; }

@media (max-width: 767.98px) {
    .person-form-workspace { padding-bottom: .5rem; }
    .person-form-header .d-flex { align-items: flex-start !important; gap: .65rem; }
    .person-form-header .btn { flex: 0 0 auto; }
    .person-finance-panel, .person-sellers-panel { margin-bottom: .35rem; }
    .person-form-actions { position: static; margin: 0; border-width: 1px 0 0 !important; box-shadow: none; }
    .person-form-actions > div > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
    .person-form-actions .btn { margin: 0 !important; }
}

/* Pessoas index: search and results optimized for desktop operations. */
.people-index-workspace { max-width: none; }
.people-index-card { min-height: min(49rem, calc(100dvh - 8rem)); }
.people-index-header { padding: .85rem 1rem .75rem !important; }
.people-index-header h5 { color: var(--datvs-navy) !important; }
.people-index-header .text-center small { display: inline-block; padding: .3rem .65rem; border-radius: 999px; background: #f1f6ff; color: #60758d !important; }
.people-index-header .text-center strong { font-size: .83rem; }
.people-index-toolbar-divider { height: 1px; margin: .75rem 0 .8rem; background: #dce6f2; }
.people-index-filters > div { margin-bottom: .1rem; }
.people-index-filters label {
    color: #536a83;
    font-size: .68rem !important;
    font-weight: 750;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.people-index-filters .form-control,
.people-index-filters .custom-select { min-height: 2rem; border-color: #c6d5e6; }
.people-index-filter-actions .btn-primary { min-width: 8rem; }
.people-table-list {
    max-height: calc(100dvh - 20.5rem);
    min-height: 17.5rem;
    margin-top: 0 !important;
    overflow: auto;
}
.people-table { min-width: 73rem; }
.people-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: .62rem;
    padding-bottom: .62rem;
    background: #eaf1fa;
    border-bottom: 1px solid #c9d9eb;
    color: #405873;
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.people-table td { padding-top: .47rem; padding-bottom: .47rem; vertical-align: middle; border-color: #e0e9f3; }
.people-table tbody tr:nth-of-type(odd) { background: #fbfcfe; }
.people-table tbody tr:hover { background: #f0f6ff !important; }
.people-table .btn { border-radius: 5px; }
.people-table .people-code { color: #41658a; font-weight: 650; }
.people-table .people-name { max-width: 19rem; color: #1f3954; font-weight: 750; }
.people-table .people-alias { max-width: 18rem; color: #536b86; }
.people-table .people-document { color: #536b86; font-variant-numeric: tabular-nums; }
.people-status-badge { min-width: 4.55rem; padding: .34rem .5rem !important; border-radius: 5px; font-size: .68rem !important; text-align: center; }
.people-index-card > .card-footer { position: relative; z-index: 3; }

/* Ordem de carregamento index: the same operational list pattern as Pedidos and Pessoas. */
.loading-index-card { min-height: min(48rem, calc(100dvh - 8rem)); }
.loading-index-header { padding: .85rem 1rem .75rem !important; }
.loading-index-header h5 { color: var(--datvs-navy) !important; }
.loading-index-header .text-md-center small { display: inline-block; padding: .3rem .65rem; border-radius: 999px; background: #f1f6ff; color: #60758d !important; }
.loading-index-toolbar-divider { height: 1px; margin: .75rem 0 .8rem; background: #dce6f2; }
.loading-index-filters label { color: #536a83; font-size: .68rem !important; font-weight: 750; letter-spacing: .03em; text-transform: uppercase; }
.loading-index-filters .form-control { min-height: 2rem; border-color: #c6d5e6; }
.loading-index-filter-actions { display: flex; align-items: flex-end; }
.loading-index-filter-actions .d-flex { width: 100%; }
.loading-index-table-list { min-height: 17.5rem; max-height: calc(100dvh - 20.5rem); overflow: auto; }
.loading-index-table { min-width: 67rem; }
.loading-index-table thead th { position: sticky; top: 0; z-index: 2; padding-top: .62rem !important; padding-bottom: .62rem !important; background: #eaf1fa; border-bottom: 1px solid #c9d9eb; color: #405873; font-size: .68rem; font-weight: 750; letter-spacing: .02em; text-transform: uppercase; }
.loading-index-table td { padding-top: .47rem !important; padding-bottom: .47rem !important; border-color: #e0e9f3; }
.loading-index-table tbody tr:nth-of-type(odd) { background: #fbfcfe; }
.loading-index-table tbody tr:hover { background: #f0f6ff !important; }
.loading-index-table td:nth-child(2) a { color: #2467c9; font-weight: 750; }
.loading-index-table td:nth-child(7), .loading-index-table td:nth-child(8), .loading-index-table td:nth-child(9), .loading-index-table td:nth-child(10) { font-variant-numeric: tabular-nums; }
.loading-index-status { min-width: 4.25rem; padding: .34rem .5rem !important; border-radius: 5px; font-size: .68rem !important; text-align: center; }

@media (max-width: 767.98px) {
    .loading-index-header .row > div { margin-bottom: .6rem; }
    .loading-index-header .row > div:last-child { margin-bottom: 0; }
    .loading-index-header .text-md-center, .loading-index-header .text-md-right { text-align: left !important; }
    .loading-index-header .text-md-right .btn { width: 100%; }
    .loading-index-filter-actions .d-flex { margin-top: .15rem; }
    .loading-index-table-list { max-height: calc(100dvh - 24rem); }
}

@media (max-width: 767.98px) {
    .people-index-header .row > div { margin-bottom: .6rem; }
    .people-index-header .row > div:last-child { margin-bottom: 0; }
    .people-index-header .text-center { text-align: left !important; }
    .people-index-header .text-md-right { text-align: left !important; }
    .people-index-header .text-md-right .btn { width: 100%; }
    .people-index-filters > div { margin-bottom: .6rem; }
    .people-index-filter-actions .btn-primary { min-width: 0; }
    .people-table-list { max-height: calc(100dvh - 24rem); }
}

/* Explicit variants for non-table Index views. */
.datvs-index-dashboard { width: 100%; max-width: none; }
.datvs-index-landing { max-width: 1440px; }
.datvs-index-landing > .d-sm-flex {
    padding: .85rem 1rem;
    margin-bottom: 1rem !important;
    background: linear-gradient(135deg, #fff, #f6f9ff);
    border: 1px solid var(--datvs-border);
    border-radius: 10px;
}
.datvs-index-landing h1 { color: var(--datvs-navy) !important; }

/* Sales dashboard */
.sales-dashboard { max-width: 1680px; padding-top: .4rem; padding-bottom: 1rem; }
.sales-dashboard .card {
    border: 1px solid var(--datvs-border);
    border-radius: 10px;
    box-shadow: 0 5px 16px rgba(30, 55, 80, .07) !important;
}
.sales-dashboard .card-header {
    padding: .6rem .8rem;
    background: #f8faff;
    border-bottom: 1px solid var(--datvs-border);
}
.sales-dashboard .card-header h6 { color: var(--datvs-navy) !important; font-size: .86rem; }
.dashboard-filter-panel { border-left: 3px solid var(--datvs-blue) !important; }
.dashboard-filter-panel .card-body { padding: .6rem .8rem !important; }
.dashboard-filter-panel label { color: #53657a; font-size: .68rem !important; letter-spacing: .03em; text-transform: uppercase; }
.dashboard-filter-panel .form-control { border-color: #cbd8e8; background: #fff; }
.dashboard-filter-panel .btn-primary { min-width: 5.7rem; }
.sales-dashboard .kpi-card { overflow: hidden; position: relative; }
.sales-dashboard .kpi-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: currentColor; opacity: .75; }
.sales-dashboard .kpi-card .card-body { padding: .75rem .85rem !important; }
.sales-dashboard .kpi-title { letter-spacing: .045em; }
.sales-dashboard .kpi-value { color: var(--datvs-navy) !important; font-size: 1.18rem !important; }
.sales-dashboard .kpi-card small { display: block; margin-top: .25rem; }
.dashboard-summary-card .card-body { padding: .8rem 1rem !important; }
.dashboard-summary-card .h5 { color: var(--datvs-navy); font-size: 1.16rem; }
.dashboard-summary-card .row > div { min-height: 4.2rem; display: flex; flex-direction: column; justify-content: center; }
.dashboard-panel .card-body { padding: .65rem .8rem !important; }
.dashboard-panel .btn-group .btn { font-size: .72rem; }
.dashboard-rank-card .table-responsive { border-radius: 0 0 10px 10px; }
.dashboard-rank-card thead th { position: sticky; top: 0; z-index: 1; background: #edf3fb; color: #53657a; font-size: .68rem; letter-spacing: .025em; text-transform: uppercase; }
.dashboard-rank-card tbody tr:hover { background: #f4f8ff; }
.dashboard-rank-card td:first-child a { font-weight: 650; }
.dashboard-attention-card { border-left: 3px solid #f5b935 !important; }
.dashboard-attention-card .card-header { background: #fffaf0; }
.sales-dashboard .attention-item { border-color: #dce6f2 !important; background: #fbfcff; min-height: 2.25rem; display: flex; align-items: center; }
.sales-dashboard .attention-item:hover { background: #f3f7ff; border-color: #bfd0e9 !important; }

@media (max-width: 767.98px) {
    #wrapper { overflow-x: hidden; }

    .datvs-sidebar,
    .datvs-sidebar.toggled {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1050;
        width: min(18rem, 84vw) !important;
        min-height: 100dvh;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform .22s ease, box-shadow .22s ease;
    }

    body.sidebar-toggled .datvs-sidebar {
        box-shadow: 12px 0 28px rgba(18, 42, 66, .26);
        transform: translateX(0);
    }

    .datvs-sidebar .sidebar-brand .sidebar-brand-text { display: inline; }
    .datvs-sidebar .sidebar-heading { text-align: left; }
    .datvs-sidebar .nav-item .nav-link {
        width: auto;
        padding: .8rem 1rem;
        text-align: left;
    }
    .datvs-sidebar .nav-item .nav-link span { display: inline; font-size: .85rem; }
    .datvs-sidebar .nav-item .nav-link i { margin-right: .25rem; }

    #content-wrapper { width: 100%; min-height: 100dvh; }
    .topbar.datvs { margin-bottom: 0 !important; }
    .topbar #sidebarToggleTop { color: var(--datvs-blue); }
    .container-fluid { padding: 16px; }
    .orders-index-header { padding: 1rem; }
    .orders-table-list { max-height: calc(100vh - 23rem); }
    .orders-index-add { width: 100%; }
    .orders-search-row > div { margin-bottom: .5rem; }
    .orders-table { min-width: 48rem; }
    .orders-table th:nth-child(2), .orders-table td:nth-child(2) { position: sticky; left: 0; z-index: 1; background: inherit; }
    .orders-table th:nth-child(3), .orders-table td:nth-child(3) { position: sticky; left: 4.4rem; z-index: 1; background: inherit; }
    .orders-table thead th:nth-child(2), .orders-table thead th:nth-child(3) { background: #edf3fb; z-index: 3; }
    .orders-index-footer { align-items: flex-start !important; flex-direction: column; gap: .55rem; padding: .75rem 1rem; }
    .orders-index-footer > div { width: 100%; justify-content: space-between; }
    .datvs-index-workspace > .card-header,
    .datvs-index-workspace > .card-body { padding-left: .85rem; padding-right: .85rem; }
    .datvs-index-workspace > .card-body.p-0 { padding-left: 0; padding-right: 0; }
    .datvs-index-workspace > .card-header .row > [class*="col-"] { margin-bottom: .5rem; }
    .datvs-index-workspace > .card-header .row > [class*="col-"]:last-child { margin-bottom: 0; }
    .datvs-index-workspace .table-responsive { margin-left: -.85rem; margin-right: -.85rem; width: calc(100% + 1.7rem); }
    .index-view-content .container-fluid > .card > .card-header,
    .index-view-content .container-fluid > form > .card > .card-header { padding: .85rem; }
    .order-form-body { padding: .9rem; }
    .order-customer-panel .border-right { border-right: 0 !important; border-bottom: 1px solid #dce6f2; margin-bottom: .65rem; padding-bottom: .65rem; }
    .order-actions-card { position: static; }
    .finance-filter-row { padding: .8rem; }
    .finance-table-list { max-height: calc(100vh - 25rem); }
    .finance-index-footer { align-items: flex-start !important; flex-direction: column; gap: .55rem; padding: .75rem 1rem; }
    .menu-page .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .menu-hero { min-height: auto; padding: 1rem; }
    .menu-hero::after { display: none; }
    .menu-hero-context { display: none; }
    .menu-page .admin-card .card-body { min-height: 8.8rem; padding: .85rem .65rem .7rem !important; }
    .menu-page .admin-card i { position: static; width: 2.2rem; height: 2.2rem; margin-bottom: .4rem; }
}

@media (max-width: 420px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-grid .card-body { padding: 1.1rem .75rem !important; }
}
