/* AI TEAM COMPANY OS — VISUAL V5 FINAL FIDELITY (1:1 MASTER SPECIFICATION) */
:root {
  color-scheme: dark;
  --bg: #040914;
  --sidebar-bg: #060e1a;
  --surface: rgba(11, 22, 38, 0.7);
  --surface-elevated: rgba(16, 30, 52, 0.8);
  --surface-card: linear-gradient(180deg, rgba(14, 26, 46, 0.75) 0%, rgba(8, 16, 30, 0.88) 100%);
  --border: rgba(56, 189, 248, 0.12);
  --border-strong: rgba(56, 189, 248, 0.22);
  --border-focus: rgba(0, 229, 255, 0.5);
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --accent: #00e5ff;
  --accent-blue: #0284c7;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #818cf8;
  --glow-cyan: 0 0 20px rgba(0, 229, 255, 0.25);
  --glow-blue: 0 0 20px rgba(2, 132, 199, 0.3);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --ease: 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html, body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { overflow-x: hidden; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: transparent; color: inherit; padding: 0; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }

.app-shell {
  display: flex;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 25%, rgba(14, 165, 233, 0.06) 0%, transparent 60%), #040914;
}

/* ==========================================================================
   SIDEBAR (1:1 Master)
   ========================================================================== */
.sidebar {
  display: flex;
  flex: 0 0 250px;
  width: 250px;
  flex-direction: column;
  padding: 14px 12px 12px;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 6px 16px;
}
.brand-mark-wrap {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.3) 0%, rgba(0, 229, 255, 0.15) 100%);
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.brand-mark { width: 18px; height: 18px; }
.brand-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #ffffff;
}
.brand-text span {
  display: block;
  font-size: 8.5px;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 600;
}

.nav-list {
  display: grid;
  gap: 2px;
  overflow-y: auto;
  max-height: calc(100vh - 170px);
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
  cursor: pointer;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-left-color: rgba(0, 229, 255, 0.3);
}
.nav-item.is-active {
  background: linear-gradient(90deg, rgba(2, 132, 199, 0.28) 0%, rgba(3, 105, 161, 0.14) 100%);
  color: #ffffff;
  font-weight: 600;
  border-left-color: #00e5ff;
  box-shadow: 0 0 18px rgba(0, 229, 255, 0.18);
}
.nav-icon {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: currentColor;
}
.nav-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}
.nav-item.is-active .nav-icon { color: #00e5ff; }
.nav-badge-red {
  margin-left: auto;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.nav-badge-red[hidden] {
  display: none !important;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.sidebar-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 4px;
}
.operator-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #ffffff;
  font-weight: 600;
  font-size: 12px;
}
.operator-info strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
}
.operator-info span {
  display: block;
  font-size: 9.5px;
  color: var(--text-tertiary);
}
.profile-chevron {
  margin-left: auto;
  width: 13px;
  height: 13px;
  color: var(--text-tertiary);
}
.workspace-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
}
.company-badge-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.workspace-card strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: #e2e8f0;
}
.workspace-card span {
  display: block;
  font-size: 9px;
  color: var(--text-tertiary);
}

/* ==========================================================================
   TOPBAR / HEADER (1:1 Master)
   ========================================================================== */
.content-shell {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: relative;
  z-index: 500;
  display: flex;
  height: 48px;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 14, 26, 0.85);
  backdrop-filter: blur(12px);
}
.mobile-brand { display: none; }
.search-box {
  display: flex;
  width: 320px;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.6);
  color: var(--text-tertiary);
  font-size: 11.5px;
}
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 11.5px;
}
.search-box input::placeholder { color: var(--text-tertiary); }
.search-box kbd {
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-tertiary);
  font-size: 9.5px;
  font-family: inherit;
}
.top-metrics {
  display: none !important;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.topbar-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--ease);
}
.topbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}
.topbar-bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--danger);
}
.profile-button {
  padding: 0;
  border-radius: 50%;
}

/* ==========================================================================
   MAIN DASHBOARD CONTAINER (1:1 Master)
   ========================================================================== */
main {
  flex: 1;
  padding: 12px 28px 14px;
}
.dashboard-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 1680px;
}

/* 1. GREETING ROW */
.dashboard-welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 4px 2px;
}
.welcome-copy h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.15;
}
.welcome-subtitle {
  margin-top: 3px;
  font-size: 12.5px;
  color: #94a3b8;
}
.welcome-meta {
  text-align: right;
}
.welcome-date {
  font-size: 11.5px;
  color: var(--text-secondary);
}
.welcome-time {
  font-weight: 700;
  color: #ffffff;
  margin-left: 6px;
}
.welcome-quote {
  margin-top: 2px;
  font-size: 11px;
  font-style: italic;
  color: var(--text-tertiary);
}

/* 2. ROW OF 6 KPIS */
.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
.kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 76px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(14, 27, 50, 0.78) 0%, rgba(8, 17, 34, 0.92) 100%);
  border: 1px solid rgba(56, 189, 248, 0.16);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transition: border-color var(--ease), box-shadow var(--ease);
}
.kpi-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45), 0 0 16px rgba(14, 165, 233, 0.15);
}
.kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.kpi-head span {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}
.kpi-chevron {
  width: 13px;
  height: 13px;
  color: var(--text-tertiary);
}
.kpi-body {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 6px;
}
.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}
.kpi-trend {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--success);
}
.kpi-trend.is-neutral {
  color: var(--text-tertiary);
}
.kpi-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--success);
}
.kpi-subtext {
  font-size: 10px;
  color: var(--text-tertiary);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}
/* Sparkline bar heights & layout classes (CSP compliant: zero inline styles) */
.h-35 { height: 35%; }
.h-40 { height: 40%; }
.h-45 { height: 45%; }
.h-50 { height: 50%; }
.h-55 { height: 55%; }
.h-60 { height: 60%; }
.h-65 { height: 65%; }
.h-70 { height: 70%; }
.h-75 { height: 75%; }
.h-80 { height: 80%; }
.h-85 { height: 85%; }
.h-90 { height: 90%; }
.h-95 { height: 95%; }
.h-100 { height: 100%; }

.reference-earth {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0.001;
  pointer-events: none;
}
.revenue-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 3px;
}
.revenue-val {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
}
.revenue-months {
  display: flex;
  justify-content: space-around;
  font-size: 9px;
  color: var(--text-tertiary);
  margin-top: 3px;
}
.access-brand-wrap {
  margin: 0 auto 16px;
}

.kpi-sparkline {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 18px;
}
.kpi-sparkline i {
  width: 3.5px;
  border-radius: 2px;
  background: linear-gradient(180deg, #00e5ff 0%, #0284c7 100%);
  box-shadow: 0 0 6px rgba(0, 229, 255, 0.4);
  display: block;
}
.kpi-sparkline.is-neutral i {
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.5) 0%, rgba(2, 132, 199, 0.25) 100%);
  box-shadow: none;
}
.kpi-sparkline.is-teal i { background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%); box-shadow: 0 0 6px rgba(20, 184, 166, 0.4); }
.kpi-sparkline.is-green i { background: linear-gradient(180deg, #10b981 0%, #059669 100%); box-shadow: 0 0 6px rgba(16, 185, 129, 0.4); }
.kpi-sparkline.is-cyan i { background: linear-gradient(180deg, #00e5ff 0%, #0284c7 100%); box-shadow: 0 0 6px rgba(0, 229, 255, 0.5); }

/* 3. PRIMARY ROW (HERO + AGENTES + ATIVIDADE) */
.dashboard-primary {
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(250px, 1fr) minmax(260px, 1fr);
  gap: 12px;
  height: 380px;
}
.panel {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(14, 27, 50, 0.78) 0%, rgba(8, 17, 34, 0.92) 100%);
  border: 1px solid rgba(56, 189, 248, 0.16);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.card-heading h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.card-heading .button.is-quiet {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* HERO PANEL & APPROVED VISUAL BACKGROUND */
.hero-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 28px;
  border-radius: var(--radius-lg);
  background-color: #010512;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.hero-visual-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background-color: #010512;
}

.hero-bg-img {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  object-fit: contain;
  object-position: right center;
  display: block;
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 8%, rgba(0, 0, 0, 0.6) 18%, black 32%, black 100%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.2) 8%, rgba(0, 0, 0, 0.6) 18%, black 32%, black 100%);
}

.hero-text-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(1, 5, 18, 0.95) 0%,
    rgba(1, 5, 18, 0.88) 18%,
    rgba(1, 5, 18, 0.65) 32%,
    rgba(1, 5, 18, 0.30) 46%,
    rgba(1, 5, 18, 0.08) 58%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 2;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 360px;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.hero-brand img { width: 14px; height: 14px; }

.hero-copy h1 {
  display: flex;
  flex-direction: column;
  font-size: 32px;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: #ffffff;
  margin: 0 0 10px 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75), 0 0 30px rgba(0, 229, 255, 0.25);
}

.hero-copy h1 span {
  display: block;
}

.hero-description {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.45;
  max-width: 310px;
  margin-bottom: 16px;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

.hero-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 20px;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #0284c7 0%, #00b4d8 100%);
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.55);
  cursor: pointer;
  transition: all var(--ease);
}

