/* ==========================================================================
   PAINEL ADMINISTRATIVO AIP INTERNET - STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --admin-blue-dark: #071D38;
  --admin-blue-sidebar: #0A2540;
  --admin-blue-active: #133966;
  --admin-orange: #FF6A00;
  --admin-bg: #F4F6F9;
  --admin-card: #FFFFFF;
  --admin-border: #E2E8F0;
  --admin-text: #1E293B;
  --admin-muted: #64748B;
  
  --status-novo: #3B82F6;
  --status-contato: #8B5CF6;
  --status-analise: #F59E0B;
  --status-concluido: #10B981;
  --status-cancelado: #EF4444;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  display: flex;
  min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.admin-sidebar {
  width: 250px;
  background: var(--admin-blue-sidebar);
  color: #E2E8F0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.sidebar-brand {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 10px;
}

.sidebar-brand img {
  height: 32px;
}

.sidebar-brand span {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: #FFFFFF;
}

.sidebar-menu {
  list-style: none;
  padding: 16px 10px;
  overflow-y: auto;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #94A3B8;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.sidebar-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #FFFFFF;
}

.sidebar-menu a.active {
  background: var(--admin-orange);
  color: #FFFFFF;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #64748B;
}

/* ==========================================================================
   MAIN CONTENT & TOPBAR
   ========================================================================== */
.admin-main {
  margin-left: 250px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-topbar {
  height: 64px;
  background: #FFFFFF;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--admin-blue-dark);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.badge-perfil {
  background: #EBF3FF;
  color: #0066FF;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.topbar-user {
  font-size: 13px;
  font-weight: 600;
}

.btn-logout {
  color: #EF4444;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-content {
  padding: 28px;
  flex-grow: 1;
}

/* ==========================================================================
   CARDS DE MÉTRICAS (KPIs)
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.kpi-card {
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.kpi-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--admin-blue-dark);
}

/* ==========================================================================
   TABELAS E COMPONENTES
   ========================================================================== */
.table-container {
  background: #FFFFFF;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 24px;
}

.table-header-bar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.admin-table th {
  background: #F8FAFC;
  padding: 12px 18px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--admin-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--admin-border);
  color: var(--admin-text);
}

.admin-table tr:hover td {
  background: #F8FAFC;
}

.badge-status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
}

.status-novo { background: #DBEAFE; color: #1E40AF; }
.status-em_contato { background: #EDE9FE; color: #5B21B6; }
.status-em_analise_cobertura { background: #FEF3C7; color: #92400E; }
.status-instalacao_agendada { background: #D1FAE5; color: #065F46; }
.status-concluido { background: #D1FAE5; color: #065F46; }
.status-cancelado { background: #FEE2E2; color: #991B1B; }

/* Botões do Painel */
.btn-primary {
  background: var(--admin-orange);
  color: #FFFFFF;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary:hover {
  background: #E65A00;
}

.btn-secondary {
  background: #FFFFFF;
  color: var(--admin-text);
  border: 1px solid var(--admin-border);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-sm {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
}
