/* style.css - Estilização Profissional SaaS/CRM */
/* Reset Básico e Variáveis CSS */
/* Fidelidade a imagens: Cores suaves, layouts grid, sombras leves, bordas arredondadas, tipografia clean */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --white: #FFFFFF;
  --gray-light: #F4F6F8;
  --gray-medium: #DEE2E6;
  --gray-dark: #6C757D;
  --blue: #007BFF;
  --green: #28A745;
  --orange: #FD7E14;
  --red: #DC3545;
  --sidebar-bg: #2C3E50; /* Cinza/azulado escuro para sidebar */
  --shadow-light: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
  --transition: all 0.2s ease-in-out;
  --font-family: 'Roboto', sans-serif;
}

body {
  font-family: var(--font-family);
  background: var(--gray-light);
  color: var(--gray-dark);
  line-height: 1.5;
  font-size: 14px;
}

/* Login Container */
#login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: var(--white);
}

.login-form {
  background: var(--white);
  padding: 32px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  width: 360px;
}

.login-form h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
  color: var(--gray-dark);
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--gray-dark);
}

.input-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--gray-medium);
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: var(--transition);
}

.input-group input:focus {
  border-color: var(--blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.input-group input::placeholder {
  color: var(--gray-medium);
}

/* Botões Gerais */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-light);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-medium);
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover {
  background: darken(var(--blue), 10%);
}

.btn-success {
  background: var(--green);
  color: var(--white);
}

.btn-success:hover {
  background: darken(var(--green), 10%);
}

.btn-warning {
  background: var(--orange);
  color: var(--white);
}

.btn-warning:hover {
  background: darken(var(--orange), 10%);
}

.btn-danger {
  background: var(--red);
  color: var(--white);
}

.btn-danger:hover {
  background: darken(var(--red), 10%);
}

.btn-secondary {
  background: var(--gray-light);
  color: var(--gray-dark);
}

.btn-secondary:hover {
  background: var(--gray-medium);
}

/* Panel Container */
#panel-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* Topbar */
#topbar {
  background: var(--white);
  box-shadow: var(--shadow-light);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.logo {
  font-size: 20px;
  font-weight: 600;
  color: var(--blue);
  margin: 0;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info span {
  font-size: 14px;
  color: var(--gray-dark);
}

/* Sidebar */
#sidebar {
  background: var(--sidebar-bg);
  width: 240px;
  height: calc(100vh - 64px); /* Ajuste para topbar */
  position: fixed;
  padding: 24px 16px;
  color: var(--white);
  overflow-y: auto;
}

#sidebar nav ul {
  list-style: none;
}

#sidebar nav li {
  margin-bottom: 8px;
}

#sidebar nav a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: var(--white);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 500;
}

#sidebar nav a:hover,
#sidebar nav a.active {
  background: rgba(255, 255, 255, 0.1);
}

.icon {
  margin-right: 12px;
  font-size: 18px;
}

/* Content */
#content {
  margin-left: 240px;
  margin-top: 64px; /* Espaço para topbar */
  padding: 32px;
  flex: 1;
  overflow-y: auto;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--gray-dark);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.metric-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  padding: 24px;
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.metric-card:hover {
  box-shadow: var(--shadow-medium);
}

.metric-icon {
  font-size: 32px;
  margin-right: 16px;
  color: var(--blue);
}

.metric-content h3 {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-medium);
  margin-bottom: 8px;
}

.metric-content p {
  font-size: 24px;
  font-weight: 600;
  color: var(--gray-dark);
}

/* Graphs Grid */
.graphs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 24px;
}

.graph-card {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  padding: 24px;
}

.graph-card h3 {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
  color: var(--gray-dark);
}

.graph-card canvas {
  width: 100%;
  height: 240px;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  overflow: hidden;
}

.data-table th,
.data-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--gray-light);
}

.data-table th {
  background: var(--gray-light);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-medium);
  text-transform: uppercase;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: var(--gray-light);
}

.status-pago {
  color: var(--green);
  font-weight: 500;
}

.status-aguardando {
  color: var(--orange);
  font-weight: 500;
}

.tag {
  background: var(--orange); /* Cor exclusiva por frontend, ajuste por ID se necessário */
  color: var(--white);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
}

.action-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin: 0 8px;
  color: var(--gray-medium);
  transition: var(--transition);
}

.action-btn:hover {
  color: var(--blue);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  width: 480px;
  max-width: 90%;
  overflow: hidden;
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-dark);
  margin: 0;
}

.modal-close {
  cursor: pointer;
  font-size: 24px;
  color: var(--gray-medium);
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--gray-dark);
}

.modal-body {
  padding: 24px;
  max-height: 400px;
  overflow-y: auto;
  color: var(--gray-dark);
}

.modal-body p {
  margin-bottom: 12px;
  font-size: 14px;
}

.modal-body img {
  max-width: 100%;
  border-radius: var(--border-radius);
  margin: 16px 0;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-light);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}


.toast {
  background: #28a745;          /* verde sucesso */
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  font-size: 14px;
  font-weight: 500;
  max-width: 320px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.4s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.hide {
  opacity: 0;
  transform: translateY(20px);
}