.hero-action:hover {
  background: linear-gradient(90deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 0 32px rgba(14, 165, 233, 0.8);
  transform: translateY(-1px);
}

.hero-action:focus-visible {
  outline: 2px solid #00e5ff;
  outline-offset: 2px;
}

.play-icon { font-size: 10px; color: #ffffff; }

.hero-foot {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 28px;
  margin-top: auto;
  padding-top: 10px;
}
.hero-metric-item {
  display: flex;
  flex-direction: column;
}
.hero-metric-bar {
  width: 28px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 6px;
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}
.hero-foot strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.hero-foot span {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* AGENTES DE IA PANEL */
.agents-panel {
  justify-content: flex-start;
}
.live-agents {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-height: none;
}
.agent-slot-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border-radius: var(--radius-sm);
  transition: background var(--ease);
}
.agent-slot-row:hover {
  background: rgba(255, 255, 255, 0.05);
}
.agent-circle-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.agent-brand-img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}
.agent-circle-avatar svg.ui-icon {
  width: 16px;
  height: 16px;
}
.agent-circle-avatar.is-coral-dark {
  background: radial-gradient(circle, #2d1810 0%, #170c08 100%);
  border: 1px solid rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 10px rgba(249, 115, 22, 0.2);
}
.agent-circle-avatar.is-teal-dark {
  background: radial-gradient(circle, #0f2922 0%, #061511 100%);
  border: 1px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}
.agent-circle-avatar.is-blue-dark {
  background: radial-gradient(circle, #0e1e38 0%, #060e1d 100%);
  border: 1px solid rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}
.agent-circle-avatar.is-coral { background: radial-gradient(circle, #f97316 0%, #c2410c 100%); }
.agent-circle-avatar.is-cyan { background: radial-gradient(circle, #06b6d4 0%, #0e7490 100%); }
.agent-circle-avatar.is-teal { background: radial-gradient(circle, #10b981 0%, #047857 100%); }
.agent-circle-avatar.is-gold { background: radial-gradient(circle, #eab308 0%, #a16207 100%); }
.agent-circle-avatar.is-blue { background: radial-gradient(circle, #3b82f6 0%, #1d4ed8 100%); }
.agent-circle-avatar.is-amber { background: radial-gradient(circle, #f59e0b 0%, #b45309 100%); }
.agent-circle-avatar.is-purple { background: radial-gradient(circle, #a855f7 0%, #7e22ce 100%); }
.agent-circle-avatar.is-sky { background: radial-gradient(circle, #0ea5e9 0%, #0369a1 100%); }

.agent-slot-info {
  flex: 1;
  min-width: 0;
}
.agent-slot-info strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-slot-info span {
  display: block;
  font-size: 10px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agent-slot-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px;
  font-weight: 500;
  white-space: nowrap;
}
.agent-slot-status.is-online { color: var(--success); }
.agent-slot-status.is-executing { color: var(--accent); }
.agent-slot-status.is-analysis, .agent-slot-status.is-waiting { color: var(--warning); }
.agent-slot-status.is-unconfigured { color: var(--text-tertiary); }
.agent-slot-status i {
  width: 4.5px;
  height: 4.5px;
  border-radius: 50%;
  background: currentColor;
}

/* ATIVIDADE EM TEMPO REAL PANEL */
.realtime-panel {
  justify-content: flex-start;
}
.live-activity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-height: none;
}
.activity-slot-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 3.5px 4px;
}
.activity-icon-badge {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border);
  flex-shrink: 0;
  margin-top: 1px;
  transition: all var(--ease);
}
.activity-icon-badge svg { width: 12px; height: 12px; color: var(--accent); }
.activity-icon-badge.is-green { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.35); }
.activity-icon-badge.is-green svg { color: #10b981; }
.activity-icon-badge.is-cyan { background: rgba(0, 229, 255, 0.12); border-color: rgba(0, 229, 255, 0.35); }
.activity-icon-badge.is-cyan svg { color: #00e5ff; }
.activity-icon-badge.is-blue { background: rgba(59, 130, 246, 0.12); border-color: rgba(59, 130, 246, 0.35); }
.activity-icon-badge.is-blue svg { color: #38bdf8; }
.activity-icon-badge.is-amber { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); }
.activity-icon-badge.is-amber svg { color: #f59e0b; }
.activity-icon-badge.is-red { background: rgba(239, 68, 68, 0.12); border-color: rgba(239, 68, 68, 0.35); }
.activity-icon-badge.is-red svg { color: #ef4444; }
.activity-icon-badge.is-purple { background: rgba(168, 85, 247, 0.12); border-color: rgba(168, 85, 247, 0.35); }
.activity-icon-badge.is-purple svg { color: #c084fc; }

.activity-slot-info {
  flex: 1;
  min-width: 0;
}
.activity-slot-info strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-slot-info p {
  font-size: 10px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 1px;
}
.activity-slot-time {
  font-size: 9px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 4px;
  opacity: 0.85;
}

/* 4. MIDDLE ROW (DESEMPENHO + RECEITA + STATUS) */
.dashboard-triad {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 12px;
  height: 175px;
}
.performance-body-wrap,
.revenue-body-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}
.panel-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 14px;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.panel-empty-state .empty-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.16);
  color: var(--accent);
  margin-bottom: 6px;
}
.panel-empty-state .empty-icon svg {
  width: 14px;
  height: 14px;
}
.panel-empty-state strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 2px;
}
.panel-empty-state p {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.35;
  margin: 0;
  max-width: 260px;
}
.chart-box {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 0;
  height: 98px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: rgba(8, 16, 32, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.08);
}
.chart-real-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 4px;
  font-size: 10px;
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-item i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
}
.legend-item i.is-cyan { background: var(--accent); }
.legend-item i.is-blue { background: #3b82f6; }
.legend-item i.is-red { background: var(--danger); }
.legend-item i.is-amber { background: var(--warning); }
.legend-item i.is-purple { background: var(--info); }

/* Donut chart layout */
.donut-layout {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
}
.donut-svg-wrap {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.35));
}
.donut-legend {
  display: grid;
  gap: 3px;
  font-size: 9.5px;
  color: var(--text-secondary);
}

/* 5. BOTTOM ROW (APROVAÇÕES + COMPROMISSOS + INDICADORES) */
.dashboard-secondary {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 12px;
  height: 175px;
}
.approvals-list, .appointments-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  max-height: none;
}
.approval-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.1);
}
.approval-card-info {
  flex: 1;
  min-width: 0;
}
.approval-card-info strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.approval-card-info span {
  display: block;
  font-size: 9.5px;
  color: var(--text-tertiary);
  margin-top: 1px;
}
.approval-action-btns {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.btn-approve {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #10b981;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 600;
  transition: opacity var(--ease);
}
.btn-reject {
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: #ef4444;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 600;
  transition: opacity var(--ease);
}
.btn-approve:hover, .btn-reject:hover { opacity: 0.9; }

/* Appointments list */
.appointment-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 4px;
}
.appointment-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.appointment-date-badge strong { font-size: 11px; font-weight: 700; color: #ffffff; line-height: 1; }
.appointment-date-badge span { font-size: 7.5px; font-weight: 700; color: var(--accent); }
.appointment-info {
  flex: 1;
  min-width: 0;
}
.appointment-info strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.appointment-info span {
  display: block;
  font-size: 9.5px;
  color: var(--text-tertiary);
}
.appointment-tag {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  font-size: 9px;
  font-weight: 500;
}

/* Indicators layout */
.indicators-layout {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
}
.radial-gauge-wrap {
  width: 82px;
  height: 82px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.4));
}
.indicators-checklist {
  display: grid;
  gap: 3px;
  font-size: 10px;
  color: var(--text-secondary);
}
.indicators-checklist li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.indicators-checklist li span:first-child {
  display: flex;
  align-items: center;
  gap: 6px;
}
.indicators-checklist li strong {
  color: #ffffff;
}
.check-icon {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
}

/* BRAND FOOTER BAR */
.dashboard-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 4px;
  border-top: 1px solid rgba(56, 189, 248, 0.1);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
}
.footer-left strong { color: var(--accent); font-weight: 700; margin-right: 6px; }

/* UTILITY ICONS & SVG */
.ui-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* EMPTY STATE CARDS & MINI EMPTY STATES */
.empty-state-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  padding: 10px 14px;
  color: var(--text-tertiary);
}
.empty-state-card .empty-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.15);
  color: var(--accent);
  margin-bottom: 5px;
}
.empty-state-card .empty-icon svg {
  width: 12px;
  height: 12px;
}
.empty-state-card strong {
  display: block;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.empty-state-card p {
  font-size: 8.5px;
  color: var(--text-tertiary);
  line-height: 1.3;
  margin: 0;
}
.empty-state-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 10px;
  color: var(--text-tertiary);
  gap: 4px;
}
.empty-state-mini .empty-icon-mini {
  color: var(--accent);
  margin-bottom: 2px;
}
.empty-state-mini .empty-icon-mini svg {
  width: 14px;
  height: 14px;
}
.empty-state-mini strong {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.empty-state-mini p {
  font-size: 8.5px;
  color: var(--text-tertiary);
  margin: 0;
}
.kpi-trend.is-neutral {
  color: var(--text-tertiary);
  font-weight: 500;
}
.kpi-sparkline.is-neutral i {
  background: rgba(56, 189, 248, 0.15);
}

/* ==========================================================================
   RESPONSIVENESS (1920, 1600, 1366, Mobile 390/360)
   ========================================================================== */
@media (max-width: 1400px) {
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-primary { grid-template-columns: 1fr; height: auto; gap: 12px; }
  .dashboard-triad, .dashboard-secondary { grid-template-columns: 1fr; height: auto; gap: 12px; }
  .hero-panel { min-height: 380px; }
  .hero-visual-bg::before { display: none; }
  .hero-bg-img { -webkit-mask-image: none; mask-image: none; object-fit: cover; object-position: right center; }
  .agents-panel, .realtime-panel { height: auto; min-height: 220px; }
  .performance-panel, .revenue-panel, .status-panel, .approvals-panel, .appointments-panel, .indicators-panel { height: auto; min-height: 180px; }
}

@media (max-width: 720px) {
  .app-shell { display: block; overflow-x: hidden; }
  .content-shell { max-width: 100vw; overflow-x: hidden; }
  main { max-width: 100vw; overflow-x: hidden; padding: 14px 12px 80px; }
  .dashboard-page { max-width: 100%; overflow-x: hidden; display: flex; flex-direction: column; gap: 12px; }
  .sidebar {
    position: fixed;
    z-index: 20;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 62px;
    padding: 6px 10px;
    border-top: 1px solid var(--border);
    border-right: 0;
    background: var(--sidebar-bg);
  }
  .brand, .sidebar-bottom, .nav-item:not([data-mobile="true"]) { display: none; }
  .nav-list {
    display: flex;
    height: 100%;
    justify-content: space-around;
    gap: 4px;
    overflow: visible;
  }
  .nav-item {
    display: grid;
    flex: 1;
    justify-items: center;
    gap: 2px;
    padding: 4px 2px;
    font-size: 9px;
    text-align: center;
  }
  .topbar {
    height: 56px;
    padding: 0 14px;
  }
  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .mobile-brand .brand-mark { width: 22px; height: 22px; }
  .mobile-brand strong { font-size: 13px; letter-spacing: 0.08em; }
  .mobile-brand span { font-size: 8px; color: var(--accent); }
  .search-box, .top-metrics { display: none !important; }
  .dashboard-welcome { flex-direction: column; align-items: flex-start; gap: 4px; }
  .welcome-meta { text-align: left; }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-primary, .dashboard-triad, .dashboard-secondary {
    display: flex;
    flex-direction: column;
    height: auto;
    gap: 12px;
  }
  .hero-panel { min-height: 440px; padding: 24px 20px; overflow: hidden; }
  .hero-visual-bg::before { display: none; }
  .hero-bg-img { -webkit-mask-image: none; mask-image: none; object-fit: cover; object-position: 80% center; }
  .hero-text-shade {
    background: linear-gradient(135deg, rgba(2, 6, 18, 0.88) 0%, rgba(2, 6, 18, 0.68) 50%, rgba(2, 6, 18, 0.30) 100%);
  }
  .hero-copy h1 { font-size: 27px; line-height: 1.1; margin-bottom: 12px; }
  .hero-description { font-size: 12.5px; max-width: 280px; margin-bottom: 20px; color: #e2e8f0; }
  .hero-foot { gap: 18px; padding-top: 14px; }
  .hero-foot strong { font-size: 16px; }
  .hero-foot span { font-size: 10px; }
  .agents-panel, .realtime-panel { height: auto; min-height: 220px; }
  .performance-panel, .revenue-panel, .status-panel, .approvals-panel, .appointments-panel, .indicators-panel { height: auto; min-height: 180px; }
  .donut-layout { flex-direction: column; align-items: center; gap: 12px; }
  .indicators-layout { flex-direction: column; align-items: center; gap: 12px; }
  .dashboard-brand-footer { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Access State / Login Screen */
.access-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 120px);
}
.access-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
}
.access-card h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.access-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 24px;
}
.access-form {
  display: grid;
  gap: 12px;
}
.access-form input {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  color: #ffffff;
  font-size: 13px;
}
.access-form button {
  padding: 12px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Toast */
.toast {
  position: fixed;
  z-index: 99;
  right: 24px;
  bottom: 24px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--border-strong);
  color: #ffffff;
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(8px);
  transition: all var(--ease);
  pointer-events: none;
}
.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   AI TEAM COMPANY OS — P3.2 TASK WORKSPACE, TIMELINE & INSTRUCTION COMPOSER
   ========================================================================== */
.task-workspace-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.task-workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.task-filters-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.filter-pill {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  transition: all var(--ease);
}
.filter-pill:hover {
  border-color: var(--border-strong);
  color: #ffffff;
}
.filter-pill.is-active {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.15);
}
.table-search-wrap {
  flex: 0 1 300px;
}
.table-search-wrap .input {
  width: 100%;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  color: #ffffff;
  font-size: 11.5px;
}

.task-table-header {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) minmax(100px, 1fr) minmax(130px, 1.2fr) minmax(110px, 1fr) minmax(110px, 1fr);
  gap: 12px;
  padding: 6px 14px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.task-row {
  display: grid;
  grid-template-columns: minmax(200px, 2fr) minmax(100px, 1fr) minmax(130px, 1.2fr) minmax(110px, 1fr) minmax(110px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.08);
  transition: all var(--ease);
  cursor: pointer;
}
.task-row:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}
.task-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.task-main strong {
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.02em;
}
.task-objective {
  font-size: 11px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.task-project .project-tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  font-size: 10px;
  color: #38bdf8;
  font-weight: 500;
}
.task-executor-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.task-executor-col .executor-name {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
}
.task-executor-col .model-name {
  font-size: 9.5px;
  color: var(--text-tertiary);
}
.task-status-col {
  display: flex;
  align-items: center;
}
.task-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-size: 10.5px;
  color: var(--text-tertiary);
}
.checkpoint-tag {
  display: inline-block;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--accent);
  font-size: 9px;
  font-weight: 600;
  font-family: monospace;
}

/* TASK DETAIL WORKSPACE LAYOUT */
.task-workspace-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.85fr) minmax(310px, 1fr);
  gap: 16px;
  align-items: start;
}
.task-workspace-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.task-workspace-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.event-count-badge {
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
}

/* OPERATIONAL CONVERSATION / TIMELINE */
.conversation-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 4px;
}
.conversation-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid var(--border);
  transition: all var(--ease);
}
.conversation-row.is-michel {
  border-left: 3px solid #38bdf8;
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.08) 0%, rgba(15, 23, 42, 0.5) 100%);
}
.conversation-row.is-orchestrator {
  border-left: 3px solid #a855f7;
  background: linear-gradient(90deg, rgba(168, 85, 247, 0.08) 0%, rgba(15, 23, 42, 0.5) 100%);
}
.conversation-row.is-agent {
  border-left: 3px solid #00e5ff;
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.08) 0%, rgba(15, 23, 42, 0.5) 100%);
}
.conversation-row.is-system {
  border-left: 3px solid #64748b;
  background: rgba(15, 23, 42, 0.35);
}

