/* ═══════════════════════════════════════════════════════════════════
   Grupo Gestor — Secretaria Virtual
   Paleta: Azul #1A56A5 | Azul Médio #2E7DD1 | Teal #00C9A7
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --gg-blue-dark:  #1A56A5;
  --gg-blue-med:   #2E7DD1;
  --gg-teal:       #00C9A7;
  --gg-teal-dark:  #00A88C;
  --gg-bg:         #F0F4FA;
  --gg-white:      #FFFFFF;
  --gg-text:       #1A202C;
  --gg-muted:      #718096;
  --gg-border:     #E2E8F0;
  --sidebar-w:     260px;
  --topbar-h:      64px;
  --radius:        12px;
  --shadow:        0 2px 12px rgba(26,86,165,.10);
  --shadow-lg:     0 8px 30px rgba(26,86,165,.15);
}

* { box-sizing: border-box; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--gg-bg);
  color: var(--gg-text);
  margin: 0;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: linear-gradient(180deg, var(--gg-blue-dark) 0%, #0F3A7A 100%);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform .3s ease;
  box-shadow: 4px 0 20px rgba(0,0,0,.15);
}

.sidebar-brand {
  padding: 24px 20px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-logo { height: 42px; object-fit: contain; }
.sidebar-app-name {
  color: var(--gg-teal);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 8px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all .2s;
}
.sidebar-link i { font-size: 18px; min-width: 20px; }
.sidebar-link:hover {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.sidebar-link.active {
  background: var(--gg-teal);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,201,167,.35);
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.1);
}
.sidebar-bot-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
}
.sidebar-bot-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-bot-label { color: rgba(255,255,255,.5); font-size: 11px; }
.sidebar-bot-name  { color: #fff; font-size: 13px; font-weight: 600; }

/* ─── TOPBAR & MAIN ───────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  background: var(--gg-white);
  border-bottom: 1px solid var(--gg-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gg-blue-dark);
  margin: 0;
  flex: 1;
}
.badge-bot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.badge-bot.on  { background: #E6FBF7; color: #00876A; }
.badge-bot.off { background: #FEE2E2; color: #C0392B; }
.badge-bot .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse-dot 2s infinite;
}
.badge-bot.off .dot { animation: none; }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
.content-area { padding: 28px; flex: 1; }

/* ─── CARDS ───────────────────────────────────────────────────────── */
.gg-card {
  background: var(--gg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--gg-border);
}
.gg-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gg-border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.gg-card-header h5 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--gg-blue-dark);
}
.gg-card-body { padding: 24px; }

/* ─── STAT CARDS ──────────────────────────────────────────────────── */
.stat-card {
  background: var(--gg-white);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gg-border);
  display: flex;
  align-items: center;
  gap: 16px;
}
.stat-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.stat-icon.blue   { background: #EBF4FF; color: var(--gg-blue-dark); }
.stat-icon.teal   { background: #E6FBF7; color: var(--gg-teal-dark); }
.stat-icon.orange { background: #FFF5EB; color: #E07B23; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--gg-text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--gg-muted); margin-top: 4px; }

/* ─── AGENDA ──────────────────────────────────────────────────────── */
.periodo-tabs {
  display: flex;
  gap: 6px;
}
.periodo-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--gg-border);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--gg-muted);
  transition: all .15s;
  font-family: 'Inter', sans-serif;
}
.periodo-btn:hover { border-color: var(--gg-blue-med); color: var(--gg-blue-med); }
.periodo-btn.active { border-color: var(--gg-teal); background: var(--gg-teal); color: #fff; }

.evento-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gg-border);
  align-items: flex-start;
}
.evento-item:last-child { border-bottom: none; }
.evento-hora {
  font-weight: 700;
  font-size: 13px;
  color: var(--gg-blue-dark);
  min-width: 96px;
  background: #EBF4FF;
  border-radius: 8px;
  padding: 6px 10px;
  text-align: center;
  flex-shrink: 0;
}
.evento-titulo { font-size: 14px; font-weight: 600; color: var(--gg-text); }
.evento-meta   { font-size: 12px; color: var(--gg-muted); margin-top: 3px; }
.evento-meta i { margin-right: 3px; }

/* ─── FORMS ───────────────────────────────────────────────────────── */
.form-label { font-size: 13px; font-weight: 600; color: var(--gg-text); margin-bottom: 6px; }
.form-control, .form-select {
  border: 1.5px solid var(--gg-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  transition: border-color .2s, box-shadow .2s;
  font-family: 'Inter', sans-serif;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gg-blue-med);
  box-shadow: 0 0 0 3px rgba(46,125,209,.15);
  outline: none;
}
textarea.form-control { resize: vertical; min-height: 80px; }

/* ─── BUTTONS ─────────────────────────────────────────────────────── */
.btn-gg-primary {
  background: linear-gradient(135deg, var(--gg-blue-dark), var(--gg-blue-med));
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 24px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
}
.btn-gg-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26,86,165,.35);
  color: #fff;
}
.btn-gg-teal {
  background: linear-gradient(135deg, var(--gg-teal), var(--gg-teal-dark));
  color: #fff; border: none;
  border-radius: 8px; padding: 11px 24px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
}
.btn-gg-teal:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,201,167,.35); color: #fff; }
.btn-gg-outline {
  background: transparent;
  color: var(--gg-blue-dark);
  border: 1.5px solid var(--gg-border);
  border-radius: 8px; padding: 10px 20px;
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: all .2s; display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Inter', sans-serif;
}
.btn-gg-outline:hover { border-color: var(--gg-blue-med); background: #EBF4FF; }

/* ─── STATUS BADGES ───────────────────────────────────────────────── */
.status-badge {
  padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px;
}
.status-done    { background: #E6FBF7; color: #00876A; }
.status-error   { background: #FEE2E2; color: #C0392B; }
.status-warning { background: #FEF3C7; color: #92400E; }

/* ─── CONFIG ROWS ─────────────────────────────────────────────────── */
.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--gg-border);
  gap: 16px;
}
.config-row:last-child { border-bottom: none; }
.config-row-label { font-size: 14px; font-weight: 600; color: var(--gg-text); }
.config-row-sub   { font-size: 12px; color: var(--gg-muted); margin-top: 2px; }
.config-row .form-control { max-width: 160px; }

/* ─── EMPTY STATE ─────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 24px; }
.empty-state-icon { font-size: 48px; color: var(--gg-border); margin-bottom: 12px; }
.empty-state-title { font-weight: 700; color: var(--gg-muted); font-size: 16px; }
.empty-state-sub   { font-size: 13px; color: var(--gg-muted); margin-top: 4px; }

/* ─── SPINNER ─────────────────────────────────────────────────────── */
.spinner-gg {
  width: 18px; height: 18px;
  border: 3px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ──────────────────────────────────────────────────── */
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
}
@media (max-width: 576px) {
  .content-area { padding: 16px; }
  .topbar { padding: 0 16px; }
}

/* ─── MISC ────────────────────────────────────────────────────────── */
.text-teal { color: var(--gg-teal) !important; }
.text-blue { color: var(--gg-blue-dark) !important; }
