@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Geist:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #09090b;
  --bg1: #0f0f12;
  --bg2: #141418;
  --bg3: #1a1a20;
  --bg4: #1f1f26;
  --surface: rgba(255,255,255,0.03);
  --surface2: rgba(255,255,255,0.055);
  --surface3: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.11);
  --border3: rgba(255,255,255,0.16);
  --text: #f4f4f5;
  --text2: #a1a1aa;
  --text3: #71717a;
  --text4: #52525b;
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent3: rgba(99,102,241,0.15);
  --accent4: rgba(99,102,241,0.08);
  --accent-border: rgba(99,102,241,0.3);
  --green: #22c55e;
  --green-bg: rgba(34,197,94,0.08);
  --green-border: rgba(34,197,94,0.2);
  --yellow: #eab308;
  --yellow-bg: rgba(234,179,8,0.08);
  --yellow-border: rgba(234,179,8,0.2);
  --red: #ef4444;
  --red-bg: rgba(239,68,68,0.08);
  --red-border: rgba(239,68,68,0.2);
  --blue: #3b82f6;
  --blue-bg: rgba(59,130,246,0.08);
  --blue-border: rgba(59,130,246,0.2);
  --purple: #a855f7;
  --purple-bg: rgba(168,85,247,0.08);
  --purple-border: rgba(168,85,247,0.2);
  --sidebar-w: 248px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  min-height: 100vh;
}

.serif { font-family: 'Instrument Serif', serif; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border3); border-radius: 99px; }

/* ── BACKGROUNDS ── */
.bg-noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.6;
}
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 0%, transparent 70%);
}
.bg-glow-tl {
  position: fixed; top: -200px; left: -200px; width: 600px; height: 600px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(99,102,241,0.12) 0%, transparent 65%);
  filter: blur(40px);
}
.bg-glow-br {
  position: fixed; bottom: -200px; right: -200px; width: 500px; height: 500px;
  border-radius: 50%; pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(168,85,247,0.08) 0%, transparent 65%);
  filter: blur(40px);
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4 { line-height: 1.1; font-weight: 600; }
p { color: var(--text2); }
a { text-decoration: none; color: inherit; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: var(--radius); border: none;
  font-family: 'Geist', sans-serif; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all 0.18s ease; white-space: nowrap; line-height: 1;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 0 0 1px rgba(99,102,241,0.4), 0 4px 16px rgba(99,102,241,0.25);
}
.btn-primary:hover {
  background: var(--accent2);
  box-shadow: 0 0 0 1px rgba(129,140,248,0.5), 0 6px 22px rgba(99,102,241,0.35);
}
.btn-secondary {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border2);
}
.btn-secondary:hover { background: var(--surface3); border-color: var(--border3); }
.btn-ghost {
  background: transparent; color: var(--text2); border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface); color: var(--text); border-color: var(--border2); }
.btn-danger {
  background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border);
}
.btn-danger:hover { background: rgba(239,68,68,0.15); }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 14.5px; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }
.btn-icon {
  width: 34px; height: 34px; padding: 0;
  background: var(--surface2); color: var(--text2);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.btn-icon:hover { background: var(--surface3); color: var(--text); }

/* ── INPUTS ── */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field label {
  font-size: 11.5px; font-weight: 500; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.field input, .field select, .field textarea {
  background: var(--bg2); color: var(--text);
  border: 1px solid var(--border2); border-radius: var(--radius);
  padding: 10px 12px; font-size: 14px; font-family: 'Geist', sans-serif;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%; min-width: 0;
}
/* FIX: select não corta texto — aparência nativa para permitir scroll */
.field select {
  appearance: auto;
  -webkit-appearance: auto;
  padding-right: 8px;
}
.field select option { background: var(--bg2); color: var(--text); }
.field textarea { min-height: 80px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent4);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text4); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.02em;
  white-space: nowrap; flex-shrink: 0;
}
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.badge-green { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.badge-green::before { background: var(--green); }
.badge-yellow { background: var(--yellow-bg); color: var(--yellow); border: 1px solid var(--yellow-border); }
.badge-yellow::before { background: var(--yellow); }
.badge-red { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.badge-red::before { background: var(--red); }
.badge-blue { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.badge-blue::before { background: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-border); }
.badge-purple::before { background: var(--purple); }
.badge-gray { background: var(--surface2); color: var(--text3); border: 1px solid var(--border2); }
.badge-gray::before { background: var(--text4); }

/* ── EMPTY STATE ── */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; gap: 10px; text-align: center;
  border: 1px dashed var(--border2); border-radius: var(--radius-xl);
}
.empty-state .es-icon { font-size: 32px; opacity: 0.4; }
.empty-state p { color: var(--text3); font-size: 13.5px; }

/* ══════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════ */
#landingView { position: relative; z-index: 1; }

.land-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px; height: 60px;
  background: rgba(9,9,11,0.7); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.land-nav.scrolled { background: rgba(9,9,11,0.9); }
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Instrument Serif', serif; font-size: 20px; cursor: pointer;
}
.nav-dot {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent); display: grid; place-items: center;
  font-size: 13px; box-shadow: 0 0 16px rgba(99,102,241,0.5);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  background: none; border: none; color: var(--text2); font-family: 'Geist', sans-serif;
  font-size: 13.5px; padding: 7px 13px; border-radius: 8px; cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-actions { display: flex; gap: 8px; align-items: center; }

