/* ═══════════════════════════════════════════════════════════════
   SPROUT HUB — Design System v2.0
   Paleta: #5d7265 · #f1ece1 · #a9b69d · #e4cc92 · #ded5c5
   Fonte: Montserrat | Grid: 8px
═══════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Cores principais */
  --primary:        #5d7265;
  --primary-hover:  #4a5d52;
  --primary-light:  #a9b69d;
  --primary-faint:  #edf2ec;
  --accent:         #e4cc92;
  --accent-faint:   rgba(228, 204, 146, 0.15);

  /* Superfícies */
  --bg:             #f1ece1;
  --surface:        #ffffff;
  --surface-raised: #fdfcf9;
  --border:         #ded5c5;
  --border-focus:   #5d7265;

  /* Texto */
  --text-strong:    #1e2c24;
  --text-main:      #2f3e34;
  --text-secondary: #6b7c72;
  --text-muted:     #9aab9f;

  /* Semânticas */
  --success:        #438e5c;
  --success-bg:     #ebf5ee;
  --warning:        #c18d2a;
  --warning-bg:     #fdf6e3;
  --danger:         #b83c3c;
  --danger-bg:      #fdf0f0;
  --info:           #3a7bbf;
  --info-bg:        #eef4fb;

  /* Layout */
  --sidebar-w:      268px;

  /* Radii */
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --radius-xl:      20px;
  --radius-pill:    100px;

  /* Shadows */
  --shadow-xs:  0 1px 3px rgba(47, 62, 52, 0.06);
  --shadow-sm:  0 2px 8px rgba(47, 62, 52, 0.06), 0 1px 3px rgba(47, 62, 52, 0.04);
  --shadow-md:  0 8px 24px rgba(47, 62, 52, 0.09), 0 2px 6px rgba(47, 62, 52, 0.05);
  --shadow-lg:  0 16px 48px rgba(47, 62, 52, 0.12), 0 4px 12px rgba(47, 62, 52, 0.07);
  --shadow-focus: 0 0 0 3px rgba(93, 114, 101, 0.18);

  /* Transitions */
  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:     150ms;
  --t-base:     200ms;
  --t-slow:     300ms;
  --transition: var(--t-base) var(--ease);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: var(--bg);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.5;
}

h1, h2, h3, h4, h5 {
  margin: 0;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

p { margin: 0; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
═══════════════════════════════════════════════════════════════ */

/* ─── Sidebar ────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background-color: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 32px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 1px solid var(--border);
}

.sidebar-header a {
  display: flex;
  align-items: center;
}

.sidebar-logo {
  width: 140px;
  height: auto;
  display: block;
}

.nav-links {
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  gap: 2px;
  flex: 1;
  overflow-y: auto;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 16px 12px 8px;
}

.nav-link {
  color: var(--text-secondary);
  padding: 11px 14px;
  border-radius: var(--radius-md);
  transition: background-color var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  position: relative;
}

.nav-link svg,
.nav-link i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: opacity var(--t-fast) var(--ease);
}

.nav-link:hover {
  background-color: var(--primary-faint);
  color: var(--primary);
}

.nav-link:hover i,
.nav-link:hover svg { opacity: 1; }

.nav-link.active {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(93, 114, 101, 0.25),
              inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.nav-link.active i,
.nav-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

/* ─── Main Content ───────────────────────────────────────────── */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 40px 48px;
  overflow-y: auto;
  scroll-behavior: smooth;
  height: 100vh;
}

/* ─── View Sections ──────────────────────────────────────────── */
.view-section { display: none; }

.view-section > h2 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-strong);
}

.view-section > p.subtitle {
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Section Header (título + ação) ─────────────────────────── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  gap: 24px;
}

.section-header-text h2 { font-size: 26px; font-weight: 800; margin-bottom: 4px; }
.section-header-text p  { color: var(--text-secondary); font-size: 14px; margin: 0; }

/* ─── Section Group Label ────────────────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   BOTÕES
═══════════════════════════════════════════════════════════════ */

button {
  background-color: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  transition: background-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

button:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(93, 114, 101, 0.2);
}

button:active { transform: translateY(0); }

button i, button svg { width: 15px; height: 15px; flex-shrink: 0; }

/* Secundário — outline */
button.btn-secondary {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}

button.btn-secondary:hover {
  background-color: var(--surface);
  border-color: var(--primary-light);
  color: var(--primary);
  box-shadow: var(--shadow-xs);
}

