:root {
  --navy: #10243a;
  --blue: #1769aa;
  --cyan: #22b8cf;
  --bg: #f3f6fa;
  --text: #1c2b3a;
  --muted: #718096;
  --line: #e5ebf1;
  --white: #fff;
  --red: #c2413b;
  --orange: #b7791f;
}

/* CONFIGURAÇÕES GERAIS */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.5 Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 9px;
  padding: 11px 16px;
  font-weight: 650;
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hidden {
  display: none !important;
}

/* LOGIN */

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
  background: linear-gradient(135deg, #10243a, #174e75);
}

.auth-card {
  width: min(100%, 420px);
  background: var(--white);
  padding: 36px;
  border-radius: 20px;
  box-shadow: 0 25px 70px #06162955;
}

.auth-card h1 {
  font-size: 32px;
  margin: 4px 0;
}

.auth-card h1 span {
  color: var(--blue);
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--cyan), var(--blue));
  color: var(--white);
  font-weight: 900;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: var(--blue);
  margin: 14px 0 3px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

/* FORMULÁRIOS */

label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 650;
  color: #435365;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px #1769aa18;
}

textarea {
  resize: vertical;
}

form {
  display: grid;
  gap: 15px;
  margin-top: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}

.form-grid label {
  min-width: 0;
}

.span-2 {
  grid-column: span 2;
}

.form-actions {
  grid-column: 1 / -1;
}

.form-actions button {
  min-width: 180px;
}

.primary {
  background: var(--blue);
  color: var(--white);
}

.primary:hover {
  background: #10578f;
}

.secondary {
  background: #eaf2f8;
  color: var(--blue);
}

.full {
  width: 100%;
  margin-top: 5px;
}

/* APLICAÇÃO */

.app {
  min-height: 100vh;
}

/* MENU LATERAL */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 245px;
  background: var(--navy);
  color: var(--white);
  padding: 25px 17px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 30px;
}

.brand b {
  display: block;
  font-size: 16px;
}

.brand small {
  display: block;
  color: #91a9bd;
  font-size: 9px;
  letter-spacing: 1px;
}

.sidebar nav {
  display: grid;
  gap: 7px;
}

.nav-link {
  background: transparent;
  color: #b9c9d7;
  text-align: left;
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 12px;
  border-radius: 9px;
}

.nav-link.active,
.nav-link:hover {
  background: #ffffff17;
  color: var(--white);
}

.logout {
  margin-top: auto;
  background: #ffffff12;
  color: #d9e5ef;
}

/* CONTEÚDO PRINCIPAL */

.main {
  margin-left: 245px;
  padding: 30px;
  max-width: 1600px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 25px;
}

.topbar h2 {
  font-size: 26px;
  margin: 0;
}

.topbar .eyebrow {
  margin: 0;
}