.land-hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 120px 24px 80px; text-align: center; position: relative;
  max-width: 1180px; margin-inline: auto;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 99px;
  background: var(--accent4); border: 1px solid var(--accent-border);
  color: var(--accent2); font-size: 12px; font-weight: 500; margin-bottom: 28px;
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green); animation: blink 2s ease-in-out infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.hero-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1.0; letter-spacing: -0.02em;
  max-width: 820px; margin: 0 auto;
}
.hero-title em {
  font-style: italic; color: transparent;
  background: linear-gradient(135deg, var(--accent2) 0%, var(--purple) 100%);
  -webkit-background-clip: text; background-clip: text;
}
.hero-sub {
  max-width: 480px; margin: 20px auto 0;
  font-size: 16px; line-height: 1.7; color: var(--text2);
}
.hero-cta { display: flex; gap: 10px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.hero-trust {
  display: flex; align-items: center; gap: 20px; margin-top: 40px;
  color: var(--text3); font-size: 12.5px; flex-wrap: wrap; justify-content: center;
}
.trust-sep { width: 1px; height: 14px; background: var(--border2); }

.hero-mockup {
  max-width: 960px; margin: 60px auto 0; position: relative; padding: 0 24px;
}
.mockup-glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 600px; height: 200px; pointer-events: none;
  background: radial-gradient(ellipse, rgba(99,102,241,0.2), transparent 70%);
  filter: blur(30px);
}
.mockup-window {
  background: var(--bg1); border: 1px solid var(--border2);
  border-radius: var(--radius-2xl); overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04);
  position: relative; z-index: 1;
}
.mockup-bar {
  height: 44px; background: var(--bg2); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 16px; gap: 12px;
}
.mockup-dots { display: flex; gap: 6px; }
.mockup-dot { width: 10px; height: 10px; border-radius: 50%; }
.mockup-dot.r { background: #ff5f57; }
.mockup-dot.y { background: #febc2e; }
.mockup-dot.g { background: #28c840; }
.mockup-bar-title {
  flex: 1; text-align: center; font-size: 11px; color: var(--text4); letter-spacing: 0.04em;
}
.mockup-body { display: flex; min-height: 320px; }
.mockup-sidebar {
  width: 180px; border-right: 1px solid var(--border);
  padding: 12px 10px; background: var(--bg1); flex-shrink: 0;
}
.ms-label {
  font-size: 9px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--text4); font-weight: 600; padding: 8px 8px 4px;
}
.ms-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 8px;
  border-radius: 8px; font-size: 12px; font-weight: 500; color: var(--text2); cursor: default;
}
.ms-item.active { background: var(--accent4); color: var(--accent2); border: 1px solid var(--accent-border); }
.ms-icon { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; background: var(--surface2); }
.ms-item.active .ms-icon { background: var(--accent3); }
.mockup-content { flex: 1; padding: 16px; min-width: 0; }
.mc-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }
.mc-stat {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: 10px;
}
.mc-sl { font-size: 9px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text4); font-weight: 600; }
.mc-sv { font-family: 'Instrument Serif', serif; font-size: 22px; color: var(--text); margin-top: 3px; }
.mc-sg { font-size: 10px; color: var(--green); margin-top: 1px; font-weight: 600; }
.mc-list-title { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text4); margin-bottom: 8px; }
.mc-rows { display: flex; flex-direction: column; gap: 5px; }
.mc-row {
  display: flex; align-items: center; gap: 9px; padding: 7px 9px;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
}
.mc-av {
  width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  background: var(--accent4); color: var(--accent2); display: grid; place-items: center;
  font-size: 10px; font-weight: 700; border: 1px solid var(--accent-border);
}
.mc-name { font-size: 11.5px; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-meta { font-size: 10px; color: var(--text4); }

.land-section { padding: 100px 24px; position: relative; z-index: 1; }
.section-wrap { max-width: 1040px; margin: 0 auto; }
.section-header { margin-bottom: 56px; }
.section-tag {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 14px;
  padding: 4px 12px; border-radius: 99px;
  background: var(--surface2); border: 1px solid var(--border2);
  color: var(--text3); font-size: 11.5px; font-weight: 500;
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.02em;
}
.section-title em { font-style: italic; color: var(--accent2); }
.section-sub { color: var(--text2); font-size: 15px; line-height: 1.7; max-width: 520px; margin-top: 12px; }

.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.step-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 28px 24px;
  position: relative; overflow: hidden; transition: border-color 0.2s, transform 0.2s;
}
.step-card:hover { border-color: var(--border2); transform: translateY(-3px); }
.step-card::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(99,102,241,0.06), transparent 55%);
  pointer-events: none;
}
.step-num {
  font-family: 'Instrument Serif', serif; font-size: 56px; line-height: 1;
  color: transparent; background: linear-gradient(135deg, var(--border3), var(--surface3));
  -webkit-background-clip: text; background-clip: text;
  margin-bottom: 16px; letter-spacing: -0.03em;
}
.step-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 14px;
  background: var(--accent4); border: 1px solid var(--accent-border);
  display: grid; place-items: center; font-size: 18px;
}
.step-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step-desc { font-size: 13px; color: var(--text2); line-height: 1.65; }

.features-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 12px; }
.feat-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.feat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.feat-icon {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 14px;
  background: var(--surface2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 17px;
}
.feat-title { font-size: 14.5px; font-weight: 600; margin-bottom: 5px; }
.feat-desc { font-size: 12.5px; color: var(--text3); line-height: 1.6; }

.segs-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.seg-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 15px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--text2); cursor: default;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.seg-pill:hover { border-color: var(--accent-border); color: var(--accent2); background: var(--accent4); }

.test-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.test-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 24px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.2s;
}
.test-card:hover { border-color: var(--border2); }
.test-stars { color: var(--yellow); font-size: 13px; letter-spacing: 2px; }
.test-quote {
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: 15.5px; line-height: 1.65; color: var(--text); flex: 1;
}
.test-author { display: flex; align-items: center; gap: 10px; margin-top: auto; }
.test-av {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: var(--accent4); border: 1px solid var(--accent-border);
  color: var(--accent2); display: grid; place-items: center;
  font-weight: 700; font-size: 15px;
}
.test-name { font-weight: 600; font-size: 13.5px; }
.test-role { font-size: 11.5px; color: var(--text3); margin-top: 1px; }

.land-cta { padding: 100px 24px; text-align: center; position: relative; z-index: 1; }
.cta-inner { max-width: 620px; margin: 0 auto; }
.cta-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.05;
}
.cta-title em { font-style: italic; color: var(--accent2); }
.cta-sub { color: var(--text2); font-size: 15px; line-height: 1.7; margin: 16px auto 0; max-width: 440px; }
.cta-actions { display: flex; gap: 10px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }

.land-footer {
  border-top: 1px solid var(--border); padding: 28px 48px;
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text3); font-size: 12.5px; position: relative; z-index: 1;
}