/* Ghost — sem fundo */
button.btn-ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

button.btn-ghost:hover {
  background-color: var(--primary-faint);
  color: var(--primary);
  box-shadow: none;
  transform: none;
}

/* Danger — outline suave */
button.btn-danger {
  background-color: transparent;
  border-color: rgba(184, 60, 60, 0.25);
  color: var(--danger);
}

button.btn-danger:hover {
  background-color: var(--danger-bg);
  border-color: var(--danger);
  color: var(--danger);
  box-shadow: none;
}

/* Ícone */
button.btn-icon {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-muted);
  padding: 7px;
  border-radius: var(--radius-md);
  min-width: 32px;
  min-height: 32px;
}

button.btn-icon:hover {
  background-color: var(--primary-faint);
  color: var(--primary);
  transform: none;
  box-shadow: none;
}

/* Encerrar sessão — ghost danger */
button.btn-logout-sidebar {
  background-color: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
  width: 100%;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12.5px;
}

button.btn-logout-sidebar:hover {
  background-color: var(--danger-bg);
  border-color: rgba(184, 60, 60, 0.3);
  color: var(--danger);
  transform: none;
  box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════
   FORMS & INPUTS
═══════════════════════════════════════════════════════════════ */

input, select, textarea {
  width: 100%;
  padding: 11px 14px;
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: var(--radius-md);
  box-sizing: border-box;
  font-family: 'Montserrat', sans-serif;
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

input::placeholder, textarea::placeholder { color: var(--text-muted); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
}

label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

/* ─── Filter Bar ─────────────────────────────────────────────── */
.filter-bar {
  background: var(--surface);
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 140px;
}

.filter-group label {
  margin: 0;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* Date Presets */
.date-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.date-preset-btn {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}

.date-preset-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: var(--primary-faint);
  transform: none;
  box-shadow: none;
}

.date-preset-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: none;
  transform: none;
}

.custom-date-range {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.custom-date-range input { flex: 1; min-width: 140px; }

/* ═══════════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════════ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  line-height: 1;
}

.badge::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-connected    { background: var(--success-bg); color: var(--success); }
.badge-disconnected { background: var(--danger-bg);  color: var(--danger); }
.badge-qr_ready     { background: var(--warning-bg); color: var(--warning); }
.badge-initializing { background: var(--info-bg);    color: var(--info); }
.badge-reconnecting { background: var(--info-bg);    color: var(--info); }
.badge-auth_failure { background: var(--danger-bg);  color: var(--danger); }
.badge-error        { background: var(--danger-bg);  color: var(--danger); }
.badge-active       { background: var(--success-bg); color: var(--success); }
.badge-inactive     { background: #f4f3f0;           color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — STAT CARDS
═══════════════════════════════════════════════════════════════ */

.stats-section {
  margin-bottom: 40px;
}

.stat-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--primary-faint);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--primary-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}

.stat-icon i, .stat-icon svg { width: 18px; height: 18px; }

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   CLIENTS — CARDS
═══════════════════════════════════════════════════════════════ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.client-card {
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}

.client-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.client-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.client-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--primary-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.client-card-avatar i, .client-card-avatar svg { width: 20px; height: 20px; }

.client-card-info { flex: 1; min-width: 0; }
.client-card-info h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-card-info p {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-card-api {
  background: var(--bg);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.client-card-api-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.client-card-api code {
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  color: var(--text-secondary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.client-card-api .btn-copy {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  flex-shrink: 0;
  gap: 5px;
}

.client-card-api .btn-copy:hover {
  background: var(--primary-faint);
  border-color: var(--primary-light);
  transform: none;
  box-shadow: none;
}

.client-card-api .btn-copy i, .client-card-api .btn-copy svg { width: 13px; height: 13px; }

.client-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.client-card-actions button {
  flex: 1;
  padding: 9px 12px;
  font-size: 12px;
  border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════════
   WHATSAPP — SESSION CARDS
═══════════════════════════════════════════════════════════════ */

.wa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.wa-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
  overflow: hidden;
}

.wa-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.wa-card-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.wa-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 3px;
}

.wa-card-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* QR área */
.wa-card-qr {
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex: 1;
  min-height: 260px;
  background: var(--surface-raised);
}

.qr-wrapper {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 8px;
}

.qr-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.qr-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px;
}

.qr-placeholder i, .qr-placeholder svg { width: 40px; height: 40px; opacity: 0.4; }
.qr-placeholder p { font-size: 12px; line-height: 1.5; }

.qr-connected-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--success);
}

