:root {
    --rcl-blue-dark: #0f2747;
    --rcl-blue: #1f5f9f;
    --rcl-blue-soft: #d9e9fb;
    --rcl-orange: #f28c28;
    --rcl-yellow: #f2c94c;
    --rcl-green: #2e8b57;
    --rcl-gray: #6b7785;
    --rcl-gray-light: #eef3f8;
    --rcl-white: #ffffff;
    --rcl-border: rgba(15, 39, 71, 0.08);
    --rcl-shadow: 0 20px 45px rgba(12, 32, 57, 0.08);
    --rcl-app-bg-top: #d9e1ea;
    --rcl-app-bg-bottom: #cfd8e3;
    --rcl-app-surface: rgba(221, 229, 238, 0.88);
    --sidebar-expanded-width: 292px;
    --sidebar-collapsed-width: 78px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Manrope', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(15, 39, 71, 0.12), transparent 24%),
        radial-gradient(circle at bottom right, rgba(31, 95, 159, 0.1), transparent 22%),
        linear-gradient(180deg, var(--rcl-app-bg-top) 0%, var(--rcl-app-bg-bottom) 100%);
    color: #1f2d3d;
    overflow-x: hidden;
}

a {
    text-decoration: none;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: #d1d1d1;
}

.login-section {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.login-hero,
.login-card {
    border-radius: 28px;
}

.login-hero {
    padding: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.login-hero-logo {
    width: min(100%, 540px);
    height: auto;
    display: block;
    filter: drop-shadow(0 12px 30px rgba(55, 53, 163, 0.12));
}

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--rcl-blue);
}

.form-control,
.form-select {
    min-height: 48px;
    border-radius: 14px;
    border-color: rgba(15, 39, 71, 0.14);
}

.btn-primary {
    background: linear-gradient(135deg, var(--rcl-blue-dark), var(--rcl-blue));
    border-color: transparent;
    border-radius: 14px;
}

.badge-ordem-compra-aberta {
    background-color: #c0392b;
    color: var(--rcl-white);
}

.badge-ordem-compra-aguardando-aprovacao {
    background-color: var(--rcl-orange);
    color: #3d2500;
}

.badge-ordem-compra-aprovada {
    background-color: var(--rcl-yellow);
    color: #4a3900;
}

.badge-ordem-compra-solicitada {
    background-color: var(--rcl-blue);
    color: var(--rcl-white);
}

.badge-ordem-compra-recebida {
    background-color: var(--rcl-green);
    color: var(--rcl-white);
}

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

.sidebar-overlay {
    display: none;
}

.sidebar {
    width: var(--sidebar-expanded-width);
    padding: 24px 14px;
    background: linear-gradient(180deg, var(--rcl-blue-dark), #173b64);
    color: var(--rcl-white);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    z-index: 1040;
    transition: width 0.3s ease, padding 0.3s ease, transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
    padding-inline: 10px;
}

.sidebar.expanded {
    width: var(--sidebar-expanded-width);
    padding-inline: 14px;
}

.sidebar-brand {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 0 0 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 76px;
}

.sidebar-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04));
    border-radius: 18px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-radius 0.2s ease, padding 0.2s ease;
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.07));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
    outline: none;
}

.sidebar-brand-copy,
.menu-text,
.sidebar-link-end,
.sidebar-chevron {
    transition: opacity 0.2s ease, max-width 0.2s ease, transform 0.2s ease;
}

.sidebar-brand-copy {
    overflow: hidden;
}

.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding-inline: 0;
    padding-block: 0 12px;
    min-height: 62px;
}

.sidebar.collapsed .sidebar-toggle {
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 4px;
    border-radius: 18px;
    background: transparent;
    box-shadow: none;
}

.sidebar.collapsed .sidebar-toggle:hover,
.sidebar.collapsed .sidebar-toggle:focus-visible {
    background: transparent;
    box-shadow: none;
}

