/* Alliance CRM - Estilo Principal */
:root {
  --primary-color: #1a237e;
  --primary-dark: #0d1428;
  --primary-light: #283593;
  --secondary-color: #ffffff;
  --accent-color: #ffc107;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --error-color: #f44336;
  --warning-color: #ff9800;
  --info-color: #2196f3;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: var(--text-color);
  line-height: 1.6;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--secondary-color);
  padding: 1rem 2rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 400px;
  height: 120px;
  background-image: url('/images/logo-novo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-text {
  display: none;
}

.logo-text .company {
  font-size: 1.5rem;
  font-weight: bold;
  letter-spacing: 2px;
}

.logo-text .subtitle {
  font-size: 0.8rem;
  opacity: 0.8;
  letter-spacing: 1px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-details {
  text-align: right;
}

.user-name {
  font-weight: bold;
  font-size: 1.1rem;
}

.user-hierarchy {
  font-size: 0.9rem;
  opacity: 0.8;
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
}

.logout-btn {
  background: var(--accent-color);
  color: var(--primary-dark);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
}

.logout-btn:hover {
  background: #ffb300;
  transform: translateY(-2px);
}

/* Container Principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Cards */
.card {
  background: var(--secondary-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 2rem;
  margin-bottom: 2rem;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.card-title {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

/* Formulários */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: var(--secondary-color);
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--secondary-color);
  color: var(--text-color);
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.1);
}

/* Botões */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: var(--secondary-color);
  color: var(--text-color);
}

.btn-primary:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

.btn-success {
  background: var(--success-color);
  color: var(--secondary-color);
}

.btn-success:hover {
  background: #45a049;
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--error-color);
  color: var(--secondary-color);
}

.btn-danger:hover {
  background: #da190b;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--text-light);
  color: var(--secondary-color);
}

.btn-secondary:hover {
  background: #555;
  transform: translateY(-2px);
}

/* Tabelas */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  background: var(--primary-color);
  color: var(--secondary-color);
  font-weight: bold;
}

.table tr:hover {
  background: rgba(26, 35, 126, 0.05);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  text-transform: uppercase;
}

.badge-vendedor { background: #e3f2fd; color: #1976d2; }
.badge-supervisor { background: #f3e5f5; color: #7b1fa2; }
.badge-coordenador { background: #e8f5e8; color: #388e3c; }
.badge-gerente { background: #fff3e0; color: #f57c00; }
.badge-diretor { background: #ffebee; color: #d32f2f; }
.badge-backoffice { background: #f1f8e9; color: #689f38; }
.badge-supervisor-backoffice { background: #e1f5fe; color: #0288d1; }
.badge-coordenador-backoffice { background: #fce4ec; color: #c2185b; }
.badge-gerente-backoffice { background: #fff8e1; color: #f9a825; }

/* Página de Login */
.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-card {
  background: var(--primary-color);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  padding: 3rem;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  margin-bottom: 2rem;
  text-align: center;
}

.login-logo .logo-icon {
  margin: 0 auto 1rem;
  width: 400px;
  height: 120px;
  display: block;
  background-image: url('/images/logo-novo.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


.login-title {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
}

.login-subtitle {
  color: var(--secondary-color);
  margin-bottom: 2rem;
}

.error-message {
  background: var(--error-color);
  color: var(--secondary-color);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.success-message {
  background: var(--success-color);
  color: var(--secondary-color);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Dashboard */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.dashboard-card {
  background: var(--secondary-color);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-5px);
}

.dashboard-card h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.dashboard-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 1rem;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Responsividade */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .table {
    font-size: 0.9rem;
  }
  
  .table th,
  .table td {
    padding: 0.5rem;
  }
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Utilitários */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