.qr-connected-icon i, .qr-connected-icon svg { width: 56px; height: 56px; }
.qr-connected-icon p { font-size: 13px; font-weight: 600; color: var(--success); }

/* Session info */
.wa-card-info {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.wa-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wa-info-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wa-info-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
}

/* Card footer */
.wa-card-footer {
  padding: 14px 20px;
  display: flex;
  gap: 10px;
}

.wa-card-footer button {
  flex: 1;
  padding: 10px 14px;
  font-size: 12.5px;
  border-radius: var(--radius-md);
}

/* ═══════════════════════════════════════════════════════════════
   TEMPLATES / ALERTAS
═══════════════════════════════════════════════════════════════ */

.templates-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1500px) { .templates-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .templates-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .templates-grid { grid-template-columns: 1fr; } }

.template-card {
  background: var(--primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--primary-hover);
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
  overflow: hidden;
}

.template-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(47, 62, 52, 0.25);
}

.template-card-header {
  padding: 20px 20px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.template-card-header h4 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.template-card-header code {
  font-family: 'Courier New', monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.15);
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.template-card-body {
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  flex: 1;
  background: rgba(0,0,0,0.06);
  min-height: 80px;
}

.var-highlight {
  color: var(--accent);
  font-weight: 700;
  background: rgba(228, 204, 146, 0.15);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12.5px;
}

.template-card-footer {
  padding: 14px 20px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.template-card-footer button {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 12px;
}

.template-card-footer button:hover {
  background: rgba(255,255,255,0.2);
  transform: none;
  box-shadow: none;
}

/* Template group */
.template-group { margin-bottom: 40px; }

.template-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.template-group-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

/* Info banner variáveis */
.info-banner {
  background: var(--surface);
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 28px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-xs);
}

.info-banner i, .info-banner svg { color: var(--primary); width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.info-banner p { font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }

/* ═══════════════════════════════════════════════════════════════
   LOGS
═══════════════════════════════════════════════════════════════ */

.log-group { margin-bottom: 36px; }

.log-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.log-group-date {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.log-group-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.log-group-count {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.log-item {
  background: var(--surface);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}

.log-item:hover {
  border-color: var(--primary-light);
  transform: translateX(3px);
  box-shadow: var(--shadow-xs);
}

.log-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.log-client-name {
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-strong);
}

.log-channel-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.log-channel-badge i, .log-channel-badge svg { width: 12px; height: 12px; }

.log-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.log-status-badge.success { background: var(--success-bg); color: var(--success); }
.log-status-badge.error   { background: var(--danger-bg);  color: var(--danger); }

.log-separator { flex: 1; }

.log-item-msg {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.log-item-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════════════ */

#view-login {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  width: 100%;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 52px 56px;
  max-width: 420px;
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-card img { margin-bottom: 28px; }

.login-card h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.login-card p {
  color: var(--text-secondary);
  margin-bottom: 36px;
  font-size: 14px;
}

.login-form-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: left;
  margin-bottom: 20px;
}

.login-form-fields label {
  text-transform: none;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0;
  margin-bottom: 5px;
}

/* ═══════════════════════════════════════════════════════════════
   MODAIS
═══════════════════════════════════════════════════════════════ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 44, 36, 0.5);
  backdrop-filter: blur(4px);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 36px 40px;
  max-width: 520px;
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.modal-form-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-field-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  display: block;
}

.modal-section {
  background: var(--surface-raised);
  border: 1px solid var(--border);
  padding: 20px;
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.modal-section-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.modal-row {
  display: flex;
  gap: 14px;
}

.modal-row > div { flex: 1; }

/* ═══════════════════════════════════════════════════════════════
   RECENT CLIENTS LIST (Dashboard)
═══════════════════════════════════════════════════════════════ */

.recent-client-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}

.recent-client-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATES
═══════════════════════════════════════════════════════════════ */

.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
}

.empty-state i, .empty-state svg {
  width: 48px; height: 48px;
  opacity: 0.3;
  margin-bottom: 16px;
}

.empty-state p { font-size: 14px; }

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════════════ */

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
  .main-content { padding: 32px; }
}

@media (max-width: 900px) {
  .main-content { padding: 24px; }
  .cards-grid   { grid-template-columns: 1fr; }
}