.sidebar.collapsed .sidebar-brand-copy,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .sidebar-link-end,
.sidebar.collapsed .sidebar-chevron {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateX(-6px);
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.08em;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(6, 18, 34, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease, transform 0.25s ease;
}

.sidebar.collapsed .brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    transform: translateX(0);
    box-shadow: 0 3px 10px rgba(6, 18, 34, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-brand-copy strong {
    display: block;
    font-size: 1.1rem;
    line-height: 1.1;
}

.brand-eyebrow,
.topbar-system {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.72;
}

.sidebar-nav,
.sidebar-footer {
    display: grid;
    gap: 8px;
}

.sidebar-nav {
    align-content: start;
}

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

.sidebar-link,
.sidebar-accordion {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 13px 14px;
    color: rgba(255, 255, 255, 0.84);
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.sidebar.collapsed .sidebar-link,
.sidebar.collapsed .sidebar-accordion {
    min-height: 52px;
    justify-content: center;
    padding-inline: 0;
}

.sidebar.collapsed .sidebar-link.is-disabled-when-collapsed {
    cursor: default;
}

.sidebar.collapsed .sidebar-accordion {
    pointer-events: none;
}

a.sidebar-link,
a.sidebar-sublink,
.sidebar-accordion {
    appearance: none;
    -webkit-appearance: none;
    border: none !important;
    outline: none;
    box-shadow: none;
    background: transparent !important;
    font: inherit;
}

.sidebar-link,
.sidebar-accordion,
.sidebar-sublink {
    text-decoration: none;
}

.sidebar-accordion {
    text-align: left;
    cursor: pointer;
    user-select: none;
}

.sidebar-accordion:focus-visible {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 0 0 2px rgba(217, 233, 251, 0.22);
}

.sidebar-link-content {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    font-weight: 700;
}

.sidebar.collapsed .sidebar-link-content {
    justify-content: center;
    gap: 0;
    flex: 0 0 auto;
}

.sidebar-link-end {
    width: 0.85rem;
    min-width: 0.85rem;
    flex-shrink: 0;
}

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

.sidebar-subnav {
    display: grid;
    gap: 6px;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0 0 0 18px;
    transition: max-height 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
    opacity: 0;
    transform: translateY(-4px);
}

.sidebar.collapsed .sidebar-subnav {
    max-height: 0 !important;
    opacity: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-4px) !important;
}

.sidebar-group.is-open .sidebar-subnav {
    max-height: 960px;
    margin-top: 6px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    opacity: 1;
    transform: translateY(0);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 14px;
    color: #000000 !important;
    font-size: 1rem;
    font-weight: bold;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-group.is-open .sidebar-sublink {
    color: #000000 !important;
    background-color: #eef2f7 !important;
    box-shadow: inset 0 0 0 1px rgba(15, 39, 71, 0.08);
}

.sidebar-sublink:link,
.sidebar-sublink:visited {
    color: #000000 !important;
}

.sidebar-sublink::before {
    display: none;
}

.sidebar-sublink:hover,
.sidebar-sublink.active {
    background-color: #eef2f7 !important;
    color: #000000 !important;
    transform: translateX(2px);
    box-shadow: inset 0 0 0 1px rgba(15, 39, 71, 0.12);
}

.sidebar-sublink.active::before,
.sidebar-sublink:hover::before {
    display: none;
}

.sidebar-chevron {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    opacity: 0.72;
    max-width: 1rem;
}

.sidebar-group.is-open .sidebar-chevron {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar-link:hover,
.sidebar-link.active,
.sidebar-accordion:hover,
.sidebar-accordion.active,
.sidebar-group.is-open > .sidebar-accordion,
.sidebar-group.is-active > .sidebar-accordion {
    color: var(--rcl-white);
    background-color: #eef2f7;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: translateX(2px);
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-collapsed-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s ease;
    background: linear-gradient(180deg, rgba(216, 225, 235, 0.78), rgba(205, 216, 228, 0.92));
}

.sidebar.expanded ~ .app-main {
    margin-left: var(--sidebar-expanded-width);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 22px 28px;
    position: sticky;
    top: 0;
    z-index: 1030;
    backdrop-filter: blur(14px);
    background: rgba(226, 234, 242, 0.84);
    border-bottom: 1px solid var(--rcl-border);
}

.topbar-left,
.topbar-right,
.user-pill {
    display: flex;
    align-items: center;
    gap: 14px;
}

.page-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--rcl-blue-dark);
}

.topbar-toggle {
    display: none;
    color: var(--rcl-blue-dark);
    font-size: 1.35rem;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.user-pill {
    padding: 8px 14px 8px 8px;
    border-radius: 999px;
    background: var(--rcl-white);
    box-shadow: 0 10px 24px rgba(12, 32, 57, 0.06);
}

.user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--rcl-white);
    background: linear-gradient(135deg, var(--rcl-blue-dark), var(--rcl-blue));
    font-weight: 800;
}

.content-wrapper {
    padding: 28px;
    background: var(--rcl-app-surface);
    min-width: 0;
}

.app-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--rcl-gray);
    font-size: 0.9rem;
}

.app-breadcrumbs a {
    color: var(--rcl-blue);
}

.app-breadcrumbs .is-current {
    color: var(--rcl-blue-dark);
    font-weight: 700;
}

.row,
.row > [class^="col"],
.row > [class*=" col-"] {
    min-width: 0;
}

.breadcrumb-separator {
    opacity: 0.48;
}

.page-section {
    display: grid;
    gap: 24px;
}

.finance-page,
.finance-page .row,
.finance-page .col-md-4,
.finance-page .col-md-6,
.finance-page .col-xl-2,
.finance-page .col-xl-3,
.finance-page .col-xl-4,
.finance-page .col-xl-5,
.finance-page .col-xl-6,
.finance-page .col-xl-7,
.finance-page .col-xl-8 {
    min-width: 0;
}

