@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --brand: #12b76a;
  --brand-dark: #087443;
  --brand-soft: #d1fadf;
  --ink: #172b4d;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --navy: #0b172a;
  --danger: #d92d20;
  --warning: #f79009;
  --radius: 18px;
  --shadow: 0 18px 60px rgba(20, 34, 56, .11);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--surface); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(228,231,236,.8); }
.nav { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { width: 226px; }
.nav-links { display: flex; align-items: center; gap: 28px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 24px; }

.btn { min-height: 46px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 700; transition: .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 10px 25px rgba(18,183,106,.24); }
.btn-primary:hover { background: #0ca360; }
.btn-secondary { background: white; border-color: #cfd6df; color: var(--ink); }
.btn-dark { background: var(--navy); color: white; }
.btn-danger { background: #fff1f0; color: var(--danger); border-color: #fecdca; }
.btn-sm { min-height: 36px; padding: 0 13px; border-radius: 9px; font-size: 13px; }

.hero { position: relative; overflow: hidden; padding: 86px 0 78px; background: radial-gradient(circle at 84% 18%, rgba(18,183,106,.16), transparent 31%), linear-gradient(180deg, #fff 0%, #f7fbf9 100%); }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(#12b76a 1px, transparent 1px); background-size: 28px 28px; opacity: .06; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr .98fr; gap: 58px; align-items: center; }
.eyebrow { width: fit-content; padding: 8px 12px; border: 1px solid #a6f4c5; border-radius: 999px; background: #ecfdf3; color: var(--brand-dark); font-weight: 700; font-size: 13px; }
h1 { margin: 22px 0 18px; font-size: clamp(42px, 5vw, 68px); line-height: 1.02; letter-spacing: -3px; }
.highlight { color: var(--brand); }
.lead { margin: 0; color: var(--muted); font-size: 18px; line-height: 1.7; max-width: 650px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 28px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.hero-points span::before { content: '✓'; color: var(--brand); margin-right: 8px; }
.hero-visual { position: relative; }
.hero-visual img { width: 100%; filter: drop-shadow(0 28px 42px rgba(23,43,77,.14)); }
.floating-price { position: absolute; right: 3%; bottom: -1%; background: var(--navy); color: white; padding: 18px 20px; border-radius: 16px; box-shadow: var(--shadow); }
.floating-price small { display: block; color: #b8c2d1; margin-bottom: 5px; }
.floating-price strong { font-size: 24px; }

.logo-strip { border-block: 1px solid var(--line); background: white; }
.logo-strip-inner { min-height: 88px; display: flex; align-items: center; justify-content: center; gap: 40px; color: var(--muted); text-align: center; font-weight: 600; }

.section { padding: 88px 0; }
.section-soft { background: var(--surface-2); }
.section-dark { background: var(--navy); color: white; }
.section-heading { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-heading.left { margin-left: 0; text-align: left; }
.kicker { text-transform: uppercase; color: var(--brand); letter-spacing: 1.5px; font-weight: 800; font-size: 12px; }
h2 { font-size: clamp(32px, 4vw, 48px); line-height: 1.12; letter-spacing: -1.8px; margin: 12px 0 14px; }
.section-heading p { color: var(--muted); line-height: 1.7; margin: 0; }
.section-dark .section-heading p { color: #bac5d5; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: white; transition: .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: #b7efce; }
.icon-box { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-size: 22px; margin-bottom: 18px; }
.feature-card h3 { margin: 0 0 9px; font-size: 18px; }
.feature-card p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }

.steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.step::before { counter-increment: step; content: '0' counter(step); display: block; color: var(--brand); font-weight: 800; font-size: 13px; margin-bottom: 34px; }
.step h3 { margin: 0 0 10px; }
.step p { margin: 0; color: #b8c2d1; line-height: 1.65; }

.pricing-wrap { max-width: 760px; margin: 0 auto; display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: white; box-shadow: var(--shadow); }
.pricing-intro { padding: 40px; background: #ecfdf3; }
.pricing-card { padding: 40px; }
.price { font-size: 52px; font-weight: 800; letter-spacing: -2px; margin: 15px 0 20px; }
.price span { font-size: 16px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.check-list { list-style: none; padding: 0; margin: 24px 0; display: grid; gap: 13px; color: var(--ink-2); }
.check-list li::before { content: '✓'; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); margin-right: 10px; font-size: 12px; font-weight: 800; }

.faq { max-width: 850px; margin: 0 auto; display: grid; gap: 12px; }
details { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; background: white; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); line-height: 1.65; }

.cta { padding: 74px 0; }
.cta-card { padding: 48px; border-radius: 28px; background: linear-gradient(135deg, #0b172a, #17385a); color: white; display: flex; align-items: center; justify-content: space-between; gap: 30px; overflow: hidden; position: relative; }
.cta-card::after { content: ''; position: absolute; width: 280px; height: 280px; right: -90px; top: -100px; border-radius: 50%; background: rgba(18,183,106,.22); }
.cta-card h2 { margin: 0 0 12px; }
.cta-card p { margin: 0; color: #c5cedb; }
.cta-card .btn { position: relative; z-index: 2; white-space: nowrap; }

footer { background: #08111f; color: #aeb9c9; padding: 50px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px; }
footer img { width: 210px; filter: brightness(0) invert(1); opacity: .95; }
footer h4 { color: white; margin-top: 0; }
.footer-links { display: grid; gap: 10px; font-size: 14px; }
.footer-bottom { margin-top: 38px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }

/* Auth */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); }
.auth-art { padding: 52px; color: white; background: radial-gradient(circle at 30% 20%, rgba(18,183,106,.28), transparent 30%), var(--navy); display: flex; flex-direction: column; justify-content: space-between; }
.auth-art img { width: 230px; filter: brightness(0) invert(1); }
.auth-art h1 { font-size: 48px; max-width: 550px; }
.auth-art p { color: #c0cad8; max-width: 540px; line-height: 1.7; }
.auth-panel { display: grid; place-items: center; padding: 40px; }
.auth-box { width: min(470px, 100%); background: white; border: 1px solid var(--line); border-radius: 22px; padding: 34px; box-shadow: var(--shadow); }
.auth-box h2 { font-size: 30px; margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.input, textarea, select { width: 100%; min-height: 44px; border: 1px solid #d0d5dd; border-radius: 10px; padding: 10px 12px; background: white; color: var(--ink); outline: none; }
.input:focus, textarea:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(18,183,106,.12); }
textarea { min-height: 100px; resize: vertical; }
.form-message { min-height: 24px; color: var(--danger); font-size: 13px; }
.auth-switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }
.auth-switch a { color: var(--brand-dark); font-weight: 700; }

/* App */
.app-body { background: #f4f7fb; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { background: var(--navy); color: white; padding: 24px 18px; position: sticky; top: 0; height: 100vh; }
.sidebar-brand img { width: 200px; filter: brightness(0) invert(1); }
.sidebar-nav { display: grid; gap: 7px; margin-top: 34px; }
.nav-item { border: 0; width: 100%; color: #b8c2d1; background: transparent; padding: 12px 14px; border-radius: 10px; text-align: left; font-weight: 600; }
.nav-item.active, .nav-item:hover { color: white; background: rgba(18,183,106,.18); }
.sidebar-bottom { position: absolute; left: 18px; right: 18px; bottom: 20px; }
.app-main { padding: 28px; min-width: 0; }
.app-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.app-topbar h1 { font-size: 30px; margin: 0; letter-spacing: -1px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; }
.panel { display: none; }
.panel.active { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.metric-card, .card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.metric-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.metric-value { font-size: 30px; font-weight: 800; margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-title h3 { margin: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.status.active, .status.online, .status.trialing, .status.paid { background: #ecfdf3; color: #087443; }
.status.suspended, .status.cancelled, .status.offline, .status.failed { background: #fef3f2; color: #b42318; }
.status.pending, .status.past_due, .status.paused { background: #fffaeb; color: #b54708; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.inline-form .field { margin: 0; min-width: 150px; flex: 1; }
.flow-list { display: grid; gap: 12px; }
.flow-item { padding: 16px; border: 1px solid var(--line); border-radius: 12px; }
.flow-meta { color: var(--muted); font-size: 12px; margin: 8px 0; }
.chat-box { height: 360px; overflow: auto; background: #efeae2; padding: 18px; border-radius: 14px; display: grid; align-content: start; gap: 10px; }
.bubble { max-width: 80%; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; }
.bubble.in { background: white; }
.bubble.out { background: #d9fdd3; justify-self: end; }
.notice { padding: 13px 14px; border-radius: 11px; background: #fffaeb; border: 1px solid #fedf89; color: #854a0e; font-size: 13px; }
.empty { color: var(--muted); padding: 26px; text-align: center; border: 1px dashed #cdd5df; border-radius: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.loading { opacity: .6; pointer-events: none; }

@media (max-width: 980px) {
  .nav-links { display: none; }
  .mobile-menu { display: block; }
  .hero-grid, .pricing-wrap, .auth-page, .grid-2 { grid-template-columns: 1fr; }
  .hero { padding-top: 58px; }
  .feature-grid, .steps { grid-template-columns: repeat(2,1fr); }
  .auth-art { display: none; }
  .app-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding-inline: 12px; }
  .sidebar-brand img { width: 58px; object-fit: cover; object-position: left; }
  .nav-item { font-size: 0; text-align: center; }
  .nav-item::first-letter { font-size: 18px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 680px) {
  .container { width: min(100% - 28px, 1180px); }
  .brand img { width: 185px; }
  .nav-actions .btn-secondary { display: none; }
  h1 { letter-spacing: -2px; }
  .hero-grid { gap: 34px; }
  .floating-price { position: static; width: fit-content; margin-top: 10px; }
  .feature-grid, .steps, .metric-grid, .form-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .cta-card { padding: 34px 24px; flex-direction: column; align-items: flex-start; }
  .footer-grid { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; top: auto; width: auto; height: 72px; padding: 8px; }
  .sidebar-brand, .sidebar-bottom { display: none; }
  .sidebar-nav { margin: 0; display: flex; overflow-x: auto; }
  .nav-item { min-width: 72px; padding: 10px 8px; }
  .app-main { padding: 18px 14px 92px; }
  .app-topbar { align-items: flex-start; }
  .app-topbar h1 { font-size: 25px; }
}

/* TinBots multissetor */
.department-badge { display: inline-flex; align-items: center; width: fit-content; padding: 5px 9px; border-radius: 999px; background: #eef4ff; color: #3538cd; font-size: 12px; font-weight: 700; }
.department-badge.muted { background: #f2f4f7; color: var(--muted); }
.department-metrics { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 12px; }
.department-metric-card { display: grid; gap: 9px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.department-metric-card strong { font-size: 27px; }
.department-metric-card span:last-child { color: var(--muted); font-size: 12px; }
.check-row { display: flex; align-items: center; gap: 9px; margin: 4px 0 17px; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.check-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.filter-bar, .conversation-routing { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.filter-bar .field, .conversation-routing .field { min-width: 180px; margin: 0; flex: 1; }
.conversation-card { display: grid; gap: 14px; }
.chat-box.compact { height: 280px; }
.mt-8 { margin-top: 8px; }
.panel-grid-wide { grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); }

@media (max-width: 1180px) {
  .department-metrics { grid-template-columns: repeat(3, minmax(140px, 1fr)); }
}

@media (max-width: 980px) {
  .department-metrics { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
  .panel-grid-wide { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .department-metrics { grid-template-columns: 1fr; }
  .filter-bar, .conversation-routing { align-items: stretch; }
  .filter-bar .field, .conversation-routing .field { min-width: 100%; }
  .chat-box.compact { height: 240px; }
}

/* Catálogo de comandos por cliente */
.command-toolbar { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(240px, 1fr) auto; gap: 14px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.command-toolbar .field { margin: 0; }
.command-toolbar .actions { justify-content: flex-end; padding-bottom: 1px; }
.command-groups { display: grid; gap: 22px; margin-top: 18px; }
.command-category { display: grid; gap: 12px; }
.command-category > .card-title { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.command-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.command-card { display: flex; align-items: flex-start; gap: 11px; min-height: 132px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: white; cursor: pointer; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.command-card:hover { border-color: #98a2b3; box-shadow: 0 8px 22px rgba(16,24,40,.06); }
.command-card.enabled { border-color: rgba(18,183,106,.45); background: #f4fff9; }
.command-card.read-only { cursor: default; }
.command-card.read-only:hover { box-shadow: none; }
.command-card input { width: 19px; height: 19px; margin-top: 2px; flex: 0 0 auto; accent-color: var(--brand); }
.command-card-body { display: grid; gap: 8px; min-width: 0; color: var(--ink-2); font-size: 13px; line-height: 1.45; }
.command-card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--ink); }
.command-card-title strong { font-size: 14px; }
.command-card small { color: var(--muted); overflow-wrap: anywhere; }

@media (max-width: 1180px) {
  .command-toolbar { grid-template-columns: 1fr 1fr; }
  .command-toolbar .actions { grid-column: 1 / -1; justify-content: flex-start; }
  .command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .command-toolbar, .command-grid { grid-template-columns: 1fr; }
  .command-toolbar .actions { grid-column: auto; }
  .command-card { min-height: auto; }
}

/* Atendimento humano e estados de mensagens */
.human-composer { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.human-composer textarea { min-height: 74px; max-height: 180px; resize: vertical; }
.message-meta { display: block; margin-bottom: 5px; font-size: 10px; font-weight: 800; opacity: .65; text-transform: uppercase; letter-spacing: .04em; }
.bubble { overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .human-composer { grid-template-columns: 1fr; }
  .human-composer .btn { width: 100%; }
}
.recovery-codes { padding: 14px; border: 1px dashed var(--line); border-radius: 12px; background: var(--surface-2); line-height: 1.7; white-space: pre-wrap; }

/* Modelos prontos por segmento */
.template-intro-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: linear-gradient(135deg, #ffffff 0%, #f3fff8 100%); }
.template-intro-card h3 { margin: 5px 0 8px; font-size: 25px; }
.template-mode-box { min-width: 310px; padding: 15px; border: 1px solid rgba(18,183,106,.28); border-radius: 14px; background: rgba(255,255,255,.9); }
.template-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(210px, .55fr) auto; gap: 14px; align-items: end; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.template-toolbar .status { margin-bottom: 8px; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.template-card { display: grid; grid-template-rows: auto auto 1fr auto; gap: 13px; padding: 19px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: 0 4px 16px rgba(16,24,40,.035); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.template-card:hover { transform: translateY(-2px); border-color: rgba(18,183,106,.5); box-shadow: 0 12px 28px rgba(16,24,40,.08); }
.template-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.template-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 14px; background: var(--brand-soft); font-size: 27px; }
.template-card h3 { margin: 0; font-size: 18px; }
.template-category { color: var(--brand-dark); font-size: 12px; font-weight: 800; }
.template-stats { display: flex; flex-wrap: wrap; gap: 7px; }
.template-stat { padding: 5px 8px; border-radius: 999px; background: #f2f4f7; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.template-highlights { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; line-height: 1.65; }
.template-card .actions { margin-top: 3px; }
.template-card .actions .btn { flex: 1; }
.template-dialog { width: min(720px, calc(100% - 28px)); max-height: 85vh; border: 0; border-radius: 18px; padding: 0; box-shadow: 0 28px 80px rgba(16,24,40,.3); }
.template-dialog::backdrop { background: rgba(10,20,36,.62); backdrop-filter: blur(3px); }
.template-dialog-card { padding: 24px; overflow: auto; max-height: 85vh; }
.template-dialog-card > .card-title > div { display: flex; align-items: center; gap: 12px; }
.template-dialog-icon { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; background: var(--brand-soft); font-size: 25px; }
.template-preview-list { display: grid; gap: 12px; margin: 18px 0; }
.template-preview-department { padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.template-preview-department strong { display: block; margin-bottom: 7px; }
.template-preview-department ul { margin: 8px 0 0; padding-left: 19px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.template-applying { opacity: .65; pointer-events: none; }

@media (max-width: 1180px) {
  .template-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .template-intro-card { align-items: stretch; flex-direction: column; }
  .template-mode-box { min-width: 0; }
  .template-toolbar, .template-grid { grid-template-columns: 1fr; }
  .template-toolbar .status { width: fit-content; margin: 0; }
}

/* Conexão WhatsApp pelo painel */
.whatsapp-connect-grid { display:grid; grid-template-columns:minmax(0,1fr) 320px; gap:24px; align-items:center; }
.whatsapp-connect-grid p { margin:8px 0; }
.whatsapp-qr-panel { text-align:center; }
.whatsapp-qr-box { width:280px; max-width:100%; aspect-ratio:1; margin:0 auto 12px; background:#fff; border:1px solid #e4e7ec; border-radius:18px; padding:14px; display:grid; place-items:center; }
.whatsapp-qr-box img { width:100%; height:100%; object-fit:contain; image-rendering:pixelated; }
.whatsapp-qr-panel small { display:block; margin-top:8px; }
@media (max-width: 760px) { .whatsapp-connect-grid { grid-template-columns:1fr; } .whatsapp-qr-box { width:240px; } }

/* TinAutomação v2.0 */
.whatsapp-profile{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid #d0d5dd;border-radius:14px;background:#f8fafc}
.whatsapp-profile img{width:52px;height:52px;border-radius:50%;object-fit:cover;background:#eef2f6}
.mini-chart{display:flex;align-items:flex-end;gap:12px;min-height:130px;padding:14px 8px 0;overflow-x:auto}
.mini-chart-day{min-width:58px;display:flex;flex-direction:column;align-items:center;gap:7px;color:#667085}
.mini-chart-bars{height:96px;display:flex;align-items:flex-end;gap:5px}
.mini-bar{display:block;width:14px;border-radius:6px 6px 2px 2px;background:#12b76a}
.mini-bar.sent{background:#344054}
.visual-flow{display:grid;grid-template-columns:minmax(140px,1fr) auto minmax(180px,2fr) auto minmax(110px,.8fr);gap:10px;align-items:stretch;margin:14px 0}
.visual-node{display:flex;flex-direction:column;gap:6px;padding:12px;border:1px solid #d0d5dd;border-radius:12px;background:#fff;min-width:0}
.visual-node small{font-size:10px;font-weight:800;letter-spacing:.06em;color:#667085}
.visual-node span,.visual-node strong{overflow-wrap:anywhere}
.visual-arrow{align-self:center;font-size:22px;color:#12b76a;font-weight:800}
.health-chips{display:flex;flex-wrap:wrap;gap:8px}
.health-chip{display:inline-flex;gap:5px;align-items:center;border:1px solid #d0d5dd;border-radius:999px;padding:6px 10px;background:#fff;font-size:12px}
@media (max-width:900px){.visual-flow{grid-template-columns:1fr}.visual-arrow{transform:rotate(90deg);justify-self:center}.mini-chart{gap:8px}}
.password-strength{display:block;margin-top:6px;color:#667085}.password-strength[data-strength="weak"]{color:#b42318}.password-strength[data-strength="medium"]{color:#b54708}.password-strength[data-strength="strong"]{color:#087443}

/* TinAutomação 2.1 - Central de Atendimento inspirada no layout aprovado */
.support-head{display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:18px}.support-actions{display:flex;gap:10px;min-width:min(560px,48vw)}.sector-tabs{display:flex;gap:10px;overflow:auto;padding:6px 0 16px}.sector-tab{border:1px solid var(--line);background:var(--surface);padding:11px 16px;border-radius:12px;font-weight:700;white-space:nowrap;cursor:pointer}.sector-tab.active{background:#1456ff;color:#fff;border-color:#1456ff}.sector-tab .count{margin-left:7px;opacity:.8}.support-shell{display:grid;grid-template-columns:340px minmax(420px,1fr) 280px;min-height:660px;border:1px solid var(--line);border-radius:18px;overflow:hidden;background:var(--surface)}.support-list-pane,.support-info-pane{background:var(--surface-2)}.support-list-pane{border-right:1px solid var(--line)}.support-list-head{display:flex;justify-content:space-between;align-items:center;padding:16px;border-bottom:1px solid var(--line)}.support-list-head select{max-width:145px}.support-conversation-list{overflow:auto;height:600px}.support-conversation{padding:15px 16px;border-bottom:1px solid var(--line);cursor:pointer}.support-conversation:hover,.support-conversation.active{background:rgba(20,86,255,.08)}.support-conversation.active{box-shadow:inset 3px 0 #1456ff}.support-conversation-top{display:flex;justify-content:space-between;gap:10px}.support-conversation-name{font-weight:800}.support-conversation-preview{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:5px}.support-conversation-tags{display:flex;gap:6px;align-items:center;margin-top:7px}.support-chat-pane{min-width:0;background:#0e1b31}.support-chat-header{background:#132440;color:#fff;padding:15px 18px;display:flex;justify-content:space-between;align-items:center}.support-chat-header .metric-label{color:#a9b8cf}.support-chat-messages{height:500px;overflow:auto;padding:20px;background:linear-gradient(rgba(9,24,45,.94),rgba(9,24,45,.94));display:flex;flex-direction:column;gap:10px}.support-chat-messages .bubble{max-width:76%;padding:11px 14px;border-radius:14px;color:#fff;background:#1b3155;align-self:flex-start}.support-chat-messages .bubble.out{align-self:flex-end;background:#087a54}.support-chat-messages .message-meta{display:block;font-size:10px;opacity:.7;margin-bottom:5px}.support-quick-actions{display:flex;gap:8px;padding:10px 14px;background:#132440;overflow:auto}.support-quick-actions button{background:#1c3153;color:#dbe7ff;border:1px solid #2b466f;border-radius:999px;padding:7px 11px;white-space:nowrap;cursor:pointer}.support-composer{display:flex;gap:10px;padding:12px 14px;background:#132440}.support-composer .input{background:#0c1c33;color:#fff;border-color:#2b466f}.support-info-pane{padding:18px;border-left:1px solid var(--line);display:flex;flex-direction:column;gap:10px}.support-info-pane label{font-size:12px;color:var(--muted);font-weight:700}.support-info-pane select{width:100%}.contact-avatar{width:58px;height:58px;border-radius:50%;background:#1456ff;color:#fff;display:grid;place-items:center;font-weight:800;font-size:22px}.support-meta{display:grid;grid-template-columns:1fr;gap:4px;margin-top:12px}.support-meta span{font-size:12px;color:var(--muted);margin-top:8px}.support-empty{height:660px;display:grid;place-content:center;text-align:center;color:#9fb0c9;gap:8px}.unread-pill{background:#16a05d;color:#fff;border-radius:999px;min-width:22px;height:22px;padding:0 6px;display:inline-grid;place-items:center;font-size:11px;font-weight:800}.dept-pill{border-radius:999px;padding:3px 8px;background:rgba(20,86,255,.12);color:#1456ff;font-size:11px;font-weight:800}@media(max-width:1200px){.support-shell{grid-template-columns:310px 1fr}.support-info-pane{display:none}}@media(max-width:760px){.support-head{align-items:stretch;flex-direction:column}.support-actions{min-width:0;width:100%}.support-shell{grid-template-columns:1fr}.support-list-pane{border-right:0}.support-chat-pane{display:none}.support-shell.chat-open .support-list-pane{display:none}.support-shell.chat-open .support-chat-pane{display:block}.support-conversation-list{height:calc(100vh - 340px)}}
