:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --sidebar-w: 260px;
  --bg: #f5f6fa;
}

body { background: var(--bg); }

/* ---- Shell ---- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.app-content { padding: 1.5rem; }

/* ---- Sidebar ---- */
.app-sidebar {
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid #e9ecef;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.15rem 1.25rem; font-weight: 700; font-size: 1.15rem;
  border-bottom: 1px solid #f0f0f5;
}
.brand-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--brand); color: #fff; font-size: 1.1rem;
}
.sidebar-nav { padding: .75rem; display: flex; flex-direction: column; gap: .15rem; }
.sidebar-nav .nav-link {
  color: #495057; border-radius: 8px; padding: .6rem .8rem;
  display: flex; align-items: center; gap: .6rem; font-weight: 500;
}
.sidebar-nav .nav-link:hover { background: #f3f4f8; color: var(--brand-dark); }
.sidebar-nav .nav-link.active { background: var(--brand); color: #fff; }

/* ---- Navbar ---- */
.app-navbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.5rem; background: #fff; border-bottom: 1px solid #e9ecef;
  position: sticky; top: 0; z-index: 10;
}

/* ---- Cards / page ---- */
.page-title { font-weight: 700; margin-bottom: 1.25rem; }
.card { border: 1px solid #ececf2; border-radius: 14px; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-icon {
  width: 46px; height: 46px; border-radius: 12px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 1.3rem;
  background: #eef0fb; color: var(--brand);
}

/* ---- Auth ---- */
.auth-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); padding: 1rem;
}
.auth-card { width: 100%; max-width: 420px; border: none; border-radius: 16px; }

/* ---- Onboarding ---- */
.onboarding-wrap { max-width: 640px; margin: 0 auto; }

/* ---- Simulador (chat) ---- */
.chat-window {
  max-width: 460px; margin: 0 auto; background: #e5ddd5;
  border-radius: 16px; overflow: hidden; border: 1px solid #d6cfc7;
}
.chat-header {
  background: #075e54; color: #fff; padding: .75rem 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.chat-body { height: 460px; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.chat-bubble { max-width: 78%; padding: .5rem .75rem; border-radius: 10px; font-size: .92rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.chat-bubble.from-user { align-self: flex-end; background: #dcf8c6; }
.chat-bubble.from-bot { align-self: flex-start; background: #fff; }
.chat-footer { padding: .6rem; background: #f0f0f0; display: flex; gap: .5rem; }
.chat-hint { font-size: .78rem; }

/* ---- Responsivo ---- */
@media (max-width: 768px) {
  .app-sidebar { position: fixed; left: -100%; z-index: 1050; transition: left .2s; }
  .app-sidebar.is-open { left: 0; }
}
