/* Estilos base e cabeçalho do módulo */
:root {
  --bg-dark: #0b1120;
  --bg-panel: #111827;
  --bg-soft: #1f2937;
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --accent: #facc15;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --white: #ffffff;
  --danger: #ef4444;
  --success: #4ade80;
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: linear-gradient(135deg, #020817 0%, #0f172a 42%, #111827 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.btn-primary {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-weight: 700;
  padding: 15px 20px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 16px 24px rgba(34, 197, 94, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

#container-botoes .btn-primary,
#container-botoes .report-settings,
#container-botoes .report-sql {
  min-height: 48px;
  border-radius: 12px;
  font-weight: 700;
}

.btn-sql-geral {
  min-width: 170px;
  padding: 12px 18px;
}

.message {
  min-height: 24px;
  margin: 16px 0 0;
  font-weight: 600;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.helper-text {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
  text-align: center;
}

.main-page {
  min-height: 100vh;
  padding: 32px 20px 60px;
}

.topbar {
  max-width: 1100px;
  margin: 0 auto 24px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.logo span {
  color: var(--accent);
}

.user-area {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.user-badge,
.empresa-badge {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #bbf7d0;
}
.user-badge i { display: inline-grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border: 1px solid rgba(226,255,190,.75); border-radius: 50%; color: #173b2b; background: radial-gradient(circle at 32% 24%, #d9f59a, #9bc74e 68%, #6d9d35); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(45,83,27,.2), 0 3px 8px rgba(0,0,0,.24); }

.empresa-badge {
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.25);
  color: #fef3c7;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 600;
  min-height: 42px;
  transition: transform 0.2s ease, background 0.2s ease;
}
.logout-btn i, .btn-trocar-modulo i, .btn-sair i { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid rgba(255,255,255,.16); border-radius: 8px; color: #ffd2ca; background: linear-gradient(145deg, #9b5147, #69372f); box-shadow: inset 0 1px 0 rgba(255,255,255,.25), inset 0 -2px 0 rgba(0,0,0,.14), 0 2px 5px rgba(0,0,0,.18); transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.logout-btn.module-switch-btn { border: 1px solid rgba(86,189,131,.5); color: #eafff2; background: linear-gradient(145deg, #26794c, #155637); box-shadow: 0 5px 12px rgba(21,86,55,.24); }
.logout-btn.module-switch-btn i, .btn-trocar-modulo i { color: #d7f48b; background: linear-gradient(145deg, #367451, #214a34); }
.logout-btn:hover i, .btn-trocar-modulo:hover i, .btn-sair:hover i { transform: translateY(-1px); filter: brightness(1.12); }

.logout-btn:hover {
  transform: translateY(-1px);
  background: rgba(239, 68, 68, 0.2);
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .user-area {
    justify-content: stretch;
  }

  .user-badge,
  .empresa-badge,
  .logout-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Tela 1: seleção de empresa */
.selection-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vh, 56px) 20px;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(34, 197, 94, 0.17), transparent 34rem),
    radial-gradient(ellipse at 92% 100%, rgba(59, 130, 246, 0.12), transparent 32rem),
    linear-gradient(145deg, #050b17 0%, #0b1424 55%, #101b2b 100%);
}

.selection-container {
  width: min(100%, 1180px);
}

.selection-card {
  background: linear-gradient(150deg, rgba(17, 29, 47, 0.97), rgba(10, 19, 34, 0.97));
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 26px;
  padding: clamp(22px, 3.5vw, 40px);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.selection-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #60a5fa, var(--accent));
}

.selection-heading {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 24px;
}
.selection-user-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; margin-left: auto; border: 1px solid rgba(226,255,190,.75); border-radius: 50%; color: #173b2b; background: radial-gradient(circle at 32% 24%, #d9f59a, #9bc74e 68%, #6d9d35); box-shadow: inset 0 2px 0 rgba(255,255,255,.55), inset 0 -3px 0 rgba(45,83,27,.2), 0 4px 10px rgba(0,0,0,.25); }
.selection-user-avatar i { filter: drop-shadow(0 1px 1px rgba(255,255,255,.35)); }

.module-logo-container {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  padding: 8px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 22px;
  background: rgba(34, 197, 94, 0.08);
}

.selection-card h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
}

.selection-title > p:last-child {
  margin-top: 9px;
  color: #a9b8c9;
  font-size: 0.98rem;
}

.selection-eyebrow {
  margin: 0 0 7px;
  color: #73e3a0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.selection-card p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  max-width: 700px;
}

.company-search-wrap {
  margin-top: 0;
  position: relative;
}

.company-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.company-actions > * {
  flex: 0 0 auto;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 2.5rem;
  color: var(--bg-dark);
  background: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  transform: skew(-8deg);
}

  .brand-mark {
    margin-bottom: 1.75rem;
  }

  .eyebrow {
  margin: 0 0 0.8rem;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}



.btn-sql-geral,
.btn-parametros,
.btn-feriados {
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(34, 197, 94, 0.16);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-parametros i, .btn-feriados i { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: linear-gradient(145deg, rgba(255,255,255,.25), rgba(0,0,0,.12)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), inset 0 -2px 0 rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16); }

.btn-sair {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.16);
  color: #fecaca;
  font-weight: 700;
  padding: 10px 18px;
  cursor: pointer;
  min-height: 44px;
  transition: transform 0.2s ease, background 0.2s ease;
  border: 1px solid rgba(223,121,112,.35);
}

.btn-trocar-modulo {
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(38,121,76,.92), rgba(21,86,55,.96));
  color: #eafff2;
  border-color: rgba(86,189,131,.5);
  font-weight: 700;
  padding: 10px 18px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn-parametros {
  min-width: 160px;
  gap: 8px;
}

.btn-feriados {
  gap: 6px;
}

.btn-sql-geral:hover,
.btn-parametros:hover,
.btn-feriados:hover,
.btn-sair:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(34, 197, 94, 0.24);
}

.btn-sair:hover {
  background: rgba(239, 68, 68, 0.28);
  box-shadow: none;
}

.btn-trocar-modulo:hover {
  transform: translateY(-2px);
  border-color: rgba(86,189,131,.8);
  background: linear-gradient(145deg, rgba(38,121,76,1), rgba(21,86,55,1));
}

.btn-edit {
  background: #3b82f6;
  color: white;
  padding: 8px 12px;
  font-size: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 6px;
  transition: all 0.2s;
}

.btn-edit:hover {
  background: #2563eb;
  transform: translateY(-1px);
}

.btn-danger {
  background: #ef4444;
  color: white;
  padding: 8px 12px;
  font-size: 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-danger:hover {
  background: #dc2626;
  transform: translateY(-1px);
}

.company-search {
  width: 100%;
  min-height: 54px;
  background: rgba(7, 14, 26, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--white);
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.company-search:focus {
  border-color: rgba(34, 197, 94, 0.7);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
  background: rgba(7, 14, 26, 0.95);
}

.company-search::placeholder {
  color: #8090a4;
}

.company-list-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 34px;
}

.company-list-heading h2 {
  margin: 0;
  color: #f1f5f9;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.company-list-heading p {
  color: #91a0b2;
  font-size: 0.86rem;
}

.company-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr));
  gap: 16px;
  margin-top: 15px;
}

.company-option {
  min-width: 0;
  background: linear-gradient(145deg, rgba(24, 39, 59, 0.82), rgba(14, 25, 42, 0.9));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  gap: 18px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.company-option:hover {
  transform: translateY(-3px);
  border-color: rgba(74, 222, 128, 0.48);
  background: linear-gradient(145deg, rgba(27, 48, 68, 0.96), rgba(14, 29, 45, 0.98));
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.22);
}

.company-option h3 {
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 1.05rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.company-option p {
  margin: 0 0 12px;
  color: #a8b5c5;
  font-size: 0.86rem;
  line-height: 1.5;
}

.company-option small {
  color: #8093a8;
  font-size: 0.77rem;
  font-weight: 650;
  letter-spacing: 0.03em;
}

.company-option button {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  font-weight: 700;
  min-height: 42px;
  padding: 10px 14px;
  cursor: pointer;
  box-shadow: 0 12px 22px rgba(34, 197, 94, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.company-option button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(34, 197, 94, 0.28);
}

.company-grid > .error-message {
  grid-column: 1 / -1;
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(248, 113, 113, 0.25);
  border-radius: 14px;
  background: rgba(127, 29, 29, 0.12);
  color: #fecaca;
}

.selection-card :focus-visible {
  outline: 3px solid rgba(110, 231, 164, 0.75);
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .selection-page {
    padding: 18px 12px;
  }

  .selection-card {
    border-radius: 20px;
    padding: 22px 18px;
  }

  .selection-heading {
    gap: 14px;
    margin-bottom: 20px;
  }

  .module-logo-container {
    width: 62px;
    height: 62px;
    padding: 5px;
    border-radius: 17px;
  }

  .selection-heading .module-logo {
    height: 52px;
    max-width: 52px;
  }

  .selection-heading h1 {
    min-width: 0;
    font-size: clamp(1.45rem, 6vw, 2rem);
  }

  .selection-title > p:last-child {
    font-size: 0.88rem;
  }

  .company-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-actions > * {
    width: 100%;
    min-width: 0;
    padding-inline: 10px;
    text-align: center;
  }

  .company-actions .btn-sql-geral {
    grid-column: 1 / -1;
  }

  .company-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  }
}

@media (max-width: 520px) {
  .company-list-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .company-grid {
    grid-template-columns: 1fr;
  }

  .company-option {
    min-height: 0;
  }
}

/* Tela 2: painel e ações de produtividade */
.dashboard {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  gap: 28px;
}

.hero-panel,
.card {
  background: rgba(17, 24, 39, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #60a5fa, var(--accent));
}

.hero-panel h2 {
  margin: 0 0 12px;
  font-size: clamp(1.8rem, 2vw, 2.2rem);
}

.hero-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
  max-width: 700px;
}

/* Formulários e opções dos relatórios */
.report-period {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}

.report-control {
  margin-top: 22px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.report-settings,
.report-sql {
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  cursor: pointer;
  font-weight: 700;
  min-height: 48px;
  padding: 12px 18px;
  box-shadow: 0 16px 24px rgba(34, 197, 94, 0.25);
}

.report-sql {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: none;
}

.report-sql-output {
  width: 100%;
  min-height: 240px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.6);
  color: var(--white);
  resize: vertical;
  font-family: Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.5;
}

.report-dialog {
  padding: 0px 60px;
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 16px;
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow);
}

.sql-geral-dialog {
  width: min(92vw, 520px);
}

.sql-geral-dialog .report-form h3 {
  color: var(--primary);
}

.sql-geral-dialog .report-dialog-actions .btn-primary {
  min-width: 150px;
}

.report-dialog::backdrop {
  background: rgba(2, 8, 23, 0.78);
}

.report-form {
  padding: 24px;
}

.report-form h3 {
  margin: 0 0 8px;
}

.report-form p {
  margin: 0 0 20px;
  color: var(--muted);
}

.report-form h4 {
  margin: 18px 0 10px;
}

.report-range-group {
  margin-top: 18px;
  padding: 14px 12px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.25);
}