.finance-page .card,
.finance-page .kpi-card,
.finance-page .card-body,
.finance-page .table-responsive,
.finance-page .metric-list li,
.finance-page .alert {
    min-width: 0;
}

.finance-page .alert {
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.finance-page .card-body > h3,
.finance-page .card-title-row h3 {
    white-space: nowrap;
    overflow: visible;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.finance-page .kpi-card {
    padding: 18px 18px;
}

.finance-page .kpi-card span {
    font-size: clamp(0.72rem, 0.78vw, 0.82rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-page .kpi-card strong {
    font-size: clamp(1rem, 1.35vw, 1.55rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-page .metric-list li span {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-page .metric-list li strong {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 45%;
}

.finance-overview-panels .card-body h3,
.finance-billing-panels .card-body h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.35;
    padding-top: 2px;
    padding-right: 12px;
    margin-bottom: 14px;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    background: var(--rcl-white);
}

.finance-overview-panels .metric-list li,
.finance-billing-panels .metric-list li {
    overflow: visible;
    min-height: 24px;
}

.finance-overview-panels .metric-list li span,
.finance-billing-panels .metric-list li span,
.finance-overview-panels .metric-list li strong,
.finance-billing-panels .metric-list li strong {
    line-height: 1.35;
}

.finance-page .table-responsive {
    overflow-x: auto;
    overflow-y: hidden;
}

.finance-page .table {
    width: max-content;
    min-width: 100%;
}

.finance-page .table > :not(caption) > * > * {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.section-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
}

.section-header > * {
    min-width: 0;
}

.card,
.kpi-card,
.placeholder-card {
    border: 1px solid var(--rcl-border);
    border-radius: 24px;
    box-shadow: var(--rcl-shadow);
    background: var(--rcl-white);
}

.kpi-card {
    padding: 20px 22px;
    background: var(--rcl-white);
    height: 100%;
    min-width: 0;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover,
.module-shortcut:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 45px rgba(12, 32, 57, 0.12);
}

.kpi-card span {
    display: block;
    font-size: 0.88rem;
    color: var(--rcl-gray);
    margin-bottom: 10px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.kpi-card strong {
    display: block;
    max-width: 100%;
    font-size: clamp(1.3rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.18;
    color: var(--rcl-blue-dark);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.finance-overview-kpis .kpi-card {
    padding: 18px 18px;
}

.finance-overview-kpis .kpi-card span {
    font-size: clamp(0.72rem, 0.78vw, 0.82rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-overview-kpis .kpi-card strong {
    font-size: clamp(1rem, 1.35vw, 1.55rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-result-kpis .kpi-card {
    padding: 18px 18px;
}

.finance-result-kpis .kpi-card span {
    font-size: clamp(0.72rem, 0.78vw, 0.82rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-result-kpis .kpi-card strong {
    font-size: clamp(1rem, 1.35vw, 1.55rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-receivables-kpis .kpi-card {
    padding: 18px 18px;
}

.finance-receivables-kpis .kpi-card span {
    font-size: clamp(0.72rem, 0.78vw, 0.82rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-receivables-kpis .kpi-card strong {
    font-size: clamp(1rem, 1.32vw, 1.5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    overflow-wrap: normal;
    word-break: normal;
}

.finance-overview-panels .card.h-100 {
    height: 240px !important;
    max-height: 240px;
    overflow: hidden;
}

.finance-overview-panels .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.finance-overview-panels .metric-list {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-gutter: stable;
}

.finance-overview-panels .metric-list li {
    align-items: flex-start;
    gap: 10px;
}

.finance-payables-sidebar-column {
    display: flex;
}

.finance-payables-sidebar-stack {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 0;
}

.finance-payables-sidebar-item {
    display: flex;
    flex: 1 1 0;
    min-height: 0;
}

.finance-payables-sidebar {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.finance-payables-sidebar .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.finance-payables-sidebar__list {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-gutter: stable;
}

.finance-payables-sidebar__list li {
    align-items: flex-start;
    gap: 10px;
}

.finance-billing-panels .card.h-100 {
    height: 100%;
    max-height: 360px;
    overflow: hidden;
}

.finance-billing-panels .card.h-100 .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.finance-billing-panels .metric-list {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-gutter: stable;
}

.finance-payables-sidebar .card-body > h3 {
    padding-right: 12px;
    margin-bottom: 14px;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
    background: var(--rcl-white);
}

.finance-billing-panels .metric-list li {
    align-items: flex-start;
    gap: 10px;
}

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.card-title-row h3,
.card-body h3 {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0 0 18px;
    color: var(--rcl-blue-dark);
}

.chart-card .card-body {
    position: relative;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.chart-card .chart-canvas-wrapper {
    position: relative;
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    height: 320px;
}

.chart-card-compact .card-body {
    min-height: 260px;
}

.chart-card-compact .chart-canvas-wrapper {
    height: 220px;
}

.fleet-costs-equal-card {
    height: 340px;
    overflow: hidden;
}

.fleet-costs-detail-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.fleet-costs-detail-table {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.chart-card canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    min-width: 0;
}

.finance-nav-list,
.module-grid {
    display: grid;
    gap: 12px;
}

.finance-nav-list {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.finance-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 14px;
    background: var(--rcl-gray-light);
    color: var(--rcl-blue-dark);
    font-weight: 700;
}

.finance-nav-link.active {
    background: linear-gradient(135deg, var(--rcl-blue-dark), var(--rcl-blue));
    color: var(--rcl-white);
}

.finance-filter-card {
    height: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.9rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
}

.finance-filter-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.finance-filter-card__header h3 {
    margin: 0;
    font-size: 1rem;
}

.finance-filter-card__header p {
    margin: 0;
    max-width: 18rem;
    color: #64748b;
    font-size: 0.875rem;
    text-align: right;
}

.finance-filter-card__eyebrow {
    display: inline-block;
    margin-bottom: 0.15rem;
    color: #0f766e;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.finance-filter-nav,
.finance-filter-period-summary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.finance-filter-nav__label,
.finance-filter-period-summary span {
    color: #64748b;
    font-size: 0.8rem;
}

.finance-filter-nav__controls {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    font-weight: 600;
}

.finance-filter-period-summary strong {
    font-size: 0.95rem;
    color: #0f172a;
}

.finance-filter-card .row {
    --bs-gutter-y: 0.75rem;
}

.finance-filter-card .form-label {
    margin-bottom: 0.3rem;
}

.finance-filter-card .form-control,
.finance-filter-card .form-select {
    min-height: 42px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    border-radius: 12px;
}

.finance-filter-card .btn {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-radius: 12px;
}

.fleet-dashboard-header {
    align-items: flex-start;
}

.fleet-notification-center {
    margin-left: auto;
}

.fleet-notification-button {
    position: relative;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(15, 39, 71, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--rcl-blue-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 24px rgba(12, 32, 57, 0.08);
}

.fleet-notification-button:hover,
.fleet-notification-button:focus {
    background: #ffffff;
    color: var(--rcl-blue-dark);
    border-color: rgba(31, 95, 159, 0.16);
}

.fleet-notification-button i {
    font-size: 1.2rem;
}

.fleet-notification-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #d64545;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(214, 69, 69, 0.28);
}

.fleet-notification-dropdown {
    width: min(420px, calc(100vw - 32px));
    border: 1px solid rgba(15, 39, 71, 0.08);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 50px rgba(12, 32, 57, 0.14);
}

.fleet-notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(15, 39, 71, 0.08);
    background: linear-gradient(180deg, #f9fbfd, #f1f6fb);
}

.fleet-notification-dropdown-header strong {
    display: block;
    color: var(--rcl-blue-dark);
}

.fleet-notification-dropdown-header small {
    color: var(--rcl-gray);
}

.fleet-notification-list {
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
    background: #ffffff;
}

.fleet-notification-empty,
.fleet-notification-error {
    padding: 18px;
    color: var(--rcl-gray);
    text-align: center;
}

.fleet-notification-error {
    color: #b42318;
}

.fleet-notification-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 12px;
    align-items: start;
    padding: 14px;
    border-radius: 18px;
    color: inherit;
    transition: background 0.18s ease, transform 0.18s ease;
}

.fleet-notification-item + .fleet-notification-item {
    margin-top: 6px;
}

.fleet-notification-item:hover {
    background: #f6f9fc;
    transform: translateY(-1px);
}

.fleet-notification-item.is-read {
    opacity: 0.72;
}

.fleet-notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-top: 2px;
}

.fleet-notification-item.is-critical .fleet-notification-icon {
    background: rgba(214, 69, 69, 0.12);
    color: #d64545;
}

.fleet-notification-item.is-warning .fleet-notification-icon {
    background: rgba(240, 180, 41, 0.16);
    color: #af7b00;
}

.fleet-notification-item.is-info .fleet-notification-icon {
    background: rgba(31, 95, 159, 0.12);
    color: #1f5f9f;
}

.fleet-notification-content {
    min-width: 0;
}

.fleet-notification-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.fleet-notification-title strong {
    color: var(--rcl-blue-dark);
    font-size: 0.95rem;
}

.fleet-notification-module {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rcl-gray);
}

.fleet-notification-description {
    margin: 0 0 6px;
    color: #465465;
    font-size: 0.88rem;
}

.fleet-notification-meta {
    font-size: 0.78rem;
    color: var(--rcl-gray);
}

.fleet-notification-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.fleet-notification-open,
.fleet-notification-read {
    border: 0;
    background: transparent;
    color: var(--rcl-blue);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0;
}

.fleet-notification-read {
    color: var(--rcl-gray);
}

.fleet-notification-read:disabled {
    opacity: 0.45;
}

.tire-retread-list {
    display: grid;
    gap: 14px;
}

.tire-retread-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(15, 39, 71, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
}

.tire-retread-item.is-disabled {
    opacity: 0.68;
}

.tire-retread-check {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tire-retread-check .form-check-input {
    margin-top: 0;
    flex-shrink: 0;
}

.tire-retread-check .form-check-label {
    font-weight: 700;
    color: var(--rcl-blue-dark);
}

.tire-retread-value {
    min-width: 0;
}

.tire-total-card {
    padding: 18px;
    border: 1px solid rgba(15, 39, 71, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 991px) {
    .tire-retread-item {
        grid-template-columns: 1fr;
    }
}

.tire-movement-page {
    gap: 20px;
}

.tire-movement-switcher {
    min-width: 360px;
}

@media (max-width: 575.98px) {
    .tire-movement-switcher {
        min-width: 0;
        width: 100%;
    }
}

.tire-movement-summary-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.tire-movement-summary-grid article {
    padding: 16px 18px;
    border: 1px solid var(--rcl-border);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(15, 39, 71, 0.02), rgba(31, 95, 159, 0.06));
    display: grid;
    gap: 6px;
}

.tire-movement-summary-grid article span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rcl-gray);
}

.tire-movement-summary-grid article strong {
    font-size: 1rem;
    color: var(--rcl-blue-dark);
}

.tire-movement-summary-action {
    display: flex;
    align-items: end;
    justify-content: end;
}

.tire-movement-summary-action .btn {
    min-height: 52px;
    width: 100%;
}

.tire-layout-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(31, 95, 159, 0.12);
    color: var(--rcl-blue-dark);
    font-weight: 700;
}

.tire-status-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 22px;
    min-width: 0;
    font-size: 0.9rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.legend-dot.is-normal {
    background: #2f9e44;
}

.legend-dot.is-attention {
    background: #f0b429;
}

.legend-dot.is-problem {
    background: #d64545;
}

.legend-dot.is-empty {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
}

.legend-dot.is-selected {
    background: #1677ff;
}

.legend-dot.is-destination {
    background: #f08c00;
}

.vehicle-layout-board {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top center, rgba(31, 95, 159, 0.09), transparent 38%),
        linear-gradient(180deg, #f6f9fd 0%, #eef4fb 100%);
    border: 1px solid rgba(15, 39, 71, 0.08);
}

.vehicle-axle-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.vehicle-axle-group {
    display: flex;
    gap: 12px;
}

.vehicle-axle-group.is-right {
    justify-content: end;
}

.vehicle-axle-center {
    display: grid;
    gap: 8px;
    justify-items: center;
    color: var(--rcl-blue-dark);
    font-weight: 700;
}

.vehicle-chassis {
    width: 96px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--rcl-blue-dark), var(--rcl-blue));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.vehicle-slot,
.stock-tire-card {
    border: 1px solid transparent;
    border-radius: 22px;
    padding: 14px;
    background: var(--rcl-white);
    box-shadow: 0 16px 32px rgba(12, 32, 57, 0.06);
    display: grid;
    gap: 6px;
    text-align: left;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.vehicle-slot:hover,
.stock-tire-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 34px rgba(12, 32, 57, 0.12);
}

.vehicle-slot.status-normal,
.stock-tire-card.status-normal {
    border-color: rgba(47, 158, 68, 0.28);
    background: linear-gradient(180deg, rgba(47, 158, 68, 0.08), rgba(255, 255, 255, 0.96));
}

.vehicle-slot.status-atencao,
.stock-tire-card.status-atencao {
    border-color: rgba(240, 180, 41, 0.35);
    background: linear-gradient(180deg, rgba(240, 180, 41, 0.1), rgba(255, 255, 255, 0.96));
}

.vehicle-slot.status-problema,
.stock-tire-card.status-problema {
    border-color: rgba(214, 69, 69, 0.35);
    background: linear-gradient(180deg, rgba(214, 69, 69, 0.1), rgba(255, 255, 255, 0.96));
}

.vehicle-slot.status-empty {
    border-color: rgba(170, 180, 192, 0.35);
    background: linear-gradient(180deg, rgba(170, 180, 192, 0.18), rgba(255, 255, 255, 0.92));
}

.vehicle-slot.is-selected,
.stock-tire-card.is-selected {
    border-color: #1677ff;
    background: #f4f8ff;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14), 0 18px 34px rgba(12, 32, 57, 0.11);
}

.vehicle-slot.is-destination {
    border-color: #f08c00;
    box-shadow: 0 0 0 3px rgba(240, 140, 0, 0.16), 0 20px 34px rgba(240, 140, 0, 0.15);
}

.slot-code,
.slot-label,
.compact-tire-card span,
.compact-tire-card small,
.support-column-header span,
.selection-card-label,
.preview-action {
    color: var(--rcl-gray);
}

.slot-code {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.slot-label {
    font-size: 0.84rem;
}

.slot-empty-label {
    font-size: 0.9rem;
    color: #7d8896;
    font-weight: 700;
}

.compact-tire-card {
    display: grid;
    gap: 3px;
}

.compact-tire-card strong {
    font-size: 1.05rem;
    color: var(--rcl-blue-dark);
}

.compact-tire-card span,
.compact-tire-card small {
    display: block;
    line-height: 1.35;
}

.tire-selection-state,
.tire-selection-actions,
.selection-history-list {
    display: grid;
    gap: 12px;
}

.selection-placeholder,
.selection-tip,
.selection-history-empty,
.empty-support-state {
    padding: 16px 18px;
    border-radius: 18px;
    background: var(--rcl-gray-light);
    color: var(--rcl-gray);
}

.selection-card,
.preview-summary,
.history-entry,
.detail-grid article {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--rcl-border);
    background: var(--rcl-white);
}

.selection-card {
    display: grid;
    gap: 8px;
}

.selection-card.is-selected {
    background: linear-gradient(180deg, rgba(22, 119, 255, 0.08), rgba(255, 255, 255, 0.96));
}

.selection-card.is-preview {
    background: linear-gradient(180deg, rgba(240, 140, 0, 0.08), rgba(255, 255, 255, 0.96));
}

.preview-summary,
.history-entry {
    display: grid;
    gap: 6px;
}

.preview-summary strong,
.history-entry strong,
.selection-card strong,
.detail-grid strong {
    color: var(--rcl-blue-dark);
}

.preview-displaced {
    padding-top: 6px;
    color: var(--rcl-gray);
}

.support-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.support-column-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    color: var(--rcl-blue-dark);
}

.spare-slot-grid,
.stock-tire-grid {
    display: grid;
    gap: 14px;
}

.spare-slot-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stock-tire-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tire-stock-search {
    width: min(320px, 100%);
}

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

.detail-grid article {
    display: grid;
    gap: 8px;
}

.detail-grid article span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--rcl-gray);
}

@media (max-width: 1399px) {
    .tire-movement-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .tire-movement-switcher {
        min-width: 0;
        width: 100%;
    }

    .vehicle-axle-row {
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .vehicle-axle-center {
        order: -1;
        margin-bottom: 2px;
    }

    .vehicle-axle-group,
    .vehicle-axle-group.is-right {
        justify-content: center;
        flex-wrap: wrap;
    }

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

@media (max-width: 767px) {
    .tire-movement-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vehicle-layout-board {
        padding: 18px;
    }

    .stock-tire-grid,
    .spare-slot-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .sidebar,
    .topbar,
    .footer,
    .tire-movement-switcher,
    .tire-selection-panel,
    .tire-support-panel,
    .tire-recent-panel,
    .btn,
    .modal {
        display: none !important;
    }

    .app-main,
    .content-wrapper {
        margin: 0;
        padding: 0;
    }

    .tire-vehicle-panel,
    .tire-movement-summary {
        box-shadow: none;
        border: 1px solid #c9d2dc;
    }
}

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

.module-shortcut {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f9fbfd, #eef4fa);
    border: 1px solid rgba(15, 39, 71, 0.08);
    color: var(--rcl-blue-dark);
    display: grid;
    gap: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.module-shortcut i,
.placeholder-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    font-size: 1.6rem;
    color: var(--rcl-blue);
    background: var(--rcl-blue-soft);
}

.integration-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.mini-stat {
    border: 1px solid rgba(15, 39, 71, 0.08);
    border-radius: 18px;
    padding: 16px 18px;
    background: linear-gradient(180deg, #fcfdff, #f3f7fb);
}

.mini-stat span {
    display: block;
    color: var(--rcl-gray);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.mini-stat strong {
    color: var(--rcl-blue-dark);
    font-size: 1.3rem;
}

.mini-stat-accent {
    background: linear-gradient(180deg, #eef7ff, #e3f0fd);
    border-color: rgba(31, 95, 159, 0.14);
}

.sync-result-card {
    border-radius: 20px;
}

.sync-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.sync-result-item {
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(31, 95, 159, 0.12);
    display: grid;
    gap: 4px;
}

.sync-result-item span,
.sync-result-item small {
    color: var(--rcl-gray);
}

.sync-result-item strong {
    color: var(--rcl-blue-dark);
    font-size: 1.05rem;
}

.metric-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.metric-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(15, 39, 71, 0.12);
}

.metric-list li span,
.metric-list li strong {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.metric-list li strong {
    text-align: right;
    flex-shrink: 0;
}

.metric-list li:last-child {
    border-bottom: 0;
}

.dataTables_wrapper .dataTables_scrollBody {
    border-bottom: 1px solid rgba(15, 39, 71, 0.08);
}

.pump-odometer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.pump-odometer-card {
    display: grid;
    gap: 6px;
    padding: 18px;
    border: 1px solid rgba(15, 39, 71, 0.08);
    border-radius: 20px;
    background: linear-gradient(160deg, #f7fbff, #eef4fb);
}

.pump-odometer-name {
    color: var(--rcl-blue-dark);
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pump-odometer-reading {
    color: var(--rcl-blue-dark);
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1;
    letter-spacing: 0.12em;
    font-variant-numeric: tabular-nums;
}

.pump-odometer-unit,
.pump-odometer-meta {
    color: var(--rcl-gray);
}

.pump-odometer-unit {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.pump-odometer-meta {
    font-size: 0.88rem;
}

.table > :not(caption) > * > * {
    padding: 0.9rem 0.8rem;
}

.table-responsive {
    border-radius: 18px;
    -webkit-overflow-scrolling: touch;
}

.table thead th {
    background: #f6f9fc;
    color: var(--rcl-blue-dark);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom-width: 1px;
}

.table tbody tr:hover {
    background: rgba(31, 95, 159, 0.03);
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid rgba(15, 39, 71, 0.14);
    border-radius: 12px;
    padding: 0.45rem 0.75rem;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    display: flex;
    align-items: center;
}

.planos-dashboard-page .dataTables_wrapper .dataTables_length {
    display: none !important;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
    white-space: normal;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_length select.form-select,
.dataTables_wrapper .dataTables_length select.form-select-sm {
    width: 84px !important;
    min-width: 84px;
    margin: 0 !important;
    padding-right: 2.25rem;
    line-height: 1.2;
    flex: 0 0 auto;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 10px;
}

.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px 22px;
    color: var(--rcl-gray);
    font-size: 0.88rem;
}

.placeholder-card {
    background: linear-gradient(145deg, var(--rcl-white), #f2f7fd);
}

.placeholder-icon {
    margin: 0 auto 18px;
}

.dre-table th {
    color: var(--rcl-blue-dark);
}

@media (max-width: 1199.98px) {
    .login-section {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 991.98px) {
    body {
        font-size: 0.95rem;
    }

    .page-title {
        font-size: 1.2rem;
    }

    .topbar-system,
    .app-breadcrumbs,
    .app-footer,
    .kpi-card span,
    .table thead th,
    .pump-odometer-unit,
    .pump-odometer-meta,
    .form-label,
    .text-muted,
    .btn-sm,
    small {
        font-size: 0.8rem;
    }

    .card-title-row h3,
    .card-body h3 {
        font-size: 1rem;
    }

    .kpi-card strong {
        font-size: clamp(1.15rem, 2vw, 1.7rem);
    }

    .metric-list li,
    .table tbody,
    .dataTables_wrapper,
    .finance-filter-card__header p,
    .finance-filter-nav__label,
    .finance-filter-period-summary span {
        font-size: 0.9rem;
    }

    .topbar-toggle {
        display: inline-flex;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        padding: 0;
        background: rgba(15, 39, 71, 0.38);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        z-index: 1035;
    }

    .sidebar-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar {
        width: var(--sidebar-expanded-width);
        padding-inline: 14px;
        max-width: min(88vw, var(--sidebar-expanded-width));
        transform: translateX(-100%);
        box-shadow: 20px 0 40px rgba(12, 32, 57, 0.18);
    }

    .sidebar.collapsed,
    .sidebar.expanded {
        width: min(88vw, var(--sidebar-expanded-width));
        padding-inline: 14px;
    }

    .sidebar.expanded {
        transform: translateX(0);
    }

    .sidebar.expanded .sidebar-brand-copy,
    .sidebar.expanded .menu-text,
    .sidebar.expanded .sidebar-link-end,
    .sidebar.expanded .sidebar-chevron {
        opacity: 1;
        max-width: 100%;
        pointer-events: auto;
        transform: translateX(0);
    }

    .sidebar.expanded .sidebar-link,
    .sidebar.expanded .sidebar-accordion {
        min-height: unset;
        justify-content: space-between;
        padding-inline: 14px;
    }

    .sidebar.expanded .sidebar-link-content {
        justify-content: flex-start;
        gap: 12px;
        flex: 1;
    }

    .sidebar.expanded .sidebar-subnav {
        pointer-events: auto;
    }

    .app-main {
        margin-left: 0;
    }

    .topbar,
    .content-wrapper,
    .app-footer {
        padding-left: 18px;
        padding-right: 18px;
    }

    .topbar {
        gap: 14px;
    }

    .topbar-right {
        margin-left: auto;
    }

    body.sidebar-mobile-open {
        overflow: hidden;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 0.84rem;
    }

    .eyebrow,
    .finance-filter-card__eyebrow {
        font-size: 0.62rem;
    }

    .page-title {
        font-size: 0.98rem;
    }

    .card-title-row h3,
    .card-body h3,
    .finance-filter-card__header h3 {
        font-size: 0.88rem;
    }

    .topbar-system,
    .app-breadcrumbs,
    .app-footer,
    .kpi-card span,
    .pump-odometer-name,
    .pump-odometer-unit,
    .pump-odometer-meta,
    .finance-filter-nav__label,
    .finance-filter-period-summary span,
    .form-label,
    .text-muted,
    .btn-sm,
    small {
        font-size: 0.7rem;
    }

    .table thead th {
        font-size: 0.74rem;
        white-space: nowrap;
    }

    .kpi-card strong,
    .pump-odometer-reading {
        font-size: clamp(0.92rem, 4vw, 1.28rem);
    }

    .metric-list li,
    .dataTables_wrapper,
    .finance-filter-card__header p,
    .finance-filter-nav__controls,
    .finance-filter-period-summary strong {
        font-size: 0.76rem;
    }

    .table tbody {
        font-size: 0.8rem;
    }

    .section-header,
    .topbar,
    .topbar-right,
    .topbar-left,
    .app-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .login-hero,
    .login-card .card-body {
        padding: 26px;
    }

    .app-shell {
        min-height: 100dvh;
    }

    .topbar {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .topbar-right {
        width: 100%;
        gap: 10px;
    }

    .user-pill {
        width: 100%;
        justify-content: flex-start;
        min-width: 0;
    }

    .user-pill > div {
        min-width: 0;
    }

    .user-pill strong,
    .user-pill small {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-right .logout-link {
        width: 100%;
    }

    .content-wrapper {
        padding: 16px;
    }

    .app-breadcrumbs {
        margin-bottom: 14px;
        font-size: 0.82rem;
    }

    .page-section {
        gap: 16px;
    }

    .card,
    .kpi-card,
    .placeholder-card {
        border-radius: 18px;
    }

    .table > :not(caption) > * > * {
        padding: 0.7rem 0.6rem;
        white-space: nowrap;
        overflow-wrap: normal;
        word-break: normal;
    }

    .table .btn,
    .table .badge,
    .table a {
        white-space: nowrap;
    }

    .table td.text-end,
    .table th.text-end {
        text-align: left !important;
    }

    .table-responsive {
        overflow-x: auto;
        overflow-y: hidden;
    }

    .table-responsive > .table,
    .dataTables_wrapper .table {
        width: max-content;
        min-width: 100%;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        justify-content: flex-start;
        text-align: left;
        width: 100%;
        margin-top: 10px;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        max-width: none;
    }

    .login-hero-logo {
        width: min(100%, 360px);
    }

    .chart-card .card-body {
        min-height: 300px;
    }

    .chart-card .chart-canvas-wrapper {
        min-height: 240px;
    }

    .chart-card-compact .card-body {
        min-height: 220px;
    }

    .chart-card-compact .chart-canvas-wrapper {
        height: 190px;
        min-height: 190px;
    }

    .finance-filter-card__header {
        flex-direction: column;
    }

    .finance-filter-card__header p {
        max-width: none;
        text-align: left;
    }

    .fleet-costs-equal-card {
        height: auto;
        overflow: visible;
    }

    .fleet-costs-detail-card .card-body {
        height: auto;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 0.78rem;
    }

    .eyebrow,
    .finance-filter-card__eyebrow {
        font-size: 0.58rem;
    }

    .topbar,
    .content-wrapper,
    .app-footer {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-title {
        font-size: 0.9rem;
    }

    .card-title-row h3,
    .card-body h3,
    .finance-filter-card__header h3 {
        font-size: 0.8rem;
    }

    .topbar-system,
    .app-breadcrumbs,
    .app-footer,
    .kpi-card span,
    .pump-odometer-name,
    .pump-odometer-unit,
    .pump-odometer-meta,
    .finance-filter-nav__label,
    .finance-filter-period-summary span,
    .form-label,
    .text-muted,
    .btn-sm,
    small {
        font-size: 0.66rem;
    }

    .table thead th {
        font-size: 0.7rem;
        white-space: nowrap;
    }

    .kpi-card strong,
    .pump-odometer-reading {
        font-size: clamp(0.84rem, 3.8vw, 1.1rem);
    }

    .metric-list li,
    .dataTables_wrapper,
    .finance-filter-card__header p,
    .finance-filter-nav__controls,
    .finance-filter-period-summary strong {
        font-size: 0.72rem;
    }

    .table tbody,
    .table .btn,
    .table .badge {
        font-size: 0.74rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        font-size: 0.95rem;
    }

    .sidebar-brand-copy strong {
        font-size: 1rem;
    }
}