/* =========================================================
   zappEvents · sistema visual "Crachá"
   Teal da marca + grafite do logo + fundo névoa.
   Coral só para urgência (lead quente, gravando).
   ========================================================= */

:root {
  /* Cor */
  --teal: #4B8E97;
  --teal-600: #3E7A82;
  --teal-800: #24494F;
  --teal-100: #D6E8EA;
  --teal-50: #EAF3F4;
  --mist: #EDF1F1;
  --surface: #FFFFFF;
  --ink: #263033;
  --body: #4A5558;
  --muted: #7C878A;
  --line: #DCE3E4;
  --line-soft: #E8EDED;
  --coral: #E4704F;
  --coral-50: #FCEDE8;
  --amber: #C98A1B;
  --amber-50: #FBF3E2;
  --wa: #1FA855;

  /* Tipo */
  --font-display: 'Raleway', system-ui, sans-serif;
  --font-body: 'Figtree', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Forma */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-1: 0 1px 2px rgba(36, 73, 79, .06), 0 2px 8px rgba(36, 73, 79, .05);
  --shadow-2: 0 8px 28px rgba(36, 73, 79, .12);
  --ease: cubic-bezier(.2, .7, .2, 1);

  --sidebar-w: 248px;
  --gutter: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--mist);
  color: var(--body);
  font: 15px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

:focus-visible { outline: 2.5px solid var(--teal); outline-offset: 2px; border-radius: 8px; }

/* ---------- Tipografia ---------- */
.page-title, h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -.01em;
  font-variant-numeric: lining-nums;
}
.lt { font-weight: 300; }
.page-title { font-size: clamp(1.75rem, 1.2rem + 2vw, 2.5rem); line-height: 1.08; }
.page-subtitle { max-width: 60ch; margin-top: .5rem; color: var(--muted); }
.eyebrow {
  font: 500 .72rem/1.2 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--teal-600);
  margin-bottom: .55rem;
  display: flex; align-items: center; gap: .4rem;
}
.muted { color: var(--muted); }
.mono { font-family: var(--font-mono); }

/* ---------- Botões ---------- */
.btn {
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  height: 42px; padding: 0 1.1rem;
  border-radius: 999px;
  font-weight: 600; font-size: .9rem;
  white-space: nowrap;
  transition: background .2s var(--ease), box-shadow .2s var(--ease), transform .15s var(--ease), color .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--teal); color: #fff; box-shadow: 0 4px 14px rgba(75, 142, 151, .35); }