.report-range-group h4 {
  margin: 0 0 12px;
}

.report-range-group > label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

#diasUteisParametro {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: red;
}

.report-holiday-group {
  border-color: rgba(250, 204, 21, 0.25);
  background: rgba(250, 204, 21, 0.04);
}

.report-ranges {
  display: grid;
  gap: 10px;
}

.report-range {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 12px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.8), rgba(17, 24, 39, 1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.report-range-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.report-range-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.report-range-header-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
  padding: 0 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.report-range-table {
  width: 100%;
}

.report-range-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
}

.report-range-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}

.report-range-row label span {
  color: var(--muted);
}

.report-range input {
  min-width: 0;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.report-range input:focus {
  border-color: rgba(34, 197, 94, 0.8);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
  outline: none;
}

.report-remove-range {
  justify-self: end;
  min-width: 110px;
}

.report-add-range,
.report-add-holiday-range,
.report-remove-range {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.report-add-range,
.report-add-holiday-range {
  margin-top: 10px;
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.25);
  font-weight: 700;
}

.report-remove-range {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.06);
  border-color: rgba(239, 68, 68, 0.28);
}

.report-add-range:hover,
.report-add-holiday-range:hover,
.report-remove-range:hover,
.report-cancel:hover {
  transform: translateY(-1px);
}

