:root {
  --navy: #0a2842;
  --navy-2: #123e62;
  --blue: #176fc9;
  --blue-soft: #e9f4ff;
  --green: #11855b;
  --green-soft: #e5f8ee;
  --amber: #b97000;
  --amber-soft: #fff3d5;
  --red: #ba3a32;
  --red-soft: #fff0ee;
  --ink: #142235;
  --muted: #647386;
  --line: #dce5ee;
  --surface: #ffffff;
  --canvas: #f5f8fc;
  --radius: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; }
.login-aside { background: radial-gradient(circle at 28% 18%, #1d6fae 0, transparent 34%), linear-gradient(145deg, #061a2d, #123c60); color: white; padding: clamp(36px, 7vw, 92px); display: flex; flex-direction: column; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; background: #39c58b; color: #073324; display: grid; place-items: center; font-size: 21px; }
.login-aside h1 { max-width: 610px; margin: 56px 0 17px; font-size: clamp(36px, 4.2vw, 61px); line-height: 1.03; letter-spacing: -.055em; }
.login-aside p { max-width: 540px; color: #c1d8e9; line-height: 1.65; font-size: 17px; }
.route-line { display: flex; align-items: center; gap: 12px; margin-top: 31px; color: #dceaf4; font-weight: 700; }
.route-line span:nth-child(2) { height: 1px; background: #4c9fd8; width: 90px; position: relative; }
.route-line span:nth-child(2)::after { content: ""; position: absolute; right: 0; top: -4px; border-left: 7px solid #4c9fd8; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.login-footer { color: #84a4bb; font-size: 13px; }
.login-panel { display: flex; justify-content: center; align-items: center; padding: 28px; background: white; }
.login-card { width: min(410px, 100%); }
.eyebrow { color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
h2 { margin: 7px 0 7px; font-size: 31px; letter-spacing: -.04em; }
.subtle { color: var(--muted); line-height: 1.5; margin: 0 0 26px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { color: #425167; font-size: 13px; font-weight: 750; }
input, select, textarea { border: 1px solid #cad7e2; border-radius: 10px; padding: 12px 13px; width: 100%; color: var(--ink); background: #fff; outline: none; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px #dcebfa; }
textarea { min-height: 86px; resize: vertical; }
.button { border: 0; background: var(--blue); color: #fff; border-radius: 10px; padding: 12px 15px; font-weight: 750; transition: .2s; }
.button:hover { background: #0d5ba8; transform: translateY(-1px); }
.button.secondary { background: #eef4f8; color: #1d3853; }
.button.secondary:hover { background: #dde9f2; }
.button.success { background: var(--green); }
.button.danger { background: var(--red); }
.button.full { width: 100%; }
.demo-box { margin-top: 25px; border: 1px solid #d7e3ec; border-radius: 12px; background: #f7fafc; padding: 15px; color: #4c5e72; font-size: 13px; line-height: 1.55; }
.demo-box strong { color: var(--ink); }

.shell { min-height: 100vh; display: grid; grid-template-columns: 244px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: radial-gradient(circle at 20% 0%, #174f76 0, transparent 31%), linear-gradient(170deg, #0b2943, #081e34); padding: 23px 15px; color: white; display: flex; flex-direction: column; }
.sidebar .brand { padding: 0 9px; }
.nav { display: grid; gap: 5px; margin-top: 44px; }
.nav button { border: 0; background: transparent; color: #aec8da; display: flex; gap: 12px; align-items: center; padding: 12px 13px; border-radius: 11px; text-align: left; font-weight: 700; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav button:hover { color: white; background: rgba(255,255,255,.07); transform: translateX(2px); }
.nav button.active { color: white; background: linear-gradient(90deg, #1d628f, #185276); box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.nav-icon { width: 20px; text-align: center; }
.account { margin-top: auto; padding: 15px 9px 3px; border-top: 1px solid #28516f; display: flex; align-items: center; gap: 10px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; background: #3bbf8a; color: #073324; display: grid; place-items: center; font-size: 13px; font-weight: 850; }
.account-name { font-size: 13px; font-weight: 750; color: #fff; }
.account-role { font-size: 11px; color: #9dbdd2; margin-top: 2px; text-transform: capitalize; }
.logout { color: #a9c1d3; background: transparent; border: 0; margin-left: auto; font-size: 17px; }
.main { min-width: 0; }
.topbar { min-height: 79px; background: rgba(255,255,255,.88); border-bottom: 1px solid #dce6ef; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(22px, 4vw, 52px); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(14px); }
.topbar small { color: var(--muted); }
.topbar strong { display: block; margin-top: 2px; font-size: 15px; }
.content { max-width: 1480px; margin: 0 auto; padding: clamp(23px, 4vw, 43px) clamp(22px, 4vw, 52px) 54px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 29px; }
.page-heading h1 { margin: 5px 0 7px; font-size: clamp(28px, 3vw, 39px); letter-spacing: -.045em; }
.page-heading p { color: var(--muted); margin: 0; }
.section-title { margin: 33px 0 15px; font-size: 17px; letter-spacing: -.015em; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; }
.result-stats { grid-template-columns: repeat(3, minmax(0,1fr)); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; min-height: 133px; }
.stat .stat-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--blue); }
.stat:nth-child(2) .stat-icon { background: var(--amber-soft); color: var(--amber); }
.stat:nth-child(3) .stat-icon { background: var(--green-soft); color: var(--green); }
.stat:nth-child(4) .stat-icon { background: #f1ebff; color: #744dc5; }
.stat-label { color: var(--muted); font-size: 12px; font-weight: 700; margin-top: 14px; }
.stat-value { font-size: 25px; font-weight: 820; margin-top: 2px; letter-spacing: -.04em; }
.monthly-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(25px, 4vw, 39px); border-radius: 24px; color: #fff; background: radial-gradient(circle at 85% 10%, rgba(62,189,141,.39), transparent 26%), radial-gradient(circle at 63% 118%, rgba(27,115,207,.48), transparent 42%), linear-gradient(112deg, #092a48, #123f63); box-shadow: 0 18px 42px rgba(20,58,90,.14); }
.monthly-hero::after { content: ""; position: absolute; width: 280px; height: 280px; right: 24%; top: -210px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.monthly-hero-copy, .monthly-profit { position: relative; z-index: 1; }
.monthly-hero .eyebrow { margin: 0 0 8px; color: #7ce6b6; }
.monthly-hero h1 { margin: 0; max-width: 620px; font-size: clamp(30px, 3.4vw, 46px); letter-spacing: -.052em; line-height: 1.04; }
.monthly-hero p:not(.eyebrow) { margin: 12px 0 0; max-width: 570px; color: #c8dce9; line-height: 1.55; }
.monthly-profit { min-width: 250px; padding: 19px 21px; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: rgba(255,255,255,.12); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.monthly-profit span, .monthly-profit small { display: block; color: #d8e8f2; font-size: 12px; font-weight: 750; }
.monthly-profit strong { display: block; margin: 5px 0 4px; color: #fff; font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -.05em; }
.monthly-profit.is-negative { background: rgba(174, 57, 52, .24); border-color: rgba(255, 190, 185, .32); }
.monthly-toolbar { margin: 20px 0; padding: 14px 16px; display: flex; align-items: end; justify-content: space-between; gap: 16px; border: 1px solid #dce6ef; border-radius: 17px; background: rgba(255,255,255,.86); box-shadow: 0 8px 24px rgba(27,66,101,.05); }
.toolbar-field { display: grid; gap: 6px; width: min(390px, 100%); }
.toolbar-field label { color: #506176; font-size: 12px; font-weight: 800; }
.toolbar-field input { padding: 10px 12px; border-radius: 10px; }
.monthly-toolbar .button { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; padding: 11px 15px; }
.monthly-toolbar .button span { font-size: 18px; line-height: 12px; }
.monthly-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.metric-card { min-height: 142px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #dfe8f0; border-radius: 18px; background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(27,66,101,.045); transition: transform .18s ease, box-shadow .18s ease; }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(27,66,101,.09); }
.metric-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; font-size: 12px; font-weight: 850; }
.metric-label { display: block; color: #65768a; font-size: 12px; font-weight: 750; }
.metric-value { display: block; margin-top: 4px; color: #102842; font-size: clamp(21px, 1.85vw, 28px); letter-spacing: -.05em; white-space: nowrap; }
.metric-card--revenue .metric-icon { color: #0c64bb; background: #e5f2ff; }
.metric-card--extra .metric-icon { color: #087353; background: #dcf6e9; }
.metric-card--trip .metric-icon { color: #aa6900; background: #fff1d5; }
.metric-card--team .metric-icon { color: #077756; background: #ddf7eb; }
.metric-card--fixed .metric-icon { color: #6947c7; background: #eee9ff; }
.metric-card--total { border-color: #c8dcee; background: linear-gradient(135deg, #edf7ff, #ffffff); }
.metric-card--total .metric-icon { color: #155f9d; background: #dcebfa; }
.monthly-calculation { margin: 17px 0; display: flex; gap: 13px; align-items: flex-start; padding: 15px 17px; color: #31516a; border: 1px solid #cde4db; border-radius: 16px; background: linear-gradient(90deg, #f2fbf7, #f9fcff); }
.monthly-calculation-icon { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; color: #087354; border-radius: 9px; background: #dff5e9; font-weight: 900; }
.monthly-calculation strong { color: #173d58; font-size: 13px; }
.monthly-calculation p { margin: 4px 0 0; font-size: 13px; line-height: 1.5; }
.monthly-calculation b { color: #087354; }
.monthly-notice { margin-bottom: 17px; }
.monthly-content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .78fr); gap: 18px; align-items: start; }
.monthly-trips .panel-head { padding: 18px 20px; }
.panel-kicker { margin: 0 0 4px; color: #6f8193; font-size: 10px; font-weight: 850; letter-spacing: .095em; }
.monthly-trips .panel-head h3, .summary-panel .panel-head h3 { font-size: 17px; letter-spacing: -.025em; }
.count-pill { padding: 7px 10px; color: #1762a5; border-radius: 999px; background: #e9f4ff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.monthly-aside { display: grid; gap: 14px; }
.summary-panel { box-shadow: 0 7px 20px rgba(27,66,101,.035); }
.summary-panel .panel-head { padding-bottom: 14px; }
.financial-toolbar { margin-bottom: 16px; }
.financial-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.financial-metric { min-height: 132px; display: flex; gap: 13px; padding: 17px; border: 1px solid #dce6ee; border-radius: 17px; background: #fff; box-shadow: 0 7px 20px rgba(27,66,101,.04); }
.financial-metric > span { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 11px; font-weight: 850; }
.financial-metric small { display: block; color: #607287; font-size: 12px; font-weight: 800; }
.financial-metric strong { display: block; margin-top: 4px; color: #102842; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.05em; white-space: nowrap; }
.financial-metric p { margin: 4px 0 0; color: #778799; font-size: 11px; line-height: 1.35; }
.financial-metric.is-pending > span { color: #9d5c00; background: #fff0cf; }
.financial-metric.is-paid > span { color: #087353; background: #dcf6e9; }
.financial-metric.is-overdue > span { color: #b13d33; background: #ffe5e1; }
.financial-metric.is-driver > span { color: #1766ad; background: #e4f2ff; }
.financial-note { margin: 16px 0; display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; color: #446075; border: 1px solid #d6e5ef; border-radius: 14px; background: #f8fbfe; font-size: 12px; line-height: 1.5; }
.financial-note span { width: 20px; height: 20px; flex: 0 0 20px; display: grid; place-items: center; border-radius: 50%; color: #1763a5; background: #ddebfa; font-size: 12px; font-weight: 850; }
.financial-note p { margin: 0; }
.financial-main-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .85fr); gap: 18px; align-items: start; }
.financial-secondary-grid { margin-top: 18px; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .85fr); }
.financial-entry-form { overflow: visible; }
.financial-entry-form h3 { font-size: 18px; letter-spacing: -.03em; }
.financial-rows { padding: 8px 14px 14px; }
.financial-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 13px 6px; border-bottom: 1px solid #edf1f4; }
.financial-row:last-child { border-bottom: 0; }
.financial-row-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.financial-row-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; color: #7251c3; border-radius: 10px; background: #eeeaff; font-weight: 850; }
.financial-row-main b { display: block; color: #20374f; font-size: 13px; }
.financial-row-main small { display: block; margin-top: 3px; color: #718195; font-size: 11px; }
.financial-row-value { text-align: right; }
.financial-row-value strong { display: block; color: #183550; font-size: 13px; }
.financial-row-value .payment-status { margin-top: 5px; }
.financial-row-action { min-width: 126px; display: grid; justify-items: end; gap: 6px; text-align: right; }
.due-button { color: #64798d; font-size: 11px; font-weight: 700; }
.small-button { padding: 8px 10px; border-radius: 9px; font-size: 11px; white-space: nowrap; }
.payment-status { display: inline-flex; align-items: center; justify-content: center; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 850; white-space: nowrap; }
.payment-status.is-paid { color: #087353; background: #dcf6e9; }
.payment-status.is-pending { color: #966000; background: #fff0cf; }
.driver-debts-list { padding: 6px 17px 14px; }
.driver-debt-row { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 13px 0; border-bottom: 1px solid #edf1f4; }
.driver-debt-row:last-child { border-bottom: 0; }
.driver-debt-row b { display: block; color: #20374f; font-size: 13px; }
.driver-debt-row span { display: block; margin-top: 3px; color: #738397; font-size: 11px; }
.driver-debt-payment { display: grid; justify-items: end; gap: 7px; flex: 0 0 auto; }
.driver-debt-payment strong { color: #173d58; font-size: 13px; }
.compact-empty { padding: 25px 8px; }
.paid-history-panel { margin-top: 18px; }
.payment-history { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; list-style: none; padding: 5px 20px 16px; margin: 0; }
.payment-history li { padding: 12px 0; border-bottom: 1px solid #edf1f4; }
.payment-history b { display: block; color: #20374f; font-size: 13px; }
.payment-history span { display: block; margin-top: 3px; color: #6b7d91; font-size: 11px; line-height: 1.45; }
.payment-history em { display: block; margin-top: 2px; color: #087353; font-style: normal; font-weight: 750; }
.extra-revenue-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.revenue-stat { border-color: #bfe5d3; background: linear-gradient(135deg, #effbf5, #ffffff); }
.revenue-stat .stat-icon { color: #087353; background: #dcf6e9; }
.extra-revenue-form { overflow: visible; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(310px, .9fr); gap: 20px; }
.users-layout { display: grid; grid-template-columns: minmax(340px, .9fr) minmax(440px, 1.2fr); gap: 20px; align-items: start; }
.user-directory { overflow: visible; }
.user-directory .panel-head { align-items: flex-start; gap: 16px; }
.user-directory-note { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 5px 0 0; }
.user-cards { padding: 12px; display: grid; gap: 10px; }
.user-card { border: 1px solid #e2eaf0; border-radius: 13px; padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: #fff; }
.user-card-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.user-card-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: #e4f3ff; color: var(--blue); font-weight: 850; font-size: 12px; }
.user-card-main b { display: block; color: var(--ink); font-size: 14px; }
.user-role-chip { display: inline-block; margin: 4px 0 0; padding: 3px 7px; border-radius: 999px; background: #eef4f8; color: #486276; font-size: 10px; font-weight: 800; }
.user-email { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; overflow-wrap: anywhere; }
.user-card-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.user-action-edit, .user-action-delete { padding: 9px 11px; font-size: 12px; white-space: nowrap; }
.user-action-delete { background: #fff0ee; color: #a23632; border: 1px solid #f2c7c2; }
.user-action-delete:hover { background: #ffe0dc; }
.user-current { color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; max-width: 125px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; overflow: hidden; }
.panel-head { padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e7edf2; }
.panel-head h3 { font-size: 15px; margin: 0; }
.panel-head button.link, .link { background: none; border: 0; color: var(--blue); font-size: 13px; font-weight: 750; padding: 0; }
.empty { padding: 35px 22px; text-align: center; color: var(--muted); }
.trip-list { display: grid; }
.trip-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; padding: 17px 20px; border-bottom: 1px solid #edf1f4; text-decoration: none; color: inherit; }
.trip-row:last-child { border-bottom: 0; }
.trip-row:hover { background: #f8fbfd; }
.trip-code { font-size: 12px; color: var(--blue); font-weight: 800; letter-spacing: .05em; }
.trip-route { font-weight: 760; margin-top: 4px; }
.trip-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.money { font-weight: 800; white-space: nowrap; }
.badge { border-radius: 999px; font-size: 11px; padding: 6px 9px; font-weight: 800; white-space: nowrap; }
.badge.em_andamento { color: #075e9c; background: #e4f3ff; }
.badge.aguardando_financeiro { color: #976000; background: var(--amber-soft); }
.badge.encerrada { color: #08724b; background: var(--green-soft); }
.notice { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #f0d294; background: #fff8e8; border-radius: 12px; padding: 15px; color: #73500d; line-height: 1.45; font-size: 13px; }
.notice strong { display: block; color: #513c10; margin-bottom: 3px; }
.quick-list { list-style: none; padding: 3px 20px 16px; margin: 0; }
.quick-list li { padding: 12px 0; border-bottom: 1px solid #edf1f4; color: #536277; font-size: 13px; }
.quick-list li:last-child { border: 0; }
.quick-list b { color: var(--ink); display: block; margin-bottom: 2px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.trip-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; cursor: pointer; transition: .2s; }
.trip-card:hover { border-color: #aac9e4; box-shadow: 0 9px 23px rgba(22,58,89,.08); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.route { margin: 24px 0 17px; display: flex; align-items: center; gap: 8px; color: #516173; font-size: 13px; font-weight: 700; }
.route i { height: 1px; flex: 1; background: #a7c3db; }
.card-data { display: flex; justify-content: space-between; border-top: 1px solid #e9eef2; padding-top: 14px; font-size: 12px; color: var(--muted); }
.card-data b { color: var(--ink); display: block; font-size: 14px; margin-top: 3px; }
.form-panel { padding: 24px; overflow: visible; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.form-grid .span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 23px; }
.trip-hero { border-radius: 17px; background: linear-gradient(113deg, var(--navy), #155276); color: #fff; padding: 24px; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.trip-hero .eyebrow { color: #82c9ff; }
.trip-hero h1 { font-size: 33px; margin: 5px 0; letter-spacing: -.04em; }
.trip-hero p { margin: 0; color: #c3dceb; }
.trip-hero .badge { background: rgba(255,255,255,.16); color: #fff; }
.cost-grid { margin: 19px 0; display: grid; grid-template-columns: 1.2fr repeat(2,1fr); gap: 15px; }
.cost-block { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.cost-block small { color: var(--muted); font-weight: 700; }
.cost-block strong { display: block; margin-top: 6px; font-size: 25px; letter-spacing: -.04em; }
.journey { padding: 19px 20px; display: flex; align-items: center; gap: 13px; color: #426077; font-size: 13px; font-weight: 760; }
.journey .point { width: 10px; height: 10px; border-radius: 50%; background: var(--blue); }
.journey .point.end { background: #39bc82; }
.journey .line { height: 2px; background: #b9cfdf; flex: 1; }
.table-wrap { width: 100%; overflow: visible; }
table { border-collapse: collapse; width: 100%; max-width: 100%; min-width: 0; table-layout: fixed; }
th { color: var(--muted); text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 13px 14px; background: #f8fafc; overflow-wrap: anywhere; }
td { border-top: 1px solid #ebf0f3; padding: 14px; font-size: 13px; vertical-align: top; overflow-wrap: anywhere; word-break: break-word; }
td .money, .table-wrap .money { white-space: normal; }
.table-wrap .link { white-space: normal; text-align: left; }
td .small { color: var(--muted); font-size: 11px; margin-top: 3px; }
.expense-form { border: 1px dashed #b9cee0; background: #f8fbfd; padding: 20px; border-radius: 14px; }
.expense-form h3 { margin: 0 0 16px; font-size: 15px; }
.review-box { border: 1px solid #b7ded1; background: #f1fbf6; padding: 20px; border-radius: 14px; }
.review-box h3 { margin: 0 0 7px; }
.review-box p { margin: 0 0 17px; color: #506c61; font-size: 13px; line-height: 1.5; }
.split-actions { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin-top: 20px; }
.reviewing { outline: 2px solid #bdddf2; }
.list-note { color: var(--muted); font-size: 13px; line-height: 1.5; }
.toast { position: fixed; bottom: 24px; right: 24px; max-width: 340px; background: #17334a; color: white; padding: 14px 17px; border-radius: 12px; box-shadow: 0 14px 40px rgba(0,0,0,.25); z-index: 30; }
.toast.error { background: #963a34; }
.mobile-nav { display: none; }

@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2,1fr); }
  .users-layout { grid-template-columns: 1fr; }
  .monthly-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .monthly-content-grid { grid-template-columns: 1fr; }
  .monthly-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .financial-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .financial-main-grid, .financial-secondary-grid { grid-template-columns: 1fr; }
  .payment-history { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-aside { min-height: 345px; padding: 31px 28px; }
  .login-aside h1 { margin: 40px 0 10px; font-size: 38px; }
  .login-aside p, .login-footer { display: none; }
  .login-panel { align-items: flex-start; padding: 35px 24px; }
  .shell { display: block; padding-bottom: 69px; }
  .sidebar { display: none; }
  .topbar { min-height: 69px; padding: 0 21px; position: static; }
  .content { padding: 26px 17px 37px; }
  .page-heading { display: block; }
  .page-heading .button { margin-top: 17px; }
  .stat-grid, .cards, .grid-2, .cost-grid, .users-layout { grid-template-columns: 1fr; }
  .monthly-hero { display: block; padding: 25px 22px; border-radius: 20px; }
  .monthly-hero h1 { font-size: 32px; }
  .monthly-profit { min-width: 0; margin-top: 22px; }
  .monthly-toolbar { align-items: stretch; flex-direction: column; padding: 14px; }
  .toolbar-field { width: 100%; }
  .monthly-toolbar .button { justify-content: center; }
  .monthly-metrics, .monthly-aside { grid-template-columns: 1fr; }
  .financial-metrics, .payment-history { grid-template-columns: 1fr; }
  .financial-row { grid-template-columns: minmax(0, 1fr) auto; }
  .financial-row-action { grid-column: 1 / -1; min-width: 0; justify-items: start; text-align: left; }
  .driver-debt-row { align-items: flex-start; flex-direction: column; }
  .driver-debt-payment { width: 100%; grid-template-columns: 1fr auto; align-items: center; }
  th { padding: 10px 8px; font-size: 9px; letter-spacing: .035em; }
  td { padding: 11px 8px; font-size: 11px; }
  td .small { font-size: 10px; }
  .metric-card { min-height: 118px; }
  .metric-value { font-size: 26px; }
  .monthly-calculation { padding: 14px; }
  .user-card { align-items: flex-start; flex-direction: column; }
  .user-card-actions { width: 100%; }
  .user-card-actions .button { flex: 1; }
  .user-current { max-width: none; text-align: left; }
  .trip-row { grid-template-columns: 1fr auto; gap: 10px; }
  .trip-row .money { grid-column: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .trip-hero { display: block; }
  .trip-hero .badge { display: inline-block; margin-top: 15px; }
  .form-actions, .split-actions { flex-wrap: wrap; }
  .form-actions .button, .split-actions .button { flex: 1; }
  .mobile-nav { position: fixed; z-index: 10; bottom: 0; left: 0; right: 0; height: 69px; background: var(--navy); display: flex; justify-content: space-around; padding: 7px 5px; }
  .mobile-nav button { border: 0; background: transparent; color: #a6c1d4; padding: 4px 9px; font-size: 10px; display: grid; gap: 2px; place-items: center; }
  .mobile-nav button.active { color: #fff; }
  .mobile-nav b { font-size: 18px; line-height: 18px; }
}

/* Tema futurista: superfícies escuras, contraste alto e detalhes luminosos. */
:root {
  color-scheme: dark;
  --navy: #090e0b;
  --navy-2: #111a13;
  --blue: #b4ff61;
  --blue-soft: #173018;
  --green: #9cff4d;
  --green-soft: #15331a;
  --amber: #ffd85a;
  --amber-soft: #382f11;
  --red: #ff766d;
  --red-soft: #3c1d1c;
  --ink: #edf5ed;
  --muted: #93a596;
  --line: #243128;
  --surface: #101612;
  --canvas: #070a08;
}

body { background: radial-gradient(circle at 78% -14%, rgba(122, 255, 74, .12), transparent 28%), radial-gradient(circle at 18% 104%, rgba(68, 147, 79, .12), transparent 32%), #070a08; }
body::selection { color: #091009; background: #b4ff61; }
.main { background-image: linear-gradient(rgba(176,255,97,.022) 1px, transparent 1px), linear-gradient(90deg, rgba(176,255,97,.022) 1px, transparent 1px); background-size: 34px 34px; }
.login-aside { background: radial-gradient(circle at 17% 17%, rgba(167,255,83,.26), transparent 25%), linear-gradient(135deg, #070b08, #121c13); }
.login-panel { background: #080c09; }
.login-footer { color: #718777; }
.brand { color: #f2fff0; }
.brand-mark { background: linear-gradient(135deg, #c0ff6d, #83e63f); color: #0b110b; box-shadow: 0 0 22px rgba(165,255,80,.27); }
.login-aside p { color: #a9bca9; }
.route-line { color: #d5e6d4; }
.route-line span:nth-child(2), .route-line span:nth-child(2)::after { border-color: #a9ff57; }
.route-line span:nth-child(2) { background: #a9ff57; }
.eyebrow { color: #a9ff57; }
.subtle, .page-heading p { color: #91a493; }
.field label { color: #b6c5b7; }
input, select, textarea { color: #edf5ed; border-color: #2c3b2f; background: #0c120e; }
input::placeholder, textarea::placeholder { color: #667968; }
input:focus, select:focus, textarea:focus { border-color: #aaff5b; box-shadow: 0 0 0 3px rgba(170,255,91,.12), 0 0 18px rgba(170,255,91,.07); }
.button { color: #0b100b; background: linear-gradient(135deg, #c3ff70, #91ec49); box-shadow: 0 7px 18px rgba(134,243,63,.12); }
.button:hover { color: #071008; background: linear-gradient(135deg, #d1ff91, #9df451); box-shadow: 0 10px 24px rgba(134,243,63,.2); }
.button.secondary { color: #d8e7d7; background: #1a241c; border: 1px solid #334536; box-shadow: none; }
.button.secondary:hover { background: #243126; }
.button.success { color: #0b100b; background: linear-gradient(135deg, #c3ff70, #91ec49); }
.button.danger { color: #fff3f2; background: #a63b38; }
.demo-box { color: #aabbaa; border-color: #293b2d; background: #0d140f; }
.demo-box strong { color: #eff8ed; }

.sidebar { background: radial-gradient(circle at 14% 0%, rgba(151,255,71,.14), transparent 22%), linear-gradient(180deg, #0a100c, #080b09 72%); border-right: 1px solid #1f2c22; }
.nav button { color: #8ea38f; }
.nav button:hover { color: #eaffdc; background: rgba(181,255,100,.07); }
.nav button.active { color: #0a110a; background: linear-gradient(135deg, #c3ff70, #92ed4d); box-shadow: 0 8px 24px rgba(141,244,68,.19); }
.account { border-color: #26352a; }
.avatar { background: #b4ff61; color: #091009; box-shadow: 0 0 18px rgba(180,255,97,.18); }
.account-role, .logout { color: #8da58f; }
.topbar { color: #eaf5e9; background: rgba(8,12,9,.82); border-color: #253128; }
.topbar small { color: #8da38f; }
.topbar strong { color: #eaf5e9; }

.panel, .stat, .trip-card, .cost-block { background: linear-gradient(145deg, rgba(18,25,20,.96), rgba(10,15,12,.96)); border-color: #26352a; box-shadow: 0 10px 30px rgba(0,0,0,.16); }
.panel-head { border-color: #233126; }
.panel-head h3, .quick-list b, .user-card-main b, .financial-row-main b, .driver-debt-row b, .payment-history b { color: #edf6ec; }
.stat { position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; width: 72px; height: 72px; right: -28px; bottom: -37px; border: 1px solid rgba(180,255,97,.16); border-radius: 50%; }
.stat .stat-icon { color: #b8ff67; background: #19331a; }
.stat:nth-child(2) .stat-icon { color: #ffd85a; background: #392f12; }
.stat:nth-child(3) .stat-icon { color: #9dffeb; background: #15302c; }
.stat:nth-child(4) .stat-icon { color: #cbb6ff; background: #2c2340; }
.stat-label, .metric-label, .panel-kicker { color: #8fa291; }
.stat-value, .metric-value, .money, .financial-row-value strong, .driver-debt-payment strong { color: #f0faef; }
.link, .panel-head button.link { color: #b7ff65; }
.link:hover { color: #d8ffa9; }
.empty, .list-note, .quick-list li, .user-directory-note { color: #91a492; }
.quick-list li { border-color: #223025; }

.trip-card:hover { border-color: #5d8c48; box-shadow: 0 14px 30px rgba(145,239,72,.11); }
.trip-row { border-color: #1f2d23; }
.trip-row:hover { background: rgba(173,255,91,.04); }
.trip-code, .route { color: #b7ff65; }
.trip-meta, .card-data, .route { color: #91a493; }
.card-data { border-color: #223025; }
.card-data b { color: #eaf5e8; }
.badge.em_andamento { color: #bcff6c; background: #1c3a1b; }
.badge.aguardando_financeiro { color: #ffda65; background: #3b3111; }
.badge.encerrada { color: #9affcb; background: #153728; }
.notice { color: #f6d772; border-color: #57481c; background: linear-gradient(135deg, #2d2611, #211d0e); }
.notice strong { color: #ffeaa1; }
.expense-form { border-color: #426447; background: #0d1510; }
.review-box { color: #c9f4d1; border-color: #347444; background: #102719; }
.review-box p { color: #a8d6b0; }
.reviewing { outline-color: #8edb55; }

th { color: #91a493; background: #111913; border-color: #26352a; }
td { color: #dce9dc; border-color: #223025; }
td .small { color: #8da28e; }
tr:hover td { background: rgba(180,255,97,.025); }
.table-wrap .link { color: #b7ff65; }
.user-card { background: #101712; border-color: #27372a; }
.user-card-avatar { color: #b7ff65; background: #1a351c; }
.user-role-chip { color: #b6d5b8; background: #1a281c; }
.user-action-delete { color: #ffaaa5; border-color: #5d302d; background: #301917; }
.user-action-delete:hover { background: #47201d; }
.user-current, .user-email { color: #8da28e; }

.monthly-hero { background: radial-gradient(circle at 88% 22%, rgba(174,255,91,.28), transparent 24%), radial-gradient(circle at 58% 110%, rgba(83,155,76,.24), transparent 39%), linear-gradient(125deg, #0a100c, #142516); border: 1px solid #344b36; box-shadow: 0 18px 42px rgba(0,0,0,.25), inset 0 1px 0 rgba(210,255,176,.08); }
.monthly-hero .eyebrow { color: #baff6f; }
.monthly-hero p:not(.eyebrow) { color: #adbeae; }
.monthly-profit { border-color: rgba(193,255,112,.28); background: rgba(171,255,91,.10); }
.monthly-profit span, .monthly-profit small { color: #c1d8c1; }
.monthly-profit strong { color: #d8ffab; }
.monthly-toolbar { border-color: #29382d; background: rgba(15,21,16,.9); box-shadow: 0 10px 26px rgba(0,0,0,.14); }
.toolbar-field label { color: #b6c5b7; }
.metric-card { background: linear-gradient(145deg, #121a14, #0d120e); border-color: #293a2d; box-shadow: 0 9px 22px rgba(0,0,0,.13); }
.metric-card:hover { border-color: #5d864a; box-shadow: 0 14px 28px rgba(118,230,65,.10); }
.metric-card--revenue .metric-icon, .metric-card--extra .metric-icon { color: #b9ff69; background: #1a351b; }
.metric-card--trip .metric-icon { color: #ffdb63; background: #382f12; }
.metric-card--team .metric-icon { color: #9cffde; background: #15352b; }
.metric-card--fixed .metric-icon { color: #cfbaff; background: #2b2340; }
.metric-card--total { border-color: #46633d; background: linear-gradient(135deg, #182416, #101710); }
.metric-card--total .metric-icon { color: #baff6e; background: #23451f; }
.monthly-calculation { color: #bad9bd; border-color: #36553a; background: linear-gradient(90deg, #112416, #101914); }
.monthly-calculation strong { color: #e5f8e4; }
.monthly-calculation b { color: #baff6e; }
.monthly-calculation-icon { color: #aaff5d; background: #1d3d1e; }
.count-pill { color: #c1ff7a; background: #1b351b; }

.financial-metric, .financial-note { border-color: #2b3d2e; background: linear-gradient(145deg, #121a14, #0e140f); box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.financial-metric small, .financial-metric p, .financial-note { color: #9eb39f; }
.financial-metric strong { color: #effbef; }
.financial-metric.is-pending > span { color: #ffdc63; background: #382f12; }
.financial-metric.is-paid > span, .financial-metric.is-driver > span { color: #b9ff69; background: #1a351b; }
.financial-metric.is-overdue > span { color: #ff918b; background: #3b1c1b; }
.financial-note span { color: #baff6e; background: #1c361c; }
.financial-row { border-color: #233126; }
.financial-row-icon { color: #c9b4ff; background: #2b2340; }
.financial-row-main small, .driver-debt-row span, .payment-history span { color: #8fa291; }
.payment-status.is-paid { color: #baff6e; background: #19351b; }
.payment-status.is-pending { color: #ffda65; background: #392f12; }
.due-button { color: #a6cfa3; }
.toast { color: #eaffe8; background: #172618; border: 1px solid #486946; box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.toast.error { background: #4a1f1d; border-color: #893a35; }
.mobile-nav { background: rgba(8,12,9,.97); border-top: 1px solid #26352a; }
.mobile-nav button { color: #8da28e; }
.mobile-nav button.active { color: #baff6e; }

/* Direção visual clara: painel administrativo limpo, inspirado em softwares de gestão. */
:root {
  color-scheme: light;
  --navy: #1e293b;
  --navy-2: #344256;
  --blue: #2f7df4;
  --blue-soft: #edf4ff;
  --green: #32b775;
  --green-soft: #eaf9f1;
  --amber: #d58a18;
  --amber-soft: #fff6df;
  --red: #dc625c;
  --red-soft: #fff0ef;
  --ink: #202b3b;
  --muted: #758195;
  --line: #e8edf4;
  --surface: #ffffff;
  --canvas: #edf3fc;
}

body { background: #eaf1fc; color: #202b3b; }
body::selection { color: #fff; background: #2f7df4; }
.shell { grid-template-columns: 230px minmax(0, 1fr); gap: 12px; padding: 12px; }
.main { min-height: calc(100vh - 24px); background: #f8fafd; background-image: none; border-radius: 20px; overflow: hidden; }
.sidebar { top: 12px; height: calc(100vh - 24px); padding: 21px 13px; color: #253247; border: 1px solid #edf1f6; border-radius: 20px; background: #fff; box-shadow: 0 10px 30px rgba(53,80,119,.06); }
.brand { color: #202b3b; }
.brand-mark { color: #fff; background: linear-gradient(135deg, #4a8cf7, #286ee6); box-shadow: 0 8px 18px rgba(47,125,244,.2); }
.nav { margin-top: 40px; gap: 4px; }
.nav button { position: relative; color: #687587; font-weight: 650; }
.nav button:hover { color: #2f7df4; background: #f5f8fd; transform: none; }
.nav button.active { color: #2f7df4; background: #eef5ff; box-shadow: none; }
.nav button.active::before { content: ""; position: absolute; width: 3px; height: 18px; left: -13px; border-radius: 0 3px 3px 0; background: #2f7df4; }
.account { border-color: #edf0f4; }
.avatar { color: #fff; background: #4b8cf7; box-shadow: none; }
.account-name { color: #263246; }
.account-role, .logout { color: #8290a2; }
.topbar { min-height: 67px; color: #202b3b; background: rgba(255,255,255,.94); border-color: #edf0f4; backdrop-filter: blur(12px); }
.topbar small { color: #788496; }
.topbar strong { color: #202b3b; }
.content { max-width: 1540px; padding: clamp(25px, 3.5vw, 36px) clamp(22px, 3.5vw, 42px) 50px; }

.login-aside { background: linear-gradient(135deg, #2e7df4, #74a9ff); }
.login-panel { background: #fff; }
.login-aside p, .login-footer { color: #e8f2ff; }
.login-aside .brand, .login-aside .brand-mark { color: #fff; }
.login-aside .brand-mark { background: rgba(255,255,255,.18); box-shadow: none; }
.route-line { color: #eaf3ff; }
.route-line span:nth-child(2) { background: #d6e8ff; }
.route-line span:nth-child(2)::after { border-left-color: #d6e8ff; border-top-color: transparent; border-bottom-color: transparent; }
.eyebrow { color: #2f7df4; }
.subtle, .page-heading p { color: #778397; }
.field label, .toolbar-field label { color: #445267; }
input, select, textarea { color: #263246; border-color: #dce4ee; background: #fff; }
input::placeholder, textarea::placeholder { color: #a5aeba; }
input:focus, select:focus, textarea:focus { border-color: #74a5fa; box-shadow: 0 0 0 3px #e9f2ff; }
.button { color: #fff; background: #2f7df4; box-shadow: 0 7px 16px rgba(47,125,244,.16); }
.button:hover { color: #fff; background: #236bda; box-shadow: 0 10px 22px rgba(47,125,244,.22); }
.button.secondary { color: #46556a; border-color: #e0e7ef; background: #f5f7fa; }
.button.secondary:hover { background: #edf1f5; }
.button.success { color: #fff; background: #32b775; }
.button.danger { color: #fff; background: #dc625c; }
.demo-box { color: #667589; border-color: #e1e8f0; background: #f8fafc; }
.demo-box strong { color: #243146; }

.panel, .stat, .trip-card, .cost-block { background: #fff; border-color: #e7edf4; box-shadow: 0 8px 24px rgba(55,81,116,.045); }
.panel-head { border-color: #edf0f4; }
.panel-head h3, .quick-list b, .user-card-main b, .financial-row-main b, .driver-debt-row b, .payment-history b { color: #263246; }
.stat::after { border-color: rgba(47,125,244,.10); }
.stat .stat-icon { color: #2f7df4; background: #edf4ff; }
.stat:nth-child(2) .stat-icon { color: #db921d; background: #fff5df; }
.stat:nth-child(3) .stat-icon { color: #32b775; background: #eaf9f1; }
.stat:nth-child(4) .stat-icon { color: #7a59cc; background: #f2edff; }
.stat-label, .metric-label, .panel-kicker { color: #7a8799; }
.stat-value, .metric-value, .money, .financial-row-value strong, .driver-debt-payment strong { color: #202b3b; }
.link, .panel-head button.link, .table-wrap .link { color: #2f7df4; }
.link:hover, .table-wrap .link:hover { color: #236bda; }
.empty, .list-note, .quick-list li, .user-directory-note { color: #748195; }
.quick-list li { border-color: #edf0f4; }

.trip-card:hover { border-color: #c8dcff; box-shadow: 0 12px 26px rgba(47,125,244,.10); }
.trip-row { border-color: #edf0f4; }
.trip-row:hover { background: #f7faff; }
.trip-code, .route { color: #2f7df4; }
.trip-meta, .card-data, .route { color: #778498; }
.card-data { border-color: #edf0f4; }
.card-data b { color: #263246; }
.badge.em_andamento { color: #2774da; background: #eaf3ff; }
.badge.aguardando_financeiro { color: #b57408; background: #fff4d8; }
.badge.encerrada { color: #238e5d; background: #e8f8ef; }
.notice { color: #8b6212; border-color: #f3dca9; background: #fffaf0; }
.notice strong { color: #6e4e11; }
.expense-form { border-color: #cddcec; background: #f8fbfe; }
.review-box { color: #315c43; border-color: #bbe4cc; background: #f0fbf5; }
.review-box p { color: #557565; }
.reviewing { outline-color: #bcd7ff; }

th { color: #758195; background: #f8fafc; border-color: #edf0f4; }
td { color: #354257; border-color: #edf0f4; }
td .small { color: #8290a2; }
tr:hover td { background: #fbfcff; }
.user-card { background: #fff; border-color: #e8edf3; }
.user-card-avatar { color: #2f7df4; background: #edf4ff; }
.user-role-chip { color: #54647a; background: #f1f4f8; }
.user-action-delete { color: #c24f4a; border-color: #f1c8c4; background: #fff2f1; }
.user-action-delete:hover { background: #ffe6e3; }
.user-current, .user-email { color: #748195; }

.monthly-hero { color: #233148; border-color: #e2eaf4; background: radial-gradient(circle at 91% 18%, rgba(91,151,255,.17), transparent 23%), linear-gradient(135deg, #fff, #f0f6ff); box-shadow: 0 12px 28px rgba(54,81,116,.06); }
.monthly-hero .eyebrow { color: #2f7df4; }
.monthly-hero h1 { color: #202b3b; }
.monthly-hero p:not(.eyebrow) { color: #718095; }
.monthly-profit { border-color: #d6e5ff; background: #fff; box-shadow: 0 8px 20px rgba(47,125,244,.07); }
.monthly-profit span, .monthly-profit small { color: #718095; }
.monthly-profit strong { color: #2f7df4; }
.monthly-toolbar { border-color: #e4eaf2; background: #fff; box-shadow: 0 7px 18px rgba(54,81,116,.035); }
.metric-card { background: #fff; border-color: #e5ebf3; box-shadow: 0 7px 18px rgba(54,81,116,.035); }
.metric-card:hover { border-color: #c9dcfc; box-shadow: 0 10px 22px rgba(47,125,244,.08); }
.metric-card--revenue .metric-icon { color: #2f7df4; background: #eaf3ff; }
.metric-card--extra .metric-icon { color: #32b775; background: #eaf9f1; }
.metric-card--trip .metric-icon { color: #db921d; background: #fff5df; }
.metric-card--team .metric-icon { color: #28a26b; background: #eaf9f1; }
.metric-card--fixed .metric-icon { color: #7a59cc; background: #f2edff; }
.metric-card--total { border-color: #d9e7fd; background: linear-gradient(135deg, #f5f9ff, #fff); }
.metric-card--total .metric-icon { color: #2f7df4; background: #eaf3ff; }
.monthly-calculation { color: #51647b; border-color: #d8e5f5; background: #f7fbff; }
.monthly-calculation strong { color: #2c4059; }
.monthly-calculation b { color: #268b5c; }
.monthly-calculation-icon { color: #2f7df4; background: #e9f3ff; }
.count-pill { color: #2f7df4; background: #edf4ff; }

.financial-metric, .financial-note { border-color: #e3eaf2; background: #fff; box-shadow: 0 7px 18px rgba(54,81,116,.035); }
.financial-metric small, .financial-metric p, .financial-note { color: #738196; }
.financial-metric strong { color: #202b3b; }
.financial-metric.is-pending > span { color: #d68a16; background: #fff4df; }
.financial-metric.is-paid > span { color: #32b775; background: #eaf9f1; }
.financial-metric.is-driver > span { color: #2f7df4; background: #eaf3ff; }
.financial-metric.is-overdue > span { color: #d7605b; background: #fff0ef; }
.financial-note span { color: #2f7df4; background: #eaf3ff; }
.financial-row { border-color: #edf0f4; }
.financial-row-icon { color: #7457c7; background: #f1edff; }
.financial-row-main small, .driver-debt-row span, .payment-history span { color: #768397; }
.payment-status.is-paid { color: #278b5b; background: #e8f8ef; }
.payment-status.is-pending { color: #b77508; background: #fff4d8; }
.due-button { color: #708096; }
.toast { color: #fff; background: #263548; border-color: #263548; box-shadow: 0 16px 36px rgba(31,45,64,.22); }
.toast.error { background: #b74f4a; border-color: #b74f4a; }
.mobile-nav { background: rgba(255,255,255,.97); border-color: #e5eaf1; box-shadow: 0 -8px 18px rgba(55,81,116,.06); }
.mobile-nav button { color: #718094; }
.mobile-nav button.active { color: #2f7df4; }

/* Central de controle em azul-marinho: painel operacional de alto contraste. */
:root {
  color-scheme: dark;
  --navy: #081221;
  --navy-2: #0d1a2c;
  --blue: #207cf7;
  --blue-soft: #102c52;
  --green: #39d27d;
  --green-soft: #123d2d;
  --amber: #f4b538;
  --amber-soft: #382b10;
  --red: #f36c75;
  --red-soft: #3b1c27;
  --ink: #f2f6ff;
  --muted: #a9b4c7;
  --line: #20324c;
  --surface: #0e1a2b;
  --canvas: #07111f;
}

body { color: #edf3ff; background: radial-gradient(circle at 84% 0%, rgba(26,92,188,.16), transparent 30%), #07111f; }
body::selection { color: #fff; background: #207cf7; }
.shell { grid-template-columns: 180px minmax(0, 1fr); gap: 0; padding: 0; }
.main { min-height: 100vh; border-radius: 0; overflow: hidden; background: radial-gradient(circle at 68% 12%, rgba(25,89,181,.10), transparent 27%), #07111f; background-image: radial-gradient(circle at 68% 12%, rgba(25,89,181,.10), transparent 27%), linear-gradient(rgba(83,126,181,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(83,126,181,.025) 1px, transparent 1px); background-size: auto, 42px 42px, 42px 42px; }
.sidebar { top: 0; height: 100vh; padding: 20px 11px; border: 0; border-right: 1px solid #1a2940; border-radius: 0; color: #c7d2e5; background: linear-gradient(180deg, #081221, #0a1627 70%, #081221); box-shadow: none; }
.sidebar .brand { justify-content: center; flex-direction: column; gap: 8px; color: #eff5ff; font-size: 11px; font-weight: 850; letter-spacing: .045em; text-transform: uppercase; }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; color: #e8f4ff; background: linear-gradient(135deg, #30b9ff, #1d61e8 58%, #2b42c3); box-shadow: 0 10px 24px rgba(29,112,244,.24); font-size: 31px; font-weight: 900; }
.nav { margin-top: 48px; gap: 8px; }
.nav button { padding: 11px 10px; color: #b3c0d3; border-radius: 8px; font-size: 12px; }
.nav button:hover { color: #edf5ff; background: rgba(55,120,212,.10); transform: none; }
.nav button.active { color: #54a2ff; background: linear-gradient(90deg, rgba(31,113,232,.26), rgba(23,67,123,.22)); box-shadow: inset 1px 0 0 rgba(72,153,255,.36); }
.nav button.active::before { left: -11px; height: 20px; background: #207cf7; }
.nav-icon { color: #8fa6c6; }
.nav button.active .nav-icon { color: #54a2ff; }
.account { padding: 15px 7px 3px; border-color: #1d2d45; }
.avatar { color: #dff0ff; background: #174c7f; box-shadow: none; }
.account-name { color: #ecf4ff; }
.account-role, .logout { color: #8498b5; }
.topbar { display: none; }
.content { max-width: none; padding: 23px 30px 46px; }

.login-aside { background: radial-gradient(circle at 14% 16%, rgba(56,165,255,.30), transparent 27%), linear-gradient(135deg, #071221, #102b50); }
.login-panel { background: #091524; }
.login-aside .brand { color: #fff; }
.login-aside .brand-mark { color: #fff; background: linear-gradient(135deg, #30b9ff, #1d61e8); }
.login-aside p, .login-footer { color: #b6c9e5; }
.route-line { color: #dce9fb; }
.route-line span:nth-child(2) { background: #4c9eff; }
.route-line span:nth-child(2)::after { border-left-color: #4c9eff; border-top-color: transparent; border-bottom-color: transparent; }
.eyebrow { color: #3292ff; }
.subtle, .page-heading p { color: #a9b7ca; }
.field label, .toolbar-field label { color: #c3cee0; }
input, select, textarea { color: #eef4ff; border-color: #29415f; background: #0b1727; }
input::placeholder, textarea::placeholder { color: #7486a0; }
input:focus, select:focus, textarea:focus { border-color: #287df4; box-shadow: 0 0 0 3px rgba(32,124,247,.13); }
.button { color: #fff; background: linear-gradient(135deg, #1686ff, #246ee9); box-shadow: 0 8px 18px rgba(16,103,235,.22); }
.button:hover { color: #fff; background: linear-gradient(135deg, #3399ff, #2a76f0); box-shadow: 0 10px 24px rgba(16,103,235,.32); }
.button.secondary { color: #d9e6f7; border-color: #29415f; background: #142238; }
.button.secondary:hover { background: #1a2c46; }
.button.success { background: linear-gradient(135deg, #22bf70, #1d9c5b); }
.button.danger { background: #b64b5a; }
.demo-box { color: #b2c0d3; border-color: #263b57; background: #0d192a; }
.demo-box strong { color: #f2f6ff; }

.page-heading { margin-bottom: 24px; }
.page-heading h1 { color: #f4f7ff; }
.panel, .stat, .trip-card, .cost-block { background: linear-gradient(145deg, #101d2e, #0d1828); border-color: #20334d; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.panel-head { border-color: #1f3048; }
.panel-head h3, .quick-list b, .user-card-main b, .financial-row-main b, .driver-debt-row b, .payment-history b { color: #f0f5ff; }
.stat { border-top: 2px solid #207cf7; }
.stat:nth-child(2) { border-top-color: #f4b538; }
.stat:nth-child(3) { border-top-color: #39d27d; }
.stat:nth-child(4) { border-top-color: #a967f5; }
.stat::after { border-color: rgba(70,139,247,.15); }
.stat .stat-icon { color: #55a4ff; background: #12335e; }
.stat:nth-child(2) .stat-icon { color: #f6c655; background: #3a2c12; }
.stat:nth-child(3) .stat-icon { color: #5ce399; background: #123b2d; }
.stat:nth-child(4) .stat-icon { color: #bf8aff; background: #2d2148; }
.stat-label, .metric-label, .panel-kicker { color: #9facbf; }
.stat-value, .metric-value, .money, .financial-row-value strong, .driver-debt-payment strong { color: #f6f8ff; }
.link, .panel-head button.link, .table-wrap .link { color: #3292ff; }
.link:hover, .table-wrap .link:hover { color: #73b6ff; }
.empty, .list-note, .quick-list li, .user-directory-note { color: #9baac0; }
.quick-list li { border-color: #1e3048; }
.trip-card:hover { border-color: #2c6fc6; box-shadow: 0 14px 30px rgba(19,91,195,.16); }
.trip-row { border-color: #1d2e46; }
.trip-row:hover { background: rgba(42,113,220,.06); }
.trip-code, .route { color: #3c9aff; }
.trip-meta, .card-data, .route { color: #a0adc0; }
.card-data { border-color: #1e3048; }
.card-data b { color: #edf4ff; }
.badge.em_andamento { color: #64acff; background: #12345f; }
.badge.aguardando_financeiro { color: #f7c552; background: #3a2d12; }
.badge.encerrada { color: #63e49d; background: #123d2d; }
.notice { color: #c7d5e9; border-color: #263b58; background: linear-gradient(135deg, #111f32, #0e1928); }
.notice strong { color: #f0f5ff; }
.expense-form { border-color: #33547a; background: #0e1b2d; }
.review-box { color: #c1efcf; border-color: #2b664c; background: #102b20; }
.review-box p { color: #a5cfb4; }
.reviewing { outline-color: #3c95ff; }

th { color: #9cacbf; background: #132238; border-color: #20314a; }
td { color: #dbe6f6; border-color: #1d2d45; }
td .small { color: #8fa1ba; }
tr:hover td { background: rgba(34,90,172,.07); }
.user-card { background: #101d2e; border-color: #243851; }
.user-card-avatar { color: #69b0ff; background: #12345e; }
.user-role-chip { color: #bdcde1; background: #1b2b42; }
.user-action-delete { color: #ff9fa6; border-color: #65313e; background: #301923; }
.user-action-delete:hover { background: #44202c; }
.user-current, .user-email { color: #93a5bd; }

.monthly-dashboard-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.monthly-dashboard-heading .eyebrow { margin: 0 0 8px; font-size: 11px; }
.monthly-dashboard-heading h1 { margin: 0; color: #f6f8ff; font-size: clamp(30px, 3vw, 40px); letter-spacing: -.045em; }
.monthly-dashboard-heading p:not(.eyebrow) { margin: 7px 0 0; color: #b0bdd0; }
.export-button { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; padding: 12px 16px; color: #dce8f8; border: 1px solid #263a56; border-radius: 9px; background: #111e30; font: inherit; font-size: 12px; font-weight: 750; }
.export-button:hover { color: #fff; border-color: #3b6fa7; background: #172a42; }
.monthly-toolbar { margin: 0 0 17px; border-color: #21344f; background: linear-gradient(145deg, #101d2e, #0e1928); box-shadow: 0 9px 22px rgba(0,0,0,.14); }
.monthly-toolbar .button { min-width: 158px; justify-content: center; }
.monthly-metrics { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.metric-card { min-height: 155px; padding: 16px; background: linear-gradient(145deg, #101d2e, #0d1928); border-color: #233650; border-top: 2px solid #207cf7; box-shadow: 0 9px 21px rgba(0,0,0,.15); }
.metric-card:hover { border-color: #285b99; box-shadow: 0 13px 26px rgba(19,91,195,.15); }
.metric-icon { width: 39px; height: 39px; }
.metric-value { font-size: clamp(21px, 1.65vw, 26px); }
.metric-card--revenue { border-top-color: #207cf7; }
.metric-card--extra { border-top-color: #43d68a; }
.metric-card--trip { border-top-color: #f4b538; }
.metric-card--team { border-top-color: #39d27d; }
.metric-card--fixed { border-top-color: #ba67fa; }
.metric-card--total { border-top-color: #3a9eff; background: linear-gradient(145deg, #11213a, #0d1929); }
.metric-card--net { border-top-color: #45db8d; background: linear-gradient(145deg, #123224, #0d1f19); }
.metric-card--revenue .metric-icon { color: #62adff; background: #12355f; }
.metric-card--extra .metric-icon { color: #5ce59d; background: #123d2d; }
.metric-card--trip .metric-icon { color: #f6c655; background: #3a2c11; }
.metric-card--team .metric-icon { color: #5ce59d; background: #123d2d; }
.metric-card--fixed .metric-icon { color: #c891ff; background: #2c2146; }
.metric-card--total .metric-icon { color: #64afff; background: #12345f; }
.metric-card--net .metric-icon { color: #68e8a5; background: #123d2d; }
.monthly-calculation { color: #c5d3e5; border-color: #253b59; background: linear-gradient(135deg, #101f32, #0e1929); }
.monthly-calculation strong { color: #f0f6ff; }
.monthly-calculation b { color: #61df97; }
.monthly-calculation-icon { color: #5de39a; background: #123d2d; }
.count-pill { color: #d8e8fb; background: #1a2b43; }
.summary-panel { background: linear-gradient(145deg, #101d2e, #0d1928); }

.financial-metric, .financial-note { border-color: #233650; background: linear-gradient(145deg, #101d2e, #0d1928); box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.financial-metric small, .financial-metric p, .financial-note { color: #9facbf; }
.financial-metric strong { color: #f5f8ff; }
.financial-metric.is-pending > span { color: #f6c655; background: #3a2c11; }
.financial-metric.is-paid > span { color: #5ce59d; background: #123d2d; }
.financial-metric.is-driver > span { color: #64afff; background: #12345f; }
.financial-metric.is-overdue > span { color: #ff969e; background: #3b1c28; }
.financial-note span { color: #64afff; background: #12345f; }
.financial-row { border-color: #1e3048; }
.financial-row-icon { color: #c891ff; background: #2c2146; }
.financial-row-main small, .driver-debt-row span, .payment-history span { color: #9aa9bd; }
.payment-status.is-paid { color: #62e39a; background: #123d2d; }
.payment-status.is-pending { color: #f6c655; background: #3a2c11; }
.due-button { color: #a8b9ce; }
.toast { color: #eff5ff; border-color: #2d4e75; background: #14263c; box-shadow: 0 16px 40px rgba(0,0,0,.36); }
.toast.error { background: #4b202b; border-color: #843847; }

@media (max-width: 1150px) {
  .monthly-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .shell { display: block; padding: 0; }
  .sidebar { display: none; }
  .main { min-height: 100vh; border-radius: 0; }
  .content { padding: 25px 16px 85px; }
  .monthly-dashboard-heading { display: block; }
  .export-button { margin-top: 16px; }
  .monthly-metrics { grid-template-columns: 1fr; }
  .mobile-nav { background: #0a1627; border-color: #1e3048; box-shadow: 0 -8px 20px rgba(0,0,0,.2); }
  .mobile-nav button { color: #8fa1ba; }
  .mobile-nav button.active { color: #54a2ff; }
}

.financial-filter-bar { display: grid; grid-template-columns: minmax(210px, 1.3fr) repeat(3, minmax(130px, .8fr)) auto; gap: 12px; align-items: end; margin: 0 0 16px; padding: 14px 16px; border: 1px solid #223752; border-radius: 12px; background: linear-gradient(145deg, #0f1d2e, #0d1828); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.filter-heading { display: flex; align-items: center; gap: 9px; min-width: 0; padding-bottom: 3px; }
.filter-heading b { display: block; color: #eff5ff; font-size: 13px; }
.filter-heading small { display: block; margin-top: 3px; color: #91a4bd; font-size: 11px; line-height: 1.35; }
.filter-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; color: #62adff; border-radius: 9px; background: #12345f; font-size: 17px; font-weight: 800; }
.filter-field { display: grid; gap: 6px; min-width: 0; }
.filter-field label { color: #afbdd0; font-size: 11px; font-weight: 800; }
.filter-field input, .filter-field select { min-width: 0; padding: 9px 10px; border-radius: 8px; font-size: 12px; }
.filter-actions { display: flex; gap: 8px; align-items: end; }
.filter-actions .button { padding: 10px 12px; white-space: nowrap; font-size: 12px; }
@media (max-width: 1240px) {
  .financial-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { justify-content: flex-end; }
}
@media (max-width: 760px) {
  .financial-filter-bar { grid-template-columns: 1fr; padding: 14px; }
  .filter-actions .button { flex: 1; }
}

/* Financeiro: organização compacta para consulta e pagamentos rápidos. */
.page-heading:has(+ .financial-control-strip) { margin-bottom: 17px; }
.financial-control-strip { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: end; margin-bottom: 13px; padding: 12px 14px; border: 1px solid #223752; border-radius: 12px; background: linear-gradient(145deg, #0f1d2e, #0c1726); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.financial-month-form { display: flex; gap: 9px; align-items: end; padding-right: 16px; border-right: 1px solid #253954; }
.financial-month-form .toolbar-field { min-width: 185px; }
.financial-month-form .toolbar-field label { margin-bottom: 5px; font-size: 11px; }
.financial-month-form input { padding: 9px 10px; border-radius: 8px; font-size: 12px; }
.financial-month-form .button { padding: 10px 13px; font-size: 12px; white-space: nowrap; }
.financial-filter-bar { grid-template-columns: minmax(175px, 1.25fr) repeat(3, minmax(105px, .72fr)) auto; gap: 9px; align-items: end; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.financial-filter-bar .filter-field { gap: 5px; }
.financial-filter-bar .filter-field label { color: #9facbf; font-size: 10px; letter-spacing: .02em; }
.financial-filter-bar .filter-field input, .financial-filter-bar .filter-field select { height: 37px; padding: 7px 9px; font-size: 12px; }
.financial-filter-bar .filter-actions { gap: 7px; }
.financial-filter-bar .filter-actions .button { height: 37px; padding: 8px 10px; font-size: 11px; }
.financial-metrics { gap: 10px; }
.financial-metric { min-height: 99px; gap: 10px; padding: 13px 14px; }
.financial-metric > span { width: 31px; height: 31px; flex-basis: 31px; border-radius: 9px; }
.financial-metric small { font-size: 11px; }
.financial-metric strong { margin-top: 2px; font-size: clamp(19px, 1.75vw, 24px); }
.financial-metric p { margin-top: 2px; font-size: 10px; line-height: 1.3; }
.financial-note { margin: 11px 0 13px; padding: 10px 12px; font-size: 11px; }
.financial-workspace { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(295px, .72fr); gap: 14px; align-items: start; }
.financial-primary-stack, .financial-action-rail { display: grid; gap: 14px; min-width: 0; }
.financial-workspace .panel-head { padding: 13px 15px; }
.financial-workspace .panel-head h3 { font-size: 16px; }
.financial-workspace .panel-kicker { margin-bottom: 3px; font-size: 9px; }
.financial-workspace .count-pill { padding: 6px 9px; font-size: 11px; }
.financial-records-panel .table-wrap { min-height: 0; }
.financial-records-panel th, .financial-records-panel td { padding-top: 10px; padding-bottom: 10px; }
.fixed-accounts-panel .financial-rows { padding: 4px 12px 8px; }
.fixed-accounts-panel .financial-row { gap: 10px; padding: 10px 4px; }
.fixed-accounts-panel .financial-row-main { gap: 9px; }
.fixed-accounts-panel .financial-row-icon { width: 29px; height: 29px; flex-basis: 29px; border-radius: 8px; }
.fixed-accounts-panel .financial-row-main small { margin-top: 2px; font-size: 10px; }
.fixed-accounts-panel .financial-row-value { gap: 4px; }
.fixed-accounts-panel .financial-row-action { gap: 5px; }
.financial-entry-details, .paid-history-details { overflow: hidden; border: 1px solid #223752; border-radius: 11px; background: linear-gradient(145deg, #101d2e, #0d1828); box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.financial-entry-details > summary, .paid-history-details > summary { display: flex; align-items: center; gap: 10px; min-height: 69px; padding: 12px 14px; cursor: pointer; list-style: none; }
.financial-entry-details > summary::-webkit-details-marker, .paid-history-details > summary::-webkit-details-marker { display: none; }
.financial-entry-details summary b, .paid-history-details summary b { display: block; color: #eef5ff; font-size: 13px; }
.financial-entry-details summary small, .paid-history-details summary small { display: block; margin-top: 3px; color: #93a5bd; font-size: 10px; line-height: 1.35; }
.financial-entry-summary-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 9px; color: #66b1ff; background: #12355f; font-size: 18px; font-weight: 750; }
.financial-entry-chevron { margin-left: auto; color: #7f93af; font-size: 17px; transition: transform .18s ease; }
.financial-entry-details[open] .financial-entry-chevron, .paid-history-details[open] .financial-entry-chevron { transform: rotate(180deg); }
.financial-entry-details[open] { background: transparent; }
.financial-entry-details .financial-entry-form { border-width: 1px 0 0; border-radius: 0; box-shadow: none; }
.financial-entry-form { padding: 15px; }
.financial-entry-form .panel-kicker { margin: 0 0 3px; }
.financial-entry-form h3 { margin: 0 0 13px; color: #f1f6ff; font-size: 16px; }
.financial-entry-form .form-grid { gap: 11px; }
.financial-entry-form textarea { min-height: 70px; }
.driver-debts-card .driver-debts-list { padding: 3px 13px 10px; }
.driver-debts-card .driver-debt-row { padding: 11px 2px; }
.driver-debts-card .driver-debt-payment { gap: 7px; }
.paid-history-details { margin-top: 14px; }
.paid-history-details > summary { min-height: 56px; }
.paid-history-details > summary strong { margin-left: auto; color: #64e19a; font-size: 13px; }
.paid-history-details .paid-history-panel { border: 0; border-top: 1px solid #21334c; border-radius: 0; box-shadow: none; }
.paid-history-details .payment-history { padding: 0 14px 12px; }

@media (max-width: 1320px) {
  .financial-control-strip { grid-template-columns: 1fr; gap: 11px; }
  .financial-month-form { padding: 0 0 11px; border: 0; border-bottom: 1px solid #233650; }
  .financial-filter-bar { grid-template-columns: minmax(170px, 1.2fr) repeat(3, minmax(110px, .75fr)) auto; }
}
@media (max-width: 1050px) {
  .financial-workspace { grid-template-columns: 1fr; }
  .financial-action-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .financial-filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .financial-filter-bar .filter-search { grid-column: span 2; }
  .financial-filter-bar .filter-actions { justify-content: flex-end; }
}
@media (max-width: 760px) {
  .financial-control-strip { padding: 12px; }
  .financial-month-form { display: grid; grid-template-columns: 1fr auto; }
  .financial-month-form .toolbar-field { min-width: 0; }
  .financial-filter-bar { grid-template-columns: 1fr 1fr; }
  .financial-filter-bar .filter-search { grid-column: 1 / -1; }
  .financial-filter-bar .filter-actions { grid-column: 1 / -1; justify-content: stretch; }
  .financial-filter-bar .filter-actions .button { flex: 1; }
  .financial-action-rail { grid-template-columns: 1fr; }
  .financial-metric { min-height: 89px; }
  .financial-workspace { gap: 11px; }
  .financial-entry-details > summary { min-height: 62px; }
}

/* Alertas de vencimento dos custos fixos. */
.fixed-costs-directory .panel-head { padding-bottom: 11px; }
.fixed-costs-directory .panel-head .list-note { margin: 3px 0 0; font-size: 10px; }
.fixed-alert-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 14px 10px; padding: 9px 11px; border: 1px solid #31415a; border-radius: 9px; background: #101d2e; }
.fixed-alert-summary > span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border-radius: 6px; font-size: 10px; font-weight: 800; }
.fixed-alert-summary > p { flex: 1 1 180px; margin: 0; color: #97a9bf; font-size: 10px; line-height: 1.35; }
.fixed-alert-summary.is-clear { color: #69e39d; border-color: #24503d; background: #0d211b; }
.fixed-alert-summary.is-clear > span { width: 21px; height: 21px; display: grid; place-items: center; padding: 0; color: #69e39d; background: #133d2c; }
.fixed-alert-summary .is-due-soon, .fixed-alert-legend .is-due-soon { color: #ffd268; background: #3d2e10; }
.fixed-alert-summary .is-overdue, .fixed-alert-legend .is-overdue { color: #ff9ca4; background: #3d1d29; }
.fixed-cost-row.alert-vence_em_breve td { background: rgba(177, 122, 20, .06); }
.fixed-cost-row.alert-vencido td { background: rgba(183, 62, 78, .08); }
.fixed-cost-row.alert-vence_em_breve td:first-child { box-shadow: inset 3px 0 0 #e4aa34; }
.fixed-cost-row.alert-vencido td:first-child { box-shadow: inset 3px 0 0 #e96571; }
.fixed-cost-alert { display: inline-grid; gap: 2px; min-width: 108px; padding: 5px 7px; border: 1px solid transparent; border-radius: 7px; line-height: 1.15; }
.fixed-cost-alert b { font-size: 10px; }
.fixed-cost-alert small { font-size: 9px; }
.fixed-cost-alert.is-pending { color: #b9c7d9; border-color: #31425a; background: #142238; }
.fixed-cost-alert.is-no-date { color: #aab8ca; border-color: #38495e; background: #172331; }
.fixed-cost-alert.is-paid { color: #69e3a0; border-color: #245c40; background: #112e22; }
.fixed-cost-alert.is-due-soon { color: #ffd36c; border-color: #76551d; background: #392b10; }
.fixed-cost-alert.is-overdue { color: #ff9da6; border-color: #723444; background: #361c26; }
.fixed-alert-legend { display: flex; flex-wrap: wrap; gap: 7px; padding: 10px 14px 12px; border-top: 1px solid #1d2e46; }
.fixed-alert-legend span { padding: 5px 7px; border-radius: 6px; font-size: 10px; font-weight: 750; }
.field-help { display: block; margin-top: 5px; color: #8fa1ba; font-size: 10px; line-height: 1.3; }
.financial-row--vence_em_breve { border-left: 2px solid #e4aa34 !important; background: rgba(177, 122, 20, .05); }
.financial-row--vencido { border-left: 2px solid #e96571 !important; background: rgba(183, 62, 78, .07); }
.financial-row--vence_em_breve:hover, .financial-row--vencido:hover { background: inherit; }

@media (max-width: 760px) {
  .fixed-alert-summary { margin-inline: 10px; }
  .fixed-cost-alert { min-width: 94px; }
}

/* PWA: leitura e navegação sem cortes em telas pequenas. */
html { max-width: 100%; background: #07111f; }
body { min-width: 0; max-width: 100%; overflow-x: clip; }
img, svg, canvas { max-width: 100%; height: auto; }
button, input, select, textarea, .main, .content, .panel, .field, .toolbar-field { min-width: 0; }
.monthly-metrics { grid-template-columns: repeat(auto-fit, minmax(172px, 1fr)); }
.metric-value, .financial-metric strong, .stat-value, .money { overflow-wrap: anywhere; }

.mobile-menu { display: none; }
.sidebar .brand > div:last-child { display: grid; gap: 3px; width: 100%; text-align: center; }
.sidebar .brand > div:last-child strong, .sidebar .brand > div:last-child small { display: block; }
.sidebar .brand > div:last-child small { color: #8fa1ba; font-size: 9px; font-weight: 650; letter-spacing: .02em; text-transform: none; }

@media (max-width: 760px) {
  .content { width: 100%; padding: 20px 14px 92px; }
  .page-heading, .monthly-dashboard-heading { gap: 14px; margin-bottom: 18px; }
  .page-heading h1, .monthly-dashboard-heading h1 { font-size: clamp(27px, 8.5vw, 35px); line-height: 1.06; overflow-wrap: anywhere; }
  .page-heading p, .monthly-dashboard-heading p:not(.eyebrow) { overflow-wrap: anywhere; }
  .monthly-metrics { grid-template-columns: 1fr; gap: 10px; }
  .metric-card { min-height: 104px; padding: 14px; }
  .metric-value { font-size: clamp(21px, 7vw, 27px); white-space: normal; }
  .monthly-toolbar, .financial-control-strip { gap: 10px; }
  .monthly-toolbar .button, .export-button { width: 100%; justify-content: center; }
  .panel-head { gap: 10px; padding: 14px; }
  .panel-head > * { min-width: 0; }
  .count-pill { flex: 0 0 auto; }
  .quick-list li, .financial-note, .monthly-calculation, .notice { overflow-wrap: anywhere; }

  .mobile-nav {
    z-index: 30;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    justify-content: stretch;
    gap: 2px;
    height: 72px;
    padding: 6px 5px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav button {
    min-width: 0;
    min-height: 58px;
    padding: 3px 2px;
    overflow: hidden;
    white-space: nowrap;
  }
  .mobile-nav button b { max-width: 100%; font-size: 16px; line-height: 17px; overflow: hidden; }
  .mobile-nav button span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

  .mobile-menu {
    position: fixed;
    z-index: 29;
    inset: 0;
    display: block;
    pointer-events: none;
    opacity: 0;
    background: rgba(2, 8, 17, .64);
    transition: opacity .18s ease;
  }
  .mobile-menu.is-open { pointer-events: auto; opacity: 1; }
  .mobile-menu-sheet {
    position: absolute;
    right: 0;
    bottom: 72px;
    left: 0;
    max-height: min(62vh, 520px);
    padding: 15px 14px 18px;
    overflow-y: auto;
    border: 1px solid #263d5d;
    border-radius: 19px 19px 0 0;
    background: #0d1a2c;
    box-shadow: 0 -16px 36px rgba(0, 0, 0, .3);
    transform: translateY(105%);
    transition: transform .2s ease;
  }
  .mobile-menu.is-open .mobile-menu-sheet { transform: translateY(0); }
  .mobile-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 2px 12px; color: #f0f5ff; }
  .mobile-menu-close { width: 32px; height: 32px; padding: 0; border: 1px solid #29415f; border-radius: 9px; color: #dbe9fb; background: #142238; font-size: 22px; line-height: 1; }
  .mobile-menu-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mobile-menu-items button { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 12px 10px; border: 1px solid #203650; border-radius: 10px; color: #becce0; background: #101f33; text-align: left; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
  .mobile-menu-items button span { color: #64afff; }
  .mobile-menu-items button.active { color: #e5f0ff; border-color: #2c70c1; background: #15335a; }

  .table-wrap { overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tbody { padding: 8px; }
  .table-wrap tbody tr { overflow: hidden; margin-bottom: 9px; border: 1px solid #20354f; border-radius: 11px; background: #0d1929; }
  .table-wrap tbody tr:last-child { margin-bottom: 0; }
  .table-wrap td {
    display: grid;
    grid-template-columns: minmax(82px, .72fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    min-width: 0;
    padding: 9px 10px;
    border: 0;
    border-bottom: 1px solid #1d2e46;
    font-size: 12px;
    text-align: left;
    overflow-wrap: anywhere;
  }
  .table-wrap td::before { content: attr(data-label); color: #8fa1ba; font-size: 10px; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; overflow-wrap: anywhere; }
  .table-wrap td:empty { display: none; }
  .table-wrap td[colspan] { display: block; padding: 22px 12px; text-align: center; }
  .table-wrap td[colspan]::before { display: none; }
  .table-wrap td:last-child { border-bottom: 0; }
  .table-wrap td .link, .table-wrap td .button { justify-self: start; white-space: normal; }
  .table-wrap .money { white-space: normal; }

  .financial-row, .driver-debt-row { min-width: 0; }
  .financial-row-main, .driver-debt-row > div { min-width: 0; }
  .financial-row-main b, .financial-row-main small, .driver-debt-row b, .driver-debt-row span { overflow-wrap: anywhere; }
}

@media (max-width: 390px) {
  .mobile-menu-items { grid-template-columns: 1fr; }
  .financial-month-form { grid-template-columns: 1fr; }
  .financial-month-form .button { width: 100%; }
  .page-heading h1, .monthly-dashboard-heading h1 { font-size: 27px; }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .monthly-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .monthly-content-grid { grid-template-columns: 1fr; }
  .monthly-aside { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 761px) {
  .mobile-menu { display: none !important; }
}

/* Comprovantes de despesas: arquivos são enviados somente após a criação do lançamento. */
.attachment-picker { display: grid; gap: 10px; margin: 18px 0; padding: 14px; border: 1px solid #2b4666; border-radius: 12px; background: rgba(12, 28, 47, .82); }
.attachment-picker-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.attachment-picker-heading strong { display: block; color: #e8f2ff; font-size: 13px; }
.attachment-picker-heading small { display: block; margin-top: 3px; color: #9bb0ca; font-size: 11px; line-height: 1.4; }
.attachment-lock { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: #79bcff; background: #12345f; font-size: 10px; font-weight: 800; white-space: nowrap; }
.attachment-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.attachment-choice { display: inline-flex; align-items: center; gap: 7px; min-height: 37px; padding: 8px 11px; border: 1px solid #345b84; border-radius: 9px; color: #dceaff; background: #142842; cursor: pointer; font-size: 12px; font-weight: 760; }
.attachment-choice:hover { border-color: #4c93d9; background: #183458; }
.attachment-choice > input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.attachment-selected { display: grid; gap: 7px; }
.attachment-empty { color: #91a5be; font-size: 11px; }
.attachment-selected-item, .attachment-list-item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 9px; border: 1px solid #223d5a; border-radius: 9px; background: #101f33; }
.attachment-selected-item > span:nth-child(2), .attachment-list-item > div { min-width: 0; flex: 1; }
.attachment-selected-item b, .attachment-list-item b { display: block; overflow: hidden; color: #e7f0ff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-selected-item small, .attachment-list-item small { display: block; margin-top: 2px; color: #91a7c1; font-size: 10px; }
.attachment-file-icon { width: 31px; height: 31px; flex: 0 0 31px; display: grid; place-items: center; border-radius: 8px; color: #83c5ff; background: #123b66; font-size: 9px; font-weight: 900; }
.attachment-remove, .attachment-dialog-close { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; padding: 0; border: 1px solid #344e6d; border-radius: 8px; color: #b9cce1; background: #14243a; font-size: 18px; line-height: 1; }
.attachment-remove:hover, .attachment-dialog-close:hover { color: #fff; border-color: #637e9c; background: #203954; }
.attachment-status { min-height: 16px; margin: 0; color: #9aaec4; font-size: 11px; line-height: 1.35; }
.attachment-status.is-ready { color: #7be0a5; }
.attachment-status.is-error { color: #ff9e9b; }
.attachment-inline { margin-top: 7px; }
.attachment-link { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; border: 0; color: #68b2ff; background: transparent; font-size: 11px; font-weight: 760; text-align: left; }
.attachment-link:hover { color: #b4dcff; text-decoration: underline; }
.danger-link { color: #ff9694 !important; }
.attachment-dialog { position: fixed; z-index: 60; inset: 0; display: grid; place-items: center; padding: 18px; }
.attachment-dialog-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 16, .72); backdrop-filter: blur(4px); }
.attachment-dialog-card { position: relative; width: min(100%, 620px); max-height: min(80vh, 650px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #315274; border-radius: 16px; color: #e5effd; background: #0d1a2b; box-shadow: 0 25px 80px rgba(0,0,0,.45); }
.attachment-dialog-card header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px; border-bottom: 1px solid #203a58; }
.attachment-dialog-card h3 { margin: 2px 0 0; color: #f1f6ff; font-size: 18px; }
.attachment-dialog-content { overflow: auto; padding: 14px 18px 18px; }
.attachment-dialog-loading, .attachment-empty-panel { margin: 0; padding: 18px 4px; color: #a6b7cd; font-size: 13px; text-align: center; }
.attachment-list { display: grid; gap: 9px; }
.attachment-list-item { padding: 11px; }
.attachment-list-actions { display: flex; align-items: center; flex: 0 0 auto !important; gap: 10px; }

@media (max-width: 760px) {
  .attachment-picker { padding: 12px; }
  .attachment-picker-heading { display: grid; gap: 5px; }
  .attachment-lock { justify-self: start; }
  .attachment-actions { display: grid; grid-template-columns: 1fr; }
  .attachment-choice { justify-content: center; }
  .attachment-dialog { align-items: end; padding: 0; }
  .attachment-dialog-card { width: 100%; max-height: 78vh; border-radius: 18px 18px 0 0; }
  .attachment-dialog-content { padding: 13px 14px 18px; }
  .attachment-list-item { align-items: flex-start; flex-wrap: wrap; }
  .attachment-list-actions { width: 100%; padding-left: 40px; }
}

/* Controle de Cotas Transportadas — área administrativa isolada. */
.quota-toolbar { grid-template-columns: minmax(125px, .7fr) minmax(140px, .8fr) minmax(160px, 1fr) minmax(140px, .8fr) auto; }
.report-period-total { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border: 1px dashed #365272; border-radius: 9px; color: #a9bbd0; background: #0d1c2e; font-size: 12px; }
.quota-isolation { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 13px 15px; border: 1px solid #263d5c; border-radius: 12px; color: #b6c8df; background: linear-gradient(135deg, #101f33, #0d1928); }
.quota-isolation > span { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; color: #66adff; background: #12355f; font-size: 14px; }
.quota-isolation strong { display: block; color: #eaf2ff; font-size: 13px; }
.quota-isolation p { margin: 3px 0 0; font-size: 12px; line-height: 1.45; }
.quota-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.quota-metric-help { display: block; margin-top: 5px; color: #91a3bb; font-size: 10px; font-weight: 600; line-height: 1.35; }
.quota-monthly-logistics { margin: 0 0 16px; overflow: hidden; }
.quota-monthly-intro { margin: 0; padding: 13px 16px; border-bottom: 1px solid #20314a; color: #a8bad0; font-size: 12px; line-height: 1.5; }
.quota-monthly-logistics-list { display: grid; }
.quota-monthly-logistics-row { display: grid; grid-template-columns: minmax(130px, 1.2fr) minmax(150px, 1fr) minmax(88px, .65fr) minmax(110px, .8fr); align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #1e3048; }
.quota-monthly-logistics-row:last-child { border-bottom: 0; }
.quota-monthly-logistics-row strong { color: #e7f1ff; font-size: 13px; }
.quota-monthly-logistics-row span { color: #9dafc6; font-size: 12px; }
.quota-monthly-logistics-row b { color: #70e4a0; font-size: 13px; text-align: right; }
.quota-monthly-empty { margin: 0; padding: 18px; }
.quota-monthly-filter-note { margin: 0; padding: 10px 16px; border-top: 1px solid #20314a; color: #8197b3; background: rgba(10, 24, 41, .5); font-size: 11px; line-height: 1.45; }
.quota-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .72fr); gap: 16px; align-items: start; }
.quota-main-column, .quota-side-column { display: grid; gap: 16px; }
.quota-panel { overflow: hidden; }
.quota-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 16px; border-bottom: 1px solid #20314a; background: rgba(8, 19, 33, .38); }
.quota-form .field { margin: 0; }
.quota-form .field label span { color: #8fa1ba; font-weight: 500; }
.quota-note-field { grid-column: span 2; }
.quota-preview { min-height: 76px; display: grid; align-content: center; gap: 2px; padding: 10px 12px; border: 1px solid #2a4262; border-radius: 10px; background: #0e1d30; }
.quota-preview small, .quota-preview span { color: #96a9c1; font-size: 10px; }
.quota-preview strong { color: #eff6ff; font-size: 18px; letter-spacing: -.025em; }
.quota-preview p { margin: 4px 0 0; color: #7f96b2; font-size: 10px; line-height: 1.35; }
.quota-form-action { display: flex; align-items: end; justify-content: flex-end; }
.quota-form-action .button { width: 100%; min-height: 43px; }
.quota-unit-form { grid-template-columns: 1.15fr 1fr .7fr .7fr 1.35fr 1.3fr 1fr; }
.quota-unit-form .quota-note-field { grid-column: auto; }
.quota-pay-button { padding: 7px 9px; border-radius: 8px; font-size: 11px; white-space: nowrap; }
.quota-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; white-space: nowrap; }
.quota-edit-form { display: grid; gap: 14px; }
.quota-edit-form > p { margin: 0; color: #9caec4; font-size: 12px; line-height: 1.45; }
.quota-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quota-edit-grid .quota-preview { min-height: 0; }
.quota-edit-form textarea { min-height: 82px; resize: vertical; }
.quota-rates { overflow: hidden; }
.quota-rates-intro { margin: 0; padding: 13px 16px 0; color: #9caec4; font-size: 12px; line-height: 1.45; }
.quota-rate-form { display: grid; gap: 12px; padding: 16px; }
.quota-rate-form .field { margin: 0; }
.quota-rate-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 10px; }
.quota-rule-card { margin: 0 16px 16px; padding: 13px; border: 1px solid #25466b; border-radius: 11px; background: #0d2238; }
.quota-rule-card strong { display: block; color: #dbeaff; font-size: 12px; }
.quota-rule-card p { margin: 5px 0 0; color: #a4bbd6; font-size: 11px; line-height: 1.5; }
.quota-rule-card b { color: #7ab8ff; }

@media (max-width: 1260px) {
  .quota-toolbar { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quota-toolbar .button { grid-column: 1 / -1; justify-self: end; }
  .quota-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quota-layout { grid-template-columns: 1fr; }
  .quota-side-column { grid-template-columns: minmax(0, 1fr); }
  .quota-unit-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quota-edit-grid { grid-template-columns: 1fr; }
  .quota-monthly-logistics-row { grid-template-columns: minmax(130px, 1fr) minmax(140px, 1fr) minmax(88px, .7fr) minmax(105px, .8fr); }
}

@media (max-width: 760px) {
  .quota-toolbar, .quota-metrics, .quota-form, .quota-unit-form, .quota-rate-grid { grid-template-columns: 1fr; }
  .quota-toolbar .button { width: 100%; grid-column: auto; justify-self: stretch; }
  .quota-note-field { grid-column: auto; }
  .quota-form-action { justify-content: stretch; }
  .quota-isolation { padding: 12px; }
  .quota-metrics .metric-card { min-height: 124px; }
  .quota-monthly-logistics-row { grid-template-columns: 1fr auto; gap: 5px 12px; padding: 12px; }
  .quota-monthly-logistics-row span { grid-column: 1; }
  .quota-monthly-logistics-row span + span { grid-column: 1; }
  .quota-monthly-logistics-row b { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
  .quota-monthly-intro, .quota-monthly-filter-note { padding-right: 12px; padding-left: 12px; }
}