/* ══════════════════════════════════════════
   AUTH MODAL
══════════════════════════════════════════ */
.auth-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(9,9,11,0.85); backdrop-filter: blur(16px);
  align-items: center; justify-content: center; padding: 16px;
  overflow: auto;
}
.auth-overlay.open { display: flex; }
.auth-modal {
  width: 100%; max-width: 860px; margin: auto;
  background: var(--bg1); border: 1px solid var(--border2);
  border-radius: var(--radius-2xl);
  box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
  display: grid; grid-template-columns: 1fr 1fr;
  overflow: hidden; position: relative; max-height: 92vh; overflow-y: auto;
  animation: modalIn 0.22s ease;
}
@keyframes modalIn { from { opacity:0; transform: scale(0.97) translateY(10px); } to { opacity:1; transform: none; } }
.auth-panel-left {
  background: linear-gradient(155deg, var(--accent4) 0%, transparent 60%);
  border-right: 1px solid var(--border); padding: 40px 36px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.auth-panel-left::before {
  content: ''; position: absolute; top: -80px; right: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15), transparent 65%);
  pointer-events: none;
}
.auth-left-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-left-title { font-family: 'Instrument Serif', serif; font-size: 30px; line-height: 1.1; margin-bottom: 12px; }
.auth-left-title em { font-style: italic; color: var(--accent2); }
.auth-left-desc { color: var(--text2); font-size: 13.5px; line-height: 1.7; max-width: 260px; }
.auth-left-perks { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.auth-perk {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--text2); font-weight: 500;
}
.auth-perk-icon {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: var(--accent4); border: 1px solid var(--accent-border);
  display: grid; place-items: center; font-size: 10px; color: var(--accent2);
}
.auth-left-footer { color: var(--text4); font-size: 11.5px; margin-top: auto; padding-top: 20px; }
.auth-form-area { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-close {
  position: absolute; top: 14px; right: 14px; z-index: 10;
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text2); cursor: pointer;
  display: grid; place-items: center; font-size: 14px; transition: all 0.15s;
}
.auth-close:hover { background: var(--surface3); color: var(--text); border-color: var(--border2); }
.auth-form-title { font-family: 'Instrument Serif', serif; font-size: 26px; margin-bottom: 4px; }
.auth-form-sub { color: var(--text3); font-size: 13px; margin-bottom: 24px; }
.stepper { display: flex; gap: 6px; margin-bottom: 24px; }
.step-dot { flex: 1; height: 3px; border-radius: 99px; background: var(--border2); position: relative; overflow: hidden; }
.step-dot.active::after, .step-dot.done::after {
  content: ''; position: absolute; inset: 0; border-radius: 99px; background: var(--accent);
}
.step-dot.active::after { animation: fillBar 0.35s ease forwards; }
.step-dot.done::after { width: 100%; }
@keyframes fillBar { from{width:0} to{width:100%} }
.auth-switch { margin-top: 16px; text-align: center; font-size: 12.5px; color: var(--text3); }
.auth-switch button { background: none; border: none; color: var(--accent2); font-weight: 600; cursor: pointer; font-family: 'Geist', sans-serif; font-size: 12.5px; }
.form-gap { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.form-actions { display: flex; gap: 9px; margin-top: 4px; }

/* ══════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════ */
#dashboardView { min-height: 100vh; position: relative; z-index: 1; }

.sidebar {
  position: fixed; left: 12px; top: 12px; bottom: 12px;
  width: var(--sidebar-w); z-index: 50;
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-2xl); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow-y: auto; overflow-x: hidden;
}
.sidebar::-webkit-scrollbar { width: 3px; }
.side-brand {
  display: flex; align-items: center; gap: 9px; padding: 4px 8px;
  margin-bottom: 20px; flex-shrink: 0;
  font-family: 'Instrument Serif', serif; font-size: 19px;
}
.side-nav-section { flex-shrink: 0; }
.side-nav-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text4); font-weight: 600; padding: 10px 10px 5px;
}
.side-nav-sep { height: 1px; background: var(--border); margin: 8px 0; }
.nav-btn {
  width: 100%; background: none; border: none; color: var(--text2);
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 9px; text-align: left;
  font-family: 'Geist', sans-serif; font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; flex-shrink: 0;
}
.nav-btn .ni {
  width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; font-size: 13px;
  background: var(--surface); flex-shrink: 0; transition: background 0.15s;
}
.nav-btn:hover { background: var(--surface2); color: var(--text); }
.nav-btn.active { background: var(--accent4); color: var(--accent2); border: 1px solid var(--accent-border); }
.nav-btn.active .ni { background: var(--accent3); }
.side-bottom { margin-top: auto; padding-top: 12px; flex-shrink: 0; }
.side-user-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px; margin-bottom: 8px;
}
.side-user-row { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.side-avatar {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 14px;
  box-shadow: 0 0 12px rgba(99,102,241,0.3);
}
.side-name { font-weight: 600; font-size: 13px; }
.side-plan { font-size: 11px; color: var(--text4); margin-top: 1px; }
.side-link-box {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 8px; padding: 7px 10px;
  font-size: 10.5px; color: var(--text4); word-break: break-all;
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
  line-height: 1.4;
}
.side-link-box:hover { border-color: var(--accent-border); color: var(--accent2); }

.dash-main {
  margin-left: calc(var(--sidebar-w) + 22px);
  padding: 12px 16px 48px; min-height: 100vh;
  max-width: 1600px;
}

/* ── TOPBAR ── */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; margin-bottom: 20px;
  background: rgba(15,15,18,0.8); backdrop-filter: blur(20px);
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  position: sticky; top: 12px; z-index: 40;
  overflow: visible;
}
.topbar-title h2 { font-family: 'Instrument Serif', serif; font-size: 22px; line-height: 1; }
.topbar-title p { font-size: 12px; color: var(--text3); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions-clean { flex: 1; display: flex; justify-content: flex-end; }

.top-notify-slot {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 99px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border);
  font-size: 11.5px; font-weight: 500; color: var(--text4);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 260px; transition: all 0.2s;
}
.top-notify-slot.has-notif { color: var(--text2); border-color: var(--border2); background: rgba(255,255,255,0.055); }
.top-notify-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 6px var(--green); flex-shrink: 0;
  animation: blink 2s ease-in-out infinite;
}

.notif-wrap { position: relative; }
.notif-dot {
  position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 6px var(--red);
  display: none; animation: blink 2s ease-in-out infinite;
}
.notif-dot.on { display: block; }

.view { display: none; animation: fadeUp 0.22s ease; }
.view.active { display: block; }
@keyframes fadeUp { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }

.mobile-nav-bar { display: none; }

/* ══════════════════════════════════════════
   DASHBOARD CARDS / STATS
══════════════════════════════════════════ */
.dash-hero {
  background: linear-gradient(135deg, var(--accent4) 0%, transparent 50%);
  border: 1px solid var(--border); border-radius: var(--radius-2xl);
  padding: 24px 28px; margin-bottom: 20px; position: relative; overflow: hidden;
}
.dash-hero::after {
  content: ''; position: absolute; right: -60px; top: -60px;
  width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 65%);
  pointer-events: none;
}
.dash-hero-inner {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap;
}
.dash-hero-inner h1 { font-family: 'Instrument Serif', serif; font-size: 28px; line-height: 1; }
.dash-hero-inner h1 em { font-style: italic; color: var(--accent2); }
.dash-hero-inner p { color: var(--text2); margin-top: 6px; font-size: 13px; }