.conversation-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 11px;
  flex-shrink: 0;
}
.conversation-avatar.is-michel {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.conversation-avatar.is-orchestrator {
  background: linear-gradient(135deg, #9333ea 0%, #7e22ce 100%);
  color: #ffffff;
  border: 1px solid rgba(168, 85, 247, 0.4);
}
.conversation-avatar.is-agent {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 229, 255, 0.4);
}
.conversation-avatar.is-system {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
}

.conversation-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.conversation-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.conversation-category {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1px 5px;
  border-radius: 3px;
}
.conversation-category.is-michel { color: #38bdf8; background: rgba(56, 189, 248, 0.12); }
.conversation-category.is-orchestrator { color: #c084fc; background: rgba(168, 85, 247, 0.12); }
.conversation-category.is-agent { color: #22d3ee; background: rgba(6, 182, 212, 0.12); }
.conversation-category.is-system { color: #94a3b8; background: rgba(100, 116, 139, 0.12); }

.conversation-actor {
  font-size: 11.5px;
  font-weight: 600;
  color: #ffffff;
}
.conversation-type {
  font-size: 9.5px;
  font-family: monospace;
  color: var(--text-tertiary);
}
.conversation-body {
  font-size: 12px;
  color: #e2e8f0;
  line-height: 1.45;
  word-break: break-word;
}
.conversation-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.meta-tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.15);
  font-size: 9px;
  font-family: monospace;
  color: var(--text-secondary);
}
.conversation-time {
  font-size: 10px;
  color: var(--text-tertiary);
  white-space: nowrap;
  flex-shrink: 0;
}

/* INSTRUCTION COMPOSER */
.composer-approval-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
  margin-bottom: 12px;
}
.composer-approval-warning .warning-icon {
  font-size: 16px;
}
.composer-approval-warning strong {
  display: block;
  font-size: 11.5px;
  color: #fef3c7;
}
.composer-approval-warning p {
  font-size: 10.5px;
  color: #fcd34d;
  margin: 2px 0 0;
}
.composer-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}
.composer-textarea {
  min-height: 76px;
  resize: vertical;
  width: 100%;
  padding: 10px 12px;
  font-size: 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-family: inherit;
}
.composer-textarea:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}
.composer-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  gap: 12px;
}
.composer-hint {
  font-size: 10px;
  color: var(--text-tertiary);
}

