:root {
    --af-gold: #F5B800;
    --af-green-light: #5BB947;
    --af-green-dark: #1F7A3A;
    --af-navy: #0E2C4E;
    --af-navy-darker: #081A30;
    --af-off-white: #f6f8f5;
    --af-text: #1f2937;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, sans-serif;
    background-color: var(--af-off-white);
    color: var(--af-text);
}

.hero {
    background: linear-gradient(135deg, var(--af-navy) 0%, var(--af-green-dark) 100%);
    padding: 5rem 1rem 4.5rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(
        circle at 20% 50%,
        rgba(245, 184, 0, 0.1) 0%,
        transparent 45%
    );
    pointer-events: none;
}

.hero > .container {
    position: relative;
    z-index: 1;
}

.hero-logo {
    width: 240px;
    height: auto;
    background: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    box-shadow: 0 12px 36px rgba(14, 44, 78, 0.35);
    margin-bottom: 2rem;
}

.hero-tagline {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.badge-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
}

.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem 1.75rem;
    height: 100%;
    box-shadow: 0 2px 10px rgba(14, 44, 78, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid var(--af-green-dark);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(14, 44, 78, 0.12);
}

.feature-card:nth-child(2n) .feature-card {
    border-top-color: var(--af-gold);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    color: var(--af-navy);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: #4b5563;
    margin-bottom: 0;
    line-height: 1.6;
}

.footer {
    background: var(--af-navy);
    color: #fff;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer p.text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* ============================================================
   Telas de Autenticação (login / recuperar senha)
   ============================================================ */

body.auth-body {
    background: var(--af-off-white);
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

.auth-brand {
    position: relative;
    background:
        radial-gradient(circle at 85% 15%, rgba(245, 184, 0, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 15% 85%, rgba(91, 185, 71, 0.22) 0%, transparent 50%),
        linear-gradient(160deg, var(--af-navy) 0%, var(--af-navy-darker) 55%, #061224 100%);
    color: #fff;
    padding: 3.5rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.auth-brand::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -140px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--af-green-dark) 0%, var(--af-green-light) 100%);
    opacity: 0.18;
    filter: blur(10px);
    pointer-events: none;
}

.auth-brand-inner {
    position: relative;
    z-index: 1;
}

.auth-logo {
    width: 245px;
    box-sizing: border-box;
    background: #fff;
    padding: 0.2rem 0.3rem;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
    margin-bottom: 3rem;
    display: block;
}

.auth-tagline {
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 2rem;
    color: #fff;
}

.auth-tagline span {
    color: var(--af-gold);
    font-weight: 600;
}

.auth-highlights {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.auth-highlights li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1rem;
}

.auth-highlights .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--af-green-light);
    box-shadow: 0 0 0 4px rgba(91, 185, 71, 0.18);
    flex-shrink: 0;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.85rem;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2rem;
    background: var(--af-off-white);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
    background: #fff;
    border-radius: 20px;
    padding: 2.75rem 2.5rem;
    box-shadow:
        0 1px 2px rgba(14, 44, 78, 0.04),
        0 12px 40px rgba(14, 44, 78, 0.08);
}

.auth-card-head {
    margin-bottom: 2rem;
}

.auth-card-head h2 {
    color: var(--af-navy);
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 0.4rem;
    letter-spacing: -0.01em;
}

.auth-card-head p {
    color: #64748b;
    margin: 0;
    font-size: 0.95rem;
}

.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.auth-alert-erro,
.auth-alert-error {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.auth-alert-info,
.auth-alert-message {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #075985;
}

.auth-alert-sucesso,
.auth-alert-success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.auth-field label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--af-navy);
    letter-spacing: 0.01em;
}

.auth-field-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-field input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.98rem;
    background: #fff;
    color: var(--af-text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-field input::placeholder {
    color: #94a3b8;
}

.auth-field input:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 4px rgba(31, 122, 58, 0.12);
}

.auth-password {
    position: relative;
}

.auth-password input {
    padding-right: 3rem;
}

.auth-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-password-toggle:hover {
    background: #f1f5f9;
    color: var(--af-navy);
}

.auth-link-sm {
    font-size: 0.85rem;
    color: var(--af-green-dark);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.auth-link-sm:hover {
    color: var(--af-navy);
    text-decoration: underline;
}

.auth-remember {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
    user-select: none;
}

.auth-remember input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--af-green-dark);
    cursor: pointer;
}

.auth-btn-primary {
    height: 50px;
    margin-top: 0.5rem;
    background: var(--af-green-dark);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.18s ease, transform 0.08s ease, box-shadow 0.18s ease;
    box-shadow: 0 6px 16px rgba(31, 122, 58, 0.22);
}

.auth-btn-primary:hover {
    background: #186430;
    box-shadow: 0 10px 22px rgba(31, 122, 58, 0.3);
}

.auth-btn-primary:active {
    transform: translateY(1px);
}

.auth-first-access {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
    font-size: 0.9rem;
    color: #64748b;
}

.auth-first-access strong {
    color: var(--af-navy);
    font-weight: 600;
}

.auth-panel-footer {
    text-align: center;
    color: #94a3b8;
    font-size: 0.8rem;
    margin-top: 2rem;
}

/* ============================================================
   Painel provisório
   ============================================================ */

body.painel-body {
    background: var(--af-off-white);
    min-height: 100vh;
}

/* ----------------------------------------------------------------------
   Tema "Portal do Cliente" — versão azul-marinho médio
   Diferencia visualmente o portal externo (clientes) do interno
   (funcionários Agro Frotas). Cards claros "flutuam" sobre o azul
   escuro com sombras profundas, vibe dashboard premium.
   ---------------------------------------------------------------------- */

body.painel-body.cliente-area {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(31, 122, 58, 0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 100% 100%, rgba(245, 184, 0, 0.07) 0%, transparent 50%),
        #2a4068;
    background-attachment: fixed;
    color: #e2e8f0;
}

/* Topbar em navy oficial (mais escura que o fundo) — hierarquia clara */
body.cliente-area .topbar {
    background: #0E2C4E;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.cliente-area .topbar-nav a {
    color: rgba(255, 255, 255, 0.72);
}
body.cliente-area .topbar-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}
body.cliente-area .topbar-nav a.ativo {
    background: rgba(91, 185, 71, 0.18);
    color: #86efac;
}
body.cliente-area .topbar-user-name {
    color: #ffffff;
}
body.cliente-area .topbar-user-role {
    color: rgba(255, 255, 255, 0.6);
}
body.cliente-area .topbar-logout {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.85);
}
body.cliente-area .topbar-logout:hover {
    border-color: #86efac;
    color: #86efac;
}

/* Texto fora dos cards (cabeçalhos, dicas, taglines) — clareados */
body.cliente-area .frota-header h1 {
    color: #ffffff;
}
body.cliente-area .frota-header p,
body.cliente-area .resumo-cta {
    color: rgba(255, 255, 255, 0.78);
}
body.cliente-area .resumo-cta-wrap {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 12px;
}
body.cliente-area .carta-cabecalho h1 {
    color: #ffffff;
}
body.cliente-area .carta-cabecalho .auth-link-sm {
    color: rgba(255, 255, 255, 0.78);
}
body.cliente-area .carta-cabecalho .auth-link-sm:hover {
    color: #86efac;
}