.btn-primary:hover { background: var(--teal-600); }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--teal); color: var(--teal-600); }
.btn-soft { background: var(--teal-50); color: var(--teal-800); }
.btn-soft:hover { background: var(--teal-100); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #188F47; }
.btn-sm { height: 36px; padding: 0 .9rem; font-size: .84rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .7; cursor: default; box-shadow: none; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-grid; place-items: center;
  color: var(--ink);
  transition: background .2s;
}
.icon-btn:hover { background: rgba(36, 73, 79, .07); }

.link-btn { color: var(--teal-600); font-weight: 600; font-size: .88rem; display: inline-flex; gap: .4rem; align-items: center; margin-top: 1rem; }
.link-btn:hover { color: var(--teal-800); }

/* ---------- Avatares ---------- */
.avatar {
  display: inline-grid; place-items: center; flex-shrink: 0;
  border-radius: 50%;
  background: var(--teal-800); color: #fff;
  font-family: var(--font-display); font-weight: 800;
  letter-spacing: .02em;
}
.avatar-sm { width: 36px; height: 36px; font-size: .8rem; }
.avatar-md { width: 42px; height: 42px; font-size: .85rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 88px; height: 88px; font-size: 1.8rem; }
button.avatar { transition: box-shadow .2s; }
button.avatar:hover { box-shadow: 0 0 0 3px var(--teal-100); }

/* =========================================================
   LAYOUT
   ========================================================= */
.app-layout { display: flex; min-height: 100vh; }

/* ---------- Sidebar: barra teal colada na lateral, item ativo de fora a fora ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky; top: 0;
  height: 100vh;
  z-index: 60;
  transition: width .3s var(--ease);
}
.sidebar-pod {
  height: 100%;
  background: linear-gradient(180deg, var(--teal) 0%, #3F7E87 55%, var(--teal-800) 100%);
  color: #fff;
  display: flex; flex-direction: column;
  padding-top: 20px;
  overflow: hidden;
}
.sidebar-header { height: 44px; display: flex; align-items: center; padding: 0 22px; margin-bottom: 14px; }
.brand-logo-img { width: 150px; }
.brand-logo-mini { display: none; font: 800 1.6rem/1 var(--font-display); color: #fff; }

.sidebar-menu { display: flex; flex-direction: column; flex: 1; }
.menu-group-label {
  font: 500 .66rem/1 var(--font-mono);
  text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255, 255, 255, .6);
  padding: 20px 22px 8px;
}
.menu-item {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  width: 100%; height: 48px; padding: 0 22px;
  color: rgba(255, 255, 255, .88);
  font-weight: 500; font-size: .95rem;
  text-align: left;
  transition: background .2s, color .2s;
}
.menu-item i { width: 20px; text-align: center; font-size: 1rem; }
.menu-item:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.menu-item.active { background: #fff; color: var(--teal-800); font-weight: 700; }
.menu-item.active i { color: var(--teal); }
.menu-item.active::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 0;
  width: 4px; background: var(--teal-800);
}

.sidebar-user {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 16px 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  text-align: left;
  transition: background .2s;
}
.sidebar-user:hover { background: rgba(255, 255, 255, .08); }
.sidebar-user .avatar { background: #fff; color: var(--teal-800); }
.sidebar-user .user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-name { font-weight: 700; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: .76rem; color: rgba(255, 255, 255, .7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-chevron { color: rgba(255, 255, 255, .6); font-size: .75rem; }

/* recolhida */
.sidebar.collapsed { width: 76px; }
.sidebar.collapsed .brand-logo-img,
.sidebar.collapsed .menu-text,
.sidebar.collapsed .menu-group-label,
.sidebar.collapsed .user-info,
.sidebar.collapsed .user-chevron { display: none; }
.sidebar.collapsed .brand-logo-mini { display: block; }
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 0; }
.sidebar.collapsed .menu-item { justify-content: center; padding: 0; }
.sidebar.collapsed .menu-group-label { display: block; height: 16px; padding: 0; font-size: 0; }
.sidebar.collapsed .sidebar-user { justify-content: center; padding: 14px 0; }

/* ---------- Área principal ---------- */
.main-wrapper { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.top-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 32px;
  background: rgba(237, 241, 241, .86);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.mobile-logo { display: none; height: 20px; width: auto; }

.event-context-pill {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 16px 0 14px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-1);
  white-space: nowrap;
}
.ctx-label { font: 500 .66rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ctx-name { font-weight: 700; color: var(--ink); font-size: .9rem; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--wa); box-shadow: 0 0 0 0 rgba(31, 168, 85, .5); animation: pulse 2.2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(31, 168, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 168, 85, 0); } }

.header-search {
  flex: 1; max-width: 440px;
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 16px;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px var(--line-soft);
  color: var(--muted);
  transition: box-shadow .2s;
}
.header-search:focus-within { box-shadow: inset 0 0 0 1.5px var(--teal); }
.header-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); font-size: .9rem; }
.header-search input::placeholder { color: var(--muted); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.search-toggle { display: none; }

.content-container { padding: 12px 32px 64px; max-width: 1280px; width: 100%; }

.tab-content { display: none; }
.tab-content.active { display: block; animation: rise .45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin: 18px 0 28px;
}
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Chips de filtro ---------- */
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  margin: 0 0 22px; padding: 2px;
}
.chip-row::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  height: 36px; padding: 0 15px;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: .86rem; font-weight: 500; color: var(--body);
  white-space: nowrap;
  transition: all .2s var(--ease);
}
.chip i { font-size: .8rem; color: var(--muted); }
.chip:hover { box-shadow: inset 0 0 0 1px var(--teal); }
.chip.active { background: var(--ink); color: #fff; box-shadow: none; }
.chip.active i { color: #fff; }
.chip .count { font-family: var(--font-mono); font-size: .75rem; opacity: .7; }

.temp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.temp-dot.hot { background: var(--coral); }

/* ---------- Painéis ---------- */
.panel {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 24px;
  box-shadow: var(--shadow-1);
}
.panel-soft { background: var(--teal-50); box-shadow: none; }
.panel-title { font-size: 1.1rem; margin-bottom: .5rem; }

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 56px 24px;
  border-radius: var(--r-lg);
  border: 1.5px dashed var(--line);
  color: var(--muted);
}
.empty-state i { font-size: 1.8rem; color: var(--teal); margin-bottom: 12px; }
.empty-state h3 { font-size: 1.15rem; margin-bottom: 6px; }

/* =========================================================
   ASSINATURA: CREDENCIAL (Meus eventos)
   ========================================================= */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}