/* SIDE PANELS & DETAILS */
.model-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #c084fc;
  font-size: 10.5px;
  font-family: monospace;
  font-weight: 600;
}
.inline-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.button.is-fullwidth {
  width: 100%;
  text-align: center;
}

/* RESPONSIVE / MOBILE ADAPTATIONS */
@media (max-width: 900px) {
  .task-workspace-layout {
    grid-template-columns: 1fr;
  }
  .task-table-header {
    display: none;
  }
  .task-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }
  .task-meta {
    align-items: flex-start;
  }
  .composer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .composer-actions button {
    width: 100%;
  }
}

/* ==========================================================================
   AI TEAM COMPANY OS — P3.3 FAILOVER & CONTINUITY STYLES
   ========================================================================== */
.failover-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.failover-capacity-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--radius-sm);
  color: #fbbf24;
  font-size: 11.5px;
  line-height: 1.4;
}
.failover-capacity-warning strong {
  color: #fef3c7;
  display: block;
  margin-bottom: 2px;
}
.failover-approval-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-sm);
  color: #c084fc;
  font-size: 11.5px;
  line-height: 1.4;
}
.failover-approval-warning strong {
  color: #f3e8ff;
  display: block;
  margin-bottom: 2px;
}
.failover-route {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11px;
}
.failover-route div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.failover-route span {
  color: var(--text-tertiary);
  font-size: 10px;
}
.failover-route strong {
  color: var(--text-primary);
  font-size: 12px;
}
.failover-zero-cost {
  margin-top: 2px;
}
.zero-cost-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.failover-detail-text {
  word-break: break-word;
  font-size: 11px;
  color: var(--text-secondary);
}

/* Commercial Control Module */
.mb-4 {
  margin-bottom: 16px;
}
.kpi-value-lg {
  font-size: 20px;
}
.card-heading-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.badge-human-gate {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}
.boundary-text-danger {
  color: #f87171;
}
.commercial-agent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.task-table-checkout {
  grid-template-columns: minmax(140px, 1.5fr) minmax(140px, 1.5fr) minmax(90px, 1fr) minmax(100px, 1fr) minmax(100px, 1fr);
  cursor: default;
}
.task-table-customer {
  grid-template-columns: minmax(140px, 1.2fr) minmax(150px, 1.5fr) minmax(180px, 2fr) minmax(140px, 1.2fr);
  cursor: default;
}
.task-table-account {
  grid-template-columns: minmax(140px, 1.5fr) minmax(160px, 2fr) minmax(100px, 1fr) minmax(120px, 1.2fr);
  cursor: default;
}
.task-table-plan {
  grid-template-columns: minmax(100px, 1fr) minmax(140px, 1.5fr) minmax(120px, 1fr);
  cursor: default;
}
.task-table-sub {
  grid-template-columns: minmax(140px, 1.5fr) minmax(140px, 1.5fr) minmax(100px, 1fr) minmax(100px, 1fr);
  cursor: default;
}
.task-table-quota {
  grid-template-columns: minmax(140px, 1.5fr) minmax(100px, 1fr) minmax(110px, 1fr) minmax(110px, 1fr) minmax(90px, 1fr);
  cursor: default;
}
.audit-details-code {
  margin: 0;
  font-size: 10px;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* P5 Departments & Operations */
.departments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.department-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.supervisor-hero-panel {
  border-left: 3px solid #6366f1;
}
.dept-header-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}
.correlation-row {
  grid-template-columns: minmax(180px, 2fr) minmax(110px, 1.2fr) minmax(140px, 1.5fr) minmax(100px, 1fr) minmax(90px, 0.8fr);
  cursor: default;
}
.department-card-alerts {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 8px;
}
.eyebrow-red {
  color: #ef4444;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin: 0 0 4px 0;
}
.mini-alert-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-top: 4px;
}

/* P6.1 Integrations Foundation */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}
.integration-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
}
.integration-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.integration-governance-banner {
  border-left: 3px solid #10b981;
}
.integration-desc {
  font-size: 0.88rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.45;
}
.integration-section {
  margin-bottom: 8px;
}
.integration-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted, #94a3b8);
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.secret-boundary-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px;
}
.secret-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
}
.secret-var-pill {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
}
.secret-var-pill.is-present {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.secret-var-pill.is-missing {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.25);
}
.secret-notice {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
}
.integration-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.probe-result-slot {
  font-size: 0.8rem;
}