/* Cards principais — navy bem claro, ornam com a paleta sem saltar como branco */
body.cliente-area .carta-bloco,
body.cliente-area .item-decisao {
    background: #dde7f1;
    border: 1px solid rgba(14, 44, 78, 0.14);
    border-radius: 16px;
    box-shadow:
        0 10px 32px -8px rgba(0, 0, 0, 0.35),
        0 4px 10px -2px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

body.cliente-area .item-decisao:hover {
    box-shadow:
        0 14px 40px -10px rgba(0, 0, 0, 0.45),
        0 6px 14px -2px rgba(0, 0, 0, 0.22);
    transform: translateY(-1px);
}

/* Mini-cards do topo da listagem mantém cores próprias mas ganha sombra */
body.cliente-area .resumo-card {
    box-shadow:
        0 10px 28px -8px rgba(0, 0, 0, 0.35),
        0 3px 8px -1px rgba(0, 0, 0, 0.18);
    border: 1px solid rgba(14, 44, 78, 0.08);
}

/* Toolbar de aprovação em lote — sombra mais profunda no fundo escuro */
body.cliente-area .lote-toolbar {
    box-shadow:
        0 14px 40px -8px rgba(0, 0, 0, 0.50),
        0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Inputs e textareas dentro dos cards — bordas em navy claro */
body.cliente-area .item-decisao-form textarea,
body.cliente-area .carta-bloco input[type="text"],
body.cliente-area .carta-bloco textarea {
    border-color: #cbd9e9;
    background: #ffffff;
    color: #0f172a;
}

/* Textarea da toolbar de aprovação em lote: o fundo da toolbar é navy
   escuro, então força fundo branco + texto escuro pro operador enxergar
   o que digita. */
body.cliente-area .lote-toolbar textarea {
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #cbd9e9;
}
body.cliente-area .lote-toolbar textarea::placeholder {
    color: #94a3b8;
}

/* Tabelas dentro do tema cliente: a tabela ganha fundo branco com
   linhas zebradas pra contrastar com o card claro do tema, e cada linha
   fica visualmente separada. */
body.cliente-area .tabela-usuarios {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(14, 44, 78, 0.08);
}
body.cliente-area .tabela-usuarios thead th {
    background: #f1f5f9;
    color: #475569;
    border-bottom: 2px solid #cbd5e1;
}
body.cliente-area .tabela-usuarios tbody td {
    color: #0f172a;
    background: #ffffff;
}
body.cliente-area .tabela-usuarios tbody tr:nth-child(even) td {
    background: #f8fafc;
}
body.cliente-area .tabela-usuarios tbody tr:hover td {
    background: #e0f2fe;
}
body.cliente-area .tabela-usuarios tbody td {
    border-bottom: 1px solid #e2e8f0;
}
body.cliente-area .tabela-usuarios tbody td strong {
    color: #0f172a;
}
body.cliente-area .tabela-usuarios tbody td .td-sub {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 0.15rem;
}
body.cliente-area .tabela-usuarios tbody td a {
    color: var(--af-green-dark, #1f7a3a);
    font-weight: 600;
    text-decoration: none;
}
body.cliente-area .tabela-usuarios tbody td a:hover {
    text-decoration: underline;
}

/* Vazio-bloco no tema cliente */
body.cliente-area .vazio-bloco {
    color: #475569;
    background: #ffffff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

/* Texto solto dentro de cards no tema cliente: o body é navy escuro
   (texto branco), mas dentro do card de fundo claro precisamos texto
   escuro. Forçamos cor escura nos elementos de texto comuns. */
body.cliente-area .carta-bloco {
    color: #0f172a;
}
body.cliente-area .carta-bloco h3,
body.cliente-area .carta-bloco h4,
body.cliente-area .carta-bloco strong,
body.cliente-area .carta-bloco label,
body.cliente-area .carta-bloco .info-valor {
    color: #0f172a;
}
body.cliente-area .carta-bloco p,
body.cliente-area .carta-bloco div,
body.cliente-area .carta-bloco span {
    color: inherit;
}
body.cliente-area .carta-bloco .info-label {
    color: #64748b;
}
body.cliente-area .carta-bloco .dica {
    color: #475569;
}

/* Filtros (select / botões) — clareados pra ficarem legíveis sobre o fundo */
body.cliente-area .filtro-inline label {
    color: rgba(255, 255, 255, 0.78);
}
body.cliente-area .filtro-inline select {
    background: #ffffff;
    border-color: #cbd9e9;
}
body.cliente-area h2 {
    color: #ffffff !important;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.04);
}

.topbar-inner {
    max-width: 1440px;
    margin: 0 auto;
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

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

.topbar-nav {
    display: flex;
    gap: 0.25rem;
    flex: 1;
    justify-content: center;
}

.topbar-nav a {
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 0.9rem;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
}

.topbar-nav a:hover {
    background: #f1f5f9;
    color: var(--af-navy);
}

.topbar-nav a.ativo {
    background: #dcfce7;
    color: var(--af-green-dark);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    text-align: right;
    line-height: 1.2;
}

.topbar-user-name {
    color: var(--af-navy);
    font-weight: 600;
    font-size: 0.95rem;
}

.topbar-user-role {
    color: #64748b;
    font-size: 0.8rem;
}

.topbar-logout {
    background: transparent;
    border: 1.5px solid #e2e8f0;
    color: var(--af-navy);
    padding: 0.45rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.88rem;
    transition: all 0.15s ease;
}

.topbar-logout:hover {
    border-color: var(--af-green-dark);
    color: var(--af-green-dark);
}

.painel-shell {
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

.container-wide {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
    padding-right: 2rem;
    padding-left: 2rem;
}

.painel-shell:has(.container-wide) {
    max-width: 100%;
}

.painel-welcome {
    background: linear-gradient(135deg, var(--af-navy) 0%, var(--af-navy-darker) 100%);
    color: #fff;
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.painel-welcome::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 184, 0, 0.25) 0%, transparent 70%);
    pointer-events: none;
}

.painel-kicker {
    display: inline-block;
    background: rgba(245, 184, 0, 0.15);
    color: var(--af-gold);
    padding: 0.3rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.painel-welcome h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    letter-spacing: -0.01em;
}

.painel-lead {
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
    font-size: 1.02rem;
    max-width: 640px;
    line-height: 1.55;
}

.painel-stat {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.06);
    border-left: 4px solid var(--af-green-dark);
    height: 100%;
}

.painel-stat-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.painel-stat-value {
    color: var(--af-navy);
    font-size: 1.2rem;
    font-weight: 700;
}

.painel-stat-small {
    font-size: 0.95rem;
    word-break: break-all;
}

.painel-stat-ok {
    color: var(--af-green-dark);
}

.painel-atalhos {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.atalho-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.06);
    border-left: 4px solid var(--af-green-dark);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.atalho-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(14, 44, 78, 0.12);
    text-decoration: none;
}

.atalho-icone {
    font-size: 2.2rem;
    line-height: 1;
}

.atalho-titulo {
    color: var(--af-navy);
    font-weight: 700;
    font-size: 1.05rem;
}

.atalho-desc {
    color: #64748b;
    font-size: 0.88rem;
    margin-top: 0.15rem;
}

.painel-next {
    margin-top: 2.5rem;
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.06);
}

/* ============================================================
   Frota — tabela de veículos
   ============================================================ */

.frota-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.frota-header h1 {
    color: var(--af-navy);
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0.35rem 0 0.4rem;
    letter-spacing: -0.01em;
}

.frota-search {
    display: flex;
    gap: 0.5rem;
}

.frota-search input {
    height: 44px;
    padding: 0 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    color: var(--af-text);
    min-width: 220px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.frota-search input:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

.frota-search button {
    height: 44px;
    padding: 0 1.25rem;
    background: var(--af-green-dark);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.frota-search button:hover {
    background: #186430;
}

.frota-tabela {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.06);
    margin-top: 1rem;
    border: 1px solid #eef2f7;
}

.frota-tabela table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.frota-tabela thead {
    background: #f8fafc;
}

.frota-tabela th {
    text-align: left;
    padding: 0.9rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
    white-space: nowrap;
}

.th-col {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.th-col > span {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.th-col select {
    height: 24px;
    max-width: 70px;
    padding: 0 1.4rem 0 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.72rem;
    background: #fff;
    color: #475569;
    cursor: pointer;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 500;
    transition: border-color 0.15s ease, background 0.15s ease,
                box-shadow 0.15s ease, color 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    background-size: 8px;
    text-overflow: ellipsis;
}

.th-col select:hover {
    border-color: #94a3b8;
    color: var(--af-navy);
}

.th-col select:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 2px rgba(31, 122, 58, 0.12);
}

.th-col select.ativo {
    background-color: #dcfce7;
    border-color: var(--af-green-dark);
    color: var(--af-navy);
    font-weight: 600;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%231F7A3A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.frota-tabela td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--af-text);
    vertical-align: middle;
}

.frota-tabela tbody tr:last-child td {
    border-bottom: none;
}

.frota-tabela tbody tr:hover {
    background: #f8fafc;
}

.frota-tabela td.placa {
    font-family: "SF Mono", Consolas, Menlo, monospace;
    font-weight: 700;
    color: var(--af-navy);
    letter-spacing: 0.04em;
}

.frota-tabela td.numerico {
    text-align: right;
    font-variant-numeric: tabular-nums;
    color: #475569;
}

.chip-cor {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    margin-left: 0.45rem;
}

.td-sub {
    color: #94a3b8;
    font-size: 0.82rem;
    margin-top: 0.15rem;
}

.td-descricao {
    max-width: 300px;
    color: #475569;
    font-size: 0.88rem;
}

.status-pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: #f1f5f9;
    color: #475569;
}

.status-pill.status-a {
    background: #dcfce7;
    color: #166534;
}

.status-pill.status-d {
    background: #fef3c7;
    color: #92400e;
}

.status-pill.status-v {
    background: #e0f2fe;
    color: #075985;
}

.classif-pill {
    display: inline-block;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* Cards da página índice de Configurações */
.config-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.config-card {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.4rem 1.5rem;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(14, 44, 78, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.config-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(14, 44, 78, 0.10);
    border-color: var(--af-navy, #0E2C4E);
}

.config-card-icone {
    font-size: 2.2rem;
    text-align: center;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 12px;
}

.config-card-conteudo h3 {
    margin: 0 0 0.35rem;
    color: var(--af-navy, #0E2C4E);
    font-size: 1.05rem;
}

.config-card-conteudo p {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.5;
}

.config-card-cta {
    color: var(--af-green, #16a34a);
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.status-pill.status-i {
    background: #fee2e2;
    color: #991b1b;
}

.frota-paginacao {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1rem;
    flex-wrap: wrap;
}

.frota-paginacao a {
    color: var(--af-green-dark);
    font-weight: 600;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.frota-paginacao a:hover {
    background: #dcfce7;
}

.frota-paginacao .disabled {
    color: #cbd5e1;
    padding: 0.5rem 1rem;
}

.ir-pagina {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-size: 0.92rem;
    background: #f8fafc;
    padding: 0.4rem 0.8rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.ir-pagina input[type="number"] {
    width: 72px;
    height: 34px;
    padding: 0 0.5rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--af-navy);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ir-pagina input[type="number"]:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

.ir-pagina button {
    height: 34px;
    padding: 0 0.9rem;
    background: var(--af-navy);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ir-pagina button:hover {
    background: var(--af-navy-darker);
}

.btn-limpar {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 1rem;
    color: #64748b;
    font-size: 0.9rem;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-limpar:hover {
    background: #f1f5f9;
    color: var(--af-navy);
    text-decoration: none;
}

.frota-vazio {
    background: #fff;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    color: #64748b;
    margin-top: 1rem;
}

/* Barra de busca por coluna (OS, Atendimentos, Fornecedores) */

.barra-busca {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.75rem 1rem;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.04);
    flex-wrap: wrap;
}

.barra-busca label {
    color: #475569;
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0;
}

.barra-busca select {
    height: 40px;
    padding: 0 2rem 0 0.8rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fff;
    color: var(--af-navy);
    font-weight: 500;
    cursor: pointer;
    min-width: 200px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.barra-busca select:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

.barra-busca input[type="text"] {
    flex: 1;
    min-width: 240px;
    height: 40px;
    padding: 0 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    color: var(--af-text);
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.barra-busca input[type="text"]:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

.barra-busca button {
    height: 40px;
    padding: 0 1.4rem;
    background: var(--af-green-dark);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.barra-busca button:hover {
    background: #186430;
}

.barra-busca .btn-limpar {
    height: 40px;
}

.barra-busca.oculta {
    display: none;
}

.frota-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-filtrar {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    height: 40px;
    padding: 0 1rem;
    background: #fff;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    color: var(--af-navy);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-filtrar::after {
    content: "▾";
    font-size: 0.7rem;
    opacity: 0.6;
}

.btn-filtrar:hover {
    border-color: var(--af-navy);
    background: #f8fafc;
}

.btn-filtrar.ativo,
.btn-filtrar.tem-filtro {
    background: #dcfce7;
    border-color: var(--af-green-dark);
    color: var(--af-green-dark);
}

.btn-filtrar.tem-filtro::before {
    content: "●";
    color: var(--af-green-dark);
    font-size: 0.6rem;
}

/* ============================================================
   Cartas de Avaria
   ============================================================ */

.container-narrow {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn-primario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 1.5rem;
    background: var(--af-green-dark);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 12px rgba(31, 122, 58, 0.22);
}

.btn-primario:hover {
    background: #186430;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(31, 122, 58, 0.3);
}

.btn-secundario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 1.2rem;
    background: #fff;
    color: var(--af-navy);
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-secundario:hover {
    border-color: var(--af-navy);
    background: #f8fafc;
    color: var(--af-navy);
    text-decoration: none;
}

.btn-secundario-full {
    width: 100%;
    height: 40px;
    background: #fff;
    color: var(--af-navy);
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-secundario-full:hover {
    border-color: var(--af-green-dark);
    background: #f0fdf4;
    color: var(--af-green-dark);
}

.btn-perigo {
    height: 40px;
    padding: 0 1.2rem;
    background: #fff;
    color: #b91c1c;
    border: 1.5px solid #fca5a5;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-perigo:hover {
    background: #fef2f2;
}

.btn-excluir {
    width: 26px;
    height: 26px;
    padding: 0;
    background: transparent;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    color: #b91c1c;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.15s ease;
}

.btn-excluir:hover {
    background: #fee2e2;
}

/* Formulário "nova carta" */
.form-carta {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.06);
}

.form-carta .campo {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
}

.form-carta label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--af-navy);
}

.form-carta input,
.form-carta select,
.form-carta textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #fff;
    color: var(--af-text);
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.form-carta input:focus,
.form-carta select:focus,
.form-carta textarea:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

.form-carta textarea {
    resize: vertical;
    min-height: 90px;
}

.form-carta small {
    color: #64748b;
    font-size: 0.82rem;
}

.form-carta small a {
    color: var(--af-green-dark);
    font-weight: 600;
}

.obrigatorio {
    color: #dc2626;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

/* Página de edição */

.carta-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.carta-cabecalho h1 {
    color: var(--af-navy);
    font-size: 1.9rem;
    margin: 0.3rem 0 0.75rem;
    font-weight: 700;
}

.painel-kicker-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.carta-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.carta-acoes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.carta-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 1100px) {
    .carta-grid {
        grid-template-columns: 1fr;
    }
}

.carta-bloco {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.06);
    margin-bottom: 1.25rem;
    border: 1px solid #eef2f7;
}

.carta-bloco h3 {
    color: var(--af-navy);
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1rem;
    letter-spacing: -0.005em;
}

.carta-bloco h4 {
    color: var(--af-navy);
    font-size: 0.95rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem;
}

.bloco-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.bloco-header h3 {
    margin: 0;
}

.total-itens {
    color: #64748b;
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
}

.carta-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.info-label {
    font-size: 0.73rem;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.25rem;
}

.info-valor {
    color: var(--af-text);
    font-size: 0.95rem;
    font-weight: 500;
}

.info-valor.placa {
    font-family: "SF Mono", Consolas, Menlo, monospace;
    font-weight: 700;
    color: var(--af-navy);
    letter-spacing: 0.04em;
}

.info-valor-longo {
    color: var(--af-text);
    font-size: 0.95rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

.form-inline-capa {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    align-items: end;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.form-inline-capa .campo {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-inline-capa .campo-wide {
    grid-column: 1 / -1;
}

.form-inline-capa .campo-acao {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

.form-inline-capa label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--af-navy);
}

.form-inline-capa input,
.form-inline-capa select,
.form-inline-capa textarea {
    padding: 0.55rem 0.8rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.92rem;
    background: #fff;
    font-family: inherit;
}

.form-inline-capa input:focus,
.form-inline-capa select:focus,
.form-inline-capa textarea:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

/* Tabela de itens dentro da carta */
.tabela-itens {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid #eef2f7;
}

.tabela-itens table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.tabela-itens thead {
    background: #f8fafc;
}

.tabela-itens th {
    text-align: left;
    padding: 0.75rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.tabela-itens td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: var(--af-text);
}

.tabela-itens tbody tr:last-child td {
    border-bottom: none;
}

.tabela-itens td.numerico {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Form de adicionar item */
.form-adicionar-item {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
}

.form-adicionar-item h4 {
    margin: 0 0 1rem;
}

.form-grid-itens {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.75rem;
    align-items: end;
}

.form-grid-itens .campo {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-grid-itens .campo-wide {
    grid-column: span 3;
}

.form-grid-itens .campo-check {
    grid-column: span 2;
    align-self: center;
}

.form-grid-itens .campo-acao {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin-top: 0.25rem;
}

.form-grid-itens label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--af-navy);
}

.form-grid-itens input,
.form-grid-itens select {
    padding: 0.5rem 0.7rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    background: #fff;
    color: var(--af-text);
}

.form-grid-itens input:focus,
.form-grid-itens select:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

.check-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #475569;
    cursor: pointer;
}

.check-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--af-green-dark);
    cursor: pointer;
}

.dica {
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .form-grid-itens {
        grid-template-columns: 1fr 1fr;
    }
    .form-grid-itens .campo-wide,
    .form-grid-itens .campo-check {
        grid-column: span 2;
    }
}

/* Anexos */
.lista-anexos {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lista-anexos li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #eef2f7;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.lista-anexos a {
    color: var(--af-navy);
    font-weight: 500;
    text-decoration: none;
    flex: 1;
}

.lista-anexos a:hover {
    color: var(--af-green-dark);
    text-decoration: underline;
}

.anexo-tamanho {
    color: #64748b;
    font-size: 0.82rem;
}

.form-upload {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.form-upload input[type="file"] {
    flex: 1;
    padding: 0.45rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
    background: #fff;
}

.vazio-bloco {
    padding: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.92rem;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #e2e8f0;
}

.bloco-destaque {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #86efac;
}

.totais-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.total-valor {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--af-navy);
    font-variant-numeric: tabular-nums;
}

.total-valor.total-destaque {
    color: var(--af-green-dark);
    font-size: 1.6rem;
}

/* Linha do tempo */
.linha-tempo {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
}

.linha-tempo li {
    padding: 0 0 1rem 1rem;
    border-left: 2px solid #e2e8f0;
    position: relative;
}

.linha-tempo li::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 4px;
    width: 8px;
    height: 8px;
    background: var(--af-green-dark);
    border-radius: 50%;
}

.linha-tempo li:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}

.linha-tempo-data {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.linha-tempo-conteudo strong {
    color: var(--af-navy);
    font-size: 0.92rem;
}

.subtitulo {
    margin-top: 1.5rem !important;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

/* Situação e status da carta */
.situacao-pill {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #475569;
}

.situacao-rascunho        { background: #f1f5f9; color: #475569; }
.situacao-enviada         { background: #dbeafe; color: #1e40af; }
.situacao-em_analise      { background: #fef3c7; color: #92400e; }
.situacao-aprovada        { background: #dcfce7; color: #166534; }
.situacao-reprovada       { background: #fee2e2; color: #991b1b; }
.situacao-parcial         { background: #fde4f0; color: #9f1239; }
.situacao-cancelada       { background: #e5e7eb; color: #4b5563; }

.situacao-item-pendente   { background: #fef3c7; color: #92400e; }
.situacao-item-aprovado   { background: #dcfce7; color: #166534; }
.situacao-item-reprovado  { background: #fee2e2; color: #991b1b; }
.situacao-item-reanalisar { background: #dbeafe; color: #1e40af; }

/* Status do veículo (13 status) */
.status-pill.status-ag_check_list,
.status-pill.status-ag_orcamentacao,
.status-pill.status-ag_aprovacao_cliente,
.status-pill.status-ag_pecas,
.status-pill.status-ag_pecas_fornecedor,
.status-pill.status-ag_previsao,
.status-pill.status-ag_verificacao,
.status-pill.status-ag_seguro,
.status-pill.status-ag_guincho { background: #fef3c7; color: #92400e; }

.status-pill.status-com_previsao,
.status-pill.status-pronto_ag_orcamento,
.status-pill.status-pronto_ag_retirada { background: #dbeafe; color: #1e40af; }

.status-pill.status-concluido { background: #dcfce7; color: #166534; }

/* Destaque do card principal no painel */
.atalho-destaque {
    border-left-color: var(--af-gold);
    background: linear-gradient(135deg, #fffbeb 0%, #fff 60%);
}

.atalho-destaque .atalho-titulo {
    color: var(--af-navy);
}

/* Botão editar item (lápis) */
.td-acoes {
    display: flex;
    gap: 0.35rem;
    align-items: center;
}

.btn-acao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: var(--af-navy);
    text-decoration: none;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-acao:hover {
    background: #dcfce7;
    border-color: var(--af-green-dark);
    color: var(--af-green-dark);
    text-decoration: none;
}

.linha-editando {
    background: #fef9c3 !important;
    border-left: 3px solid var(--af-gold);
}

/* Form em modo edição */
.form-em-edicao {
    background: #fffbeb;
    border-color: var(--af-gold);
}

.form-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.form-header-row h4 {
    margin: 0;
}

.link-cancelar-edicao {
    color: #b45309;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.link-cancelar-edicao:hover {
    text-decoration: underline;
}

.campo label small {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.75rem;
}

.dica-input {
    color: #64748b;
    font-size: 0.78rem;
    margin-top: 0.2rem;
    display: block;
}

.info-box {
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    color: #166534;
    font-size: 0.9rem;
    line-height: 1.5;
}

.info-box strong {
    color: var(--af-green-dark);
}

.info-box ol {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
}

.info-box li {
    margin-bottom: 0.35rem;
}

.link-carta {
    color: var(--af-navy);
    text-decoration: none;
    font-weight: 700;
    font-family: "SF Mono", Consolas, Menlo, monospace;
    letter-spacing: 0.04em;
}

.link-carta:hover {
    color: var(--af-green-dark);
    text-decoration: underline;
}

.painel-next h3 {
    color: var(--af-navy);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.painel-next ul {
    margin: 0;
    padding-left: 1.2rem;
    color: #475569;
    line-height: 1.8;
}

/* ============================================================
   Portal do Cliente — tela de decisão item a item
   ============================================================ */

/* Toolbar de decisão em lote */
.lote-toolbar {
    background: linear-gradient(135deg, #0E2C4E 0%, #081A30 100%);
    color: #fff;
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    box-shadow: 0 4px 14px rgba(14, 44, 78, 0.15);
}

.lote-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lote-check-todos {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
}

.lote-check-todos input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--af-gold);
    cursor: pointer;
}

.lote-contador {
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    font-weight: 500;
}

.lote-toolbar textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1.5px solid rgba(255,255,255,0.22);
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-radius: 8px;
    font-size: 0.86rem;
    resize: vertical;
    min-height: 42px;
    font-family: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.lote-toolbar textarea::placeholder {
    color: rgba(255,255,255,0.55);
}

.lote-toolbar textarea:focus {
    outline: none;
    border-color: var(--af-gold);
    background: rgba(255,255,255,0.12);
}

.lote-botoes {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Botões dentro da toolbar de lote são mais compactos que os de cada item */
.lote-botoes .btn-aprovar,
.lote-botoes .btn-reprovar,
.lote-botoes .btn-reanalisar {
    height: 32px;
    padding: 0 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: none;
}

.lote-botoes .btn-aprovar:hover,
.lote-botoes .btn-reprovar:hover,
.lote-botoes .btn-reanalisar:hover {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
    transform: none;
}

.item-checkbox {
    display: flex;
    align-items: center;
    padding-right: 0.25rem;
    cursor: pointer;
    flex-shrink: 0;
}

.item-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--af-green-dark);
    cursor: pointer;
    margin-top: 0.2rem;
}

.item-decisao {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    margin-bottom: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.item-decisao:hover {
    box-shadow: 0 4px 14px rgba(14, 44, 78, 0.06);
}

.item-decisao-pendente   { border-left: 4px solid #f59e0b; }
.item-decisao-aprovado   { border-left: 4px solid var(--af-green-dark); background: linear-gradient(90deg, #f0fdf4 0%, #fff 40%); }
.item-decisao-reprovado  { border-left: 4px solid #dc2626; background: linear-gradient(90deg, #fef2f2 0%, #fff 40%); }
.item-decisao-reanalisar { border-left: 4px solid #2563eb; background: linear-gradient(90deg, #eff6ff 0%, #fff 40%); }

.item-decisao-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.item-status-wrap {
    margin-left: auto;
}

.item-titulo-bloco {
    flex: 1;
    min-width: 0;
}

.item-descricao {
    color: var(--af-navy);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.item-info-extra {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: 1.5px solid #cbd5e1;
    border-radius: 50%;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: help;
    transition: all 0.15s ease;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.item-info-extra:hover,
.item-info-extra:focus {
    border-color: var(--af-navy);
    color: var(--af-navy);
    background: #f1f5f9;
}

.item-info-tooltip {
    display: none;
    position: absolute;
    left: calc(100% + 0.5rem);
    top: 50%;
    transform: translateY(-50%);
    background: var(--af-navy);
    color: #fff;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    min-width: 300px;
    max-width: 360px;
    z-index: 50;
    box-shadow: 0 14px 36px rgba(14, 44, 78, 0.35);
    font-size: 0.88rem;
    line-height: 1.5;
    text-align: left;
    font-weight: 400;
    letter-spacing: 0;
}

.item-info-extra:hover .item-info-tooltip,
.item-info-extra:focus .item-info-tooltip {
    display: block;
}

.item-info-tooltip::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--af-navy);
}

.item-info-tooltip h5 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--af-gold);
    margin: 0 0 0.75rem;
    font-weight: 700;
}

.item-info-tooltip dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 1rem;
}

.item-info-tooltip dt {
    color: rgba(255,255,255,0.72);
    font-size: 0.82rem;
    font-weight: 500;
}

.item-info-tooltip dd {
    margin: 0;
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    font-size: 0.88rem;
}

.item-info-tooltip .info-qtd {
    color: rgba(255,255,255,0.55);
    font-weight: 500;
    font-size: 0.78rem;
    margin-left: 0.25rem;
}

@media (max-width: 900px) {
    .item-info-tooltip {
        left: auto;
        right: 0;
        top: calc(100% + 8px);
        transform: none;
    }
    .item-info-tooltip::before {
        left: auto;
        right: 8px;
        top: -6px;
        transform: rotate(45deg);
    }
}

.item-marca {
    color: #64748b;
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.item-status-wrap {
    flex-shrink: 0;
    margin-left: auto;
}

.item-valores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.85rem 1.5rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
}

.item-valor {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--af-navy);
    font-variant-numeric: tabular-nums;
}

.item-valor-destaque {
    color: var(--af-green-dark);
    font-size: 1.22rem;
}

.item-valor-secundario {
    color: #64748b;
    font-weight: 600;
    font-size: 0.98rem;
}

.item-valor-small {
    color: #475569;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

/* Linha pequena com o valor unitário, abaixo do total (quando qtd > 1) */
.item-valor-unit {
    color: #94a3b8;
    font-size: 0.78rem;
    font-weight: 500;
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
}

.cliente-area .item-valor-unit {
    color: rgba(255, 255, 255, 0.55);
}

.item-decisoes-log {
    background: #f8fafc;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    font-size: 0.88rem;
}

.item-decisao-linha {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.item-decisao-linha strong {
    color: var(--af-navy);
}

.item-decisao-sub {
    color: #94a3b8;
    font-size: 0.82rem;
}

.item-decisao-coment {
    width: 100%;
    color: #475569;
    font-style: italic;
    font-size: 0.88rem;
    margin-top: 0.2rem;
    padding-left: 0.3rem;
    border-left: 2px solid #cbd5e1;
    padding-left: 0.75rem;
}

.item-decisao-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.item-decisao-form textarea {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    background: #fff;
    color: var(--af-text);
    resize: vertical;
    min-height: 58px;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.item-decisao-form textarea:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.08);
}

.item-decisao-contexto {
    padding: 0.65rem 0.9rem;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: #92400e;
    font-size: 0.88rem;
    line-height: 1.45;
}

.item-decisao-contexto strong {
    color: #78350f;
}

.item-decisao-botoes {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.btn-aprovar,
.btn-reprovar,
.btn-reanalisar {
    height: 42px;
    padding: 0 1.25rem;
    border: 1.5px solid transparent;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.btn-aprovar {
    background: var(--af-green-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(31, 122, 58, 0.22);
}

.btn-aprovar:hover {
    background: #186430;
    box-shadow: 0 8px 20px rgba(31, 122, 58, 0.3);
    transform: translateY(-1px);
}

.btn-reprovar {
    background: #fff;
    color: #b91c1c;
    border-color: #fca5a5;
}

.btn-reprovar:hover {
    background: #fef2f2;
    border-color: #b91c1c;
}

.btn-reanalisar {
    background: #fff;
    color: #1e40af;
    border-color: #93c5fd;
}

.btn-reanalisar:hover {
    background: #eff6ff;
    border-color: #1e40af;
}

.item-aviso {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    color: #64748b;
    font-size: 0.88rem;
}

@media (max-width: 700px) {
    .item-decisao-botoes {
        flex-direction: column;
    }
    .btn-aprovar, .btn-reprovar, .btn-reanalisar {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   Portal do Cliente — mini resumo e filtros
   ============================================================ */

.resumo-cliente {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.resumo-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.06);
    border-left: 4px solid var(--af-green-dark);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.resumo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(14, 44, 78, 0.1);
}

.resumo-amarelo { border-left-color: #f59e0b; background: linear-gradient(135deg, #fffbeb 0%, #fff 60%); }
.resumo-verde   { border-left-color: var(--af-green-dark); background: linear-gradient(135deg, #f0fdf4 0%, #fff 60%); }
.resumo-navy    { border-left-color: var(--af-navy); background: linear-gradient(135deg, #eff6ff 0%, #fff 60%); }
.resumo-ouro    { border-left-color: var(--af-gold); background: linear-gradient(135deg, #fff7ed 0%, #fff 60%); }

.resumo-icone {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.resumo-valor {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--af-navy);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}

.resumo-label {
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 0.2rem;
    letter-spacing: 0.01em;
}

.resumo-cta-wrap {
    margin-top: 1rem;
}

.resumo-cta {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: #475569;
    font-size: 0.88rem;
    margin: 0;
}

.resumo-cta strong {
    color: var(--af-navy);
}

.filtro-inline {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.filtro-inline label {
    font-size: 0.88rem;
    color: #475569;
    font-weight: 600;
    margin: 0;
}

.filtro-inline select {
    height: 38px;
    padding: 0 2rem 0 0.8rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #fff;
    color: var(--af-navy);
    font-weight: 500;
    cursor: pointer;
    min-width: 170px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6' fill='none'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filtro-inline select:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.1);
}

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

    .auth-brand {
        padding: 2.5rem 2rem;
        min-height: auto;
    }

    .auth-tagline {
        font-size: 1.6rem;
        margin-bottom: 1.25rem;
    }

    .auth-logo {
        width: 200px;
        padding: 0.15rem 0.25rem;
        margin-bottom: 1.75rem;
    }

    .auth-highlights {
        display: none;
    }

    .auth-brand-footer {
        display: none;
    }

    .auth-panel {
        padding: 2rem 1.25rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }
}


/* ============================================================
   Botão "lápis" minimalista — usado pra editar campos inline
   ============================================================ */

.btn-lapis {
    background: transparent;
    border: 1px solid transparent;
    color: #64748b;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    line-height: 1;
    transition: all 0.15s ease;
    padding: 0;
}

.btn-lapis:hover {
    background: rgba(31, 122, 58, 0.10);
    border-color: rgba(31, 122, 58, 0.20);
    color: var(--af-green-dark);
}

/* No portal do cliente (fundo navy escuro) o lápis precisa contraste claro */
body.cliente-area .btn-lapis {
    color: rgba(255, 255, 255, 0.65);
}
body.cliente-area .btn-lapis:hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

/* Linhas do "Dados da carta" que tem ação inline (lápis) */
.info-valor-com-acao {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-valor-vazio {
    color: #94a3b8;
    font-style: italic;
    font-weight: 400;
}

/* Wrapper que junta a pill de status do veículo + botão lápis */
.status-veiculo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}


/* ============================================================
   Tela de configuração de clientes (admin)
   ============================================================ */

.config-toggle {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 0.6rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
    align-items: flex-start;
}

.config-toggle:hover {
    border-color: var(--af-green-dark);
    background: #f8fafc;
}

.config-toggle input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--af-green-dark);
    cursor: pointer;
    flex-shrink: 0;
}

.config-toggle-conteudo strong {
    display: block;
    color: var(--af-navy);
    font-size: 0.96rem;
    margin-bottom: 0.2rem;
}

.config-toggle-conteudo p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.45;
}

.tabela-usuarios {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.tabela-usuarios thead th {
    background: #f8fafc;
    color: #64748b;
    text-align: left;
    padding: 0.6rem 0.75rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    border-bottom: 1px solid #e2e8f0;
}

.tabela-usuarios tbody td {
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid #f1f5f9;
}

.tabela-usuarios tbody tr:last-child td {
    border-bottom: 0;
}

.tabela-usuarios tr.usuario-desativado {
    opacity: 0.55;
}

.form-novo-usuario .form-grid-itens {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    align-items: end;
}

.form-novo-usuario .campo-acao {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
}

@media (max-width: 700px) {
    .form-novo-usuario .form-grid-itens {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   Avisos da Agro Frotas no item (cliente vê após edição/reenvio)
   ============================================================ */

.aviso-agro-frotas {
    background: #eff6ff;
    border-left: 4px solid #1e40af;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin: 0.75rem 0;
}

.aviso-agro-frotas-titulo {
    color: #1e3a8a;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 0.4rem;
}

.aviso-agro-frotas-coment {
    color: #1e40af;
    font-style: italic;
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

.aviso-agro-frotas-meta {
    color: #64748b;
    font-size: 0.78rem;
}

.aviso-agro-frotas-versoes {
    margin-top: 0.6rem;
}

.aviso-agro-frotas-versoes summary {
    color: #1e40af;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
}

.versao-anterior {
    background: #fff;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #475569;
    border: 1px solid #dbeafe;
}

.versao-anterior strong {
    color: #1e3a8a;
}

.versao-data {
    color: #94a3b8;
    font-size: 0.78rem;
}

.versao-anterior ul {
    margin: 0.3rem 0 0;
    padding-left: 1.25rem;
}

.aviso-nao-realizado {
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin: 0.75rem 0;
    color: #7f1d1d;
}

.aviso-nao-realizado strong {
    font-size: 0.95rem;
}

.aviso-meta {
    color: #991b1b;
    font-size: 0.82rem;
    margin-top: 0.3rem;
}

.aviso-coment {
    margin-top: 0.3rem;
    font-style: italic;
}


/* ============================================================
   Botões de ação pós-cliente (item reprovado/reanálise)
   ============================================================ */

.acoes-pos-cliente {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.btn-acao-pos {
    background: #fff;
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-acao-pos:hover {
    border-color: var(--af-green-dark);
    color: var(--af-green-dark);
    background: #f0fdf4;
}

.btn-acao-pos.btn-acao-perigo:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

/* ============================================================
   Tabela dentro do modal de alerta (cobrança > fornecedor)
   ============================================================ */

.alerta-itens-tabela {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
    font-size: 0.88rem;
}

.alerta-itens-tabela thead th {
    background: #fff7ed;
    color: #92400e;
    font-weight: 700;
    text-align: left;
    padding: 0.55rem 0.7rem;
    border-bottom: 2px solid #fed7aa;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.alerta-itens-tabela td {
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.alerta-itens-tabela tr:last-child td {
    border-bottom: 0;
}

.alerta-itens-tabela td.numerico {
    text-align: right;
    white-space: nowrap;
}


/* ============================================================
   Modal de edição (<dialog> nativo)
   ============================================================ */

.dlg-edicao {
    border: 0;
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 25px 60px rgba(14, 44, 78, 0.25);
    max-width: 720px;
    width: calc(100% - 2rem);
    background: #fff;
    color: #1e293b;
}

.dlg-edicao::backdrop {
    background: rgba(14, 44, 78, 0.55);
    backdrop-filter: blur(2px);
}

.dlg-form {
    margin: 0;
}

.dlg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 16px 16px 0 0;
}

.dlg-header h2 {
    margin: 0;
    color: var(--af-navy);
    font-size: 1.15rem;
    font-weight: 700;
}

.dlg-fechar {
    background: transparent;
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.dlg-fechar:hover {
    background: #f1f5f9;
    color: var(--af-navy);
}

.dlg-corpo {
    padding: 1.5rem;
    max-height: 70vh;
    overflow-y: auto;
}

.dlg-aviso-cliente {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: #78350f;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.dlg-aviso-cliente:empty {
    display: none;
}

.dlg-aviso-coment {
    margin-top: 4px;
    color: #92400e;
    font-style: italic;
}

.dlg-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.dlg-campo {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.dlg-campo-largo {
    grid-column: 1 / -1;
}

.dlg-campo span {
    font-size: 0.82rem;
    color: #475569;
    font-weight: 600;
}

.dlg-campo input,
.dlg-campo textarea {
    padding: 0.55rem 0.8rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.93rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.dlg-campo input:focus,
.dlg-campo textarea:focus {
    outline: none;
    border-color: var(--af-green-dark);
    box-shadow: 0 0 0 3px rgba(31, 122, 58, 0.15);
}

.dlg-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 16px 16px;
}

.btn-perigo {
    background: #dc2626;
    color: #fff;
    border: 1.5px solid #dc2626;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-perigo:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}

@media (max-width: 600px) {
    .dlg-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Sininho de notificações (topbar interna)
   ============================================================ */

.sino-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.sino-botao {
    background: transparent;
    border: 1.5px solid #e2e8f0;
    color: var(--af-navy);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.sino-botao:hover {
    border-color: var(--af-green-dark);
    color: var(--af-green-dark);
    background: #f8fafc;
}

.sino-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #dc2626;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 0 0 2px #fff;
}

.sino-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 380px;
    max-width: calc(100vw - 2rem);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(14, 44, 78, 0.14);
    overflow: hidden;
    z-index: 50;
    display: flex;
    flex-direction: column;
    max-height: 480px;
}

.sino-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f1f5f9;
}

.sino-header strong {
    color: var(--af-navy);
    font-size: 0.95rem;
}

.sino-acao-link {
    background: transparent;
    border: 0;
    color: var(--af-green-dark);
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.sino-acao-link:hover {
    background: #f0fdf4;
}

.sino-lista {
    flex: 1;
    overflow-y: auto;
    padding: 0.4rem 0;
}

.sino-vazio {
    color: #64748b;
    text-align: center;
    padding: 2rem 1rem;
    margin: 0;
    font-size: 0.9rem;
}

.sino-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s ease;
}

.sino-item:hover {
    background: #f8fafc;
}

.sino-item:last-child {
    border-bottom: 0;
}

.sino-item-icone {
    font-size: 1.1rem;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
}

.sino-item-corpo {
    flex: 1;
    min-width: 0;
}

.sino-item-titulo {
    font-size: 0.88rem;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.sino-item-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 500;
}

.sino-footer {
    padding: 0.7rem;
    border-top: 1px solid #f1f5f9;
    text-align: center;
}

.sino-footer a {
    color: var(--af-green-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
}

.sino-footer a:hover {
    text-decoration: underline;
}

/* Quando o sininho está dentro da topbar do cliente (que tem fundo navy escuro) */
body.cliente-area .sino-botao {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.85);
}

body.cliente-area .sino-botao:hover {
    border-color: #86efac;
    color: #86efac;
    background: rgba(255, 255, 255, 0.08);
}

body.cliente-area .sino-badge {
    box-shadow: 0 0 0 2px #0E2C4E;
}

/* ============================================================
   Página de histórico de notificações
   ============================================================ */

.notif-pagina {
    max-width: 760px;
    margin: 0 auto;
}

.notif-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.notif-filtros {
    display: flex;
    gap: 0.4rem;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
}

.notif-filtro-link {
    padding: 0.45rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.15s ease;
}

.notif-filtro-link.ativo {
    background: #fff;
    color: var(--af-navy);
    box-shadow: 0 1px 3px rgba(14, 44, 78, 0.08);
}

.notif-card {
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.6rem;
    display: flex;
    gap: 0.85rem;
    transition: border-color 0.15s ease;
}

.notif-card:hover {
    border-color: #cbd5e1;
}

.notif-card.nao-lida {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.notif-card-icone {
    width: 38px;
    height: 38px;
    background: #f1f5f9;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.notif-card-corpo {
    flex: 1;
}

.notif-card-mensagem {
    color: #1e293b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.notif-card-mensagem a {
    color: var(--af-navy);
    font-weight: 600;
    text-decoration: none;
}

.notif-card-mensagem a:hover {
    text-decoration: underline;
}

.notif-card-meta {
    color: #94a3b8;
    font-size: 0.78rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

.notif-vazio {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 3rem 1rem;
    text-align: center;
    color: #64748b;
}

.notif-paginacao {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.notif-paginacao a,
.notif-paginacao span {
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    text-decoration: none;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
}

.notif-paginacao a:hover {
    border-color: var(--af-green-dark);
    color: var(--af-green-dark);
}

.notif-paginacao .ativa {
    background: var(--af-green-dark);
    color: #fff;
    border-color: var(--af-green-dark);
}

/* ============================================================
   Dashboard do Cliente (cliente-area .dash-*)
   ============================================================ */

.cliente-area .dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.cliente-area .dash-header h1 {
    color: #fff;
    margin: 0.5rem 0 0;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.cliente-area .dash-subtitulo {
    color: rgba(255, 255, 255, 0.78);
    margin: 0.4rem 0 0;
    font-size: 0.95rem;
}

.cliente-area .dash-filtros {
    display: flex;
    align-items: flex-end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.cliente-area .dash-filtro-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.cliente-area .dash-filtros label {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cliente-area .dash-filtros select {
    background: #ffffff;
    border: 1px solid #cbd9e9;
    color: #0f172a;
    padding: 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 170px;
    max-width: 240px;
}

.cliente-area .dash-periodo-info {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    margin: 0 0 1rem;
}

.cliente-area .dash-alerta-info {
    background: rgba(245, 158, 11, 0.12);
    border-left: 4px solid #f59e0b;
    color: #fef3c7;
    padding: 0.85rem 1.1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    line-height: 1.45;
    margin: 0 0 1.4rem;
}
.cliente-area .dash-alerta-info strong { color: #ffffff; }

/* ---- Cards principais ---- */
.cliente-area .dash-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}

.cliente-area .dash-card {
    background: #dde7f1;
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-left: 5px solid var(--af-navy);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cliente-area .dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.cliente-area .dash-card-navy { border-left-color: var(--af-navy); }
.cliente-area .dash-card-verde { border-left-color: var(--af-green-dark); }
.cliente-area .dash-card-ouro { border-left-color: var(--af-gold); }
.cliente-area .dash-card-amarelo { border-left-color: #f59e0b; }

.cliente-area .dash-card-icone {
    font-size: 2.2rem;
    line-height: 1;
}

.cliente-area .dash-card-conteudo {
    flex: 1;
    min-width: 0;
}

.cliente-area .dash-card-valor {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--af-navy);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 0.2rem;
}

.cliente-area .dash-card-label {
    color: #475569;
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cliente-area .dash-card-delta {
    font-size: 0.82rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}

.cliente-area .delta-alta {
    background: #fee2e2;
    color: #b91c1c;
}

.cliente-area .delta-baixa {
    background: #dcfce7;
    color: #166534;
}

.cliente-area .delta-neutro {
    background: #f1f5f9;
    color: #64748b;
}

/* ---- Card destaque (interpretação) ---- */
.cliente-area .dash-destaque {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    padding: 1.1rem 1.4rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    color: #f8fafc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cliente-area .dash-destaque strong {
    color: #ffffff;
}

.cliente-area .dash-destaque-icone {
    font-size: 2rem;
    line-height: 1;
}

/* ---- Bloco de gráfico/tabela ---- */
.cliente-area .dash-bloco {
    background: #dde7f1;
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.cliente-area .dash-bloco-titulo {
    color: var(--af-navy) !important;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.cliente-area .dash-chart-wrap {
    background: #ffffff;
    border-radius: 12px;
    padding: 1rem;
    height: 320px;          /* altura fixa exigida pelo Chart.js maintainAspectRatio:false */
    position: relative;
}

/* Bloco de itens (combo bar+line) precisa ser mais alto pra caber labels rotacionadas */
.cliente-area #grafico-itens {
    height: 100% !important;
    width: 100% !important;
}

.cliente-area .dash-bloco:has(#grafico-itens) .dash-chart-wrap {
    height: 420px;
}

/* ---- Grid de 2 pizzas lado a lado ---- */
.cliente-area .dash-grid-pizzas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.cliente-area .dash-grid-pizzas .dash-chart-wrap {
    height: 420px;
    margin: 0;
}

/* ---- Tabela top placas ---- */
.cliente-area .dash-tabela {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
}

.cliente-area .dash-tabela th {
    background: var(--af-navy);
    color: #ffffff;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cliente-area .dash-tabela td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 0.92rem;
}

.cliente-area .dash-tabela tr:last-child td {
    border-bottom: none;
}

.cliente-area .dash-tabela tr:hover td {
    background: #f8fafc;
}

.cliente-area .dash-placa-pill {
    background: var(--af-navy);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 6px;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.cliente-area .dash-placa-acao {
    color: #64748b;
    font-size: 0.85rem;
    cursor: not-allowed;
    font-style: italic;
}
.cliente-area .dash-placa-link {
    color: var(--af-green-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    background: #dcfce7;
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}
.cliente-area .dash-placa-link:hover {
    background: #bbf7d0;
    color: #14532d;
}

.cliente-area .dash-nota {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0.8rem 0 0;
    font-style: italic;
}

.cliente-area .dash-rodape {
    color: rgba(255, 255, 255, 0.65);
    text-align: center;
    margin-top: 2rem;
}

/* Tooltip ajuda inline (?) ao lado de labels da tabela */
.cliente-area .dash-help {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    margin-left: 0.3rem;
    transition: background 0.15s;
}
.cliente-area .dash-help:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* Wrapper de cada filtro: contém o input/select + botão limpar (✕) sobreposto */
.cliente-area .dash-filtro-input {
    position: relative;
    display: flex;
    align-items: center;
}

.cliente-area .dash-filtro-input select,
.cliente-area .dash-filtro-input input[type="text"],
.cliente-area .dash-filtro-input input[type="month"] {
    background: #ffffff;
    border: 1px solid #cbd9e9;
    color: #0f172a;
    padding: 0.5rem 1.9rem 0.5rem 0.85rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    min-width: 170px;
    max-width: 240px;
    width: 100%;
    box-sizing: border-box;
}

.cliente-area .dash-filtro-input input[type="text"] {
    text-transform: uppercase;
}

.cliente-area .dash-limpar {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.15s, color 0.15s;
}

.cliente-area .dash-limpar:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* ======================================================
   Tela de Custeio por Componente
   ====================================================== */
.cliente-area .custeio-nav {
    margin-bottom: 1rem;
}
.cliente-area .custeio-nav-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.95rem;
    border-radius: 8px;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s;
}
.cliente-area .custeio-nav-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.cliente-area .custeio-tabela td.custeio-componente {
    font-weight: 600;
    color: var(--af-navy);
}
.cliente-area .custeio-tag-cat {
    display: inline-block;
    background: #e0e7ef;
    color: var(--af-navy);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 6px;
    letter-spacing: 0.04em;
}
.cliente-area .custeio-link-placa {
    color: var(--af-navy);
    text-decoration: underline;
    font-weight: 600;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 0.85rem;
}
.cliente-area .custeio-link-placa:hover {
    color: var(--af-green-dark);
}
.cliente-area .custeio-btn-expandir {
    background: var(--af-navy);
    color: #ffffff;
    border: 0;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    cursor: pointer;
    font-weight: 600;
}
.cliente-area .custeio-btn-expandir:hover {
    background: #1e3a5f;
}
.cliente-area .custeio-historico {
    background: #f1f5f9;
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin: 0.4rem 0;
}
.cliente-area .custeio-historico > strong {
    color: var(--af-navy);
    font-size: 0.92rem;
    display: block;
    margin-bottom: 0.55rem;
}
.cliente-area .custeio-historico-tabela {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 6px;
    overflow: hidden;
    font-size: 0.85rem;
}
.cliente-area .custeio-historico-tabela th {
    background: #cbd9e9;
    color: var(--af-navy);
    text-align: left;
    padding: 0.45rem 0.7rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.cliente-area .custeio-historico-tabela td {
    padding: 0.45rem 0.7rem;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
}
.cliente-area .custeio-historico-tabela tr:last-child td { border-bottom: none; }