.section-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--text4); font-weight: 600; margin: 20px 0 10px; padding-left: 2px;
}

.stats-grid { display: grid; gap: 10px; margin-bottom: 10px; }
.stats-grid-4 { grid-template-columns: repeat(4,1fr); }
.stats-grid-3 { grid-template-columns: repeat(3,1fr); }
.stats-grid-2 { grid-template-columns: repeat(2,1fr); }
.stats-grid-6 { grid-template-columns: repeat(6,1fr); }

.stat-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 14px 16px; position: relative; overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 100% 0%, var(--surface2), transparent 55%);
  pointer-events: none;
}
.stat-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.stat-value { font-family: 'Instrument Serif', serif; font-size: 26px; line-height: 1; margin-top: 4px; color: var(--text); }
.stat-value.green { color: var(--green); }
.stat-value.yellow { color: var(--yellow); }
.stat-value.red { color: var(--red); }
.stat-value.blue { color: var(--blue); }
.stat-value.purple { color: var(--purple); }
.stat-note { font-size: 11px; color: var(--text4); margin-top: 3px; }
.stat-note.up { color: var(--green); }
.stat-icon { position: absolute; right: 12px; top: 12px; font-size: 16px; opacity: 0.15; }

.content-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 14px; }

.panel {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.panel-title { font-family: 'Instrument Serif', serif; font-size: 17px; font-weight: 600; }
.panel-sub { font-size: 11.5px; color: var(--text3); margin-top: 2px; }
.panel-action { font-size: 12.5px; color: var(--accent2); background: none; border: none; cursor: pointer; font-family: 'Geist', sans-serif; font-weight: 600; }
.panel-action:hover { color: var(--text); }
.panel-body { padding: 14px 16px; }

.apt-list { display: flex; flex-direction: column; gap: 8px; }
.apt-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px; border-radius: var(--radius-lg); border: 1px solid var(--border);
  background: var(--surface); transition: border-color 0.15s; flex-direction: column;
}
.apt-item:hover { border-color: var(--border2); }
.apt-row { display: flex; align-items: center; gap: 10px; width: 100%; }
.apt-av {
  width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
  background: var(--accent4); border: 1px solid var(--accent-border);
  color: var(--accent2); display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}
.apt-info { flex: 1; min-width: 0; }
.apt-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apt-meta { font-size: 11px; color: var(--text3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-label { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text4); font-weight: 600; text-align: center; padding: 3px 0; }
.cal-day {
  aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center;
  font-size: 11px; font-weight: 500; color: var(--text3); cursor: default;
  background: var(--surface); transition: background 0.15s, color 0.15s;
}
.cal-day.busy { background: var(--accent4); color: var(--accent2); border: 1px solid var(--accent-border); }
.cal-day.today { background: var(--accent); color: #fff; font-weight: 700; box-shadow: 0 0 12px rgba(99,102,241,0.3); }

/* ══════════════════════════════════════════
   AGENDA VIEW
══════════════════════════════════════════ */
.form-panel {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 18px; margin-bottom: 14px;
}
.form-panel-title { font-family: 'Instrument Serif', serif; font-size: 17px; margin-bottom: 14px; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px,1fr));
  gap: 10px; align-items: end;
}

.filter-bar {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px;
  margin-bottom: 14px; scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  padding: 7px 13px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text2);
  font-family: 'Geist', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; white-space: nowrap; transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.filter-btn:hover { border-color: var(--border2); color: var(--text); }
.filter-btn.active { background: var(--accent4); color: var(--accent2); border-color: var(--accent-border); }
.filter-count {
  background: var(--surface3); color: var(--text3); padding: 1px 6px;
  border-radius: 99px; font-size: 10px; font-weight: 700;
}
.filter-btn.active .filter-count { background: var(--accent3); color: var(--accent2); }

.timeline { display: flex; flex-direction: column; }
.tl-block { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.tl-block:last-child { border-bottom: none; }
.tl-time { font-size: 11px; font-weight: 600; color: var(--text4); min-width: 40px; text-align: right; padding-top: 14px; flex-shrink: 0; }
.tl-line { width: 1px; background: var(--border2); position: relative; flex-shrink: 0; }
.tl-line::before {
  content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 8px rgba(99,102,241,0.5);
}
.tl-content { flex: 1; min-width: 0; }

/* FIX: card com overflow visible para o dropdown não ser cortado */
.tl-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 12px 14px;
  display: flex; flex-direction: column; gap: 0;
  transition: border-color 0.15s;
  position: relative;
  overflow: visible; /* ESSENCIAL: permite dropdown sair do card */
}
.tl-card:hover { border-color: var(--border2); }

/* FIX: top-row com padding-right maior para não sobrepor o botão ⋮ */
.tl-card-top {
  display: flex; align-items: flex-start; gap: 10px;
  padding-right: 44px; /* espaço para o botão ⋮ */
}
.tl-card-info { flex: 1; min-width: 0; }
.tl-card-name {
  font-weight: 600; font-size: 13px;
  /* FIX: permite quebra de linha em vez de cortar */
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: normal;
}
.tl-card-meta {
  font-size: 11.5px; color: var(--text3); margin-top: 2px;
  /* FIX: permite quebra de linha em mobile */
  word-break: break-word;
  white-space: normal;
}
.tl-card-status { flex-shrink: 0; }
.tl-card .action-menu { position: absolute; top: 10px; right: 10px; }

/* FIX: ações com flex-wrap e tamanho mínimo garantido */
.apt-actions {
  display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding-top: 10px;
}
.act-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 11px; border-radius: 8px; border: none; cursor: pointer;
  font-family: 'Geist', sans-serif; font-size: 12px; font-weight: 600;
  transition: transform 0.12s, opacity 0.12s; line-height: 1;
  white-space: nowrap; flex-shrink: 0;
}
.act-btn:hover { transform: translateY(-1px); }
.act-btn:active { transform: scale(0.97); }
.act-btn.confirm { background: var(--green-bg); color: var(--green); border: 1px solid var(--green-border); }
.act-btn.refuse { background: var(--red-bg); color: var(--red); border: 1px solid var(--red-border); }
.act-btn.reschedule { background: var(--purple-bg); color: var(--purple); border: 1px solid var(--purple-border); }
.act-btn.conclude { background: var(--blue-bg); color: var(--blue); border: 1px solid var(--blue-border); }
.act-btn.whatsapp { background: rgba(37,211,102,0.1); color: #25d366; border: 1px solid rgba(37,211,102,0.2); }
.muted-actions { opacity: 0.65; }

/* ══════════════════════════════════════════
   CLIENTES / SERVIÇOS / PROFISSIONAIS
══════════════════════════════════════════ */
/* FIX: cards com overflow visible para dropdown não ser cortado */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(260px,1fr));
  gap: 12px;
}