.report-dialog-actions {
  display: flex;
  gap: 12px;
}

.report-cancel {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 12px 18px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  align-items: right;
}

@media (max-width: 560px) {
  .report-form {
    padding: 16px;
  }

  .report-range-group {
    padding: 10px 8px 8px;
  }

  .report-range-fields {
    grid-template-columns: 1fr;
  }

  .report-range {
    padding: 10px 8px;
  }

  .report-dialog-actions {
    flex-direction: column-reverse;
  }

  .report-dialog-actions button {
    width: 100%;
  }

  .report-remove-range {
    justify-self: stretch;
    width: 100%;
  }
}

.report-period label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--white);
  font-weight: 600;
}

.report-period input {
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}

.report-view-options {
  display: flex;
  gap: 20px;
  margin: 16px 0;
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
}

.radio-label input[type="radio"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.report-form > label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--white);
  font-weight: 600;
}

/* Modal de visualização e tabela do relatório */
.relatorio-modal {
  width: min(95vw, 1200px);
  max-height: 70vh;
  border: 1px solid rgba(154, 158, 158, 0.2);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  padding: 0;
}

.relatorio-modal::backdrop {
  background: rgba(214, 211, 211, 0.7);
}

.relatorio-modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 24px;
  background: var(--bg-panel);
}

