* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #f4f7fc;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem;
}

.screen-wrapper {
  max-width: 1360px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.screen-card {
  background: #ffffff;
  border-radius: 32px;
  box-shadow: 0 20px 40px -12px rgba(0, 20, 30, 0.15);
  overflow: hidden;
  padding: 1.5rem 2rem 2rem;
  border: 1px solid rgba(0,0,0,0.02);
}

.home-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.2rem 0 0.8rem 0;
  border-bottom: 1px solid #eef2f6;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.6rem;
  color: #0b2b44;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.logo i {
  color: #2a7de1;
  font-size: 1.8rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
  font-weight: 500;
  color: #2f4057;
  align-items: center;
}

.nav-links span {
  cursor: default;
}

.nav-links span:hover { color: #0b2b44; }

.login-btn {
  background: #1f4f8a;
  color: white !important;
  padding: 0.4rem 1.2rem;
  border-radius: 40px;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.login-btn i { margin-right: 0.3rem; }

.home-hero {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem 0 1rem;
}

.home-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: #0b1a2b;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.home-hero h1 span { color: #2a7de1; }

.home-hero p {
  font-size: 1.2rem;
  color: #405871;
  max-width: 550px;
  line-height: 1.5;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0.5rem 0 1rem;
}

.btn-primary {
  background: #1f4f8a;
  color: white;
  padding: 0.7rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 8px rgba(31, 79, 138, 0.2);
  text-decoration: none;
  transition: all 0.3s;
  cursor: pointer;
}

.btn-primary:hover {
  background: #163d6e;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(31, 79, 138, 0.3);
}

.btn-primary i { font-size: 0.9rem; }

.btn-secondary {
  background: #eef3f9;
  color: #1f3a5e;
  padding: 0.7rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  border: 1px solid #d4dfec;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-secondary:hover {
  background: #d4dfec;
}

.btn-danger {
  background: #dc2626;
  color: white;
  padding: 0.7rem 2rem;
  border-radius: 40px;
  font-weight: 600;
  border: none;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-danger:hover {
  background: #b91c1c;
}

.home-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem 4rem;
  background: #f8faff;
  padding: 1.8rem 2rem;
  border-radius: 28px;
  margin: 1rem 0 0.5rem;
  width: 100%;
  border: 1px solid #e9eff5;
}

.metric-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.metric-item i {
  color: #2a7de1;
  font-size: 1.6rem;
  width: 2rem;
}

.metric-item div {
  font-weight: 500;
  color: #1f3a5e;
}

.footer-home {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid #e6edf6;
  color: #5a718b;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.login-container {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  margin: 0 auto;
  padding: 1.5rem 0 0.5rem;
}

.login-container-auth {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
  min-height: 400px;
}

.auth-box {
  background: #fafcff;
  border-radius: 24px;
  padding: 2.5rem;
  width: 100%;
  max-width: 450px;
  border: 1px solid #e9eff5;
}

.auth-icon {
  text-align: center;
  margin-bottom: 1rem;
}

.auth-icon i {
  font-size: 3rem;
  color: #2a7de1;
}

.auth-box .welcome-msg {
  text-align: center;
  font-size: 1.5rem;
}

.auth-box .welcome-sub {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eef2f6;
  padding-bottom: 0.6rem;
}

.login-header .logo {
  font-size: 1.4rem;
}

.login-nav {
  display: flex;
  gap: 1.5rem;
  font-weight: 500;
  color: #2f4057;
  font-size: 0.95rem;
  align-items: center;
}

.login-nav span, .login-nav a { cursor: pointer; }

.welcome-msg {
  font-size: 1.8rem;
  font-weight: 600;
  color: #0b1a2b;
  margin-bottom: 0.3rem;
}

.welcome-sub {
  color: #5a718b;
  margin-bottom: 2rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.stat-card {
  background: #f8faff;
  padding: 1rem 0.8rem;
  border-radius: 18px;
  text-align: center;
  border: 1px solid #e9eff5;
}

.stat-card .number {
  font-size: 1.8rem;
  font-weight: 700;
  color: #0b2b44;
}

.stat-card .label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #5a718b;
  margin-top: 0.2rem;
}

.dual-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 0.8rem;
}

.panel {
  flex: 1 1 200px;
  background: #fafcff;
  border-radius: 24px;
  padding: 1.2rem 1.5rem;
  border: 1px solid #e9eff5;
}

.panel h4 {
  font-weight: 600;
  color: #0b1a2b;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
}

.panel h4 a {
  font-weight: 400;
  color: #2a7de1;
  font-size: 0.8rem;
  text-decoration: none;
}

.client-item {
  display: flex;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid #edf2f8;
  font-size: 0.95rem;
}

.client-item .status-badge {
  background: #d2e3ff;
  padding: 0.1rem 0.8rem;
  border-radius: 40px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #1f4f8a;
}

.status-badge.inactive {
  background: #eaeef5;
  color: #5a718b;
}

.status-badge.pending {
  background: #ffe8c7;
  color: #a4691a;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: #1f3a5e;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group label i {
  color: #2a7de1;
  width: 1.2rem;
}

.form-group input,
.form-group select {
  padding: 0.75rem 1rem;
  border: 1px solid #d4dfec;
  border-radius: 40px;
  font-size: 1rem;
  outline: none;
  transition: all 0.3s;
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  border-color: #2a7de1;
  box-shadow: 0 0 0 3px rgba(42, 125, 225, 0.1);
}

.error-message {
  background: #fee;
  color: #c33;
  padding: 0.75rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  color: #5a718b;
}

.auth-link a {
  color: #2a7de1;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.auth-link a:hover {
  text-decoration: underline;
}

.filtros {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filtro {
  padding: 0.5rem 1.2rem;
  background: white;
  border: 1px solid #d4dfec;
  border-radius: 40px;
  cursor: pointer;
  font-weight: 500;
  color: #405871;
  transition: all 0.3s;
}

.filtro:hover {
  border-color: #2a7de1;
}

.filtro.active {
  background: #1f4f8a;
  color: white;
  border-color: #1f4f8a;
}

.tabela-clientes {
  width: 100%;
  border-collapse: collapse;
}

.tabela-clientes th {
  font-weight: 600;
  color: #5a718b;
  border-bottom: 2px solid #e9eff5;
  white-space: nowrap;
}

.tabela-clientes td {
  border-bottom: 1px solid #edf2f8;
  white-space: nowrap;
}

.status-badge-ativo {
  background: #d2e3ff;
  color: #1f4f8a;
  padding: 0.2rem 0.8rem;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge-pendente {
  background: #ffe8c7;
  color: #a4691a;
  padding: 0.2rem 0.8rem;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status-badge-inativo {
  background: #eaeef5;
  color: #5a718b;
  padding: 0.2rem 0.8rem;
  border-radius: 40px;
  font-size: 0.75rem;
  font-weight: 600;
}

.btn-acao {
  padding: 0.3rem 0.6rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  margin-right: 0.3rem;
  transition: all 0.3s;
}

.btn-editar {
  background: #d2e3ff;
  color: #1f4f8a;
}

.btn-editar:hover {
  background: #b8d1f5;
}

.btn-timeline {
  background: #e8d5f5;
  color: #7c3aed;
}

.btn-timeline:hover {
  background: #d4b8e8;
}

.btn-excluir {
  background: #fee2e2;
  color: #dc2626;
}

.btn-excluir:hover {
  background: #fca5a5;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  font-size: 1.3rem;
  color: #0b1a2b;
}

.fechar-modal {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: #5a718b;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s;
}

.fechar-modal:hover {
  background: #eef2f6;
}

.modal-confirmacao {
  text-align: center;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.atividade {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  background: #fafcff;
  border-radius: 12px;
  border: 1px solid #e9eff5;
}

.ponto-timeline {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: 0.3rem;
  flex-shrink: 0;
}

.ponto-criacao {
  background: #10b981;
}

.ponto-edicao {
  background: #3b82f6;
}

.ponto-status {
  background: #f59e0b;
}

.ponto-exclusao {
  background: #ef4444;
}

.conteudo-atividade {
  flex: 1;
}

.conteudo-atividade strong {
  display: block;
  color: #0b1a2b;
  margin-bottom: 0.2rem;
}

.conteudo-atividade small {
  color: #5a718b;
  font-size: 0.8rem;
}

.tabela-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 700px) {
  .home-nav { flex-direction: column; align-items: stretch; gap: 0.8rem; }
  .nav-links { justify-content: space-around; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .home-hero h1 { font-size: 2.2rem; }
  .screen-card { padding: 1.2rem; }
  .login-header { flex-direction: column; gap: 1rem; }
  .login-nav { flex-wrap: wrap; justify-content: center; }
  .dual-panel { flex-direction: column; }

  .clientes-header { flex-direction: column; align-items: stretch !important; gap: 1rem; }
  .clientes-header .btn-primary { width: 100%; justify-content: center; }

  .tabela-clientes { font-size: 0.85rem; min-width: 600px; }
  .tabela-clientes th, .tabela-clientes td { padding: 0.5rem !important; }
}