.client-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 16px;
  padding-right: 54px; /* espaço para o ⋮ */
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: visible; /* FIX: dropdown não é cortado */
}
.client-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.client-card.inactive { opacity: 0.5; }
.cc-top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.cc-av {
  width: 42px; height: 42px; border-radius: 11px; flex-shrink: 0;
  background: var(--accent4); border: 1px solid var(--accent-border);
  color: var(--accent2); display: grid; place-items: center;
  font-weight: 700; font-size: 17px;
}
.cc-name {
  font-weight: 600; font-size: 13.5px;
  word-break: break-word; overflow-wrap: anywhere;
}
.cc-phone { font-size: 12px; color: var(--text3); margin-top: 2px; }
.cc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 12px; }
.cc-stat {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 10px;
}
.cc-sl { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text4); font-weight: 600; }
.cc-sv { font-family: 'Instrument Serif', serif; font-size: 16px; color: var(--text); margin-top: 3px; }

.svc-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 16px;
  padding-right: 54px;
  position: relative; overflow: visible;
  transition: border-color 0.2s, transform 0.2s;
}
.svc-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.svc-card.inactive { opacity: 0.5; }
/* FIX: preço não corta — sem text-overflow aqui */
.svc-price {
  font-family: 'Instrument Serif', serif; font-size: 24px; color: var(--text);
  word-break: break-word;
}
.svc-name { font-weight: 600; font-size: 14px; margin-top: 4px; word-break: break-word; }
.svc-dur { font-size: 12px; color: var(--text3); margin-top: 4px; }
.svc-status { margin-top: 10px; }

.prof-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 50px 16px 16px; text-align: center;
  position: relative; overflow: visible;
  transition: border-color 0.2s, transform 0.2s;
}
.prof-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.prof-card.inactive { opacity: 0.5; }
.prof-av {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 10px;
  background: var(--accent4); border: 1px solid var(--accent-border);
  color: var(--accent2); display: grid; place-items: center;
  font-weight: 700; font-size: 20px;
}
.prof-name { font-weight: 600; font-size: 14px; word-break: break-word; }
.prof-esp { font-size: 12px; color: var(--text3); margin-top: 3px; }
.prof-phone { font-size: 11.5px; color: var(--text4); margin-top: 4px; }
.online-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--green); margin-top: 10px;
}
.online-dot::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 6px var(--green);
}
.online-dot.off { color: var(--text4); }
.online-dot.off::before { background: var(--text4); box-shadow: none; }

/* ══════════════════════════════════════════
   FINANCEIRO
══════════════════════════════════════════ */
.fin-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 14px; }
.fin-card {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 22px;
  position: relative; overflow: hidden; transition: border-color 0.2s;
}
.fin-card:hover { border-color: var(--border2); }
.fin-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 90% 10%, var(--surface3), transparent 50%);
  pointer-events: none;
}
.fin-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; position: relative; }
.fin-value { font-family: 'Instrument Serif', serif; font-size: 34px; color: var(--text); margin-top: 6px; position: relative; }
.fin-sub { font-size: 12px; color: var(--text4); margin-top: 4px; position: relative; }

/* ══════════════════════════════════════════
   CONFIG
══════════════════════════════════════════ */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.config-section {
  background: var(--bg1); border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 20px;
}
.config-title { font-family: 'Instrument Serif', serif; font-size: 17px; margin-bottom: 16px; display: flex; align-items: center; gap: 9px; }
.config-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 13px;
}
.schedule-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-top: 12px; }
.sch-day { border: 1px solid var(--border); border-radius: 9px; padding: 10px 8px; text-align: center; }
.sch-day-name { font-size: 10px; font-weight: 700; color: var(--text4); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 7px; }

/* ══════════════════════════════════════════
   ACTION MENU (⋮) — FIX COMPLETO
══════════════════════════════════════════ */
.action-menu {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 80;
  display: inline-block;
}

.action-menu-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border2);
  background: var(--surface2); color: var(--text3); cursor: pointer;
  display: grid; place-items: center; font-size: 18px; font-weight: 800;
  transition: all 0.15s; line-height: 1; padding: 0;
  /* FIX: botão não some em mobile — touch events */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.action-menu-btn:hover { background: var(--accent4); border-color: var(--accent-border); color: var(--accent2); }

/* FIX PRINCIPAL: dropdown não some — pointer-events persistente durante transição */
.action-dropdown {
  position: fixed; /* FIX: fixed em vez de absolute evita ser cortado por overflow:hidden do pai */
  min-width: 190px;
  z-index: 99999; /* altíssimo para ficar acima de tudo */
  background: rgba(15,15,18,0.99);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg); padding: 5px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 0 1px rgba(255,255,255,0.05);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  transform: scale(0.97) translateY(-4px);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.action-dropdown.open {
  opacity: 1;
  pointer-events: all;
  transform: scale(1) translateY(0);
}

.action-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 11px;
  border-radius: 8px; font-size: 13.5px; font-weight: 500; color: var(--text2);
  cursor: pointer; background: none; border: none; width: 100%; text-align: left;
  font-family: 'Geist', sans-serif; transition: background 0.12s, color 0.12s;
  min-height: 42px; /* FIX: área de toque maior */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.action-item:hover { background: var(--surface3); color: var(--text); }
.action-item.danger { color: var(--red); }
.action-item.danger:hover { background: var(--red-bg); }
.action-item.success { color: var(--green); }
.action-item.success:hover { background: var(--green-bg); }
.action-item-icon {
  width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center; font-size: 12px;
  background: var(--surface2); flex-shrink: 0;
}
.action-sep { height: 1px; background: var(--border); margin: 4px 0; }