.relatorio-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.relatorio-modal-header h2 {
  margin: 0;
  color: var(--primary);
  font-size: 24px;
}

.relatorio-close {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 32px;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.relatorio-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.relatorio-modal-body {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 20px;
}

.relatorio-info {
  display: flex;
  gap: 30px;
  margin-bottom: 20px;
  padding: 12px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 8px;
  font-size: 14px;
  color: var(--text);
}

.relatorio-table-container {
  overflow-x: auto;
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.relatorio-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--text);
}

.relatorio-table thead {
  position: sticky;
  top: 0;
  background: rgba(34, 197, 94, 0.15);
  border-bottom: 2px solid var(--primary);
}
/*para reduzir o tamanho da tabela e permitir rolagem horizontal, adicionei overflow-x: auto no container da tabela*/
.relatorio-table th {
  padding: 6px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--primary);
  border-right: 1px solid rgba(148, 163, 184, 0.1);
}
.relatorio-table th.coluna-ordenavel {
  padding: 0;
}
.relatorio-table th.coluna-ordenavel button {
  width: 100%;
  padding: 10px 8px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
}
.relatorio-table th.coluna-ordenavel button:hover,
.relatorio-table th.coluna-ordenavel.ordenacao-ativa button {
  background: rgba(34, 197, 94, 0.16);
}
.relatorio-table th.coluna-ordenavel button span {
  margin-left: 4px;
  font-size: 12px;
}

.relatorio-table td {
  padding: 3px 6px;
  font-family: 'Courier New', monospace;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  border-right: 1px solid rgba(148, 163, 184, 0.05);
}

.relatorio-table tbody tr:hover {
  background: rgba(34, 197, 94, 0.05);
}

.relatorio-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.relatorio-table td.numero,
.relatorio-table td.valor {
  text-align: right;
  font-family: 'Courier New', monospace;
}

.relatorio-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.15);
  flex-wrap: wrap;
}

.btn-print,
.btn-pdf,
.btn-excel,
.btn-csv,
.btn-close {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-weight: 700;
    padding: 12px 14px;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(34, 197, 94, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-print:hover,
.btn-pdf:hover,
.btn-excel:hover,
.btn-csv:hover {
 transform: translateY(-2px);
}

.btn-close {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    font-weight: 700;
    padding: 12px 14px;
    cursor: pointer;
    box-shadow: 0 12px 22px rgba(34, 197, 94, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-close:hover {
 transform: translateY(-2px);
}

.report-form > label input {
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.stat {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 18px;
  padding: 22px 18px;
}

.stat strong {
  display: block;
  font-size: 2rem;
  margin-bottom: 8px;
}

.stat span {
  color: var(--muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 12px;
}

.card p,
.card li {
  color: var(--muted);
  line-height: 1.7;
}

.card ul {
  margin: 0;
  padding-left: 18px;
}

@media (max-width: 760px) {
  .stats-grid,
  .cards-grid {
    grid-template-columns: 1fr;
  }
}

.module-logo {
	display: block;
	flex: 0 0 auto;
	width: auto;
	height: 72px;
	max-width: 260px;
	object-fit: contain;
}
