/* +ID Compliance — app.css */
/* Bootstrap 5 base + customizações do produto */

:root {
  --id-sidebar-width: 240px;
  --id-topbar-height: 60px;
  --id-brand-color: #0d6efd;
  --id-critico: #dc3545;
  --id-alto:    #fd7e14;
  --id-moderado:#0dcaf0;
  --id-baixo:   #198754;
}

/* ─── TIPOGRAFIA ──────────────────────────────────────────────── */
body { font-size: 14px; color: #1a1a2e; background: #f8f9fc; }

.fw-500 { font-weight: 500; }
.page-title   { font-size: 1.25rem; font-weight: 600; margin-bottom: 2px; color: #1a1a2e; }
.page-subtitle { font-size: 13px; color: #6c757d; margin: 0; }

/* ─── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--id-sidebar-width);
  min-height: 100vh;
  background: #fff;
  border-right: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e9ecef;
}

.brand-logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--id-brand-color);
  background: #e7f1ff;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: -.5px;
}

.brand-logo-lg {
  font-size: 32px;
  font-weight: 700;
  color: var(--id-brand-color);
}

.brand-name {
  font-size: 12px;
  font-weight: 600;
  color: #495057;
  line-height: 1.2;
}

.sidebar .nav-link {
  font-size: 13px;
  color: #495057;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .15s, color .15s;
}

.sidebar .nav-link:hover { background: #f0f4ff; color: var(--id-brand-color); }
.sidebar .nav-link.active { background: #e7f1ff; color: var(--id-brand-color); font-weight: 500; }
.sidebar .nav-link i { font-size: 15px; }

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #adb5bd;
  list-style: none;
}

.sidebar-footer {
  border-top: 1px solid #e9ecef;
}

/* ─── TOPBAR ──────────────────────────────────────────────────── */
.topbar {
  height: var(--id-topbar-height);
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-empresa { font-size: 13px; color: #495057; }

.badge-notif {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--id-critico);
  color: #fff;
  font-size: 9px;
  border-radius: 10px;
  padding: 1px 4px;
  min-width: 16px;
  text-align: center;
}

/* ─── MAIN CONTENT ────────────────────────────────────────────── */
.main-content { min-height: 100vh; overflow-x: hidden; }
.page-content { padding-top: 24px; }

/* ─── CARDS ───────────────────────────────────────────────────── */
.card {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  box-shadow: none;
}

.card-header {
  background: transparent;
  border-bottom: 1px solid #e9ecef;
  padding: 14px 18px;
}

.card-title { font-size: 14px; font-weight: 600; color: #1a1a2e; }

/* ─── KPI CARDS ───────────────────────────────────────────────── */
.kpi-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 14px 16px;
}

.kpi-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6c757d;
  margin: 0 0 6px;
  font-weight: 500;
}

.kpi-value {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.1;
  margin: 0 0 4px;
}

.kpi-sub {
  font-size: 11px;
  color: #6c757d;
  margin: 0;
}

/* ─── BADGES DE RISCO ─────────────────────────────────────────── */
.risk-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: .02em;
}

.badge-critico { background: #fde8e8; color: #a61c1c; }
.badge-alto    { background: #fff3e0; color: #8a4a00; }
.badge-moderado{ background: #e3f2fd; color: #0a4b78; }
.badge-baixo   { background: #e8f5e9; color: #1a5c2a; }

/* ─── ATALHOS DE AÇÃO ─────────────────────────────────────────── */
.action-shortcut {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 14px 16px;
  color: #1a1a2e;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: border-color .15s, background .15s;
}

.action-shortcut:hover {
  border-color: var(--id-brand-color);
  background: #f0f4ff;
  color: var(--id-brand-color);
}

.action-shortcut i { font-size: 18px; color: var(--id-brand-color); }

/* ─── AUTH ─────────────────────────────────────────────────────── */
.auth-body {
  background: #f0f4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.auth-wrap { width: 100%; max-width: 420px; }

.auth-card {
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 16px;
  padding: 32px;
}

.auth-title   { font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.auth-subtitle { font-size: 13px; color: #6c757d; margin-bottom: 24px; }

/* ─── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  background: #fff;
  border: 1px dashed #dee2e6;
  border-radius: 12px;
  padding: 40px 24px;
  color: #6c757d;
}

/* ─── ONBOARDING WIZARD ───────────────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.wizard-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #adb5bd;
  white-space: nowrap;
}

.wizard-step.active  { color: var(--id-brand-color); font-weight: 500; }
.wizard-step.done    { color: #198754; }

.wizard-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #dee2e6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.wizard-step.active .wizard-step-num  { border-color: var(--id-brand-color); color: var(--id-brand-color); }
.wizard-step.done .wizard-step-num    { border-color: #198754; background: #198754; color: #fff; }
.wizard-step-divider                  { width: 24px; height: 2px; background: #dee2e6; flex-shrink: 0; }
.wizard-step.done + .wizard-step-divider { background: #198754; }

/* ─── TOOLTIPS ────────────────────────────────────────────────── */
.tooltip-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: #e9ecef;
  border-radius: 50%;
  font-size: 10px;
  color: #6c757d;
  cursor: help;
  margin-left: 4px;
  font-weight: 600;
}

/* ─── MOBILE ──────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .sidebar {
    position: fixed;
    left: -240px;
    top: 0;
    z-index: 200;
    transition: left .25s;
    box-shadow: 2px 0 8px rgba(0,0,0,.12);
  }
  .sidebar.open { left: 0; }
  .main-content { width: 100%; }
  .kpi-card .kpi-value { font-size: 20px; }
}

/* ─── SETUP STEPS (Dashboard guia) ──────────────────────── */
.setup-step-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0; color: #fff;
}
.setup-step-num.active  { background: #0d6efd; }
.setup-step-num.done    { background: #198754; }
.setup-step-num.pending { background: #adb5bd; }