/* ══════════════════════════════════════════
   MODAIS
══════════════════════════════════════════ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 400;
  background: rgba(9,9,11,0.85); backdrop-filter: blur(12px);
  align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--bg1); border: 1px solid var(--border2);
  border-radius: var(--radius-2xl); padding: 28px;
  width: 100%; max-width: 440px; position: relative;
  box-shadow: 0 32px 90px rgba(0,0,0,0.65);
  animation: modalIn 0.2s ease; max-height: 90vh; overflow-y: auto;
}
.modal-title { font-family: 'Instrument Serif', serif; font-size: 22px; margin-bottom: 6px; }
.modal-sub {
  font-size: 13px; color: var(--text3); margin-bottom: 20px;
  padding: 10px 12px; background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); line-height: 1.55;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface2); color: var(--text3); cursor: pointer;
  display: grid; place-items: center; font-size: 14px; transition: all 0.15s;
  z-index: 10;
}
.modal-close:hover { background: var(--surface3); color: var(--text); }
.modal-actions { display: flex; gap: 9px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

.motivo-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.motivo-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 13px;
  border: 1px solid var(--border2); border-radius: var(--radius-lg);
  background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.motivo-item:hover { border-color: var(--border3); background: var(--surface2); }
.motivo-item.sel { border-color: var(--red-border); background: var(--red-bg); color: var(--red); }
.motivo-radio {
  width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border3);
  flex-shrink: 0; display: grid; place-items: center; transition: border-color 0.15s;
}
.motivo-item.sel .motivo-radio { border-color: var(--red); background: var(--red); }
.motivo-item.sel .motivo-radio::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: #fff; }

.confirm-modal { text-align: center; max-width: 360px; }
.confirm-icon-wrap {
  width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 16px;
  display: grid; place-items: center; font-size: 22px;
}
.confirm-icon-wrap.danger { background: var(--red-bg); border: 1px solid var(--red-border); }
.confirm-icon-wrap.warn { background: var(--yellow-bg); border: 1px solid var(--yellow-border); }
.confirm-icon-wrap.info { background: var(--accent4); border: 1px solid var(--accent-border); }
.confirm-title { font-family: 'Instrument Serif', serif; font-size: 21px; margin-bottom: 8px; }
.confirm-body { color: var(--text3); font-size: 13px; line-height: 1.6; margin-bottom: 0; }

.edit-overlay {
  display: none; position: fixed; inset: 0; z-index: 450;
  background: rgba(9,9,11,0.85); backdrop-filter: blur(12px);
  align-items: center; justify-content: center; padding: 16px;
}
.edit-overlay.open { display: flex; }
.edit-modal {
  background: var(--bg1); border: 1px solid var(--border2);
  border-radius: var(--radius-2xl); padding: 28px;
  width: 100%; max-width: 500px; position: relative;
  box-shadow: 0 32px 90px rgba(0,0,0,0.65);
  animation: modalIn 0.2s ease; max-height: 90vh; overflow-y: auto;
}
.edit-title { font-family: 'Instrument Serif', serif; font-size: 22px; margin-bottom: 20px; }

/* ══════════════════════════════════════════
   PÁGINA PÚBLICA
══════════════════════════════════════════ */
#publicView { min-height: 100vh; position: relative; z-index: 1; padding: 20px 16px 120px; }
.pub-wrap { max-width: 680px; margin: 0 auto; }
.pub-back {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 18px;
  padding: 9px 16px; border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--surface); color: var(--text2);
  font-family: 'Geist', sans-serif; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all 0.15s;
}
.pub-back:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }
.pub-hero {
  background: linear-gradient(135deg, var(--accent4) 0%, transparent 55%);
  border: 1px solid var(--border); border-radius: var(--radius-2xl);
  padding: 28px 26px 24px; margin-bottom: 16px; position: relative; overflow: hidden;
}
.pub-hero::after {
  content: ''; position: absolute; right: -40px; top: -40px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.12), transparent 65%);
  pointer-events: none;
}
.pub-hero-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-family: 'Instrument Serif', serif; font-size: 16px; opacity: 0.6; }
.pub-hero h1 { font-family: 'Instrument Serif', serif; font-size: clamp(26px,6vw,44px); line-height: 1; position: relative; z-index: 1; }
.pub-hero p { color: var(--text2); margin-top: 9px; font-size: 14px; line-height: 1.6; position: relative; z-index: 1; }
.pub-socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; position: relative; z-index: 1; }
.pub-social {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px;
  border-radius: 99px; font-size: 12.5px; font-weight: 600; text-decoration: none;
  border: 1px solid var(--border2); background: var(--surface); color: var(--text2);
  transition: all 0.15s;
}
.pub-social:hover { border-color: var(--accent-border); color: var(--accent2); background: var(--accent4); }
.pub-body { display: flex; flex-direction: column; gap: 14px; }
.pub-panel { background: var(--bg1); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 20px; }
.pub-panel-title { font-family: 'Instrument Serif', serif; font-size: 17px; margin-bottom: 14px; }
.choices { display: flex; flex-direction: column; gap: 7px; }
.choice {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); cursor: pointer; transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.choice:hover { border-color: var(--border2); background: var(--surface2); }
.choice.active { border-color: var(--accent-border); background: var(--accent4); }
.choice-icon {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0;
  background: var(--surface2); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 15px; transition: background 0.15s;
}
.choice.active .choice-icon { background: var(--accent4); border-color: var(--accent-border); }
.choice-title { font-weight: 600; font-size: 13.5px; flex: 1; min-width: 0; word-break: break-word; }
.choice-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }
.choice-price {
  margin-left: auto; font-family: 'Instrument Serif', serif; font-size: 16px;
  color: var(--text); flex-shrink: 0; white-space: nowrap;
}
.pub-confirm-screen { text-align: center; padding: 40px 20px; }
.pub-tick {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 16px;
  background: var(--green-bg); border: 1px solid var(--green-border);
  display: grid; place-items: center; font-size: 28px;
}
.pub-confirm-screen h2 { font-family: 'Instrument Serif', serif; font-size: 28px; }
.pub-confirm-screen p { color: var(--text2); font-size: 14px; margin-top: 8px; line-height: 1.6; }
.pub-wa-fab {
  position: fixed; bottom: 24px; right: 20px; z-index: 9990;
  display: none; align-items: center; gap: 8px; padding: 12px 18px;
  border-radius: 99px; background: #25d366; color: #fff;
  font-family: 'Geist', sans-serif; font-weight: 700; font-size: 13.5px;
  text-decoration: none; box-shadow: 0 8px 28px rgba(37,211,102,0.4);
  transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap;
}
.pub-wa-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(37,211,102,0.5); }

