* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #eef2f6;
  color: #1f2a37;
}

:root {
  --primary: #0d4f8b;
  --primary-dark: #0a3a67;
  --card-bg: #ffffff;
  --muted: #5a6371;
  --border: rgba(13, 79, 139, 0.15);
  --surface: #f9fbff;
}

.top-nav {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  border-bottom: 4px solid rgba(255, 255, 255, 0.3);
}

.top-nav nav a {
  color: #fff;
  margin-left: 1rem;
  text-decoration: none;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-header h1 {
  margin-bottom: 0.3rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.dashboard-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 1.2rem;
  box-shadow: 0 18px 40px rgba(15, 40, 78, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border: 1px solid var(--border);
}

.dashboard-card span {
  font-size: 0.9rem;
  color: #5a6371;
}

.dashboard-card strong {
  font-size: 1rem;
  color: #0d4f8b;
  display: block;
  overflow-wrap: break-word;
  word-break: break-word;
}


.resumo-clientes {
  margin-top: 0.8rem;
}

.resumo-clientes-linhas {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #dfe4ed;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(13, 79, 139, 0.08);
}

.resumo-linha {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e4e8ef;
  align-items: center;
  gap: 1rem;
}

.resumo-linha span {
  font-size: 0.95rem;
  color: #2b3340;
}

.resumo-linha.header {
  background: #f1f5fb;
  font-weight: 600;
  color: #0d4f8b;
}

.resumo-linha.footer {
  justify-content: flex-start;
  font-weight: 600;
  cursor: pointer;
  color: #0d4f8b;
}

.resumo-linha.active {
  background: rgba(13, 79, 139, 0.08);
}

.pipeline-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 14px 32px rgba(15, 40, 78, 0.08);
  border: 1px solid rgba(13, 79, 139, 0.15);
}

.pipeline-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pipeline-grid {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pipeline-row {
  display: grid;
  grid-template-columns: 180px 1fr 70px;
  align-items: center;
  gap: 0.5rem;
}

.pipeline-label {
  font-weight: 600;
  color: #0d4f8b;
}

.pipeline-bar {
  position: relative;
  height: 14px;
  background: rgba(13, 79, 139, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.pipeline-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--primary), #1a82ff);
}

.pipeline-count {
  font-weight: 600;
  color: #0d4f8b;
  text-align: right;
}

.card {
  background: #fff;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

h1 {
  margin-top: 0;
}

label {
  display: block;
  margin-top: 0.8rem;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.6rem;
  border-radius: 4px;
  border: 1px solid #cdd4dc;
  margin-top: 0.3rem;
  font-size: 1rem;
}

button {
  margin-top: 1rem;
  padding: 0.7rem 1.6rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

button:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

button.secondary {
  background: #e3e7ec;
  color: #0d4f8b;
}

.edit-btn {
  border-radius: 4px;
  border: 1px solid #0d4f8b;
  background: #fff;
  color: #0d4f8b;
  padding: 0.35rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.edit-btn:hover {
  background: #0d4f8b;
  color: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid rgba(13, 79, 139, 0.08);
  text-align: left;
  font-size: 0.95rem;
}

th {
  background: #f1f5fb;
  font-weight: 600;
}

.mensagem-vendas {
  padding: 1rem;
  text-align: center;
  color: #0d4f8b;
  font-weight: 600;
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  align-items: flex-end;
}

.filters > * {
  flex: unset;
}

.status-chip {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(13, 79, 139, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.comissao-resumo {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.comissao-resumo span {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  border-radius: 6px;
  background: #f1f5fb;
  color: #0d4f8b;
}

.relatorio-info {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.relatorio-info span {
  padding: 0.35rem 0.65rem;
  border-radius: 5px;
  background: #fff;
  font-weight: 600;
  border: 1px solid #d1d8e0;
}

.relatorio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.label-subtitle {
  margin: 0;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.relatorio-layout {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.relatorio-dados {
  flex: 1 1 0;
}

.comissao-box {
  min-width: 220px;
  max-width: 240px;
  border: 1px solid #d1d8e0;
  border-radius: 12px;
  padding: 1rem;
  background: #f9fbff;
  box-shadow: 0 8px 24px rgba(13, 79, 139, 0.08);
}

.comissao-box span {
  font-size: 0.95rem;
  color: #5a6371;
  display: block;
  margin-bottom: 0.35rem;
}

.comissao-box strong {
  font-size: 1.4rem;
  color: #0d4f8b;
}

.login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 90;
}

.login-overlay.active {
  display: flex;
}

.login-modal {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  width: min(360px, 90%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.login-modal label {
  font-size: 0.9rem;
  color: #1f2a37;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.login-modal input {
  padding: 0.65rem;
  border-radius: 8px;
  border: 1px solid #d1d8e0;
}

.login-message {
  min-height: 1.2rem;
  color: var(--primary);
  font-size: 0.85rem;
}
@media (max-width: 640px) {
  .filters {
    flex-direction: column;
  }
}
