body { min-height: 100vh; }
.card { border-radius: .75rem; }
form p label { display: block; font-weight: 500; margin-bottom: .25rem; }
form p input, form p select { width: 100%; padding: .5rem .75rem; border: 1px solid #dee2e6; border-radius: .375rem; }
.helptext { display: block; color: #6c757d; font-size: .875rem; }
.errorlist { color: #b02a37; }

.dashboard-shell { color: #17324d; }
.dashboard-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 1.4rem; }
.dashboard-heading h1 { margin: .15rem 0 .35rem; font-size: clamp(1.8rem, 3vw, 2.6rem); font-weight: 750; letter-spacing: -.04em; color: #102a43; }
.dashboard-heading p { color: #718096; margin: 0; }
.eyebrow, .panel-kicker { color: #2176d2; font-size: .72rem; text-transform: uppercase; letter-spacing: .13em; font-weight: 750; }
.dashboard-period { background: #eaf3ff; border: 1px solid #d5e7fb; border-radius: .8rem; padding: .7rem 1rem; min-width: 230px; }
.dashboard-period span { display: block; color: #64809c; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.dashboard-period strong { color: #185fa9; font-size: .92rem; }
.dashboard-filters { display: grid; grid-template-columns: 145px 145px minmax(190px, 1fr) 170px auto auto; gap: .8rem; align-items: end; padding: 1rem; background: #fff; border: 1px solid #e4eaf0; border-radius: 1rem; box-shadow: 0 8px 30px rgba(20, 45, 70, .05); margin-bottom: 1rem; }
.dashboard-filters label { display: block; margin: 0 0 .3rem; color: #6b7f93; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.dashboard-filters input, .dashboard-filters select { width: 100%; height: 42px; border: 1px solid #d7e0e8; border-radius: .55rem; padding: 0 .7rem; background: #fbfcfd; color: #29465f; }
.btn-dashboard-filter, .btn-dashboard-clear { display: inline-flex; height: 42px; align-items: center; justify-content: center; border-radius: .55rem; padding: 0 1rem; font-size: .88rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.btn-dashboard-filter { border: 0; background: #1769c2; color: white; }
.btn-dashboard-clear { border: 1px solid #d7e0e8; color: #60758a; background: white; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi-card { position: relative; display: block; overflow: hidden; background: white; border: 1px solid #e5ebf0; border-radius: 1rem; padding: 1.15rem; color: #17324d; text-decoration: none; box-shadow: 0 7px 22px rgba(20, 45, 70, .05); transition: transform .18s ease, box-shadow .18s ease; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20, 45, 70, .1); }
.kpi-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kpi-color); }
.kpi-paid { --kpi-color: #17a673; } .kpi-approval { --kpi-color: #4e78d8; } .kpi-effect { --kpi-color: #f4b740; } .kpi-overdue { --kpi-color: #df5b5b; }
.kpi-icon { position: absolute; right: 1rem; top: .85rem; display: grid; place-items: center; width: 34px; height: 34px; color: var(--kpi-color); background: color-mix(in srgb, var(--kpi-color) 12%, white); border-radius: 50%; font-weight: 800; }
.kpi-label { color: #6e8296; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding-right: 2.5rem; }
.kpi-value { margin: .45rem 0 .55rem; color: #163752; font-size: clamp(1.25rem, 2vw, 1.7rem); font-weight: 760; letter-spacing: -.03em; }
.kpi-foot { color: #7a8c9e; font-size: .76rem; }
.kpi-foot strong { color: #334e68; } .kpi-foot span { float: right; color: var(--kpi-color); font-weight: 700; }
.dashboard-grid { display: grid; gap: 1rem; margin-bottom: 1rem; }
.dashboard-grid-main { grid-template-columns: minmax(0, 1.65fr) minmax(310px, .85fr); }
.dashboard-grid-bottom { grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); }
.dashboard-panel { min-width: 0; background: #fff; border: 1px solid #e5ebf0; border-radius: 1rem; padding: 1.2rem; box-shadow: 0 7px 22px rgba(20, 45, 70, .045); }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.panel-title h2 { color: #183b56; font-size: 1.08rem; margin: .18rem 0 0; font-weight: 750; }
.panel-total { color: #183b56; font-size: .95rem; }
.panel-link { color: #1769c2; font-size: .82rem; font-weight: 700; text-decoration: none; }
.chart-legend { display: flex; gap: 1rem; font-size: .75rem; color: #6e8296; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: .25rem; }
.legend-paid { background: #17a673; } .legend-forecast { background: #f4b740; }
.chart-wrap { position: relative; height: 310px; }
.category-list { display: grid; gap: .8rem; }
.category-row-head { display: flex; justify-content: space-between; gap: 1rem; font-size: .82rem; margin-bottom: .28rem; }
.category-row-head span { font-weight: 650; } .category-row-head strong { font-size: .78rem; }
.category-track { height: 6px; background: #edf1f5; border-radius: 999px; overflow: hidden; }
.category-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, #2176d2, #51a6e8); }
.category-row small { color: #8a9aaa; font-size: .68rem; }
.monthly-table-wrap { max-height: 380px; overflow: auto; }
.monthly-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.monthly-table th { position: sticky; top: 0; background: white; color: #8191a1; font-size: .67rem; text-transform: uppercase; letter-spacing: .06em; padding: .55rem .65rem; border-bottom: 1px solid #e5ebf0; }
.monthly-table td { padding: .72rem .65rem; border-bottom: 1px solid #eef2f5; vertical-align: middle; }
.monthly-table .money { color: #173f5f; font-weight: 700; white-space: nowrap; }
/* flex-wrap:nowrap + overflow-x:auto (em vez de wrap) para nao quebrar a
   linha da tabela: o container rola horizontalmente por conta propria em
   vez de empurrar a altura da linha (regra global: nenhuma celula quebra
   linha). flex-shrink:0 nos pills evita que o texto interno quebre. */
.category-pills { display: flex; flex-wrap: nowrap; gap: .3rem; overflow-x: auto; max-width: 100%; }
.category-pills span { padding: .22rem .45rem; border-radius: 999px; color: #52708c; background: #f0f5f9; font-size: .67rem; white-space: nowrap; flex-shrink: 0; }
.category-pills b { color: #294e6c; }
.upcoming-list { display: grid; gap: .15rem; }
.upcoming-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: .75rem; align-items: center; color: inherit; text-decoration: none; padding: .55rem; border-radius: .65rem; }
.upcoming-row:hover { background: #f5f8fb; }
.date-box { display: grid; place-items: center; line-height: 1; width: 42px; height: 42px; color: #276daf; background: #eaf3fb; border-radius: .55rem; }
.date-box b { font-size: 1rem; } .date-box small { font-size: .55rem; margin-top: .18rem; }
.date-box.is-overdue { color: #b83a3a; background: #fdecec; }
.upcoming-info { min-width: 0; }
.upcoming-info strong, .upcoming-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-info strong { font-size: .8rem; } .upcoming-info small { color: #8393a3; font-size: .67rem; }
.upcoming-value { color: #254d6c; font-size: .78rem; white-space: nowrap; }
.empty-dashboard { padding: 2rem 1rem; text-align: center; color: #8a9aaa; font-size: .85rem; }

/* Padrao do sistema: nenhuma celula de tabela quebra linha - o container
   (.table-responsive) rola horizontalmente em vez de forcar quebra. */
table td, table th {
  white-space: nowrap;
}

/* Table headers styling */
table thead th {
  background-color: var(--color-accent) !important;
  color: var(--color-accent-text) !important;
  font-weight: 600 !important;
  padding: 0.75rem !important;
}

table thead th a {
  color: var(--color-accent-text) !important;
  text-decoration: none !important;
}

table thead th a:hover {
  opacity: 0.8;
}

/* Table rows striping - alternating white and light gray */
table tbody tr:nth-child(odd) {
  background-color: white !important;
}

table tbody tr:nth-child(even) {
  background-color: #f2f2f2 !important;
}

table tbody tr:hover {
  background-color: #e8e8e8 !important;
}

@media (max-width: 1199px) {
  .dashboard-filters { grid-template-columns: repeat(4, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid-main, .dashboard-grid-bottom { grid-template-columns: 1fr; }
}
@media (max-width: 767px) {
  .dashboard-heading { align-items: stretch; flex-direction: column; gap: 1rem; }
  .dashboard-period { min-width: 0; }
  .dashboard-filters { grid-template-columns: 1fr 1fr; }
  .filter-category { grid-column: 1 / -1; }
  .kpi-grid { grid-template-columns: 1fr; }
  .chart-wrap { height: 260px; }
  .chart-legend { display: none; }
}