/* P6.2 Dogfood Workflows */
.dogfood-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.dogfood-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.dogfood-title {
  margin-bottom: 4px;
  font-size: 0.9rem;
}
.dogfood-steps {
  font-size: 0.82rem;
  padding-left: 18px;
  margin: 6px 0;
}

#topbar-logout {
  color: var(--text-tertiary);
  transition: all var(--ease);
}
#topbar-logout:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================================================
   OPERATIONAL CLIENTS & CRM (FINAL UX)
   ========================================================================== */

.task-table-operational-clients {
  display: grid;
  grid-template-columns: minmax(180px, 2fr) minmax(110px, 1fr) minmax(95px, 0.9fr) minmax(95px, 0.9fr) minmax(130px, 1.2fr) minmax(150px, 1.3fr);
  cursor: pointer;
  transition: all var(--ease);
}
.task-table-operational-clients:hover {
  background: rgba(0, 229, 255, 0.04);
  border-color: rgba(0, 229, 255, 0.25);
  transform: translateY(-1px);
}
.client-name-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.client-name-cell strong {
  font-size: 13.5px;
  color: var(--text-primary);
}
.client-name-cell span {
  font-size: 11px;
  color: var(--text-tertiary);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.status-pill.is-active {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.status-pill.is-waiting {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.status-pill.is-problem {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.status-pill.is-inactive {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

/* STUCK JOURNEYS ATTENTION BANNER */
.stuck-alert-panel {
  border-left: 3px solid #facc15;
  background: linear-gradient(90deg, rgba(234, 179, 8, 0.08) 0%, rgba(15, 23, 42, 0.45) 100%);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(234, 179, 8, 0.25);
}
.stuck-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.stuck-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stuck-alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-sm);
  gap: 12px;
}
.stuck-alert-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stuck-alert-info strong {
  font-size: 13px;
  color: #ffffff;
}
.stuck-alert-info span {
  font-size: 11.5px;
  color: #fbbf24;
}

/* CONSOLIDATED CUSTOMER SHEET */
.client-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.client-detail-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.client-detail-title-group h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.client-detail-badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* JOURNEY PIPELINE STEPPER */
.journey-stepper-panel {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
}
.journey-stepper-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.journey-pipeline {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  position: relative;
}
.journey-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all var(--ease);
}
.journey-step.is-completed {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.05);
}
.journey-step.is-waiting {
  border-color: rgba(234, 179, 8, 0.35);
  background: rgba(234, 179, 8, 0.05);
}
.journey-step.is-error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.07);
}
.journey-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}
.journey-step.is-completed .journey-step-circle {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}
.journey-step.is-waiting .journey-step-circle {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}
.journey-step.is-error .journey-step-circle {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
}
.journey-step-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.journey-step-state {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-bottom: 4px;
}
.journey-step.is-completed .journey-step-state {
  color: #4ade80;
  background: rgba(34, 197, 94, 0.12);
}
.journey-step.is-waiting .journey-step-state {
  color: #facc15;
  background: rgba(234, 179, 8, 0.12);
}
.journey-step.is-error .journey-step-state {
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}
.journey-step-detail {
  font-size: 9.5px;
  color: var(--text-tertiary);
  line-height: 1.25;
}

/* 4-CARD CONSOLIDATED GRID */
.client-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.client-info-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.client-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 10px;
}
.client-card-header h3 {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 0;
}
.client-prop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.client-prop-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
}
.client-prop-label {
  color: var(--text-tertiary);
}
.client-prop-val {
  font-weight: 600;
  color: var(--text-primary);
  text-align: right;
}

/* COMMUNICATIONS & SUPPORT LISTS */
.comm-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}
.comm-item-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.comm-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.comm-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
}
.comm-badge.is-sent {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}
.comm-badge.is-pending {
  background: rgba(234, 179, 8, 0.12);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.25);
}
.comm-badge.is-failed {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.comm-badge.is-none {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

@media (max-width: 768px) {
  .journey-pipeline {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .journey-step {
    flex-direction: row;
    text-align: left;
    gap: 12px;
    padding: 10px 14px;
  }
  .journey-step-circle {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .task-table-operational-clients {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px;
  }
}

/* ==========================================================================
   CENTRAL DE LICENÇAS & RETENÇÃO AUTOMÁTICA
   ========================================================================== */
.kpi-card.is-clickable {
  cursor: pointer;
  transition: transform var(--ease), border-color var(--ease), background var(--ease);
}
.kpi-card.is-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--border-focus);
  background: rgba(14, 165, 233, 0.08);
}
.kpi-card.is-active-filter {
  border-color: var(--accent);
  box-shadow: var(--glow-cyan);
  background: rgba(0, 229, 255, 0.06);
}

.license-hero-card {
  background: linear-gradient(135deg, rgba(14, 26, 46, 0.85) 0%, rgba(6, 14, 26, 0.95) 100%);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.license-hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.license-hero-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.license-hero-item span {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.license-hero-item strong {
  font-size: 13px;
  color: var(--text-primary);
}

.license-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.task-table-license {
  display: grid;
  grid-template-columns: minmax(160px, 1.4fr) minmax(90px, 0.8fr) minmax(90px, 0.8fr) minmax(150px, 1.2fr) minmax(130px, 1.1fr) minmax(110px, 0.9fr) minmax(210px, 1.8fr);
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
}
.task-table-header.task-table-license {
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-tertiary);
}

.license-actions-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.btn-action-sm {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--ease);
}
.btn-action-sm:hover {
  background: rgba(0, 229, 255, 0.12);
  border-color: var(--accent);
  color: #fff;
}
.btn-action-sm.is-danger:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  color: #f87171;
}

/* RISK CARDS */
.risk-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.risk-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.risk-card.is-critica {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.05);
}
.risk-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.risk-reasons-list {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 11px;
  color: #fca5a5;
}

/* MODALS */
.license-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 14, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 150ms ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.license-modal-dialog {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05);
  max-width: 540px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalScaleUp 150ms cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalScaleUp {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.license-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}
.license-modal-header h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}
.license-modal-close {
  font-size: 18px;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--ease);
}
.license-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.license-modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.license-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.license-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.license-form-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.license-form-group input,
.license-form-group select,
.license-form-group textarea {
  width: 100%;
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 12.5px;
  outline: none;
  transition: border-color var(--ease);
}
.license-form-group input:focus,
.license-form-group select:focus,
.license-form-group textarea:focus {
  border-color: var(--accent);
}
.license-form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.license-form-checkbox input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
}

.license-verify-result {
  padding: 14px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.license-verify-result.is-valid {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}
.license-verify-result.is-invalid {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

/* Smart License Wizard Steps Indicator */
.wizard-steps-indicator {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
}
.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.45;
  transition: all var(--ease);
}
.wizard-step-item.is-active {
  opacity: 1;
}
.wizard-step-item.is-completed {
  opacity: 0.85;
}
.wizard-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}
.wizard-step-item.is-active .wizard-step-num {
  background: linear-gradient(135deg, #00e5ff 0%, #0284c7 100%);
  border-color: #00e5ff;
  color: #030a16;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.5);
}
.wizard-step-item.is-completed .wizard-step-num {
  background: rgba(16, 185, 129, 0.2);
  border-color: #10b981;
  color: #34d399;
}
.wizard-step-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}
.wizard-step-item.is-active .wizard-step-label {
  color: #ffffff;
}

@media (max-width: 900px) {
  .task-table-license {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }
  .task-table-header.task-table-license {
    display: none;
  }
  .license-actions-cell {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  .license-header-actions {
    width: 100%;
  }
}

/* ==========================================================================
   OFFICIAL CAÇAPROMO RENEWAL PORTAL STYLES (P6.4)
   ========================================================================== */
.renewal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 15%, rgba(0, 229, 255, 0.08) 0%, transparent 60%), #040914;
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  padding: 24px 16px;
  align-items: center;
  justify-content: center;
}