.credential {
  --notch: var(--mist);
  position: relative;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  text-align: left;
  display: flex; flex-direction: column;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
  overflow: hidden;
}
.credential:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow-2); }
.credential-band { height: 10px; background: var(--line-soft); }
.credential.is-current .credential-band { background: var(--teal); }
.credential-slot {
  position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 9px; border-radius: 99px;
  background: var(--mist);
  box-shadow: inset 0 1.5px 2px rgba(36, 73, 79, .18);
}
.credential-main { padding: 34px 22px 20px; }
.credential-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.event-logo {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-600);
  font-size: 1.2rem; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line-soft);
}
.event-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.status-tag {
  font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em;
  padding: 6px 10px; border-radius: 99px;
  background: var(--line-soft); color: var(--body);
}
.status-tag.live { background: #E3F5EA; color: #177A3F; }
.status-tag.here { background: var(--teal); color: #fff; }
.credential-name { font-size: 1.3rem; line-height: 1.15; margin-bottom: 10px; }
.credential-meta { display: flex; flex-direction: column; gap: 4px; font: 400 .8rem/1.4 var(--font-mono); color: var(--muted); }
.credential-meta i { width: 14px; color: var(--teal); margin-right: 6px; }

/* canhoto destacável */
.credential-stub {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px 18px;
  border-top: 2px dashed var(--line);
}
.credential-stub::before, .credential-stub::after {
  content: ''; position: absolute; top: -10px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--notch);
}
.credential-stub::before { left: -9px; }
.credential-stub::after { right: -9px; }
.stub-count { display: flex; align-items: baseline; gap: 8px; }
.stub-count strong { font: 800 2rem/1 var(--font-display); color: var(--ink); font-variant-numeric: lining-nums; }
.stub-count span { font-size: .82rem; color: var(--muted); }
.stub-go {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--teal-50); color: var(--teal-600);
  transition: background .2s, color .2s, transform .2s var(--ease);
}
.credential:hover .stub-go { background: var(--teal); color: #fff; transform: translateX(3px); }

/* =========================================================
   LEADS
   ========================================================= */
.leads-stats {
  display: flex; gap: 28px; flex-wrap: wrap;
  margin: -8px 0 22px;
  font: 400 .8rem/1.2 var(--font-mono); color: var(--muted);
}
.leads-stats strong { font: 800 1.35rem/1 var(--font-display); color: var(--ink); margin-right: 6px; font-variant-numeric: lining-nums; }
.leads-stats .hot strong { color: var(--coral); }

.leads-list { display: flex; flex-direction: column; gap: 14px; }
.lead-card {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(0, 1.4fr) auto;
  gap: 24px; align-items: center;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-1);
  position: relative;
  transition: box-shadow .25s var(--ease);
}
.lead-card:hover { box-shadow: var(--shadow-2); }
.lead-card.is-hot::before {
  content: ''; position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 4px; border-radius: 0 4px 4px 0; background: var(--coral);
}
.lead-who { display: flex; gap: 14px; align-items: center; min-width: 0; }
.lead-who .avatar { background: var(--teal-50); color: var(--teal-800); }
.lead-card.is-hot .lead-who .avatar { background: var(--coral-50); color: #B24A2C; }
.lead-name { font-size: 1.05rem; line-height: 1.2; }
.lead-company { font-size: .86rem; color: var(--body); margin-top: 2px; }
.lead-company b { font-weight: 600; color: var(--ink); }
.lead-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em;
  padding: 5px 9px; border-radius: 99px;
  background: var(--line-soft); color: var(--body);
}
.tag-hot { background: var(--coral-50); color: #B24A2C; }
.tag-warm { background: var(--amber-50); color: #8A5E0F; }
.tag-time { background: transparent; padding-left: 0; color: var(--muted); }

.lead-note {
  border-left: 2px solid var(--teal-100);
  padding: 2px 0 2px 16px;
  font-size: .9rem; color: var(--body);
}
.lead-note .note-label { font: 500 .66rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--teal-600); display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.lead-actions { display: flex; flex-direction: column; gap: 8px; }

/* =========================================================
   CARTÃO DIGITAL: crachá no cordão
   ========================================================= */
.card-tab-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 48px; align-items: start;
}
.lanyard-stage { position: relative; display: flex; flex-direction: column; align-items: center; padding-top: 0; }
.lanyard-strap {
  width: 34px; height: 70px;
  background:
    repeating-linear-gradient(180deg, transparent 0 16px, rgba(255, 255, 255, .22) 16px 18px),
    linear-gradient(90deg, var(--teal-800), var(--teal) 50%, var(--teal-800));
  border-radius: 0 0 4px 4px;
}
.lanyard-clip {
  width: 26px; height: 26px; margin-top: -4px;
  border: 5px solid #A9B4B6; border-top-color: #CDD5D6;
  border-radius: 50% 50% 8px 8px;
  position: relative; z-index: 2;
}
.id-badge {
  position: relative;
  width: 100%; max-width: 340px;
  margin-top: -8px;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: 0 30px 60px -20px rgba(36, 73, 79, .35), 0 2px 6px rgba(36, 73, 79, .08);
  overflow: hidden;
  transform-origin: 50% -40px;
  animation: sway 6s ease-in-out infinite;
}
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }
.id-badge-slot {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  width: 54px; height: 10px; border-radius: 99px;
  background: var(--mist); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .25);
  z-index: 2;
}
.id-badge-top {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 44px 24px 56px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 255, 255, .16), transparent 55%),
    linear-gradient(135deg, var(--teal), var(--teal-800));
}
.id-badge-top img { height: 18px; width: auto; }
.nfc-mark { font: 500 .66rem/1 var(--font-mono); letter-spacing: .1em; color: rgba(255, 255, 255, .85); display: flex; gap: 6px; align-items: center; }
.nfc-mark i { transform: rotate(90deg); }
.id-badge-body { text-align: center; padding: 0 24px 22px; margin-top: -44px; }
.id-badge-body .avatar { box-shadow: 0 0 0 5px #fff; background: var(--ink); }
.id-name { font-size: 1.75rem; line-height: 1.1; margin-top: 14px; }
.id-role { color: var(--body); margin-top: 6px; font-size: .92rem; }
.id-company { font: 500 .74rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--teal-600); margin-top: 10px; }
.id-qr {
  width: 164px; height: 164px; margin: 20px auto 8px;
  padding: 10px; border-radius: 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid; place-items: center;
}
.id-qr img, .id-qr canvas { width: 144px !important; height: 144px !important; }
.id-hint { font-size: .76rem; color: var(--muted); }
.id-badge-foot {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 14px 20px;
  background: var(--teal-50);
  font: 400 .76rem/1.5 var(--font-mono); color: var(--teal-800);
}
.card-side { display: flex; flex-direction: column; gap: 18px; padding-top: 24px; }
.stack-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.stack-actions .btn { justify-content: flex-start; }
.data-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.data-list div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; align-items: baseline; }
.data-list dt { font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--teal-600); }
.data-list dd { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

/* =========================================================
   AGENDA
   ========================================================= */
.agenda-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 16px; }
.agenda-card {
  display: grid; grid-template-columns: 84px 1fr; gap: 20px;
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1);
}
.date-block {
  border-radius: 16px;
  background: var(--teal-50);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 12px 6px; text-align: center;
  align-self: start;
}
.date-block .month { font: 500 .7rem/1 var(--font-mono); letter-spacing: .12em; color: var(--teal-600); }
.date-block .days { font: 800 1.35rem/1.1 var(--font-display); color: var(--teal-800); margin-top: 6px; font-variant-numeric: lining-nums; }
.agenda-card.is-joined .date-block { background: var(--teal); }
.agenda-card.is-joined .date-block .month, .agenda-card.is-joined .date-block .days { color: #fff; }
.agenda-body { min-width: 0; display: flex; flex-direction: column; }
.agenda-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 6px; }
.agenda-sector { font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.countdown { font: 500 .72rem/1 var(--font-mono); color: var(--teal-600); white-space: nowrap; }
.countdown.now { color: var(--wa); }
.agenda-name { font-size: 1.2rem; margin-bottom: 4px; }
.agenda-desc { font-size: .9rem; color: var(--body); margin-bottom: 8px; }
.agenda-place { font: 400 .78rem/1.4 var(--font-mono); color: var(--muted); margin-bottom: 14px; }
.agenda-place i { color: var(--teal); margin-right: 6px; }
.agenda-body .btn { align-self: flex-start; margin-top: auto; }
.joined-note { display: inline-flex; align-items: center; gap: 8px; color: var(--teal-600); font-weight: 600; font-size: .88rem; margin-top: auto; }

/* =========================================================
   PAVILHÕES
   ========================================================= */
.venue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.venue-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.venue-head {
  padding: 22px 22px 18px;
  background: linear-gradient(160deg, var(--teal-50), #fff 70%);
  position: relative;
}
.venue-icon { width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--teal); display: grid; place-items: center; box-shadow: var(--shadow-1); margin-bottom: 14px; }
.venue-badge { font: 500 .66rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--teal-600); }
.venue-name { font-size: 1.25rem; margin-top: 6px; }
.venue-city { font-size: .88rem; color: var(--muted); }
.venue-body { padding: 4px 22px 22px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.venue-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.venue-facts div { background: var(--mist); border-radius: 12px; padding: 10px 12px; }
.venue-facts dt { font: 500 .62rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 5px; }
.venue-facts dd { font-size: .84rem; color: var(--ink); font-weight: 600; line-height: 1.3; }
.venue-hosted { display: flex; flex-wrap: wrap; gap: 6px; }
.venue-hosted span { font-size: .78rem; padding: 4px 10px; border-radius: 99px; box-shadow: inset 0 0 0 1px var(--line); }
.venue-address { font-size: .82rem; color: var(--muted); }
.venue-body .btn { margin-top: auto; }

/* =========================================================
   MEUS DADOS
   ========================================================= */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.profile-summary { text-align: center; padding: 32px 24px; }
.profile-summary .avatar { margin: 0 auto 16px; }
.profile-name { font-size: 1.35rem; }
.profile-company { font: 500 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--teal-600); margin-top: 10px; }
.plan-card {
  display: flex; gap: 12px; align-items: center; text-align: left;
  margin-top: 24px; padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--teal), var(--teal-800));
  color: #fff;
}
.plan-card i { color: #F3C969; }
.plan-card strong { display: block; font-size: .92rem; }
.plan-card span { font-size: .78rem; opacity: .8; }

/* ---------- Formulários ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .8rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea {
  height: 46px; padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #FBFCFC;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px var(--teal-50); }
.field-full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; }

/* =========================================================
   MODAIS
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(20, 38, 41, .42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
  width: 100%; max-width: 560px; max-height: calc(100vh - 48px);
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px rgba(20, 38, 41, .3);
  transform: translateY(16px) scale(.98);
  transition: transform .35s var(--ease);
}
.modal-sm { max-width: 440px; }
.modal-lg { max-width: 640px; }
.modal-overlay.active .modal { transform: none; }
.modal-grabber { display: none; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px 24px 8px; }
.modal-header h3 { font-size: 1.35rem; }
.modal-header .eyebrow { margin-bottom: .35rem; }
.modal-body { padding: 12px 24px 20px; overflow-y: auto; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; border-top: 1px solid var(--line-soft); }

.chooser-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.chooser-item {
  display: flex; gap: 16px; align-items: center; text-align: left;
  padding: 16px; border-radius: 18px;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s, background .2s;
}
.chooser-item:hover { box-shadow: inset 0 0 0 1.5px var(--teal); background: var(--teal-50); }
.chooser-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: 1.1rem; flex-shrink: 0; }
.chooser-item strong { display: block; color: var(--ink); font-size: .98rem; }
.chooser-item small { display: block; color: var(--muted); font-size: .84rem; margin-top: 2px; }

.camera-frame {
  position: relative;
  aspect-ratio: 1.75;
  border-radius: 18px;
  background: linear-gradient(160deg, #2D4F54, var(--teal-800));
  color: rgba(255, 255, 255, .8);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  font-size: .88rem;
}
.camera-frame > i { font-size: 2rem; opacity: .7; }
.corner { position: absolute; width: 26px; height: 26px; border: 3px solid #fff; }
.corner.tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
.corner.tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; border-radius: 0 8px 0 0; }
.corner.bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; border-radius: 0 0 0 8px; }
.corner.br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }

.sample-label { font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 20px 0 10px; }
.sample-list { display: flex; flex-direction: column; gap: 8px; }
.sample-btn {
  display: flex; justify-content: space-between; gap: 12px; align-items: center; text-align: left;
  padding: 12px 14px; border-radius: 12px;
  background: var(--mist);
  font-size: .88rem;
  transition: background .2s;
}
.sample-btn:hover { background: var(--teal-50); }
.sample-btn strong { color: var(--ink); font-weight: 600; }
.sample-btn span { color: var(--muted); font-size: .8rem; text-align: right; }

.ai-loader { position: relative; text-align: center; padding: 40px 12px; overflow: hidden; border-radius: 18px; background: var(--teal-50); }
.ai-loader h4 { font-size: 1.1rem; }
.ai-loader p { color: var(--muted); font-size: .88rem; }
.scan-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--teal); box-shadow: 0 0 16px 4px rgba(75, 142, 151, .45); animation: scan 1.4s ease-in-out infinite alternate; top: 10%; }
@keyframes scan { to { top: 90%; } }

.notice { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; font-size: .88rem; font-weight: 500; }
.notice-success { background: #E3F5EA; color: #177A3F; }

.recorder { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px 0 4px; text-align: center; }
.wave { display: flex; align-items: center; gap: 5px; height: 44px; }
.wave i { width: 5px; height: 10px; border-radius: 4px; background: var(--teal-100); transition: height .2s; }
.wave.recording i { background: var(--coral); animation: bar 1s ease-in-out infinite; }
.wave.recording i:nth-child(2n) { animation-delay: -.3s; }
.wave.recording i:nth-child(3n) { animation-delay: -.6s; }
@keyframes bar { 50% { height: 40px; } }
.rec-timer { font: 500 1.6rem/1 var(--font-mono); color: var(--ink); }
.mic-btn {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--teal); color: #fff; font-size: 1.6rem;
  box-shadow: 0 10px 26px rgba(75, 142, 151, .4);
  transition: background .2s, transform .2s var(--ease);
}
.mic-btn:hover { transform: scale(1.05); }
.mic-btn.is-recording { background: var(--coral); box-shadow: 0 0 0 10px var(--coral-50); }

.ai-result { margin-top: 20px; padding: 18px; border-radius: 16px; background: var(--teal-50); }
.ai-result blockquote { font-size: .95rem; color: var(--ink); line-height: 1.5; }
.ai-result-label { font-weight: 700; color: var(--ink); font-size: .88rem; margin: 14px 0 6px; }
.check-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.check-list li { display: flex; gap: 8px; font-size: .9rem; }
.check-list li::before { content: '\f00c'; font: 900 .75rem/1.6 'Font Awesome 6 Free'; color: var(--teal); }

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.kpi { background: var(--mist); border-radius: 16px; padding: 16px; }
.kpi strong { display: block; font: 800 1.6rem/1 var(--font-display); color: var(--ink); font-variant-numeric: lining-nums; }
.kpi span { font: 500 .68rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi-hot { background: var(--coral-50); }
.kpi-hot strong { color: var(--coral); }
.summary-h { font-size: 1rem; margin: 4px 0 10px; }
.summary-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; font-size: .9rem; }
.summary-list li { padding-left: 14px; border-left: 2px solid var(--teal-100); }
.summary-list strong { display: block; color: var(--ink); }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-list label { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.todo-list input { accent-color: var(--teal); margin-top: 4px; width: 16px; height: 16px; }

.email-preview { background: var(--mist); border-radius: 16px; padding: 20px; font-size: .92rem; line-height: 1.6; white-space: pre-wrap; color: var(--ink); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px);
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--ink); color: #fff;
  font-size: .9rem; font-weight: 500;
  box-shadow: 0 12px 30px rgba(20, 38, 41, .3);
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .4s var(--ease), opacity .3s;
}
.toast i { color: #7FD1A0; }
.toast.active { transform: translate(-50%, 0); opacity: 1; }

/* ---------- Barra inferior (celular) ---------- */
.mobile-bottom-nav { display: none; }
.sidebar-backdrop { position: fixed; inset: 0; background: rgba(20, 38, 41, .4); z-index: 55; opacity: 0; visibility: hidden; transition: opacity .25s; }
.sidebar-backdrop.active { opacity: 1; visibility: visible; }

/* =========================================================
   RESPONSIVO
   ========================================================= */
@media (max-width: 1180px) {
  .lead-card { grid-template-columns: 1fr auto; }
  .lead-note { grid-column: 1 / -1; grid-row: 2; }
  .lead-actions { flex-direction: row; grid-row: 1; grid-column: 2; }
  .agenda-list { grid-template-columns: 1fr; }
}

@media (max-width: 1000px) {
  .ctx-label { display: none; }
  .card-tab-layout { grid-template-columns: 1fr; gap: 24px; }
  .card-side { padding-top: 0; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0;
    transform: translateX(-110%);
    transition: transform .35s var(--ease);
    width: 280px;
  }
  .sidebar.collapsed { width: 280px; }
  .sidebar.mobile-open { transform: none; }

  .top-header { padding: 10px var(--gutter); gap: 8px; flex-wrap: wrap; }
  .mobile-logo { display: block; }
  .event-context-pill { order: 5; width: 100%; justify-content: flex-start; height: 38px; box-shadow: none; background: rgba(255, 255, 255, .7); }
  .ctx-label { display: inline; }
  .header-search { display: none; order: 6; max-width: none; flex-basis: 100%; }
  .top-header.search-open .header-search { display: flex; }
  .search-toggle { display: inline-grid; }
  #btn-header-capture { display: none; }

  .content-container { padding: 4px var(--gutter) calc(110px + env(safe-area-inset-bottom)); }
  .page-head { flex-direction: column; align-items: stretch; margin: 12px 0 20px; }
  .row-actions .btn { flex: 1; }

  .mobile-bottom-nav {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 50;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    height: 68px; padding: 0 6px;
    border-radius: 26px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 10px 30px rgba(36, 73, 79, .18);
  }
  .mobile-nav-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    font-size: .7rem; font-weight: 600; color: var(--muted);
    padding: 8px 0;
  }
  .mobile-nav-item i { font-size: 1.1rem; }
  .mobile-nav-item.active { color: var(--teal-800); }
  .mobile-nav-item.active i { color: var(--teal); }
  .mobile-capture {
    justify-self: center;
    width: 58px; height: 58px; margin-top: -30px;
    border-radius: 20px;
    background: var(--teal); color: #fff; font-size: 1.3rem;
    box-shadow: 0 10px 24px rgba(75, 142, 151, .5), 0 0 0 6px var(--mist);
    transition: transform .2s var(--ease);
  }
  .mobile-capture:active { transform: scale(.94); }

  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }

  /* modais viram bottom-sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal, .modal-sm, .modal-lg {
    max-width: none; max-height: 92vh;
    border-radius: 28px 28px 0 0;
    transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-grabber { display: block; width: 40px; height: 5px; border-radius: 99px; background: var(--line); margin: 10px auto 0; }
  .modal-header { padding-top: 14px; }
  .modal-footer .btn { flex: 1; }
}

@media (max-width: 600px) {
  .badge-grid, .venue-grid { grid-template-columns: 1fr; }
  .agenda-card { grid-template-columns: 64px 1fr; gap: 14px; padding: 16px; }
  .date-block .days { font-size: 1.05rem; }
  .lead-card { grid-template-columns: 1fr; gap: 14px; padding: 18px; }
  .lead-note { grid-row: auto; }
  .lead-actions { grid-row: auto; grid-column: auto; }
  .lead-actions .btn { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr 1fr; }
  .kpi-row .kpi:last-child { grid-column: 1 / -1; }
  .kpi strong { font-size: 1.35rem; }
  .data-list div { grid-template-columns: 1fr; gap: 2px; }
  .leads-stats { gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