/* ══════════════════════════════════════════
   NOTIFICAÇÕES
══════════════════════════════════════════ */
.notif-stack {
  position: fixed; right: 16px; top: 68px; z-index: 9998;
  display: flex; flex-direction: column; gap: 6px;
  width: min(320px, calc(100vw - 24px)); pointer-events: none;
}
.notif-item {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px;
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.03);
  pointer-events: all; animation: notifSlide 0.22s cubic-bezier(0.22,1,0.36,1);
  transition: opacity 0.4s, transform 0.4s;
}
.notif-item.out { opacity: 0; transform: translateX(10px); }
@keyframes notifSlide { from{opacity:0;transform:translateX(12px)} to{opacity:1;transform:none} }
.notif-icon {
  width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0;
  display: grid; place-items: center; font-size: 13px;
}
.notif-icon.new { background: var(--accent4); border: 1px solid var(--accent-border); }
.notif-icon.ok { background: var(--green-bg); border: 1px solid var(--green-border); }
.notif-icon.err { background: var(--red-bg); border: 1px solid var(--red-border); }
.notif-icon.info { background: var(--surface2); border: 1px solid var(--border2); }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-weight: 700; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-msg { font-size: 11px; color: var(--text3); margin-top: 1px; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 9.5px; color: var(--text4); margin-top: 2px; font-weight: 600; }
.notif-close { width: 18px; height: 18px; border-radius: 5px; background: var(--surface2); border: none; color: var(--text4); cursor: pointer; display: grid; place-items: center; font-size: 10px; flex-shrink: 0; transition: all 0.12s; }
.notif-close:hover { background: var(--surface3); color: var(--text); }

/* ══════════════════════════════════════════
   MOBILE MENU DRAWER
══════════════════════════════════════════ */
.mobile-menu-overlay {
  display: none; position: fixed; inset: 0; z-index: 99990;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.mobile-menu-overlay.open { display: block; }

.mobile-menu-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(86vw, 340px); height: 100dvh;
  z-index: 99991;
  background: rgba(14,14,18,0.98);
  border-left: 1px solid var(--border2);
  box-shadow: -28px 0 80px rgba(0,0,0,0.7);
  transform: translateX(105%);
  transition: transform 0.22s ease;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.mobile-menu-drawer.open { transform: translateX(0); }

.mobile-menu-header {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
}

.mobile-menu-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 12px 14px 24px;
  display: flex; flex-direction: column; gap: 4px;
}
.mobile-menu-body .nav-btn { width: 100%; min-height: 46px; justify-content: flex-start; }
.mobile-menu-body .side-nav-sep { margin: 8px 0; }
.mobile-menu-body .side-nav-label { padding: 8px 10px 4px; }

body.menu-open { overflow: hidden; touch-action: none; }

/* ══════════════════════════════════════════
   RESPONSIVE TABLET
══════════════════════════════════════════ */
@media (max-width: 1100px) {
  .content-grid { grid-template-columns: 1fr; }
  .stats-grid-4 { grid-template-columns: repeat(2,1fr); }
  .stats-grid-6 { grid-template-columns: repeat(3,1fr); }
  .config-grid { grid-template-columns: 1fr; }
  .fin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  .land-nav { padding: 0 24px; }
  .steps-grid, .test-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: repeat(2,1fr); }
}

/* ══════════════════════════════════════════
   RESPONSIVE MOBILE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
  body { padding-bottom: 84px; overscroll-behavior-x: none; -webkit-text-size-adjust: 100%; }
  button, input, select, textarea { font-family: 'Geist', sans-serif; -webkit-tap-highlight-color: transparent; }
  input, select, textarea { font-size: 16px !important; }

  .land-nav { padding: 0 14px; height: 56px; }
  .nav-brand { font-size: 18px; }
  .nav-links { display: none; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 7px 10px; font-size: 12px; }

  .land-hero { min-height: auto; padding: 88px 18px 48px; text-align: center; align-items: center; justify-content: flex-start; }
  .hero-title { font-size: clamp(40px, 11vw, 56px); max-width: 340px; }
  .hero-sub { font-size: 14.5px; max-width: 320px; }
  .hero-cta, .hero-trust, .cta-actions { justify-content: center; flex-wrap: wrap; }
  .hero-cta .btn, .cta-actions .btn { width: 100%; max-width: 320px; }
  .hero-trust { gap: 10px; max-width: 320px; }
  .trust-sep { display: none; }

  .hero-mockup { margin-top: 28px; padding: 0 12px; }
  .mockup-sidebar { display: none; }
  .mc-stats { grid-template-columns: 1fr 1fr; }
  .mockup-body { min-height: auto; }

  .land-section { padding: 52px 16px; }
  .section-header { text-align: center; margin-bottom: 30px; }
  .section-title { text-align: center; font-size: clamp(30px, 9vw, 42px); }
  .section-sub { text-align: center; margin-inline: auto; }
  .segs-wrap { justify-content: center; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .test-grid { grid-template-columns: 1fr; }
  .land-cta { padding: 56px 16px; }
  .land-footer { flex-direction: column; gap: 8px; text-align: center; padding: 20px 16px; }

  /* Auth mobile */
  .auth-overlay { align-items: flex-start; padding: 10px; }
  .auth-modal { grid-template-columns: 1fr; max-width: 420px; max-height: calc(100dvh - 20px); border-radius: 22px; }
  .auth-panel-left { display: none; }
  .auth-form-area { padding: 22px 18px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  .form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-actions .btn { width: 100%; }

  /* Dashboard mobile */
  .sidebar { display: none; }
  .dash-main { margin-left: 0; padding: 10px 12px 96px; width: 100%; max-width: 100%; }

  .topbar {
    position: relative; top: 0; flex-direction: column; align-items: flex-start;
    gap: 10px; padding: 14px; border-radius: 16px;
  }
  .topbar-actions-clean { width: 100%; }
  .top-notify-slot { width: 100%; max-width: 100%; font-size: 11.5px; }

  .mobile-nav-bar {
    display: grid; grid-template-columns: repeat(5,1fr); gap: 3px;
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 9990;
    padding: 7px; border-radius: var(--radius-2xl);
    background: rgba(15,15,18,0.97); backdrop-filter: blur(28px);
    border: 1px solid var(--border2);
    box-shadow: 0 12px 48px rgba(0,0,0,0.6);
    align-items: center;
  }
  .mob-nav-btn {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; padding: 7px 4px; border-radius: var(--radius-lg);
    background: none; border: 1px solid transparent; color: var(--text3);
    font-family: 'Geist', sans-serif; font-size: 9.5px; font-weight: 500;
    cursor: pointer; transition: all 0.15s; min-width: 0; width: 100%; min-height: 52px;
    -webkit-tap-highlight-color: transparent;
  }
  .mob-nav-btn.active { background: var(--accent4); border-color: var(--accent-border); color: var(--accent2); }
  .mob-nav-btn .mni { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; background: var(--surface); transition: background 0.15s; }
  .mob-nav-btn.active .mni { background: var(--accent3); }
  .mob-nav-fab {
    background: var(--accent) !important; border-color: rgba(99,102,241,0.4) !important;
    color: #fff !important; box-shadow: 0 6px 20px rgba(99,102,241,0.4);
  }
  .mob-nav-fab .mni { background: rgba(255,255,255,0.15) !important; width: 30px !important; height: 30px !important; font-size: 15px !important; }

  .dash-hero { border-radius: 18px; padding: 18px 20px; }
  .dash-hero-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  .dash-hero-inner h1 { font-size: 32px; }
  .dash-hero-inner .btn { width: 100%; }

  .stats-grid-4,
  .stats-grid-3,
  .stats-grid-6,
  .stats-grid-2 { grid-template-columns: repeat(2,1fr) !important; gap: 8px !important; }
  .stat-card { padding: 12px; min-height: 0; }
  .stat-value { font-size: 22px; }

  .content-grid { grid-template-columns: 1fr; }

  /* FIX mobile: cards em coluna única, dropdown livre */
  .cards-grid { grid-template-columns: 1fr; }
  .config-grid { grid-template-columns: 1fr; }
  .fin-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr !important; }

  /* FIX mobile: padding para não sobrepor botão ⋮ */
  .client-card { padding: 14px; padding-right: 52px; }
  .svc-card { padding: 14px; padding-right: 52px; }
  .prof-card { padding: 48px 14px 14px; }

  /* FIX timeline mobile */
  .tl-block { gap: 6px; }
  .tl-time { min-width: 32px; font-size: 10px; }
  .tl-line { display: none; }
  .tl-card-top { padding-right: 44px; }
  .tl-card-name { white-space: normal; word-break: break-word; }
  .tl-card-meta { white-space: normal; word-break: break-word; }

  /* FIX ações mobile: grid 2 colunas */
  .apt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .apt-actions .act-btn { justify-content: center; width: 100%; }
  .muted-actions { display: flex; flex-wrap: wrap; }

  /* FIX: botão ⋮ maior em mobile */
  .action-menu-btn {
    width: 38px !important; height: 38px !important;
    font-size: 20px !important;
  }

  .notif-stack { left: 10px; right: 10px; top: 10px; width: auto; }

  .pub-wa-fab { bottom: 90px; padding: 14px; border-radius: 50%; width: 50px; height: 50px; justify-content: center; }
  .pub-wa-fab span { display: none; }

  .schedule-grid { grid-template-columns: repeat(4,1fr); }

  /* FIX: select mostra texto completo em mobile */
  .field select { padding-right: 8px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid-4,
  .stats-grid-3,
  .stats-grid-6,
  .stats-grid-2 { grid-template-columns: 1fr 1fr !important; }
  /* Em telas muito pequenas, ações em coluna */
  .apt-actions { grid-template-columns: 1fr; }
  .form-actions { grid-template-columns: 1fr; }
  .hero-title { font-size: clamp(36px, 10vw, 48px); }
}


/* PATCH FINAL — TELA DE AGENDAMENTO / PÁGINA PÚBLICA */
html, body {
  background: var(--bg) !important;
  color: var(--text) !important;
}

#publicView {
  min-height: 100vh !important;
  width: 100% !important;
  padding: 90px 18px 60px !important;
  background: transparent !important;
  color: var(--text) !important;
}

#publicView[style*="display: block"],
#publicView.active {
  display: block !important;
}

#publicView .public-shell,
#publicView .public-wrap,
#publicView .public-container {
  width: min(980px, 100%) !important;
  margin: 0 auto !important;
}

.public-head,
.public-header,
.pub-header {
  width: min(860px, 100%) !important;
  margin: 0 auto 22px !important;
  padding: 22px !important;
  border-radius: var(--radius-2xl) !important;
  border: 1px solid var(--border) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.055), rgba(255,255,255,.02)) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.28) !important;
}

.public-card,
.pub-card,
#publicView .card,
#publicView .panel,
#publicView form,
#publicView .form-card {
  width: min(860px, 100%) !important;
  margin: 16px auto !important;
  padding: 22px !important;
  border-radius: var(--radius-2xl) !important;
  border: 1px solid var(--border) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.052), rgba(255,255,255,.02)) !important;
  box-shadow: 0 18px 60px rgba(0,0,0,.24) !important;
  overflow: visible !important;
}

#publicView h1,
#publicView h2 {
  font-family: 'Instrument Serif', serif !important;
  color: var(--text) !important;
  line-height: 1.02 !important;
}

#publicView h1 {
  font-size: clamp(42px, 8vw, 76px) !important;
}

#publicView h3 {
  color: var(--text) !important;
}

#publicView p,
#publicView small,
#publicView label {
  color: var(--text2) !important;
}

#publicView input,
#publicView select,
#publicView textarea,
#publicView .date-input {
  width: 100% !important;
  min-height: 52px !important;
  background: var(--bg2) !important;
  color: var(--text) !important;
  border: 1px solid var(--border2) !important;
  border-radius: var(--radius-lg) !important;
  padding: 11px 13px !important;
}

#publicView button,
#publicView .btn {
  min-height: 44px;
}

#publicView .choice,
#publicView .service-card,
#publicView .professional-card,
#publicView .pub-choice {
  border: 1px solid var(--border) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
  border-radius: var(--radius-xl) !important;
}

#publicView .choice.active,
#publicView .selected,
#publicView .active {
  border-color: var(--accent-border) !important;
  background: var(--accent4) !important;
}

@media (max-width: 768px) {
  #publicView {
    padding: 76px 14px 100px !important;
  }

  .public-head,
  .public-header,
  .pub-header,
  .public-card,
  .pub-card,
  #publicView .card,
  #publicView .panel,
  #publicView form,
  #publicView .form-card {
    padding: 18px !important;
    border-radius: 22px !important;
  }

  #publicView h1 {
    font-size: 46px !important;
  }
}
