/* ===== ESTILOS ADICIONAIS PARA O NOVO LAYOUT ===== */

/* ===== MODAIS DO CRM ===== */

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Form Select */
.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-background);
  color: var(--text-color);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Modal Footer */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
  margin-top: 1.5rem;
}

/* CRM Specific Styles */
.crm-section {
  padding: 2rem;
}

.crm-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.crm-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-color);
}

.crm-controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.crm-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.crm-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.crm-btn.secondary {
  background: var(--secondary-color);
  color: white;
}

.crm-btn.success {
  background: var(--success-color);
  color: white;
}

.crm-btn.danger {
  background: var(--danger-color);
  color: white;
}

/* CRM Search */
.crm-search-section {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border: 1px solid var(--border-color);
}

.crm-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.crm-search-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* CRM Tables */
.crm-table-container {
  background: var(--card-background);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.crm-table {
  width: 100%;
  border-collapse: collapse;
}

.crm-table th {
  background: var(--primary-color);
  color: white;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.crm-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-color);
}

.crm-table tr:hover {
  background: rgba(37, 99, 235, 0.05);
}

.crm-table tr:last-child td {
  border-bottom: none;
}

/* CRM Cards */
.crm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.crm-card {
  background: var(--card-background);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.crm-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.crm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.crm-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

.crm-card-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.crm-card-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.crm-card-status.disponivel {
  background: var(--success-color);
  color: white;
}

.crm-card-status.alugado {
  background: var(--primary-color);
  color: white;
}

.crm-card-status.vendido {
  background: var(--secondary-color);
  color: white;
}

.crm-card-status.manutencao {
  background: var(--warning-color);
  color: white;
}

.crm-card-body {
  color: var(--text-color);
  line-height: 1.6;
}

.crm-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.crm-card-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-color);
}

.crm-card-actions {
  display: flex;
  gap: 0.5rem;
}

.crm-card-action {
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.crm-card-action.edit {
  background: var(--primary-color);
  color: white;
}

.crm-card-action.delete {
  background: var(--danger-color);
  color: white;
}

.crm-card-action.schedule {
  background: var(--success-color);
  color: white;
}

/* CRM Stats */
.crm-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.crm-stat-card {
  background: var(--card-background);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  text-align: center;
}

.crm-stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.crm-stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Empty States */
.crm-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.crm-empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.crm-empty-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.crm-empty-description {
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Responsive CRM */
@media (max-width: 768px) {
  .crm-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .crm-controls {
    justify-content: center;
  }
  
  .crm-search-grid {
    grid-template-columns: 1fr;
  }
  
  .crm-table {
    font-size: 0.9rem;
  }
  
  .crm-table th,
  .crm-table td {
    padding: 0.75rem 0.5rem;
  }
  
  .crm-grid {
    grid-template-columns: 1fr;
  }
  
  .crm-card {
    padding: 1rem;
  }
  
  .crm-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .crm-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .crm-stats {
    grid-template-columns: 1fr;
  }
  
  .crm-btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ===== PERFIL DO USUÁRIO ===== */
/* ===== PROFILE STYLES ===== */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-4);
}

.profile-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-6);
}

.avatar-container {
  position: relative;
  display: inline-block;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
  border: 4px solid var(--card);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
}

.avatar:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

.avatar-change {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.avatar-change:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.security-info {
  background: var(--bg-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  font-family: monospace;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.password-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-secondary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.btn-sm {
  padding: var(--space-1) var(--space-2);
  font-size: var(--font-sm);
}

/* Profile Stats */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.profile-stat {
  text-align: center;
  padding: var(--space-3);
  background: var(--bg-secondary);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.profile-stat-value {
  font-size: var(--font-xl);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-1);
}

.profile-stat-label {
  font-size: var(--font-sm);
  color: var(--text-secondary);
}

/* Profile Form */
.profile-form {
  max-width: 600px;
  margin: 0 auto;
}

.profile-form .form-group {
  margin-bottom: var(--space-4);
}

.profile-form .form-label {
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--text);
}

/* Profile Actions */
.profile-actions {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-6);
  justify-content: center;
}

.profile-actions .btn {
  min-width: 120px;
}

/* Mobile Profile */
@media (max-width: 768px) {
  .profile-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .avatar {
    width: 80px;
    height: 80px;
    font-size: 36px;
  }
  
  .profile-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .profile-actions .btn {
    width: 100%;
  }
}
.social-links {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

.social-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.social-link:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===== SECTIONS ===== */
.content-section {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  font-size: var(--font-2xl);
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

/* ===== BOARDS GRID ===== */
.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.board-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition);
  cursor: pointer;
}

.board-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.board-card h3 {
  font-size: var(--font-xl);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.board-stats {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  margin-bottom: var(--space-4);
}

.board-actions {
  display: flex;
  gap: var(--space-2);
}

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--text-secondary);
}

.empty-state h3 {
  font-size: var(--font-xl);
  color: var(--text);
  margin-bottom: var(--space-3);
}

.empty-state p {
  margin-bottom: var(--space-6);
  font-size: var(--font-lg);
}

.empty-column {
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
  padding: var(--space-6);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
}

/* ===== NOTES GRID ===== */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.note-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: all var(--transition);
  cursor: pointer;
}

.note-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--primary);
}

.note-title {
  font-size: var(--font-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.note-content {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.note-date {
  color: var(--text-muted);
  font-size: var(--font-xs);
}

.note-actions {
  display: flex;
  gap: var(--space-2);
}

/* ===== ANALYTICS ===== */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-4);
}

.stat-item {
  text-align: center;
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius);
}

.stat-value {
  font-size: var(--font-3xl);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.stat-label {
  color: var(--text-secondary);
  font-size: var(--font-sm);
  font-weight: 500;
}

.chart-container {
  position: relative;
  height: 300px;
  margin-top: var(--space-4);
}

/* ===== SETTINGS ===== */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-6);
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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

.mb-4 { margin-bottom: var(--space-4); }
.mt-4 { margin-top: var(--space-4); }

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-in {
  animation: slideIn 0.3s ease-in-out;
}

/* ===== RESPONSIVE ADDITIONS ===== */
@media (max-width: 768px) {
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .boards-grid {
    grid-template-columns: 1fr;
  }
  
  .notes-grid {
    grid-template-columns: 1fr;
  }
  
  .analytics-grid {
    grid-template-columns: 1fr;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .board-actions {
    flex-direction: column;
  }
  
  .note-actions {
    flex-direction: column;
  }
}
