/* CSS Principal do GestiX */
:root {
  --bg: #ffffff;
  --panel: #f8f9fa;
  --muted: #6c757d;
  --text: #212529;
  --brand: #000000;
  --ok: #28a745;
  --warn: #ffc107;
  --alert: #dc3545;
  --card: #ffffff;
  --border: #dee2e6;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

/* Layout Principal */
.app {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 1000;
}

.brand {
  padding: 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand i {
  width: 32px;
  height: 32px;
  color: var(--brand);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  line-height: 1;
}

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1;
}

.nav {
  flex: 1;
  padding: 16px 0;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.nav a:hover {
  background: var(--panel);
  color: var(--brand);
}

.nav a.active {
  background: var(--panel);
  color: var(--brand);
  border-left-color: var(--brand);
}

.nav a i {
  width: 20px;
  height: 20px;
}

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}

.sidebar-settings-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
}

.sidebar-settings-link:hover {
  color: var(--brand);
}

/* Conteúdo Principal */
.content {
  flex: 1;
  padding: 32px;
  background: var(--bg);
}

.page-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}

.page-sub {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 32px;
}

/* Grid System */
.grid {
  display: grid;
  gap: 24px;
}

.grid-top {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-bottom: 32px;
}

.grid-main {
  grid-template-columns: 1fr 1fr;
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* KPIs */
.kpi-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}

.kpi-sub {
  font-size: 14px;
  color: var(--ok);
  font-weight: 500;
}

.meta {
  font-size: 14px;
  color: var(--muted);
}

/* Listas */
.list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.list-item:last-child {
  border-bottom: none;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.green {
  background: var(--ok);
}

.dot.blue {
  background: #007bff;
}

.dot.amber {
  background: var(--warn);
}

/* Insights */
.insight {
  padding: 16px;
  background: var(--panel);
  border-radius: 8px;
  margin-bottom: 12px;
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 8px;
}

.tag.gray {
  background: #e9ecef;
  color: #495057;
}

.tag.yellow {
  background: #fff3cd;
  color: #856404;
}

.tag.red {
  background: #f8d7da;
  color: #721c24;
}

/* Botões */
.btn-primary {
  background: var(--brand);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--border);
}

/* Utilitários */
.mt-16 {
  margin-top: 16px;
}

.mb-12 {
  margin-bottom: 12px;
}

/* Responsividade */
@media (max-width: 1024px) {
  .grid-main {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .content {
    padding: 16px;
  }
  
  .grid-top {
    grid-template-columns: 1fr;
  }
  
  .page-title {
    font-size: 24px;
  }
}