.renewal-container {
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
}

.renewal-header {
  text-align: center;
  margin-bottom: 24px;
}

.renewal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.renewal-brand img {
  width: 40px;
  height: 40px;
}

.renewal-brand strong {
  font-size: 20px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #00e5ff 0%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.renewal-header h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #fff;
}

.renewal-header p {
  color: var(--text-secondary);
  font-size: 13.5px;
}

.renewal-card {
  background: rgba(11, 22, 38, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  padding: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.renewal-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 13px;
}

.renewal-status-banner.is-active {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #a7f3d0;
}

.renewal-status-banner.is-expiring {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}

.renewal-status-banner.is-expired {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}

.renewal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.renewal-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.renewal-info-label {
  font-size: 11.5px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.renewal-info-value {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.renewal-plans-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.renewal-plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.renewal-plan-option {
  position: relative;
  background: rgba(15, 27, 45, 0.7);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all var(--ease);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.renewal-plan-option:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(20, 35, 60, 0.8);
}

.renewal-plan-option.is-selected {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.15);
}

.renewal-plan-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.renewal-plan-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(0, 229, 255, 0.2);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-weight: 600;
}

.renewal-plan-quota {
  font-size: 12px;
  color: var(--text-secondary);
}

.renewal-plan-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  margin-top: 4px;
}

.renewal-btn-checkout {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #00e5ff 0%, #0284c7 100%);
  color: #040914;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--ease);
}

.renewal-btn-checkout:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(0, 229, 255, 0.5);
  filter: brightness(1.1);
}

.renewal-security-note {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.renewal-error-card {
  text-align: center;
  padding: 40px 20px;
}

.renewal-error-card h2 {
  font-size: 18px;
  color: #f87171;
  margin-bottom: 10px;
}

.renewal-error-card p {
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
}

.renewal-success-box {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.renewal-success-box h3 {
  color: #34d399;
  font-size: 17px;
}

@media (max-width: 600px) {
  .renewal-page {
    padding: 16px 12px;
  }
  .renewal-card {
    padding: 20px 16px;
  }
  .renewal-info-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .renewal-plans-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   NEUVERSE AI LABS — FASE 2: INTERFACE EMPRESARIAL OPERACIONAL
   ========================================================================== */

/* 1. Badges Semânticos Adicionais */
.badge.is-slate {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.badge.is-ok, .badge.is-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge.is-danger, .badge.is-red {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
}
.badge.is-warn, .badge.is-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge.is-blue {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* 2. Central de Aprovações — Rich Approval Cards */
.approval-list-rich {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.approval-card-rich {
  background: rgba(10, 18, 32, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.16);
  border-radius: var(--radius-lg, 10px);
  padding: 20px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.approval-card-rich:hover {
  border-color: rgba(0, 229, 255, 0.32);
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.05);
}
.approval-header-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.approval-details-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 16px;
  font-size: 13px;
  line-height: 1.5;
}
.approval-details-grid dt {
  color: var(--text-secondary, #94a3b8);
  font-weight: 500;
}
.approval-details-grid dd {
  color: var(--text-primary, #f1f5f9);
  margin: 0;
}
.hash-code {
  font-family: var(--font-mono, monospace);
  font-size: 11.5px;
  word-break: break-all;
  background: rgba(0, 229, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  color: #38bdf8;
  border: 1px solid rgba(0, 229, 255, 0.18);
  display: inline-block;
}
.approval-guard-alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.45;
}
.approval-guard-alert.is-blocked {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
}
.approval-guard-alert strong {
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.approval-guard-alert p {
  margin: 0;
  color: #f87171;
}
.card-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.approval-action-btns {
  display: flex;
  gap: 10px;
  align-items: center;
}
.button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.approval-decided-label {
  font-size: 12px;
  color: var(--text-secondary, #94a3b8);
}
.approval-decided-label strong {
  color: var(--text-primary, #f1f5f9);
}

/* 3. Departamentos Canônicos — FASE 2 */
.canonical-departments-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.department-division-card {
  background: rgba(10, 18, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 10px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.2s ease;
}
.department-division-card.is-active-dept {
  border-color: rgba(0, 229, 255, 0.3);
}
.department-division-card:hover {
  border-color: rgba(0, 229, 255, 0.4);
}
.dept-agent-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.dept-agent-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12.5px;
}
.dept-agent-pill-info strong {
  display: block;
  color: var(--text-primary, #f1f5f9);
}
.dept-agent-pill-info small {
  color: var(--text-secondary, #94a3b8);
}

/* 4. Agentes & Filtros */
.agent-filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}
.agent-card-rich {
  background: rgba(10, 18, 32, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg, 10px);
  padding: 20px;
  transition: border-color 0.2s ease;
}
.agent-card-rich:hover {
  border-color: rgba(0, 229, 255, 0.25);
}
.agent-permissions-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.permission-tag {
  font-family: var(--font-mono, monospace);
  font-size: 10.5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  padding: 2px 6px;
  border-radius: 4px;
  color: #cbd5e1;
}

/* 5. Telemetria de Custos e Status de Modelos */
.telemetry-notice-panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 12.5px;
  color: var(--text-secondary, #94a3b8);
  display: flex;
  align-items: center;
  gap: 12px;
}
.telemetry-notice-panel span[data-icon] {
  color: #38bdf8;
  font-size: 18px;
}

/* 6. Mobile Responsiveness */
@media (max-width: 900px) {
  .canonical-departments-grid {
    grid-template-columns: 1fr;
  }
  .approval-details-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .card-footer-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .approval-action-btns {
    flex-direction: column;
  }
}

/* 7. Operational UI P0 Enhancements */
.btn-quick-create {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #00e5ff 0%, #0091ea 100%) !important;
  color: #030812 !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  padding: 8px 18px !important;
  border-radius: 8px !important;
  border: none !important;
  cursor: pointer;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.35);
  transition: all 0.2s ease;
}
.btn-quick-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.55);
}

.dispatcher-status-banner {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.dispatcher-status-banner.is-online {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}
.dispatcher-status-banner.is-offline {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
}
.dispatcher-status-banner .status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dispatcher-status-banner.is-online .status-indicator-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}
.dispatcher-status-banner.is-offline .status-indicator-dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
}

.pipeline-stepper {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.pipeline-step {
  padding: 10px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
  font-size: 11px;
}
.pipeline-step.is-done {
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.06);
  color: #86efac;
}
.pipeline-step.is-active {
  border-color: rgba(0, 229, 255, 0.45);
  background: rgba(0, 229, 255, 0.08);
  color: #00e5ff;
}
.pipeline-step.is-waiting {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.04);
  color: #fde68a;
}
.pipeline-step-num {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
  opacity: 0.8;
}
.pipeline-step-title {
  font-weight: 600;
  font-size: 12px;
}

.artifact-code-box {
  background: #060b13;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #e2e8f0;
  overflow-x: auto;
  max-height: 280px;
  line-height: 1.5;
}




/* P1 CIO Navigation Accordion */
.nav-section-group {
  margin-bottom: 6px;
}
.nav-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-tertiary, #64748b);
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: all 0.15s ease;
  user-select: none;
}
.nav-section-header:hover {
  color: var(--text-primary, #f1f5f9);
  background: rgba(255, 255, 255, 0.04);
}
.nav-section-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.nav-section-arrow svg, .nav-section-arrow span {
  width: 12px;
  height: 12px;
}
.nav-section-group.is-open .nav-section-arrow {
  transform: rotate(0deg);
}
.nav-section-group:not(.is-open) .nav-section-arrow {
  transform: rotate(-90deg);
}
.nav-section-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.nav-section-group:not(.is-open) .nav-section-content {
  display: none !important;
}

.nav-item.is-prep {
  opacity: 0.65;
}
.nav-item.is-prep:hover {
  opacity: 0.9;
}
.nav-pill-prep {
  margin-left: auto;
  font-size: 8.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.approval-expired-banner {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}

.badge.is-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge.is-orange {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.3);
}

.accordion-panel summary::-webkit-details-marker {
  display: none;
}
.accordion-panel summary {
  list-style: none;
}
.accordion-panel[open] summary {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.accordion-panel summary .accordion-chevron {
  transition: transform 0.2s ease;
}
.accordion-panel[open] summary .accordion-chevron {
  transform: rotate(90deg);
}

.command-preview-box {
  background: rgba(0, 229, 255, 0.04);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin: 12px 0 16px;
  color: #e2e8f0;
}
.command-preview-box strong {
  color: #38bdf8;
}
.command-preview-box.is-prep {
  background: rgba(245, 158, 11, 0.04);
  border-color: rgba(245, 158, 11, 0.2);
  color: #cbd5e1;
}
.command-preview-box.is-prep strong {
  color: #fde68a;
}

/* ==========================================================================
   ENHANCED STYLES: AGENT CHAT, PROFESSIONAL SIDEBAR, LICENSES & MOBILE
   ========================================================================== */

/* Mobile Menu Toggle & Backdrop */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.mobile-menu-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.4);
}
.mobile-nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 998;
}
.mobile-nav-backdrop.is-active {
  display: block;
}

/* Central de Conversa com Agentes ("Fale com seu agente") */
.agent-chat-shell {
  display: flex;
  flex-direction: row;
  height: calc(100vh - 105px);
  max-height: calc(100vh - 105px);
  gap: 14px;
}
.chat-conv-sidebar {
  width: 260px;
  min-width: 240px;
  background: rgba(8, 15, 30, 0.75);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.chat-conv-sidebar-header {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.85);
}
.chat-conv-sidebar-header h3 {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chat-conv-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-conv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.chat-conv-item:hover {
  background: rgba(0, 229, 255, 0.06);
  border-color: rgba(0, 229, 255, 0.2);
}
.chat-conv-item.is-active {
  background: rgba(0, 229, 255, 0.12);
  border-color: rgba(0, 229, 255, 0.4);
  color: #ffffff;
}
.chat-conv-title {
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}
.chat-conv-meta {
  font-size: 11px;
  color: var(--text-tertiary);
}
.chat-conv-delete-btn {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 16px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  border-radius: 4px;
}
.chat-conv-delete-btn:hover {
  color: #f87171;
  background: rgba(248, 113, 113, 0.15);
}
.agent-chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  background: rgba(8, 15, 30, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.agent-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
  flex-wrap: wrap;
}
.chat-agent-selector-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.chat-select-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}
.chat-select {
  background: rgba(3, 8, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.chat-select:focus {
  border-color: #00e5ff;
}
.chat-agent-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.chat-agent-status-badge.is-prep {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}
.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 6px currentColor;
}

/* Chat Messages Pane */
.chat-messages-pane {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.chat-message-bubble {
  display: flex;
  gap: 12px;
  max-width: 85%;
  animation: fadeInMsg 0.25s ease-out;
}
@keyframes fadeInMsg {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-message-bubble.is-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-message-bubble.is-agent {
  align-self: flex-start;
}
.chat-bubble-avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.chat-message-bubble.is-user .chat-bubble-avatar {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 229, 255, 0.3);
}
.chat-message-bubble.is-agent .chat-bubble-avatar {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25) 0%, rgba(5, 150, 105, 0.3) 100%);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.4);
}
.chat-bubble-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.chat-bubble-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-tertiary);
}
.chat-message-bubble.is-user .chat-bubble-meta {
  justify-content: flex-end;
}
.chat-bubble-content {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #f1f5f9;
  position: relative;
  word-break: break-word;
}
.chat-message-bubble.is-user .chat-bubble-content {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-top-right-radius: 4px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.18);
}
.chat-message-bubble.is-agent .chat-bubble-content {
  background: rgba(13, 20, 36, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.18);
  border-top-left-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), inset 0 0 12px rgba(0, 229, 255, 0.03);
}

/* Chat Result Card & Artifact Preview */
.chat-result-card {
  margin-top: 10px;
  background: rgba(3, 8, 20, 0.7);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-result-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: #38bdf8;
}
.chat-result-details {
  font-size: 12.5px;
  color: var(--text-secondary);
}
.chat-result-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  flex-wrap: wrap;
}

/* Chat Markdown Formatting & Typography */
.chat-bubble-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #f1f5f9;
}
.chat-bubble-text p {
  margin: 0 0 6px 0;
}
.chat-bubble-text p:last-child {
  margin-bottom: 0;
}
.chat-bubble-text strong {
  font-weight: 600;
  color: #ffffff;
}
.chat-bubble-text code {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  color: #38bdf8;
}
.chat-bubble-text pre {
  background: rgba(3, 8, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 10px 12px;
  overflow-x: auto;
  margin: 6px 0;
}
.chat-bubble-text pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: #e2e8f0;
}
.chat-bubble-text ul {
  margin: 4px 0 6px 18px;
  padding: 0;
}
.chat-bubble-text li {
  margin-bottom: 3px;
}

/* Chat Suggestion Chips */
.chat-suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.chat-chip-btn {
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 20px;
  color: #38bdf8;
  padding: 6px 14px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 500;
  text-align: left;
  line-height: 1.35;
}
.chat-chip-btn:hover {
  background: rgba(2, 132, 199, 0.28);
  border-color: #00e5ff;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 2px 10px rgba(0, 229, 255, 0.25);
}
.chat-chip-btn:active {
  transform: translateY(0);
}

/* Tech Details Accordion (Ocultar complexidade técnica) */
.chat-tech-details {
  margin-top: 8px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  overflow: hidden;
}
.chat-tech-summary {
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--text-tertiary, #94a3b8);
  cursor: pointer;
  user-select: none;
  font-weight: 500;
  transition: color 0.15s ease;
}
.chat-tech-summary:hover {
  color: #38bdf8;
}
.chat-tech-content {
  padding: 8px 12px;
  font-size: 11.5px;
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  line-height: 1.5;
}

/* Chat Input Bar & Controls */
.chat-input-container {
  padding: 12px 18px 16px;
  background: rgba(15, 23, 42, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-attachments-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chat-attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(2, 132, 199, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.3);
  border-radius: 6px;
  font-size: 11.5px;
  color: #e0f2fe;
}
.chat-attachment-remove {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.chat-attachment-remove:hover {
  color: #f87171;
}
.chat-input-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.chat-textarea {
  flex: 1;
  min-height: 52px;
  max-height: 180px;
  background: rgba(3, 8, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #ffffff;
  padding: 12px 14px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  line-height: 1.45;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.chat-textarea:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}
.chat-buttons-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.chat-tool-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.chat-tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
}
.chat-tool-btn svg {
  width: 19px;
  height: 19px;
}
.chat-mic-btn.is-recording {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
  animation: micPulse 1.2s infinite ease-in-out;
}
@keyframes micPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.chat-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 8px;
  color: #ffffff;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.35);
}
.chat-send-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.4);
}
.chat-send-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Voice Dictation Status & Tooltips */
.voice-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #38bdf8;
  padding: 4px 0;
}
.voice-pulsing-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: pulse 1s infinite alternate;
}

/* Licenças & Planos Repaginados */
.products-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.product-showcase-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  transition: border-color 0.2s ease;
}
.product-showcase-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
}
.product-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.product-badge-homologated {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}
.product-badge-isolated {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

/* Modal Assistente Guiado de Licença (5 passos) */
.wizard-stepper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  gap: 4px;
}
.wizard-step-node {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-tertiary);
  padding: 6px 2px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}
.wizard-step-node.is-active {
  color: #00e5ff;
  border-bottom-color: #00e5ff;
  font-weight: 700;
}
.wizard-step-node.is-completed {
  color: #34d399;
  border-bottom-color: #34d399;
}

/* Mobile & Responsive Adjustments */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: 270px;
    max-width: 85vw;
    z-index: 9999;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.85);
    background: #030814;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .sidebar.is-open {
    transform: translateX(0);
  }
  .content-shell {
    width: 100%;
    min-width: 0;
  }
  .agent-chat-shell {
    flex-direction: column;
    height: auto;
    max-height: none;
  }
  .chat-conv-sidebar {
    width: 100%;
    max-height: 150px;
    min-width: 0;
  }
  .agent-chat-container {
    height: calc(100vh - 120px);
  }
  .chat-message-bubble {
    max-width: 95%;
  }
  .chat-input-row {
    flex-direction: column;
    align-items: stretch;
  }
  .chat-buttons-group {
    justify-content: space-between;
  }
  .chat-send-btn {
    flex: 1;
    justify-content: center;
  }
}

/* ==========================================================================
   CENTRAL DE ACESSOS & PLANOS (REDESIGN FUNCIONAL)
   ========================================================================== */

.product-badge-account {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.15);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: #00e5ff;
}

.access-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.access-plan-card {
  background: rgba(8, 15, 30, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: all 0.15s ease;
}

.access-plan-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.access-plan-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
}

.access-plan-price {
  font-size: 19px;
  font-weight: 800;
  color: #00e5ff;
  letter-spacing: -0.02em;
}

.access-plan-desc {
  font-size: 11px;
  color: var(--text-tertiary);
  line-height: 1.4;
  min-height: 32px;
}

.access-plan-limits {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.access-plan-limits span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Automated Agent Team section */
.automated-agent-panel {
  background: rgba(8, 15, 30, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.22);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.agent-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 12px;
  align-items: center;
}

.agent-team-metric-box {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 10px 12px;
}

.agent-team-metric-box span {
  font-size: 11px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}

.agent-team-metric-box strong {
  font-size: 13.5px;
  color: var(--text-primary);
}

/* Main Table CLIENTES & ACESSOS */
.access-table-header {
  display: grid;
  grid-template-columns: 1.3fr 1.4fr 0.6fr 0.9fr 0.9fr 1fr 0.8fr 0.7fr 0.7fr 0.7fr 0.9fr 0.9fr 1fr 0.8fr;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-tertiary);
}

.access-table-row {
  display: grid;
  grid-template-columns: 1.3fr 1.4fr 0.6fr 0.9fr 0.9fr 1fr 0.8fr 0.7fr 0.7fr 0.7fr 0.9fr 0.9fr 1fr 0.8fr;
  gap: 8px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 11.5px;
  transition: background 0.15s ease;
}

.access-table-row:hover {
  background: rgba(0, 229, 255, 0.03);
}

.device-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
}

.device-chip.is-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.device-chip.is-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.device-chip.is-muted {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Customer Detail Modal */
.customer-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.customer-detail-section {
  background: rgba(3, 8, 20, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-detail-section h4 {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #00e5ff;
  margin: 0 0 6px 0;
  letter-spacing: 0.03em;
}

.customer-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 4px;
}

.customer-detail-row span {
  color: var(--text-tertiary);
}

.customer-detail-row strong {
  color: var(--text-primary);
}

.device-item-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

/* Agente de Acessos & Geographic Intelligence Styles */
.access-agent-panel {
  background: linear-gradient(135deg, rgba(3, 14, 30, 0.85) 0%, rgba(4, 25, 45, 0.75) 100%);
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.access-chip-btn {
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: #a5f3fc;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.access-chip-btn:hover {
  background: rgba(0, 229, 255, 0.15);
  border-color: #00e5ff;
  color: #ffffff;
}

.access-action-plan-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid #38bdf8;
  border-radius: 8px;
  padding: 14px 18px;
  margin-top: 12px;
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.1);
}

.access-action-plan-card h4 {
  margin: 0 0 8px 0;
  font-size: 13.5px;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.geo-states-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.geo-state-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #ffffff;
}

.geo-state-card strong {
  color: #00e5ff;
  font-size: 13px;
}

.geo-state-count {
  background: rgba(0, 229, 255, 0.15);
  color: #38bdf8;
  border-radius: 12px;
  padding: 1px 8px;
  font-weight: 700;
  font-size: 11px;
}

.geo-cities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.geo-city-badge {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.kpis-row-8 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}

@media (max-width: 900px) {
  .access-table-header {
    display: none;
  }
  .access-table-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 14px;
  }
  .customer-detail-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   LICENÇAS & PLANOS — NEUVERSE PREMIUM OPERATIONAL STYLING (LINEAR/STRIPE/VERCEL)
   ========================================================================== */

.licenses-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.license-header-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* 3 Enxutos Indicadores */
.licenses-kpis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 860px) {
  .licenses-kpis {
    grid-template-columns: 1fr;
  }
}

.license-kpi-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.license-kpi-card:hover {
  border-color: rgba(0, 229, 255, 0.3);
  transform: translateY(-1px);
}

.license-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.license-kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.license-kpi-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(0, 229, 255, 0.1);
  color: #00e5ff;
  border: 1px solid rgba(0, 229, 255, 0.25);
}

.license-kpi-badge.is-warn {
  background: rgba(245, 158, 11, 0.1);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}

.license-kpi-badge.is-ok {
  background: rgba(52, 211, 153, 0.1);
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
}

.license-kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: #ffffff;
  margin: 10px 0 2px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.license-kpi-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Barra de Filtros e Busca */
.licenses-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 9px;
  padding: 12px 16px;
}

.license-search-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.license-search-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #ffffff;
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.license-search-input:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
}

.license-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  font-size: 13px;
}

.license-filter-select {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #e2e8f0;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.license-filter-select:focus {
  border-color: #00e5ff;
}

/* Tabela Limpa e Elegante */
.licenses-table-wrap {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow-x: auto;
}

.licenses-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.licenses-table th {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-tertiary);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.licenses-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
}

.licenses-table tr:last-child td {
  border-bottom: none;
}

.licenses-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}

.license-client-cell strong {
  display: block;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
}

.license-client-cell span {
  display: block;
  color: var(--text-tertiary);
  font-size: 11.5px;
  margin-top: 2px;
}

.license-limits-cell {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.license-actions-cell {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

/* Badges Refinadas */
.license-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.license-status-badge.is-active {
  background: rgba(52, 211, 153, 0.12);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.license-status-badge.is-expiring {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.license-status-badge.is-suspended {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.license-status-badge.is-revoked {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Estado Vazio */
.licenses-empty-state {
  padding: 60px 24px;
  text-align: center;
  color: var(--text-tertiary);
}

.licenses-empty-icon {
  font-size: 36px;
  margin-bottom: 12px;
  color: var(--text-tertiary);
}

.licenses-empty-title {
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.licenses-empty-desc {
  font-size: 13px;
  max-width: 420px;
  margin: 0 auto 20px;
  line-height: 1.5;
}

/* Modais & Wizards */
.license-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.license-modal-dialog {
  background: #0d1527;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.7);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.license-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.license-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
  font-weight: 600;
}

.license-modal-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

.license-modal-close:hover {
  color: #ffffff;
}

.license-wizard-stepper {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.015);
}

.license-wizard-step-tab {
  flex: 1;
  padding: 12px 8px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.license-wizard-step-tab.is-active {
  color: #00e5ff;
  border-bottom-color: #00e5ff;
  background: rgba(0, 229, 255, 0.03);
}

.license-wizard-step-tab.is-done {
  color: #34d399;
}

.license-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.license-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.license-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.license-form-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.license-form-field input,
.license-form-field select,
.license-form-field textarea {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: #ffffff;
  padding: 9px 12px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.license-form-field input:focus,
.license-form-field select:focus,
.license-form-field textarea:focus {
  border-color: #00e5ff;
  box-shadow: 0 0 0 2px rgba(0, 229, 255, 0.15);
}

.license-plans-select-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.license-plan-option-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.license-plan-option-card:hover {
  border-color: rgba(0, 229, 255, 0.35);
  background: rgba(0, 229, 255, 0.025);
}

.license-plan-option-card.is-selected {
  border-color: #00e5ff;
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.12);
}

.license-review-summary {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.license-review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}

.license-review-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.license-review-row span {
  color: var(--text-tertiary);
}

.license-review-row strong {
  color: #ffffff;
}

.license-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.5);
}