.user-chip {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.online {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #25b879;
}

/* PÁGINAS */

.page {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.welcome {
  background: linear-gradient(110deg, #12314d, #1769aa);
  border-radius: 16px;
  color: var(--white);
  padding: 26px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  overflow: hidden;
}

.welcome h2 {
  font-size: 23px;
  margin: 5px 0;
}

.welcome p {
  margin: 4px 0;
  color: #d6e8f5;
}

.welcome .eyebrow {
  color: #7ce1ec;
}

.welcome-icon {
  font-size: 64px;
  opacity: 0.9;
  flex-shrink: 0;
}

/* INDICADORES */

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

.stat,
.panel {
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 20px;
}

.stat span,
.stat small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.stat strong {
  display: block;
  font-size: 29px;
  margin: 5px 0;
  color: var(--navy);
}

.stat.warning strong {
  color: var(--orange);
}

.stat.danger strong {
  color: var(--red);
}

/* PAINÉIS */

.panel h3 {
  font-size: 17px;
  margin: 0 0 4px;
}

.panel > p {
  margin: 5px 0;
  color: var(--muted);
  font-size: 13px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 17px;
}

.panel-head p {
  margin: 2px 0;
  color: var(--muted);
  font-size: 12px;
}

/* TABELAS */

.table-wrap {
  overflow-x: auto;
  margin-top: 13px;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 650px;
  text-align: left;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

th {
  color: #778697;
  font-weight: 700;
  background: #fbfcfd;
}

td {
  color: #34475a;
}

/* AVISOS E MENSAGENS */

.notice {
  padding: 12px 14px;
  border-radius: 9px;
  background: #edf7fc;
  color: #245b7d;
  font-size: 13px;
}

.message {
  min-height: 20px;
  color: var(--blue);
  font-size: 13px;
}

.message.error {
  color: var(--red);
}

/* ETIQUETAS */

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 20px;
  background: #eaf2f8;
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
}

.pill.overdue {
  background: #fff0ef;
  color: #b33a34;
}

.pill.soon {
  background: #fff6e5;
  color: #946315;
}

/* BOTÃO DE ENVIO */

.send-btn {
  padding: 7px 10px;
  background: #e8f7ef;
  color: #177448;
  font-size: 11px;
}

.send-btn:hover {
  background: #d2f0df;
}

/* ESTADO VAZIO */

.empty {
  text-align: center;
  color: var(--muted);
  padding: 25px;
}

/* TABLETS */

@media (max-width: 900px) {
  .sidebar {
    width: 75px;
    padding: 18px 10px;
  }

  .brand {
    padding: 0 5px 25px;
  }

  .brand > div:last-child,
  .nav-link span {
    display: none;
  }

  .nav-link {
    justify-content: center;
    font-size: 19px;
  }

  .logout {
    font-size: 0;
  }

  .logout:after {
    content: "Sair";
    font-size: 12px;
  }

  .main {
    margin-left: 75px;
    padding: 22px;
  }

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

/* CELULARES */

@media (max-width: 560px) {
  .main {
    padding: 16px 12px;
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .topbar h2 {
    font-size: 21px;
  }

  .user-chip {
    max-width: 115px;
    overflow: hidden;
  }

  .welcome {
    padding: 20px;
  }

  .welcome h2 {
    font-size: 19px;
  }

  .welcome-icon {
    font-size: 42px;
  }

  .stats {
    gap: 9px;
  }

  .stat {
    padding: 14px;
  }

  .stat strong {
    font-size: 24px;
  }

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

  .span-2 {
    grid-column: auto;
  }

  .form-actions {
    grid-column: auto;
  }

  .form-actions button {
    width: 100%;
  }

  .auth-card {
    padding: 26px 22px;
  }

  .panel {
    padding: 15px;
  }
}

/* WHATSAPP */
.wa-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.wa-qr-area {
  margin: 22px auto 8px;
  max-width: 340px;
  text-align: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfd;
}
.wa-qr-area img {
  display: block;
  width: min(100%, 280px);
  aspect-ratio: 1;
  object-fit: contain;
  margin: 0 auto 12px;
}
.wa-qr-area p {
  color: var(--muted);
  font-size: 13px;
}
.wa-connected {
  background: #e8f7ef;
  color: #177448;
}
@media (max-width: 560px) {
  .wa-connect-actions button {
    width: 100%;
  }
  .wa-qr-area {
    padding: 12px;
  }
}

/* ==========================================================
   AUTOCARE PRO — REFINAMENTO VISUAL
   Apenas estilos: não altera HTML, JavaScript ou integrações.
   ========================================================== */

:root {
  --navy: #10243a;
  --blue: #1769aa;
  --cyan: #22b8cf;
  --bg: #f4f7fb;
  --text: #1c2b3a;
  --muted: #718096;
  --line: #e6edf4;
  --white: #ffffff;
  --red: #c2413b;
  --orange: #b7791f;
  --surface-shadow: 0 8px 24px rgba(16, 36, 58, 0.045);
  --surface-shadow-hover: 0 14px 30px rgba(16, 36, 58, 0.085);
}

body {
  background:
    radial-gradient(
      circle at 92% 2%,
      rgba(34, 184, 207, 0.055),
      transparent 25rem
    ),
    var(--bg);
  color: var(--text);
  letter-spacing: -0.01em;
}

button,
input,
select,
textarea {
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

button {
  border-radius: 10px;
  letter-spacing: 0.005em;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(34, 184, 207, 0.22);
  outline-offset: 2px;
}

/* Login */
.auth-shell {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      circle at 15% 15%,
      rgba(34, 184, 207, 0.22),
      transparent 24rem
    ),
    radial-gradient(
      circle at 85% 85%,
      rgba(23, 105, 170, 0.35),
      transparent 28rem
    ),
    linear-gradient(135deg, #0c1d30 0%, #123b5b 55%, #1769aa 100%);
}

.auth-card {
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(3, 15, 29, 0.28);
}

.auth-card .brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  box-shadow: 0 8px 18px rgba(23, 105, 170, 0.2);
}

/* Menu lateral */
.sidebar {
  background: linear-gradient(180deg, #10243a 0%, #0c1d30 100%);
  padding: 27px 16px 20px;
  box-shadow: 8px 0 28px rgba(11, 29, 48, 0.08);
}

.brand {
  padding-bottom: 34px;
}

.brand-mark {
  box-shadow: 0 6px 16px rgba(34, 184, 207, 0.18);
}

.sidebar nav {
  gap: 6px;
}

.nav-link {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.005em;
}

.nav-link.active {
  color: #fff;
  background: linear-gradient(
    100deg,
    rgba(34, 184, 207, 0.2),
    rgba(23, 105, 170, 0.28)
  );
  border-color: rgba(124, 225, 236, 0.12);
  box-shadow: inset 3px 0 0 #22b8cf;
}

.nav-link:hover:not(.active) {
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  transform: translateX(2px);
}

.logout {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 11px;
}

.logout:hover {
  background: rgba(255, 255, 255, 0.19);
  color: #fff;
}

/* Área principal e cabeçalho */
.main {
  padding: 32px;
}

.topbar {
  margin-bottom: 28px;
}

.topbar h2 {
  color: #142b43;
  font-size: 27px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.topbar .eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
}

.user-chip {
  max-width: min(360px, 45%);
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 3px 10px rgba(16, 36, 58, 0.035);
}

/* Boas-vindas */
.welcome {
  position: relative;
  min-height: 132px;
  padding: 28px 32px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  background:
    radial-gradient(
      circle at 88% 15%,
      rgba(65, 194, 222, 0.24),
      transparent 13rem
    ),
    linear-gradient(112deg, #102b45 0%, #1769aa 68%, #167eaa 100%);
  box-shadow: 0 12px 28px rgba(23, 105, 170, 0.13);
}

.welcome h2 {
  font-size: clamp(20px, 2vw, 25px);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.welcome-icon {
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.16));
  transform: translateY(2px);
}

/* Indicadores */
.stats {
  gap: 16px;
}

.stat {
  position: relative;
  overflow: hidden;
  padding: 21px 22px;
  border-radius: 15px;
  box-shadow: var(--surface-shadow);
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    border-color 0.22s ease;
}

.stat::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #1769aa;
  opacity: 0.75;
}

.stat.warning::after {
  background: #d99a32;
}

.stat.danger::after {
  background: #d94c49;
}

.stat:hover {
  transform: translateY(-3px);
  box-shadow: var(--surface-shadow-hover);
}

.stat span {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.stat strong {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.stat small {
  margin-top: 3px;
}

/* Painéis */
.panel {
  padding: 23px;
  border: 1px solid #e8eef5;
  border-radius: 16px;
  box-shadow: var(--surface-shadow);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.panel h3 {
  color: #18334e;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.panel-head {
  margin-bottom: 19px;
}

.panel-head p,
.panel > p {
  line-height: 1.55;
}

/* Botões */
.primary {
  background: linear-gradient(135deg, #1769aa, #145b98);
  box-shadow: 0 5px 12px rgba(23, 105, 170, 0.15);
}

.primary:hover {
  background: linear-gradient(135deg, #145d9a, #104d82);
  box-shadow: 0 7px 16px rgba(23, 105, 170, 0.22);
  transform: translateY(-1px);
}

.secondary {
  border: 1px solid #dce9f4;
  background: #f0f6fb;
  color: #1769aa;
}

.secondary:hover {
  border-color: #c7dced;
  background: #e5f0f8;
  transform: translateY(-1px);
}

.form-actions button {
  min-height: 42px;
}

/* Campos */
label {
  gap: 7px;
  color: #344b60;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  min-height: 42px;
  border: 1px solid #dce5ee;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(16, 36, 58, 0.025);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #bdcedd;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #2583c5;
  box-shadow: 0 0 0 4px rgba(23, 105, 170, 0.1);
}

textarea {
  min-height: 88px;
}

/* Tabelas */
.table-wrap {
  border: 1px solid #edf1f5;
  border-radius: 12px;
  background: #fff;
}

table {
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 14px 12px;
  font-size: 12px;
}

th {
  color: #61758a;
  background: #f7f9fc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  white-space: nowrap;
}

th:first-child {
  border-top-left-radius: 10px;
}

th:last-child {
  border-top-right-radius: 10px;
}

td {
  color: #34475a;
  background: #fff;
}

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

tbody tr:hover td {
  background: #f8fbfe;
}

/* Status e ações */
.pill {
  padding: 5px 10px;
  border: 1px solid transparent;
  font-size: 10px;
  letter-spacing: 0.01em;
}

.pill.overdue {
  border-color: #f7d8d5;
}

.pill.soon {
  border-color: #f2e3c3;
}

.wa-connected {
  border: 1px solid #ccebd9;
}

.send-btn {
  border: 1px solid #d2ecdd;
  border-radius: 8px;
  font-weight: 750;
}

.send-btn:hover {
  background: #c9ead7;
  transform: translateY(-1px);
}

/* Avisos, mensagens e QR Code */
.notice {
  border: 1px solid #dcecf6;
  border-radius: 11px;
  background: linear-gradient(100deg, #f0f8fd, #f7fbfe);
  line-height: 1.55;
}

.message {
  padding: 2px 0;
}

.wa-qr-area {
  border-color: #e4ebf2;
  border-radius: 16px;
  box-shadow: var(--surface-shadow);
  background: #fff;
}

.wa-qr-area img {
  border-radius: 8px;
}

/* Janela de edição */
dialog {
  color: var(--text);
  border: 1px solid #e6edf4 !important;
  border-radius: 18px !important;
}

dialog::backdrop {
  background: rgba(8, 22, 38, 0.52);
  backdrop-filter: blur(3px);
}

/* Barra de rolagem */
* {
  scrollbar-width: thin;
  scrollbar-color: #c5d2df transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  border-radius: 20px;
  background: #c5d2df;
}

*::-webkit-scrollbar-thumb:hover {
  background: #9eafbf;
}

/* Responsividade: mantém o menu e as telas existentes */
@media (max-width: 900px) {
  .main {
    padding: 24px;
  }

  .panel {
    padding: 19px;
  }

  .welcome {
    padding: 24px;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 15px 11px;
  }

  .topbar {
    gap: 10px;
  }

  .user-chip {
    max-width: 100%;
    padding: 7px 10px;
  }

  .welcome {
    min-height: 112px;
    padding: 18px;
    border-radius: 14px;
  }

  .welcome-icon {
    font-size: 36px;
  }

  .stats {
    gap: 9px;
  }

  .stat {
    border-radius: 12px;
    padding: 13px 14px;
  }

  .stat strong {
    font-size: 25px;
  }

  .panel {
    padding: 14px;
    border-radius: 13px;
  }

  .panel-head {
    align-items: flex-start;
  }

  .panel-head button {
    flex-shrink: 0;
  }

  th,
  td {
    padding: 11px 9px;
  }
}

/* Respeita usuários que preferem menos animações */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ==========================================================
   AUTOCARE PRO — MÓDULO FINANCEIRO
   ========================================================== */
.finance-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.finance-toolbar h3 {
  margin-bottom: 4px;
}
.finance-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.finance-filters label,
.finance-type-filter {
  min-width: 130px;
}
.finance-filters input,
.finance-filters select,
.finance-type-filter select {
  min-width: 135px;
}
.finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}
.finance-card {
  min-width: 0;
  padding: 19px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--surface-shadow, 0 8px 24px rgba(16, 36, 58, 0.045));
}
.finance-card span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.finance-card span i {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  font-style: normal;
  font-size: 16px;
  background: #eef4f8;
}
.finance-card strong {
  display: block;
  margin: 13px 0 4px;
  color: var(--navy);
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.finance-card small {
  color: var(--muted);
  font-size: 11px;
}
.finance-card.income {
  border-top: 3px solid #159568;
}
.finance-card.income span i {
  color: #159568;
  background: #e8f7f0;
}
.finance-card.expense {
  border-top: 3px solid #d45c55;
}
.finance-card.expense span i {
  color: #c2413b;
  background: #fff0ef;
}
.finance-card.balance {
  border-top: 3px solid #2879b9;
}
.finance-card.balance span i {
  color: #1769aa;
  background: #eaf3fb;
}
.finance-card.count {
  border-top: 3px solid #8b78c7;
}
.finance-card.count span i {
  color: #725bb2;
  background: #f1edfb;
}
.finance-card strong.negative {
  color: #c2413b;
}
.finance-form-panel {
  border-top: 3px solid var(--blue);
}
.finance-form-tag {
  padding: 7px 10px;
  border-radius: 999px;
  color: #1769aa;
  background: #eaf3fb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.7px;
  white-space: nowrap;
}
.finance-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.finance-history-head {
  align-items: flex-end;
}
.finance-type-filter {
  max-width: 210px;
}
.finance-table {
  min-width: 900px;
}
.finance-table td {
  vertical-align: middle;
}
.finance-type {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 750;
}
.finance-type.is-income {
  color: #14764f;
  background: #e8f7ef;
}
.finance-type.is-expense {
  color: #b33a34;
  background: #fff0ef;
}
.finance-value {
  white-space: nowrap;
  font-weight: 750;
}
.text-income {
  color: #14764f;
}
.text-expense {
  color: #b33a34;
}
.finance-row-note {
  display: block;
  max-width: 260px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: normal;
}
.finance-actions {
  white-space: nowrap;
}
.finance-actions button {
  margin: 2px;
}
.finance-delete-btn {
  padding: 7px 10px;
  border-radius: 8px;
  color: #b33a34;
  background: #fff0ef;
  font-size: 11px;
  font-weight: 700;
}
.finance-delete-btn:hover {
  background: #ffe1df;
}
@media (max-width: 1100px) {
  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .finance-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .finance-filters {
    width: 100%;
  }
}
@media (max-width: 560px) {
  .finance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .finance-card {
    padding: 14px;
  }
  .finance-card strong {
    font-size: 20px;
  }
  .finance-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .finance-filters label {
    min-width: 0;
  }
  .finance-filters button {
    width: 100%;
  }
  .finance-filters button:nth-of-type(1) {
    grid-column: 1 / -1;
  }
  .finance-history-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .finance-type-filter {
    width: 100%;
    max-width: none;
  }
  .finance-form-tag {
    display: none;
  }
  .finance-form-actions button {
    flex: 1 1 100%;
  }
}

.brand-mark {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

.brand img {
  width: 45%;
  height: 45%;
  object-fit: contain;
}


/* Opções de envio de lembretes: manual sem API e Evolution API */
.reminder-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 20px;
}
.reminder-mode {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.reminder-mode.manual { border-color: #ccebd9; background: #f5fbf7; }
.reminder-mode.evolution { border-color: #d8e6f5; background: #f5f9fd; }
.reminder-mode-icon { font-size: 23px; line-height: 1.2; }
.reminder-mode strong { display: block; color: var(--text, #17324a); font-size: 13px; }
.reminder-mode p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.reminder-actions { display: flex; flex-wrap: wrap; gap: 6px; min-width: 190px; }
.reminder-actions .send-btn { padding: 8px 10px; font-size: 11px; white-space: nowrap; }
.manual-send-btn { color: #137a45; background: #eaf7ef; border-color: #ccebd9; }
.manual-send-btn:hover { background: #d9f0e2; }
.api-send-btn { color: #205d9a; background: #edf5fd; border-color: #d3e5f7; }
.api-send-btn:hover { background: #deedfb; }
@media (max-width: 700px) {
  .reminder-modes { grid-template-columns: 1fr; }
  .reminder-actions { min-width: 0; }
  .reminder-actions .send-btn { flex: 1 1 auto; }
}


/* ==========================================================
   AUTOCARE PRO — LOGO DO MENU LATERAL
   Centraliza a logo e oculta o texto "PAINEL DA OFICINA".
   Mantém os demais elementos e a responsividade existentes.
   ========================================================== */
.sidebar .brand {
  width: 100%;
  height: auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 22px;
  margin: 0 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.10);
  background: transparent;
  overflow: visible;
}

.sidebar .brand > div:last-child {
  display: none;
}

.sidebar .brand .brand-mark {
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.sidebar .brand .brand-mark img,
.sidebar .brand > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Em telas menores, mantém a logo centralizada no menu compacto. */
@media (max-width: 900px) {
  .sidebar .brand {
    width: 100%;
    min-height: 60px;
    padding: 0 0 16px;
    margin-bottom: 16px;
  }

  .sidebar .brand .brand-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }
}
