/* ============================================================
   Sistema de Controle de Vendas - Estilos Personalizados
   ============================================================ */

:root {
  --sidebar-width: 240px;
  --primary: #0d6efd;
  --dark-bg: #1a1d23;
}

/* ---------- Layout ---------- */
body {
  background-color: #f0f2f5;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 0.92rem;
}

#wrapper {
  min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background-color: var(--dark-bg) !important;
  flex-shrink: 0;
}

.sidebar-brand {
  min-height: 60px;
  display: flex;
  align-items: center;
}

.sidebar .nav-link {
  border-radius: 6px;
  margin: 1px 8px;
  transition: background 0.15s;
  font-size: 0.88rem;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background-color: rgba(255,255,255,0.12);
}

.sidebar .nav-link.active {
  background-color: var(--primary) !important;
}

/* ---------- Main Content ---------- */
.main-content {
  min-width: 0;
  overflow-x: hidden;
}

/* ---------- Cards ---------- */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  border-radius: 10px 10px 0 0 !important;
}

/* ---------- Stat Cards (Dashboard) ---------- */
.stat-card {
  border-radius: 12px;
  padding: 1.25rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.stat-card .stat-icon {
  font-size: 2.5rem;
  opacity: 0.25;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.stat-card .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  opacity: 0.85;
  margin-top: 4px;
}

/* ---------- Tables ---------- */
.table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6c757d;
  border-bottom: 2px solid #dee2e6;
}

.table td {
  vertical-align: middle;
}

.table-hover tbody tr:hover {
  background-color: #f8f9ff;
}

/* ---------- Badges ---------- */
.badge {
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn-action {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

/* ---------- Forms ---------- */
.form-label {
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.form-control, .form-select {
  border-radius: 8px;
  font-size: 0.9rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* ---------- Page Header ---------- */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.page-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: #212529;
}

/* ---------- Status Colors ---------- */
.status-pendente   { background-color: #ffc107 !important; color: #000 !important; }
.status-confirmado { background-color: #0dcaf0 !important; color: #000 !important; }
.status-enviado    { background-color: #0d6efd !important; }
.status-entregue   { background-color: #198754 !important; }
.status-cancelado  { background-color: #dc3545 !important; }

/* ---------- Login Page ---------- */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .main-content {
    padding-top: 0.5rem;
  }

  .page-header h1 {
    font-size: 1.1rem;
  }

  .stat-card .stat-value {
    font-size: 1.3rem;
  }

  .table-responsive {
    font-size: 0.82rem;
  }
}

/* ---------- Print ---------- */
@media print {
  .sidebar, .navbar, .btn, .no-print { display: none !important; }
  .main-content { margin: 0 !important; }
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }
