/* =====================================================================
   DB Board — Design System
   Cores: Azul #3E569E | Dourado #BDA07E | Branco #FFFFFF
   ===================================================================== */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Paleta principal */
  --db-blue:        #3E569E;
  --db-blue-dark:   #2C3E72;
  --db-blue-deeper: #1E2C54;
  --db-gold:        #BDA07E;
  --db-gold-light:  #D4B896;
  --db-gold-muted:  rgba(189,160,126,0.15);

  /* Neutros */
  --db-white:       #FFFFFF;
  --db-bg:          #F4F6FB;
  --db-surface:     #FFFFFF;
  --db-border:      #E2E8F4;
  --db-border-soft: #EBF0FA;

  /* Texto */
  --db-text:        #1A243D;
  --db-text-muted:  #6B7A9B;
  --db-text-light:  #9BA8C2;

  /* Semânticos */
  --db-success:     #1F7A4D;
  --db-success-bg:  #E6F5EE;
  --db-warning:     #C47D0A;
  --db-warning-bg:  #FFF5E0;
  --db-danger:      #C0392B;
  --db-danger-bg:   #FEE8E6;

  /* Sombras */
  --shadow-sm:      0 1px 4px rgba(62,86,158,0.06);
  --shadow-md:      0 4px 16px rgba(62,86,158,0.10);
  --shadow-lg:      0 8px 32px rgba(62,86,158,0.14);

  /* Radii */
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--db-bg);
  color: var(--db-text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* =====================================================================
   LAYOUT
   ===================================================================== */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* =====================================================================
   SIDEBAR
   ===================================================================== */
.sidebar {
  width: 256px;
  background: #15213F;
  color: white;
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid rgba(255,255,255,0.05);
}

/* Logo area */
.logo-area {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex-shrink: 0;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}

.logo-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--db-gold) 0%, transparent 70%);
  opacity: 0.35;
}

.logo-product {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.logo-product-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--db-white);
  letter-spacing: 0.01em;
}

.logo-product-name span {
  color: var(--db-gold-light);
  font-weight: 300;
}

.tagline {
  font-size: 0.63rem;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
}

/* Nav scrollavel */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}

/* Grupos de nav */
.nav-group {
  margin-bottom: 4px;
}

/* Nav section labels */
.nav-section-label {
  font-size: 0.59rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.28);
  padding: 14px 20px 5px;
  font-weight: 700;
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  margin: 1px 10px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.58);
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  font-size: 0.845rem;
  font-weight: 500;
  position: relative;
}

.nav-item i {
  width: 18px;
  text-align: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  color: rgba(255,255,255,0.4);
  transition: color 0.15s;
}

.nav-item:hover:not(.active) {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.9);
}

.nav-item:hover:not(.active) i {
  color: rgba(255,255,255,0.7);
}

.nav-item.active {
  background: rgba(62,86,158,0.55);
  color: white;
  font-weight: 600;
}

.nav-item.active i {
  color: var(--db-gold-light);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 55%;
  background: var(--db-gold);
  border-radius: 0 3px 3px 0;
}

/* NOC divider */
.noc-divider {
  margin: 8px 10px 2px;
  padding: 10px 10px 2px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.noc-badge {
  font-size: 0.59rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--db-gold-light);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0.8;
  padding: 0 10px 4px;
}

/* =====================================================================
   SIDEBAR FOOTER
   ===================================================================== */
.sidebar-footer {
  flex-shrink: 0;
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  cursor: default;
}

.sidebar-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--db-blue) 0%, var(--db-blue-dark) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  border: 1.5px solid rgba(189,160,126,0.4);
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.66rem;
  color: rgba(255,255,255,0.38);
  margin-top: 1px;
}

.sidebar-mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.79rem;
  color: rgba(255,255,255,0.55);
  cursor: pointer;
}

.sidebar-mode-icon {
  font-size: 0.8rem;
  color: var(--db-gold-light);
  flex-shrink: 0;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255,255,255,0.2);
  transition: 0.3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background: var(--db-gold);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/* =====================================================================
   MAIN CONTENT
   ===================================================================== */
.main-content {
  flex: 1;
  margin-left: 256px;
  padding: 24px 28px 40px;
  min-width: 0;
}

/* =====================================================================
   TOP BAR
   ===================================================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--db-surface);
  padding: 12px 20px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 22px;
  border: 1px solid var(--db-border-soft);
  gap: 16px;
}

.page-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--db-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title h2 i {
  color: var(--db-blue);
  font-size: 1rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.badge-cliente {
  background: var(--db-gold-muted);
  color: #7A5C3A;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(189,160,126,0.3);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.badge-cliente i {
  color: var(--db-gold);
}

/* Logo do cliente/admin na topbar */
.topbar-logo-wrap {
  display: flex;
  align-items: center;
  height: 36px;
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: 10px;
  padding: 4px 10px;
  overflow: hidden;
}

.topbar-logo-img {
  height: 26px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--db-blue);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 2px solid var(--db-border);
  flex-shrink: 0;
}

.role-badge {
  background: var(--db-bg);
  border: 1px solid var(--db-border);
  color: var(--db-text-muted);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.btn-logout {
  background: none;
  border: 1.5px solid var(--db-border);
  color: var(--db-text-muted);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-logout:hover {
  background: var(--db-danger-bg);
  color: var(--db-danger);
  border-color: var(--db-danger);
}

/* =====================================================================
   FILTERS BAR
   ===================================================================== */
.filters-bar {
  background: var(--db-surface);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--db-border-soft);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.filter-group label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--db-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter-group label i {
  color: var(--db-blue);
  font-size: 0.7rem;
}

.filter-group select {
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--db-border);
  background: var(--db-bg);
  color: var(--db-text);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.filter-group select:focus {
  border-color: var(--db-blue);
}

.btn-secondary {
  background: var(--db-blue);
  border: none;
  color: white;
  padding: 8px 18px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.8rem;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s, transform 0.1s;
  align-self: flex-end;
}

.btn-secondary:hover {
  background: var(--db-blue-dark);
}

.btn-secondary:active {
  transform: scale(0.97);
}

/* =====================================================================
   STATS GRID
   ===================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--db-surface);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--db-border-soft);
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--db-blue) 0%, var(--db-gold) 100%);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-title {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--db-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.stat-title i {
  color: var(--db-blue);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--db-blue-dark);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.stat-trend {
  font-size: 0.72rem;
  color: var(--db-text-light);
  font-weight: 500;
}

.trend-up { color: var(--db-success) !important; }
.trend-down { color: var(--db-danger) !important; }

/* =====================================================================
   DASHBOARD ROW / CARDS
   ===================================================================== */
.dashboard-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 20px;
}

.card-chart,
.card-table {
  background: var(--db-surface);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  flex: 1 1 40%;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--db-border-soft);
  min-width: 0;
}

.card-chart.large {
  flex: 2;
}

.section-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--db-text);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.section-title i {
  color: var(--db-blue);
  font-size: 0.85rem;
}

/* =====================================================================
   TABLES
   ===================================================================== */
.exec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.exec-table th {
  padding: 8px 10px;
  border-bottom: 2px solid var(--db-border);
  text-align: left;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--db-text-muted);
}

.exec-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--db-border-soft);
  color: var(--db-text);
  vertical-align: middle;
}

.exec-table tbody tr:hover td {
  background: var(--db-bg);
}

.exec-table tbody tr:last-child td {
  border-bottom: none;
}

/* =====================================================================
   BADGES DE STATUS
   ===================================================================== */
.status-badge {
  padding: 3px 10px;
  border-radius: 30px;
  font-size: 0.68rem;
  font-weight: 700;
  display: inline-block;
  letter-spacing: 0.03em;
}

.status-success {
  background: var(--db-success-bg);
  color: var(--db-success);
}

.status-fail {
  background: var(--db-danger-bg);
  color: var(--db-danger);
}

.status-warning {
  background: var(--db-warning-bg);
  color: var(--db-warning);
}

/* =====================================================================
   INSIGHTS IA
   ===================================================================== */
.insight-ia {
  background: linear-gradient(135deg, #EDF1FB 0%, #F4F6FB 100%);
  border-left: 3px solid var(--db-blue);
  padding: 14px 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-top: 14px;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--db-text);
}

.insight-ia i {
  color: var(--db-blue);
  margin-right: 4px;
}

.ia-suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ia-suggestions-list .insight-ia {
  margin-top: 0;
}

/* =====================================================================
   INSIGHT CARD EXPANDIDO (view insights)
   ===================================================================== */
.insight-card.expanded {
  background: var(--db-surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--db-border-soft);
}

.insight-card.expanded h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--db-text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.insight-card.expanded h3 i {
  color: var(--db-blue);
}

/* =====================================================================
   VIEWS
   ===================================================================== */
.view-hidden { display: none !important; }
.view-active { display: block; }

/* =====================================================================
   MODAL
   ===================================================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(20,30,60,0.45);
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--db-surface);
  margin: 8% auto;
  padding: 30px;
  width: 520px;
  max-width: 95vw;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--db-border-soft);
}

.modal-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--db-text);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--db-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-content p {
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--db-text);
}

.modal-content p strong {
  color: var(--db-blue-dark);
}

.modal-content hr {
  border: none;
  border-top: 1px solid var(--db-border);
  margin: 14px 0;
}

.close-modal {
  position: absolute;
  top: 18px;
  right: 22px;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--db-text-muted);
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--db-danger);
}

/* =====================================================================
   VIEW: AUTOMAÇÕES — FILTROS
   ===================================================================== */
.automacoes-filters {
  background: var(--db-surface);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--db-border-soft);
}

.automacoes-search {
  position: relative;
  display: flex;
  align-items: center;
  margin-left: auto;
}

.automacoes-search i {
  position: absolute;
  left: 12px;
  color: var(--db-text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.automacoes-search input {
  padding: 7px 12px 7px 34px;
  border-radius: 30px;
  border: 1px solid var(--db-border);
  background: var(--db-bg);
  color: var(--db-text);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  width: 200px;
  transition: border-color 0.2s, width 0.3s;
}

.automacoes-search input:focus {
  border-color: var(--db-blue);
  width: 260px;
}

/* =====================================================================
   VIEW: AUTOMAÇÕES — GRID DE CARDS
   ===================================================================== */
.robots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}

.robots-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 48px 24px;
  color: var(--db-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.robots-empty i {
  font-size: 2.5rem;
  color: var(--db-border);
}

/* =====================================================================
   ROBOT CARD
   ===================================================================== */
.robot-card {
  background: var(--db-surface);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--db-border-soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.robot-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--db-blue) 0%, var(--db-gold) 100%);
}

.robot-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.robot-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.robot-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--db-blue) 0%, var(--db-blue-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}

.robot-header-info {
  flex: 1;
  min-width: 0;
}

.robot-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--db-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.robot-meta {
  font-size: 0.7rem;
  color: var(--db-text-muted);
  margin-top: 2px;
}

.robot-status-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 30px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.robot-status-ativo   { background: var(--db-success-bg); color: var(--db-success); }
.robot-status-pausado { background: var(--db-warning-bg); color: var(--db-warning); }
.robot-status-erro    { background: var(--db-danger-bg);  color: var(--db-danger);  }

.robot-desc {
  font-size: 0.78rem;
  color: var(--db-text-muted);
  line-height: 1.55;
}

.robot-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.robot-tag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.tag-tipo    { background: rgba(62,86,158,0.1);   color: var(--db-blue); }
.tag-cliente { background: var(--db-gold-muted);  color: #7A5C3A; }
.tag-sla     { background: var(--db-bg);          color: var(--db-text-muted); border: 1px solid var(--db-border); }

.robot-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  background: var(--db-bg);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
}

.robot-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.robot-stat-num {
  font-size: 1rem;
  font-weight: 800;
  color: var(--db-blue-dark);
  line-height: 1;
}

.robot-stat-lbl {
  font-size: 0.62rem;
  color: var(--db-text-light);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  text-align: center;
}

.robot-progress-bar {
  height: 5px;
  background: var(--db-border);
  border-radius: 10px;
  overflow: hidden;
}

.robot-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.6s ease;
}

.robot-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.robot-last-exec {
  font-size: 0.7rem;
  color: var(--db-text-light);
  display: flex;
  align-items: center;
  gap: 5px;
}

.btn-robo-detalhe {
  background: var(--db-blue);
  border: none;
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background 0.2s;
}

.btn-robo-detalhe:hover {
  background: var(--db-blue-dark);
}

/* Modal robot grid */
.modal-robot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.modal-info-block p {
  padding: 4px 0;
  border-bottom: 1px solid var(--db-border-soft);
  font-size: 0.83rem;
}

.modal-info-block p:last-child {
  border-bottom: none;
}

/* =====================================================================
   VIEW: INSIGHTS
   ===================================================================== */
.insights-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.insight-kpi {
  background: var(--db-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--db-border-soft);
}

.insight-kpi i {
  font-size: 1.3rem;
  color: var(--db-blue);
}

.ikpi-num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--db-blue-dark);
  line-height: 1;
}

.ikpi-lbl {
  font-size: 0.7rem;
  color: var(--db-text-muted);
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.insights-section-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--db-text-muted);
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--db-border-soft);
}

.insights-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.insight-full-card {
  display: flex;
  gap: 16px;
  background: var(--db-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  border: 1px solid var(--db-border-soft);
  align-items: flex-start;
}

.insight-full-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.insight-full-body {
  flex: 1;
}

.insight-full-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--db-text);
  margin-bottom: 4px;
}

.insight-full-desc {
  font-size: 0.8rem;
  color: var(--db-text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

.insight-full-acao {
  font-size: 0.75rem;
  color: var(--db-blue);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.insights-excecoes-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.insight-excecao-row {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--db-bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--db-border-soft);
}

.ier-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(62,86,158,0.1);
  color: var(--db-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ier-body {
  flex: 1;
  min-width: 0;
}

.ier-tipo {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--db-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ier-acao {
  font-size: 0.74rem;
  color: var(--db-text-muted);
  margin-top: 2px;
}

.ier-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.ier-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--db-blue-dark);
}

.ier-var {
  font-size: 0.7rem;
  font-weight: 600;
}

/* =====================================================================
   BOTÃO DE DOWNLOAD DE RELATÓRIO
   ===================================================================== */
.filters-bar-right {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}

.btn-download-relatorio {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px 7px 14px;
  background: linear-gradient(135deg, var(--db-blue) 0%, var(--db-blue-dark) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(62,86,158,0.25);
  white-space: nowrap;
}

.btn-download-relatorio:hover {
  opacity: 0.9;
  box-shadow: 0 4px 14px rgba(62,86,158,0.35);
}

.btn-download-arrow {
  background: rgba(255,255,255,0.15);
  border-radius: 5px;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  transition: background 0.15s;
}

.btn-download-relatorio:hover .btn-download-arrow {
  background: rgba(255,255,255,0.25);
}

.download-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-width: 170px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s;
}

.download-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.download-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  background: none;
  border: none;
  color: var(--db-text);
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.12s;
}

.download-dropdown button:hover {
  background: var(--db-bg);
  color: var(--db-blue);
}

.download-dropdown button i {
  color: var(--db-blue);
  width: 16px;
  text-align: center;
}

.download-dropdown button + button {
  border-top: 1px solid var(--db-border-soft);
}

/* =====================================================================
   TOAST DE CONFIRMAÇÃO
   ===================================================================== */
#dbToast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--db-blue-deeper);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 0.83rem;
  font-weight: 500;
  box-shadow: 0 8px 28px rgba(30,44,84,0.35);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  border: 1px solid rgba(189,160,126,0.3);
  white-space: nowrap;
}

#dbToast i {
  color: var(--db-gold-light);
  font-size: 1rem;
}

#dbToast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* =====================================================================
   SIDEBAR — NAV BADGE & SEPARADOR
   ===================================================================== */
.nav-badge {
  margin-left: auto;
  background: var(--db-blue);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  min-width: 20px;
  text-align: center;
  letter-spacing: 0;
  flex-shrink: 0;
}

.nav-badge-danger {
  background: var(--db-danger);
}

.nav-section-sep {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 10px 14px;
}

/* =====================================================================
   VIEW: AGENDA
   ===================================================================== */
.weekly-grid-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.wg-day-lbl {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--db-text-muted);
  letter-spacing: 0.05em;
}

.weekly-grid-body {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  min-height: 100px;
}

.wg-day-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wg-chip {
  background: rgba(62,86,158,0.12);
  color: var(--db-blue);
  font-size: 0.6rem;
  font-weight: 600;
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}

.wg-chip-more {
  background: var(--db-gold-muted);
  color: #7A5C3A;
}

/* =====================================================================
   VIEW: RELATÓRIOS
   ===================================================================== */
.relatorios-templates-grid {
  margin-top: 4px;
}

.relatorios-templates-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--db-text-muted);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--db-border-soft);
  display: flex;
  align-items: center;
  gap: 6px;
}

.relatorios-templates {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.rel-template-card {
  background: var(--db-surface);
  border: 1px solid var(--db-border-soft);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  text-align: center;
  align-items: center;
}

.rel-template-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--db-blue);
}

.rel-template-card i {
  font-size: 1.5rem;
  color: var(--db-blue);
}

.rel-template-titulo {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--db-text);
}

.rel-template-desc {
  font-size: 0.72rem;
  color: var(--db-text-muted);
  line-height: 1.45;
}

.rel-template-btn {
  font-size: 0.72rem;
  color: var(--db-blue);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

/* =====================================================================
   VIEW: NOTIFICAÇÕES
   ===================================================================== */
.notif-header-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 20px;
}

.notif-filter-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--db-border);
  background: var(--db-bg);
  color: var(--db-text);
  font-size: 0.78rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.notif-filter-select:focus {
  border-color: var(--db-blue);
}

.notif-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.notif-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  border: 1px solid transparent;
}

.notif-item:hover {
  background: var(--db-bg);
  border-color: var(--db-border-soft);
}

.notif-lida {
  opacity: 0.65;
}

.notif-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.notif-body {
  flex: 1;
  min-width: 0;
}

.notif-titulo {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--db-text);
  margin-bottom: 3px;
}

.notif-desc {
  font-size: 0.78rem;
  color: var(--db-text-muted);
  line-height: 1.45;
  margin-bottom: 5px;
}

.notif-tempo {
  font-size: 0.7rem;
  color: var(--db-text-light);
  font-weight: 500;
}

.notif-dot {
  width: 8px;
  height: 8px;
  background: var(--db-blue);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}

.notif-empty {
  text-align: center;
  padding: 40px;
  color: var(--db-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.notif-empty i {
  font-size: 2rem;
  color: var(--db-border);
}

.notif-prefs-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* =====================================================================
   VIEW: CONFIGURAÇÕES
   ===================================================================== */
.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.config-card {
  background: var(--db-surface);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--db-border-soft);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--db-border-soft);
}

.config-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(62,86,158,0.12);
  color: var(--db-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.config-card-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--db-text);
}

.config-card-sub {
  font-size: 0.72rem;
  color: var(--db-text-muted);
  margin-top: 2px;
}

.config-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.config-field label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--db-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.config-input {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--db-border);
  background: var(--db-bg);
  color: var(--db-text);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.config-input:focus {
  border-color: var(--db-blue);
}

.config-input[readonly] {
  opacity: 0.6;
  cursor: default;
}

.config-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.config-toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--db-border-soft);
}

.config-toggle-row:last-child {
  border-bottom: none;
}

.ctr-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ctr-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--db-text);
}

.ctr-desc {
  font-size: 0.71rem;
  color: var(--db-text-muted);
}

/* Integrações */
.integracoes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.integ-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--db-bg);
  border: 1px solid var(--db-border-soft);
}

.integ-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.integ-body {
  flex: 1;
  min-width: 0;
}

.integ-nome {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--db-text);
}

.integ-detalhe {
  font-size: 0.7rem;
  color: var(--db-text-muted);
}

/* Sobre */
.config-sobre {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sobre-logo-row {
  display: flex;
  justify-content: center;
  padding: 10px 0;
  background: var(--db-blue-deeper);
  border-radius: var(--radius-md);
}

.sobre-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.sobre-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sobre-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--db-border-soft);
  color: var(--db-text-muted);
}

.sobre-row strong {
  color: var(--db-text);
  font-weight: 600;
}

/* =====================================================================
   VIEW: MONITOR TEMPO REAL
   ===================================================================== */
.monitor-live-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(31,122,77,0.08);
  border: 1px solid rgba(31,122,77,0.2);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--db-success);
  margin-bottom: 20px;
}

.monitor-ts {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--db-text-muted);
  font-weight: 400;
}

.monitor-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--db-success);
  animation: pulse-dot 1.2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.4); }
}

.monitor-robots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.monitor-robot-tile {
  background: var(--db-bg);
  border: 1px solid var(--db-border-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mrt-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mrt-nome {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--db-text);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mrt-client {
  font-size: 0.7rem;
  color: var(--db-text-muted);
}

.mrt-meta {
  font-size: 0.7rem;
  color: var(--db-text-light);
  font-weight: 500;
}

.monitor-alertas-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer-demo {
  text-align: center;
  font-size: 0.7rem;
  color: var(--db-text-light);
  margin-top: 40px;
  border-top: 1px solid var(--db-border);
  padding-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.footer-demo i {
  color: var(--db-gold);
}

/* =====================================================================
   GESTÃO DE CLIENTES
   ===================================================================== */
.gestao-clientes-header {
  margin-bottom: 20px;
}
.gestao-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--db-bg);
  border: 1px solid var(--db-border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
}
.gestao-intro > i {
  font-size: 1.6rem;
  color: var(--db-blue);
  flex-shrink: 0;
}
.gestao-intro-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--db-text);
}
.gestao-intro-sub {
  font-size: 0.78rem;
  color: var(--db-text-muted);
  margin-top: 2px;
}
.gestao-clientes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin: 20px 0;
}
.gestao-cliente-card {
  background: var(--db-surface);
  border: 1px solid var(--db-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: box-shadow 0.2s, transform 0.15s;
}
.gestao-cliente-card:hover {
  box-shadow: var(--db-shadow-sm);
  transform: translateY(-2px);
}
.gcc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 10px;
  margin-bottom: 16px;
}
.gcc-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.gcc-nome {
  font-size: 1rem;
  font-weight: 700;
  color: var(--db-text);
}
.gcc-sub {
  font-size: 0.72rem;
  color: var(--db-text-muted);
}
.gcc-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.gcc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gcc-stat-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--db-text);
}
.gcc-stat-lbl {
  font-size: 0.65rem;
  color: var(--db-text-muted);
  text-align: center;
}
.gcc-sla-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* =====================================================================
   ADMIN-ONLY COLUMN (hidden for clients)
   ===================================================================== */
.admin-col { display: table-cell; }

/* =====================================================================
   TABELAS — STRIPING E MELHORIAS
   ===================================================================== */
.exec-table tbody tr:nth-child(even) td {
  background: rgba(62, 86, 158, 0.025);
}

.exec-table tbody tr {
  transition: background 0.12s;
}

.exec-table tbody tr:hover td {
  background: rgba(62, 86, 158, 0.06) !important;
}

/* =====================================================================
   SIDEBAR — HOVER MELHORADO E ACTIVE GLOW
   ===================================================================== */
.nav-item.active {
  background: rgba(62, 86, 158, 0.60);
  box-shadow: 0 2px 12px rgba(62,86,158,0.25);
}

.nav-item:hover:not(.active) {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.95);
}

/* =====================================================================
   TOPBAR — REFINAMENTO
   ===================================================================== */
.top-bar {
  background: linear-gradient(135deg, var(--db-surface) 0%, rgba(244,246,251,0.7) 100%);
  backdrop-filter: blur(6px);
}

.page-title h2 i {
  background: rgba(62,86,158,0.1);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 0.85rem;
}

/* =====================================================================
   STAT CARDS — WATERMARK DECORATIVO
   ===================================================================== */
.stat-card::before {
  content: '';
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 64px;
  height: 64px;
  background: radial-gradient(circle, rgba(62,86,158,0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* =====================================================================
   ROBOT CARDS — GRADIENTE DE FUNDO E ÍCONE
   ===================================================================== */
.robot-card {
  background: linear-gradient(160deg, var(--db-surface) 75%, rgba(62,86,158,0.03) 100%);
}

.robot-icon-wrap {
  background: linear-gradient(135deg, var(--db-blue) 0%, var(--db-blue-dark) 60%, var(--db-blue-deeper) 100%);
  box-shadow: 0 4px 10px rgba(62,86,158,0.3);
}

/* =====================================================================
   GESTÃO CLIENTE CARD — MELHORIAS
   ===================================================================== */
.gestao-cliente-card {
  border: 1px solid var(--db-border-soft);
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}

.gestao-cliente-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--db-blue);
}

.gcc-header {
  background: linear-gradient(90deg, rgba(62,86,158,0.04) 0%, transparent 60%);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

/* =====================================================================
   INSIGHTS — TIMELINE DE MELHORIAS
   ===================================================================== */
.insights-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 28px;
}

.insights-timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--db-blue) 0%, var(--db-gold) 100%);
  opacity: 0.3;
  border-radius: 2px;
}

.timeline-item {
  display: flex;
  gap: 16px;
  padding: 14px 0 14px 0;
  position: relative;
  border-bottom: 1px solid var(--db-border-soft);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-dot {
  position: absolute;
  left: -25px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--db-surface);
  flex-shrink: 0;
  z-index: 1;
}

.timeline-dot-success { background: var(--db-success); box-shadow: 0 0 0 3px rgba(31,122,77,0.2); }
.timeline-dot-blue    { background: var(--db-blue);    box-shadow: 0 0 0 3px rgba(62,86,158,0.2); }
.timeline-dot-gold    { background: var(--db-gold);    box-shadow: 0 0 0 3px rgba(189,160,126,0.2); }

.timeline-body {
  flex: 1;
}

.timeline-date {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--db-text-muted);
  font-weight: 700;
  margin-bottom: 2px;
}

.timeline-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--db-text);
  margin-bottom: 3px;
}

.timeline-desc {
  font-size: 0.78rem;
  color: var(--db-text-muted);
  line-height: 1.5;
}

/* =====================================================================
   HEALTH CARD ESPECIAL
   ===================================================================== */
.stat-card-health::after {
  background: linear-gradient(90deg, var(--db-success) 0%, var(--db-gold) 100%);
}

/* =====================================================================
   UA CARD — UNIDADES DE AUTOMAÇÃO
   ===================================================================== */
.stat-card-ua {
  border-top: 3px solid var(--db-blue);
}

.stat-card-ua::after {
  display: none;
}

.ua-bar-track {
  width: 100%;
  height: 8px;
  background: var(--db-border);
  border-radius: 100px;
  overflow: visible;
  position: relative;
}

.ua-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.ua-bar-fill::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: inherit;
  border: 2px solid var(--db-surface);
  box-shadow: 0 0 0 2px rgba(62, 86, 158, 0.25);
}

/* =====================================================================
   SCROLLBAR GLOBAL
   ===================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--db-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--db-text-light); }

/* =====================================================================
   RESPONSIVO
   ===================================================================== */
@media (max-width: 900px) {
  .sidebar {
    width: 68px;
  }

  .sidebar .nav-item span,
  .sidebar .nav-item .mode-switch-text,
  .tagline,
  .noc-badge,
  .nav-section-label,
  .logo-product,
  .logo-divider,
  #modeText {
    display: none;
  }

  .logo-area {
    padding: 18px 12px;
    align-items: center;
  }

  .logo-img {
    height: 32px;
  }

  .nav-item {
    justify-content: center;
    padding: 10px;
    margin: 2px 6px;
  }

  .nav-item.active::before {
    display: none;
  }

  .mode-switch-item {
    justify-content: center;
    padding: 10px;
  }

  .switch {
    margin-left: 0 !important;
  }

  .main-content {
    margin-left: 68px;
    padding: 16px 14px 32px;
  }

  .top-bar {
    flex-wrap: wrap;
    border-radius: var(--radius-lg);
  }

  .badge-cliente {
    display: none;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dashboard-row {
    flex-direction: column;
  }

  .card-chart, .card-table {
    flex: 1 1 100%;
  }
}
