html, body { max-width: 100%; overflow-x: hidden; }
.app { grid-template-columns: 230px minmax(0, 1fr); }
main { grid-column: 2; }

/* A lateral permanece azul durante toda a rolagem. */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 230px;
  height: 100dvh;
  z-index: 20;
}

/* A imagem original possui bastante margem transparente; o recorte central
   aumenta a marca sem esticar nem deformar a logo. */
.brand {
  height: 145px;
  margin-bottom: 4px;
  overflow: hidden;
}
.brand img {
  width: 116px;
  height: auto;
  max-width: none;
  max-height: none;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  clip-path: none;
  transform: none;
}

/* Acabamento mais leve, mantendo todo o conteudo. */
body { background: #f7f9fd; }
main { padding: 0 24px 32px; }
.topbar { height: 86px; }
.quick,
.card,
.panel,
.report-card {
  border-color: #e3e9f3;
  box-shadow: 0 3px 12px rgba(16, 50, 100, 0.035);
}
.quick { padding: 17px 19px; }
.card { padding: 14px; }
.cards { gap: 10px; }
.summary { margin-top: 14px; }
.two-cols { margin-top: 14px; gap: 12px; }
.nav-btn { padding: 12px 13px; }
.icon { display: grid; place-items: center; }
.icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-user button { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; transition: background-color .16s ease; }
.sidebar-user button:hover { background: rgba(255,255,255,.14); }
.sidebar-user button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sidebar-user { grid-template-columns: 34px minmax(0,1fr) auto; gap: 6px; padding: 10px; }
.sidebar-user .avatar { width: 34px; height: 34px; }
.sidebar-user > div:nth-child(2) { min-width: 0; }
.sidebar-user > div:nth-child(2) strong { overflow: hidden; text-overflow: ellipsis; }
.user-actions { display: flex; align-items: center; gap: 1px; }
.user-actions button { width: 28px; height: 30px; }
.user-actions button svg { width: 18px; height: 18px; }
.password-dialog { width: min(480px,94vw); }
.password-form-grid { grid-template-columns: 1fr; }
.password-options { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: var(--muted); font-size: 11px; }
.password-options label { display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; cursor: pointer; }
.password-options input { accent-color: var(--blue2); }
.password-message { min-height: 18px; margin: 8px 0 0; color: var(--red); font-size: 12px; font-weight: 700; }
.password-message.success { color: var(--green); }
nav { gap: 4px; }
.table-wrap { max-width: 100%; }
.card, .two-cols > .panel { min-width: 0; }
.two-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.kpi { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; overflow: visible; }
.kpi-icon { width: 40px; height: 40px; flex: none; font-size: 18px; }
.kpi > div:last-child { min-width: 0; overflow: visible; }
.kpi strong { max-width: 100%; font-size: clamp(14px, 1.18vw, 20px); letter-spacing: -0.04em; }
@media (max-width: 1500px) and (min-width: 721px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpi strong { font-size: clamp(17px, 1.6vw, 21px); letter-spacing: -0.025em; }
}
@media (max-width: 950px) { .two-cols { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 950px) and (min-width: 721px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .sidebar { width: 220px; }
}
@media (max-width: 720px) {
  .app { display: block; }
  main { grid-column: auto; padding: 0 12px 25px; }
  .sidebar { position: static; width: auto; height: auto; }
  .brand { height: 100px; }
  .brand img { width: 190px; height: 94px; }
}

/* Seletor de varios dias. */
.multi-day { position: relative; min-width: 190px; }
.multi-day-toggle {
  width: 100%;
  min-height: 42px;
  padding: 9px 38px 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
  font-size: 12px;
  font-weight: 700;
}
.multi-day-toggle::after {
  content: '';
  position: absolute;
  right: 15px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: translateY(-70%) rotate(45deg);
}
.multi-day-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 270px;
  padding: 12px;
  z-index: 50;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(16, 50, 100, .16);
}
.multi-day-actions { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.multi-day-actions button { border: 0; background: #eef4ff; color: var(--blue); border-radius: 7px; padding: 7px 11px; cursor: pointer; }
.multi-day-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.multi-day-grid label { display: block; cursor: pointer; }
.multi-day-grid input { position: absolute; opacity: 0; pointer-events: none; }
.multi-day-grid span { display: grid; place-items: center; height: 30px; border: 1px solid #e4eaf4; border-radius: 7px; font-size: 12px; font-weight: 600; }
.multi-day-grid input:checked + span { background: var(--blue2); border-color: var(--blue2); color: #fff; }

/* Peso tipografico levemente mais suave. */
strong, .nav-btn, .filterbar label, .toolbar label, .primary, .secondary, .danger, .link-btn, .badge { font-weight: 700; }
.eyebrow { font-weight: 800; }
.topbar h1, .quick h2, .panel-head h2, .summary > h2 { font-weight: 700; }

/* Filtros e marcadores de produtos do cliente. */
.service-filters { display: flex; gap: 6px; align-items: center; }
.service-filters label { display: block; cursor: pointer; }
.service-filters input { position: absolute; opacity: 0; pointer-events: none; }
.service-filters span { display: inline-flex; align-items: center; justify-content: center; height: 44px; min-height: 44px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: #526078; font-size: 12px; font-weight: 700; box-sizing: border-box; }
.service-filters input:checked + span { border-color: var(--blue2); background: #eaf3ff; color: var(--blue); }
.connection-badge { display: inline-block; padding: 5px 8px; border-radius: 999px; white-space: nowrap; font-size: 11px; font-weight: 700; }
.connection-badge.official { background: #dbeafe; color: #1d4ed8; }
.connection-badge.qr { background: #fef3c7; color: #92400e; }
.connection-badge.both { background: #ede9fe; color: #6d28d9; }
.connection-badge.unknown { background: #eef2f7; color: #667085; }
.clients-table { min-width: 900px; }
.clients-table-wrap { max-height: calc(100vh - 190px); overflow: auto; }
.clients-table thead th { position: sticky; top: 0; z-index: 3; background: #f8fafe; box-shadow: 0 1px 0 #cbd5e1; }
.clients-table th, .clients-table td { padding-left: 10px; padding-right: 10px; }
.client-company { min-width: 190px; }
.client-company > strong { display: block; max-width: 270px; overflow: hidden; text-overflow: ellipsis; }
.client-company .connection-badge { margin-top: 5px; }
.client-profit { min-width: 105px; }
.clients-table tbody tr { transition: background-color .16s ease, box-shadow .16s ease; }
.clients-table tbody tr:nth-child(even) { background: #f7f9fc; }
.clients-table tbody tr:nth-child(odd) { background: #fff; }
.clients-table tbody td { border-bottom: 1px solid #dfe6f1; }
.clients-table tbody tr:hover { background: #eef5ff; box-shadow: inset 3px 0 0 var(--blue2); }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; cursor: pointer; }
.sort-button::after { content: ''; width: 5px; height: 5px; border-right: 1.5px solid transparent; border-bottom: 1.5px solid transparent; transform: rotate(45deg); }
.sort-button:hover { color: var(--blue2); }
.sort-button.active { color: inherit; }
.sort-button.active::after { border-color: currentColor; }
.sort-button.active.asc::after { transform: translateY(2px) rotate(225deg); }
.sort-button.active.desc::after { transform: translateY(-2px) rotate(45deg); }
@media(max-width:720px){.clients-table-wrap{max-height:none}}
.service-options { border: 1px solid var(--border); border-radius: 10px; padding: 11px 13px; }
.service-options legend { padding: 0 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.service-options label { display: inline-flex; grid-template-columns: none; align-items: center; gap: 7px; margin: 3px 20px 3px 0; }
@media (max-width: 1100px) { #clientsView .toolbar { flex-wrap: wrap; } #clientsView .toolbar > * { flex: 1 1 auto; } }

/* Controles modernos da busca e dos filtros de clientes. */
#clientsView .toolbar input[type="text"],
#clientsView .toolbar > input:not([type]),
#clientsView .toolbar select {
  height: 44px;
  min-height: 44px;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background-color: #fff;
  color: var(--text);
  box-shadow: 0 2px 7px rgba(16, 50, 100, .035);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#clientsView .toolbar { align-items: center; }
#clientsView .toolbar select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 150px;
  padding: 10px 42px 10px 14px;
  font-size: 12px;
  font-weight: 700;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}
#clientsView .toolbar input:hover,
#clientsView .toolbar select:hover { border-color: #b8c8df; background-color: #fcfdff; }
#clientsView .toolbar input:focus,
#clientsView .toolbar select:focus {
  outline: none;
  border-color: var(--blue2);
  box-shadow: 0 0 0 4px rgba(0, 125, 255, .11);
}

/* Confirmação segura antes de excluir um cliente. */
.confirm-dialog { width: min(430px, 92vw); }
.confirm-content { padding: 27px; text-align: center; }
.confirm-icon { width: 48px; height: 48px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 50%; background: #fee4e2; color: var(--red); font-size: 25px; font-weight: 800; }
.confirm-content h2 { margin: 0 0 9px; font-size: 21px; }
.confirm-content p { margin: 0; color: #526078; line-height: 1.5; }
.confirm-content .confirm-warning { margin-top: 10px; font-size: 12px; color: #8a4b45; }
.confirm-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.confirm-actions button { min-height: 42px; }

/* Barra de filtros e indicadores financeiros. */
.app:has(#financeView.active) main { height: 100vh; overflow: hidden; }
#financeView.active { height: calc(100vh - 86px); display: flex; flex-direction: column; min-height: 0; }
#financeView .toolbar, #financeView .cards { flex: 0 0 auto; }
#financeView .toolbar { align-items: center; }
#financeView .toolbar > input,
#financeView .toolbar > select,
#financeView .multi-day-toggle {
  height: 44px;
  min-height: 44px;
  border: 1px solid #d8e1ef;
  border-radius: 12px;
  background-color: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 7px rgba(16, 50, 100, .035);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#financeView .toolbar > select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 135px;
  padding: 10px 42px 10px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
#financeView .toolbar > input:hover,
#financeView .toolbar > select:hover,
#financeView .multi-day-toggle:hover { border-color: #b8c8df; background-color: #fcfdff; }
#financeView .toolbar > input:focus,
#financeView .toolbar > select:focus,
#financeView .multi-day-toggle:focus { outline: none; border-color: var(--blue2); box-shadow: 0 0 0 4px rgba(0, 125, 255, .11); }
.finance-cost-card span, .finance-cost-card strong { color: #c24136; }
.finance-fees-card span, .finance-fees-card strong { color: #b36b00; }
.finance-profit-card span, .finance-profit-card strong { color: #07854b; }

/* Tabela financeira legivel e com a acao sempre visivel. */
.finance-table-wrap { flex: 1 1 auto; min-height: 0; max-height: none; overflow: auto; }
.finance-table { min-width: 940px; }
.finance-table thead th { position: sticky; top: 0; z-index: 4; background: #f8fafe; box-shadow: 0 1px 0 #cbd5e1; }
.finance-table th, .finance-table td { padding-left: 10px; padding-right: 10px; }
.finance-table th:nth-child(3), .finance-table td:nth-child(3),
.finance-table th:nth-child(4), .finance-table td:nth-child(4),
.finance-table th:nth-child(7), .finance-table td:nth-child(7),
.finance-table th:nth-child(8), .finance-table td:nth-child(8) { text-align: right; }
.finance-table tbody tr { transition: background-color .16s ease, box-shadow .16s ease; }
.finance-table tbody tr:nth-child(odd) { background: #fff; }
.finance-table tbody tr:nth-child(even) { background: #f7f9fc; }
.finance-table tbody td { border-bottom: 1px solid #dfe6f1; }
.finance-table tbody tr:hover { background: #eef5ff; box-shadow: inset 3px 0 0 var(--blue2); }
.finance-client { width: 32%; max-width: 310px; }
.finance-client strong { display: block; overflow: hidden; text-overflow: ellipsis; }
.finance-table th:last-child, .finance-table td:last-child { position: sticky; right: 0; z-index: 2; }
.finance-table th:last-child { background: #f8fafe; z-index: 5; }
.finance-table tbody tr:nth-child(odd) td:last-child { background: #fff; }
.finance-table tbody tr:nth-child(even) td:last-child { background: #f7f9fc; }
.finance-table tbody tr:hover td:last-child { background: #eef5ff; }
.finance-action { min-width: 105px; padding-right: 12px !important; box-shadow: -8px 0 12px -12px rgba(16,50,100,.55); }
.finance-action button { width: 100%; min-width: 86px; white-space: nowrap; }
.finance-action button.primary { background: #e8f2ff; color: #0567d8; padding: 8px 11px; }
.finance-action button.primary:hover { background: #d9eaff; }
@media(max-width:720px){.app:has(#financeView.active) main{height:auto;overflow:visible}#financeView.active{height:auto;display:block}.finance-table-wrap{max-height:none}}
.undo-icon { background: #fff1d6; color: #b45309; }

/* Contas a pagar no mesmo padrao visual do Financeiro. */
.app:has(#expensesView.active) main { height: 100vh; overflow: hidden; }
#expensesView.active { height: calc(100vh - 86px); display: flex; flex-direction: column; min-height: 0; }
#expensesView .toolbar, #expensesView .cards { flex: 0 0 auto; }
#expensesView > .cards { grid-template-columns: repeat(5,minmax(0,1fr)); }
#expensesView .toolbar { align-items: center; }
#expensesView .toolbar > input,
#expensesView .toolbar > select,
#expensesView .toolbar > button {
  height: 44px;
  min-height: 44px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
#expensesView .toolbar > input,
#expensesView .toolbar > select {
  border: 1px solid #d8e1ef;
  background-color: #fff;
  color: var(--text);
  box-shadow: 0 2px 7px rgba(16, 50, 100, .035);
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
#expensesView .toolbar > select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 135px;
  padding: 10px 42px 10px 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
#expensesView .toolbar > input:hover, #expensesView .toolbar > select:hover { border-color: #b8c8df; background-color: #fcfdff; }
#expensesView .toolbar > input:focus, #expensesView .toolbar > select:focus { outline: none; border-color: var(--blue2); box-shadow: 0 0 0 4px rgba(0,125,255,.11); }
.expense-total-card span, .expense-total-card strong { color: #1d4ed8; }
.expense-paid-card span, .expense-paid-card strong { color: #07854b; }
.expense-pending-card span, .expense-pending-card strong { color: #b45309; }
.expense-late-card span, .expense-late-card strong { color: #c24136; }
.expense-profit-card span, .expense-profit-card strong { color: #07854b; }
.expenses-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; }
.expenses-table { min-width: 820px; }
.expenses-table thead th { position: sticky; top: 0; z-index: 3; background: #f8fafe; box-shadow: 0 1px 0 #cbd5e1; }
.expenses-table tbody tr:nth-child(odd) { background: #fff; }
.expenses-table tbody tr:nth-child(even) { background: #f7f9fc; }
.expenses-table tbody td { border-bottom: 1px solid #dfe6f1; }
.expenses-table tbody tr { transition: background-color .16s ease, box-shadow .16s ease; }
.expenses-table tbody tr:hover { background: #eef5ff; box-shadow: inset 3px 0 0 var(--blue2); }
.expenses-table td:last-child { white-space: nowrap; }
.expenses-empty-row:hover { background: #fff !important; box-shadow: none !important; }
.expenses-empty-row td { border-bottom: 0 !important; }
.expenses-empty { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--muted); }
.expenses-empty strong { color: var(--text); font-size: 16px; }
.expenses-empty span { font-size: 12px; }
.expenses-empty button { margin-top: 8px; }
@media(max-width:950px) and (min-width:721px){#expensesView > .cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:720px){.app:has(#expensesView.active) main{height:auto;overflow:visible}#expensesView.active{height:auto;display:block}#expensesView > .cards{grid-template-columns:1fr}.expenses-table-wrap{max-height:none}}
.expense-name strong { display: block; }
.expense-type-badge { display: inline-block; margin-top: 5px; padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 700; }
.expense-type-badge.recurring { background: #eaf3ff; color: #1d4ed8; }
.expense-type-badge.one-time { background: #f3e8ff; color: #7e22ce; }

/* Central de relatorios. */
.reports-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px; }
.reports-header h2 { margin: 0; font-size: 21px; }
.reports-header p { margin: 6px 0 0; color: var(--muted); }
.reports-period { display: flex; gap: 10px; }
.reports-period label, .reports-filter-grid label { display: grid; gap: 6px; color: #526078; font-size: 11px; font-weight: 700; }
.reports-period input, .reports-filter-grid select { height: 42px; border: 1px solid #d8e1ef; border-radius: 11px; background: #fff; color: var(--text); padding: 9px 12px; font-size: 12px; font-weight: 700; }
.reports-filters { margin-top: 12px; padding: 0; }
.reports-filters summary { padding: 14px 18px; cursor: pointer; font-size: 13px; font-weight: 700; list-style: none; }
.reports-filters summary::-webkit-details-marker { display: none; }
.reports-filters summary::after { content: '+'; float: right; color: var(--blue2); font-size: 18px; }
.reports-filters[open] summary::after { content: '−'; }
.reports-filters summary span { margin-left: 7px; color: #98a2b3; font-size: 11px; font-weight: 600; }
.reports-filter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0 18px 18px; border-top: 1px solid #edf1f7; padding-top: 16px; }
.reports-filter-grid button { align-self: end; height: 42px; }
.report-preview-cards { margin-top: 14px; }
.report-late-card span, .report-late-card strong, .report-cost-card span, .report-cost-card strong { color: #c24136; }
.report-expense-card span, .report-expense-card strong { color: #b45309; }
.report-profit-card span, .report-profit-card strong { color: #07854b; }
#reportsView .report-grid { margin-top: 14px; }
#reportsView .report-card { display: flex; flex-direction: column; min-height: 170px; }
#reportsView .report-card > div { margin-top: auto; display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
#reportsView .report-card button { min-width: 72px; }
@media(max-width:950px){.reports-header{align-items:flex-start;flex-direction:column}.reports-period{width:100%}.reports-period label{flex:1}.reports-filter-grid{grid-template-columns:1fr 1fr}}
@media(max-width:600px){.reports-period,.reports-filter-grid{display:grid;grid-template-columns:1fr}.report-preview-cards{grid-template-columns:1fr}}

/* Selecao simples: detalhes e downloads aparecem somente apos escolher. */
.reports-intro { display: flex; align-items: center; gap: 8px; padding: 13px 16px; white-space: nowrap; }
.reports-intro h2 { margin: 0; font-size: 13px; }
.reports-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.report-choice-grid { margin-top: 14px; }
.report-choice {
  min-height: 112px;
  display: grid;
  grid-template-columns: 48px minmax(0,1fr);
  grid-template-rows: 1fr auto;
  gap: 10px 14px;
  padding: 16px 18px;
  border: 1px solid #e3e9f3;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(16,50,100,.035);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.report-choice:hover { transform: translateY(-2px); border-color: #b8ccef; box-shadow: 0 10px 24px rgba(16,50,100,.08); }
.report-choice-icon { grid-row: 1 / 3; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: #eaf3ff; color: var(--blue); }
.report-choice-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.report-choice:nth-child(2) .report-choice-icon { background: #f2edff; color: #7047c7; }
.report-choice:nth-child(3) .report-choice-icon { background: #e9f8f0; color: #07854b; }
.report-choice:nth-child(4) .report-choice-icon { background: #fff3df; color: #b36b00; }
.report-choice strong, .report-choice small { display: block; }
.report-choice strong { font-size: 16px; }
.report-choice small { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.report-choice b { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; background: #eef5ff; color: #0567d8; font-size: 11px; font-weight: 700; }
.report-choice b span { transition: transform .16s ease; }
.report-choice:hover b span { transform: translateX(2px); }
.report-workspace-header { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 16px 18px; }
.report-workspace-header h2 { margin: 0; font-size: 19px; }
.report-workspace-header p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.report-back { min-height: 40px; }
.report-downloads { display: flex; gap: 7px; }
.report-downloads button { min-width: 68px; min-height: 40px; }
.reports-controls { margin-top: 12px; padding: 14px 18px; }
.reports-controls .reports-period { margin-left: auto; }
.reports-controls .multi-day { min-width: 180px; }
.reports-controls .multi-day-menu { left: auto; right: 0; width: min(270px, calc(100vw - 28px)); }
.report-table-panel { margin-top: 14px; }
.report-table-title { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.report-table-title h3 { margin: 0; font-size: 15px; }
.report-table-title span { color: var(--muted); font-size: 11px; }
.report-preview-table { min-width: 820px; }
.report-preview-table tbody tr:nth-child(even) { background: #f7f9fc; }
@media(max-width:760px){.report-workspace-header{grid-template-columns:1fr}.report-downloads{width:100%}.report-downloads button{flex:1}.reports-controls .reports-period{margin-left:0}}

/* Bloco superior do Dashboard mais compacto. */
#dashboardView .quick { padding: 12px 16px; gap: 14px; border-radius: 14px; background: linear-gradient(135deg,#cfe3fb,#dcecff); border-color: #a9c8ee; }
#dashboardView .quick h2 { margin: 3px 0 4px; font-size: 19px; }
#dashboardView .quick p { font-size: 13px; line-height: 1.35; }
#dashboardView .eyebrow { font-size: 10px; }
#dashboardView .quick-grid { gap: 7px; }
#dashboardView .quick-grid > div { padding: 9px 10px; background: rgba(255,255,255,.9); border-color: #d5e3f6; }
#dashboardView .quick-grid strong { margin: 3px 0; font-size: 15px; }
#dashboardView .quick-grid span, #dashboardView .quick-grid small { font-size: 10px; }

/* Indicadores do Dashboard em uma linha, sem cortar os valores. */
#dashboardView > .cards { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
#dashboardView > .cards .card { padding: 10px; }
#dashboardView > .cards .kpi { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
#dashboardView > .cards .kpi-icon { width: 32px; height: 32px; border-radius: 9px; font-size: 15px; }
#dashboardView > .cards .kpi-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#dashboardView > .cards .kpi span { font-size: 10px; line-height: 1.15; }
#dashboardView > .cards .kpi strong { margin-top: 4px; font-size: clamp(13px, 1.05vw, 16px); letter-spacing: -.055em; }
#dashboardView > .cards .kpi small { margin-top: 4px; font-size: 9px; line-height: 1.1; }
@media(max-width:1100px) and (min-width:721px){#dashboardView > .cards{grid-template-columns:repeat(3,minmax(0,1fr))}#dashboardView > .cards .kpi strong{font-size:17px}}
@media(max-width:720px){#dashboardView > .cards{grid-template-columns:1fr}}

/* Organizacao visual dos filtros, indicadores e resumo mensal. */
#dashboardView .filterbar { margin: 12px 0 10px; padding: 9px 12px; border: 1px solid #b8cfea; border-radius: 12px; background: #dbe9f8; align-items: center; }
#dashboardView .filterbar label { font-size: 12px; font-weight: 700; }
#dashboardView .filterbar input, #dashboardView .multi-day-toggle { height: 40px; min-height: 40px; border-color: #c6d7ed; border-radius: 10px; font-size: 12px; font-weight: 700; }
#dashboardView > .cards .card:nth-child(1) { background: #f0fbf6; border-color: #cceede; }
#dashboardView > .cards .card:nth-child(2) { background: #f0f7ff; border-color: #cee1f8; }
#dashboardView > .cards .card:nth-child(3) { background: #f5f7fa; border-color: #dce3ec; }
#dashboardView > .cards .card:nth-child(4) { background: #f7f3ff; border-color: #dfd5f7; }
#dashboardView > .cards .card:nth-child(5) { background: #fff8eb; border-color: #f3dfb9; }
#dashboardView > .cards .card:nth-child(6) { background: #fff3f2; border-color: #f1d3d0; }
#dashboardView .summary { border-color: #cbdcf2; }
#dashboardView .summary > h2 { padding: 12px 16px; background: #dbe9f8; border-radius: 13px 13px 0 0; border-bottom-color: #b8cfea; }
#dashboardView .summary-grid { padding: 14px 18px; }

/* Tabelas inferiores compactas, sem rolagem horizontal. */
#dashboardView .two-cols { margin-top: 10px; gap: 10px; align-items: start; }
#dashboardView .two-cols .panel-head { padding: 10px 13px; }
#dashboardView .two-cols .panel-head h2 { font-size: 14px; }
#dashboardView .two-cols .panel-head p { margin-top: 2px; font-size: 10px; }
#dashboardView .two-cols .link-btn { padding: 7px 9px; font-size: 12px; }
#dashboardView .two-cols .panel:first-child { border-color: #ead7a8; }
#dashboardView .two-cols .panel:first-child .panel-head { background: #fff5dc; border-radius: 13px 13px 0 0; }
#dashboardView .two-cols .panel:last-child { border-color: #edc8c4; }
#dashboardView .two-cols .panel:last-child .panel-head { background: #ffebe9; border-radius: 13px 13px 0 0; }
#dashboardView .two-cols .table-wrap { overflow: hidden; }
#dashboardView .two-cols table { min-width: 0; width: 100%; table-layout: fixed; }
#dashboardView .two-cols th, #dashboardView .two-cols td { padding: 7px 10px; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
#dashboardView .two-cols th { font-size: 9px; }
#dashboardView .two-cols th:first-child, #dashboardView .two-cols td:first-child { width: 52px; }
#dashboardView .two-cols th:nth-child(3), #dashboardView .two-cols td:nth-child(3) { width: 90px; }
#dashboardView .two-cols th:nth-child(4), #dashboardView .two-cols td:nth-child(4) { width: 96px; }
#dashboardView .two-cols .panel:first-child th:nth-child(4), #dashboardView .two-cols .panel:first-child td:nth-child(4) { overflow: visible; text-overflow: clip; }
#dashboardView .two-cols tbody tr:nth-child(even) { background: #f8fafc; }
#dashboardView .two-cols tbody td { border-bottom-color: #cbd5e1; }
#dashboardView .two-cols tbody tr:last-child td { border-bottom: 0; }
#dashboardView .two-cols tbody tr:hover { background: #edf5ff; }
