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

:root {
  --bg: #f7f8f8;
  --bg2: #ffffff;
  --bg3: #eef3f9;
  --bg4: #e6edf6;
  --border: #eaeaea;
  --text: #0a0a0a;
  --muted: #798282;
  --blue: #16a34a;
  --blue2: #15803d;
  --ink: #0a0a0a;
  --green: #16a34a;
  --danger: #dc2626;
  --warn: #d97706;
  --sidebar: 96px;
  --panel: 380px;
  --radius: 14px;
  --font: "Inter", sans-serif;
  --display: "Fustat", sans-serif;
  --shadow: 0 1px 2px rgba(16,35,63,.04), 0 12px 32px rgba(16,35,63,.06);
}

* { box-sizing: border-box; }
html, body { margin:0; padding:0; min-height:100%; background:var(--bg); color:var(--text); font-family:var(--font); }
a { color:var(--blue2); text-decoration:none; }
button, input, select, textarea { font:inherit; }
img, svg { max-width:100%; display:block; }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border:0; border-radius:12px; padding:11px 18px; cursor:pointer; font-weight:600;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  background:var(--bg3); color:var(--text); letter-spacing:-.28px;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background:var(--ink); color:#fff; }
.btn-primary:hover { background:#16345c; }
.btn-accent { background:var(--blue); color:#062524; }
.btn-success { background:var(--green); color:#fff; }
.btn-danger { background:var(--danger); color:#fff; }
.btn-ghost { background:transparent; border:1px solid var(--border); color:var(--text); }
.btn-sm { padding:7px 11px; font-size:13px; border-radius:10px; }
.btn-lg { padding:14px 22px; font-size:1rem; border-radius:14px; }
.btn-block { width:100%; }

.input, .select, .textarea {
  width:100%; background:#fff; border:1px solid var(--border); color:var(--text);
  border-radius:12px; padding:12px 14px; outline:none; transition:.15s;
}
.input:focus, .select:focus, .textarea:focus { border-color:var(--blue); box-shadow:0 0 0 4px rgba(22,163,74,.12); }
.textarea { min-height:110px; resize:vertical; }
.label { display:block; font-size:13px; color:var(--muted); margin-bottom:6px; font-weight:600; }
.form-row { margin-bottom:14px; }
.alert {
  padding:12px 14px; border-radius:12px; margin-bottom:14px; font-size:14px;
  border:1px solid var(--border); background:#fff;
}
.alert-error { border-color:#fecaca; background:#fef2f2; color:#991b1b; }
.alert-success { border-color:#bbf7d0; background:#f0fdf4; color:#166534; }
.support-banner {
  display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap;
  padding:10px 16px; background:#fff7ed; border-bottom:1px solid #fdba74; color:#9a3412;
  font-size:13px; font-weight:500;
}
.support-banner strong { font-weight:700; }

.brand {
  display:flex; align-items:center; gap:10px; font-family:var(--display);
  font-weight:700; font-size:1.25rem; color:var(--ink); letter-spacing:-.02em;
}
.brand-mark {
  width:38px; height:38px; border-radius:0; display:grid; place-items:center;
  background:transparent; color:var(--ink); font-weight:800; overflow:visible;
  border:0;
}
.brand-mark svg { width:20px; height:20px; }
.brand-mark-img {
  background:transparent !important;
  border:0;
  padding:0; text-decoration:none; flex-shrink:0;
}
.brand-mark-img img {
  width:100%; height:100%; max-width:none; object-fit:contain; display:block;
}
.brand-logo { display:inline-flex; margin-bottom:18px; text-decoration:none; background:transparent; }
.brand-logo-img { height:108px; width:auto; display:block; }
.muted { color:var(--muted); }
.center { text-align:center; }

/* AUTH */
.auth-page { background:#f7f8f8; }
.auth-wrap {
  min-height:100vh; display:grid; place-items:center; padding:28px 18px;
  background:
    radial-gradient(720px 420px at 50% -8%, rgba(34,197,94,.14), transparent 58%),
    radial-gradient(520px 320px at 90% 95%, rgba(16,35,63,.06), transparent 55%),
    linear-gradient(180deg, #fbfbfb 0%, #f0f2f1 100%);
}
.auth-card {
  width:100%; max-width:440px; color:var(--text);
  background:#fff;
  border:1px solid var(--border);
  border-radius:24px; padding:28px 28px 26px;
  box-shadow:var(--shadow);
  animation: authRise .55s ease both;
}
.auth-card .muted { color:var(--muted); }
.auth-card a:not(.btn) { color:var(--blue2); }
.auth-page .auth-card:has(.form-grid) { max-width:520px; }
.auth-logo {
  display:flex; justify-content:center; align-items:center;
  margin:0 auto 4px; text-decoration:none; background:transparent;
}
.auth-logo-img {
  height:clamp(112px, 24vw, 148px); width:auto; display:block;
}
.auth-head { text-align:center; margin:8px 0 22px; }
.auth-title {
  margin:0; font-family:var(--display); font-weight:700;
  font-size:clamp(1.45rem, 3vw, 1.75rem); letter-spacing:-.03em; color:var(--ink);
}
.auth-sub {
  margin:8px 0 0; color:var(--muted); font-size:14.5px; line-height:1.45;
  letter-spacing:-.2px;
}
.auth-form .form-row { margin-bottom:14px; }
.auth-form .label { color:var(--muted); }
.auth-form .input,
.auth-form .select {
  background:#fff; border-color:var(--border); color:var(--text);
}
.auth-form .input::placeholder { color:#a1a1aa; }
.auth-form .input:focus,
.auth-form .select:focus {
  border-color:#22c55e;
  box-shadow:0 0 0 4px rgba(34,197,94,.14);
}
.auth-form .select {
  color-scheme: light;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23798282' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center;
  appearance:none; padding-right:36px;
}
.form-grid {
  display:grid; grid-template-columns:1fr 1fr; gap:0 12px;
}
.auth-submit {
  margin-top:6px; padding:13px 18px; border-radius:14px;
  background:var(--ink); color:#fff; font-weight:700; letter-spacing:-.2px;
  box-shadow:0 8px 20px rgba(10,10,10,.12);
}
.auth-submit:hover { background:#16345c; color:#fff; }
.auth-footer {
  text-align:center; margin:18px 0 0; color:var(--muted); font-size:14px;
}
.auth-footer a { color:var(--blue2); font-weight:600; }
.auth-footer a:hover { color:var(--green); }
.auth-page .alert {
  background:#fff; border-color:var(--border); color:var(--text);
}
.auth-page .alert-error {
  border-color:#fecaca; background:#fef2f2; color:#991b1b;
}
.auth-page .alert-success {
  border-color:#bbf7d0; background:#f0fdf4; color:#166534;
}
@keyframes authRise {
  from { opacity:0; transform:translateY(14px); }
  to { opacity:1; transform:none; }
}
@media (max-width:560px) {
  .form-grid { grid-template-columns:1fr; }
  .auth-card { padding:22px 18px 20px; border-radius:20px; }
  .auth-logo-img { height:120px; }
}


/* LANDING — Waz-like layout */
.lp { background:#fff; color:#0a0a0a; overflow-x:hidden; }
.lp-header {
  position:fixed; top:0; left:0; right:0; z-index:100;
  background:#fff; border-bottom:1px solid #eaeaea;
}
.lp-header-bar {
  height:76px; max-width:1440px; margin:0 auto;
  padding:0 clamp(20px, 8vw, 138px);
  display:flex; align-items:center; justify-content:space-between; gap:24px;
}
.lp-brand {
  display:flex; align-items:center; text-decoration:none;
  padding:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
.lp-logo { height:64px; width:auto; display:block; }
.lp-logo-sm { height:42px; width:auto; }
.lp-header-actions { display:flex; gap:12px; align-items:center; }

.lp-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  border-radius:999px; padding:12px 22px; font-weight:600; font-size:15px;
  letter-spacing:-.28px; text-decoration:none; transition:transform .18s ease;
  border:1px solid transparent; cursor:pointer;
}
.lp-btn:hover { transform:translateY(-2px); }
.lp-btn-solid { background:#0a0a0a; color:#fff; }
.lp-btn-ghost {
  background:#fff; color:#0a0a0a; border-color:#eaeaea;
  box-shadow:0 1px 2px #0000000a, 0 8px 24px #0000000f;
}
.lp-btn-light { background:#fff; color:#0a0a0a; }
.lp-btn-lg { padding:15px 30px; font-size:16px; }

.lp-hero {
  text-align:center; max-width:1440px; margin:0 auto;
  padding:calc(76px + 72px) clamp(20px, 8vw, 138px) 72px;
  display:flex; flex-direction:column; align-items:center;
}
.lp-eyebrow {
  display:inline-flex; align-items:center; gap:9px;
  background:#fff; border:1px solid #eaeaea; color:#3f3f46;
  border-radius:999px; padding:8px 18px; margin-bottom:28px;
  font-size:13.5px; font-weight:600;
}
.lp-pulse {
  width:8px; height:8px; border-radius:50%; background:#22c55e;
  animation:lpPulse 2s infinite;
}
@keyframes lpPulse {
  0%,100% { box-shadow:0 0 0 0 #22c55e80; }
  50% { box-shadow:0 0 0 6px #22c55e00; }
}
.lp-hero-title {
  font-family:var(--display); font-weight:600; color:#0a0a0a;
  font-size:clamp(36px, 5.2vw, 68px); line-height:1.05; letter-spacing:-.035em;
  max-width:980px; margin:0;
}
.lp-gr { color:#16a34a; }
.lp-hero-sub {
  letter-spacing:-.4px; color:#3f3f46; max-width:700px; margin:24px 0 0;
  font-size:clamp(16px, 1.5vw, 20px); line-height:1.6;
}
.lp-hero-actions {
  display:flex; flex-wrap:wrap; justify-content:center; gap:14px; margin-top:32px;
}
.lp-hero-note {
  margin-top:16px; color:#798282; font-size:14px; letter-spacing:-.28px;
}
.lp-hero-visual { width:100%; max-width:980px; margin-top:56px; }

/* Readable product preview */
.ui-preview {
  display:grid; grid-template-columns:96px 300px 1fr; min-height:420px;
  border:1px solid #eaeaea; border-radius:24px; overflow:hidden; background:#fff;
  text-align:left; box-shadow:0 24px 60px #00000012;
}
.ui-rail {
  background:#fff; border-right:1px solid #eaeaea;
  display:flex; flex-direction:column; align-items:center;
  gap:10px; padding:14px 8px;
}
.ui-rail-logo {
  width:72px; height:36px; max-width:none; object-fit:contain; margin-bottom:10px;
  padding:0; border-radius:0; background:transparent;
}
.ui-rail-dot {
  width:38px; height:38px; border-radius:12px; background:#f4f4f5; border:1px solid #eaeaea;
  display:grid; place-items:center; color:#71717a;
}
.ui-rail-dot svg { width:18px; height:18px; display:block; }
.ui-rail-dot.is-on { background:#dcfce7; border-color:#86efac; color:#166534; }
.ui-list { border-right:1px solid #eaeaea; background:#fafafa; }
.ui-list-head { padding:16px 16px 8px; }
.ui-list-head strong { display:block; font-size:16px; font-family:var(--display); }
.ui-list-head span { color:#798282; font-size:12px; }
.ui-tabs {
  display:flex; gap:6px; padding:8px 12px 12px; border-bottom:1px solid #eaeaea; overflow:auto;
}
.ui-tabs span {
  white-space:nowrap; font-size:11px; font-weight:600; padding:7px 10px; border-radius:999px;
  background:#f4f4f5; color:#52525b;
}
.ui-tabs .is-active { background:#dcfce7; color:#166534; }
.ui-row {
  display:grid; grid-template-columns:40px 1fr auto; gap:10px; padding:12px 14px;
  border-bottom:1px solid #f0f0f0; align-items:start;
}
.ui-row.is-active { background:#f0fdf4; }
.ui-row b { display:block; font-size:13px; color:#0a0a0a; }
.ui-row p { margin:2px 0 0; font-size:12px; color:#71717a; }
.ui-row em {
  font-style:normal; min-width:18px; height:18px; border-radius:999px;
  background:#22c55e; color:#052e16; font-size:11px; font-weight:700;
  display:grid; place-items:center;
}
.ui-av {
  width:40px; height:40px; border-radius:999px; background:#bbf7d0; color:#14532d;
  display:grid; place-items:center; font-size:11px; font-weight:700;
}
.ui-av-img {
  width:40px; height:40px; border-radius:999px; object-fit:cover; display:block;
  border:1px solid #eaeaea; background:#f4f4f5;
}
.ui-av.av2 { background:#e0e7ff; color:#3730a3; }
.ui-av.av3 { background:#fde68a; color:#92400e; }
.ui-tags { display:flex; gap:4px; margin-top:6px; }
.ui-tags i {
  font-style:normal; font-size:10px; font-weight:700; padding:2px 7px; border-radius:999px;
  background:#dcfce7; color:#166534;
}
.ui-chat { display:flex; flex-direction:column; min-width:0; background:#fff; }
.ui-chat-head {
  display:flex; gap:10px; align-items:center; padding:14px 16px;
  border-bottom:1px solid #eaeaea;
}
.ui-chat-head b { display:block; font-size:14px; }
.ui-chat-head p { margin:0; font-size:12px; color:#71717a; }
.ui-msgs {
  flex:1; padding:16px; display:flex; flex-direction:column; gap:8px; background:#f7f8f8;
}
.ui-msgs .bubble {
  max-width:78%; padding:10px 12px; border-radius:14px; font-size:13px; line-height:1.4;
}
.ui-msgs .bubble.in { align-self:flex-start; background:#fff; border:1px solid #eaeaea; color:#0a0a0a; }
.ui-msgs .bubble.out { align-self:flex-end; background:#16a34a; color:#fff; }
.ui-composer {
  display:flex; gap:8px; padding:12px; border-top:1px solid #eaeaea; align-items:center;
}
.ui-composer span {
  flex:1; background:#f4f4f5; border-radius:12px; padding:12px 14px; color:#a1a1aa; font-size:13px;
}
.ui-composer button {
  border:0; background:#0a0a0a; color:#fff; border-radius:12px; padding:11px 16px;
  font-weight:600; font-size:13px; cursor:pointer;
}

@media (max-width: 900px) {
  .ui-preview { grid-template-columns:1fr; }
  .ui-rail { flex-direction:row; padding:12px; justify-content:center; }
  .ui-chat { display:none; }
}

.lp-problem { padding:88px clamp(20px, 8vw, 138px); background:#f7f8f8; }
.lp-problem-inner {
  max-width:1120px; margin:0 auto; text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:20px;
}
.lp-problem-inner h2, .lp-plans > h2, .lp-feature-text h2, .lp-final-card h2 {
  font-family:var(--display); font-weight:600; letter-spacing:-1.76px;
  font-size:clamp(32px, 3.5vw, 44px); line-height:1.05; color:#0a0a0a; margin:0;
}
.lp-lead {
  letter-spacing:-.54px; color:#798282; max-width:680px;
  font-size:18px; line-height:1.55; margin:0;
}
.lp-loss-grid {
  width:100%; display:grid; grid-template-columns:repeat(3,1fr);
  gap:18px; margin-top:16px; text-align:left;
}
.lp-loss-card {
  background:#fff; border:1px solid #eaeaea; border-radius:20px; padding:24px;
}
.lp-loss-ico {
  width:42px; height:42px; border-radius:12px; display:grid; place-items:center;
  background:#f0fdf4; color:#16a34a; margin-bottom:14px; border:1px solid #bbf7d0;
}
.lp-loss-card h3 {
  font-family:var(--display); font-size:18px; font-weight:700; margin:0 0 8px; letter-spacing:-.32px;
}
.lp-loss-card p { margin:0; color:#798282; font-size:15px; line-height:1.5; }

.lp-feature {
  max-width:1440px; margin:0 auto; padding:56px clamp(20px, 8vw, 138px);
  display:flex; align-items:center; gap:64px;
}
.lp-feature-reverse { flex-direction:row-reverse; }
.lp-feature-text { flex:1.1; display:flex; flex-direction:column; gap:18px; }
.lp-feature-text h2 { letter-spacing:-1.36px; font-size:34px; line-height:1.1; }
.lp-feature-text > p { margin:0; color:#798282; font-size:17px; line-height:1.55; letter-spacing:-.51px; }
.lp-feature-visual { flex:.9; min-width:0; }
.lp-bullets { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:14px; }
.lp-bullets li { display:flex; gap:12px; align-items:flex-start; }
.lp-bullets span {
  width:32px; height:32px; border-radius:10px; border:1px solid #eaeaea;
  display:grid; place-items:center; flex-shrink:0; color:#16a34a; font-weight:700; background:#fff;
}
.lp-bullets strong { color:#0a0a0a; font-size:16px; letter-spacing:-.32px; }
.lp-bullets div { color:#798282; font-size:14px; line-height:1.45; }
.lp-mini-card {
  background:#fff; border:1px solid #eaeaea; border-radius:24px; padding:28px;
  display:flex; flex-direction:column; gap:14px;
  box-shadow:0 24px 60px #00000014;
}
.lp-mini-card strong { font-family:var(--display); font-size:20px; }
.lp-mini-card p { margin:0; color:#3f3f46; line-height:1.5; }
.lp-muted { color:#798282 !important; font-size:14px; }
.lp-bars { display:flex; flex-direction:column; gap:12px; }
.lp-bars > div { display:flex; flex-direction:column; gap:6px; }
.lp-bars i {
  display:block; height:10px; border-radius:999px; background:#16a34a;
}
.lp-bars span { font-size:13px; color:#798282; }

.lp-plans {
  padding:96px clamp(20px, 8vw, 138px); text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:14px;
  background:
    radial-gradient(900px 420px at 50% 0%, rgba(34,197,94,.08), transparent 60%),
    #f7f8f8;
}
.lp-plan-grid {
  width:100%; max-width:1120px; display:grid; grid-template-columns:repeat(3,1fr);
  gap:20px; margin-top:28px; text-align:left; align-items:stretch;
}
.lp-plan {
  position:relative; overflow:hidden;
  border:1px solid rgba(10,10,10,.08); border-radius:28px; padding:28px 26px 24px;
  display:flex; flex-direction:column; gap:20px; background:#fff;
  box-shadow:0 1px 2px rgba(16,35,63,.04), 0 12px 28px rgba(16,35,63,.04);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.lp-plan:hover {
  transform: translateY(-4px);
  box-shadow:0 8px 28px rgba(16,35,63,.08), 0 24px 48px rgba(16,35,63,.06);
}
.lp-plan.is-featured {
  border-color:transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(160deg, #86efac, #16a34a 45%, #0a0a0a) border-box;
  border:1.5px solid transparent;
  box-shadow:0 18px 48px rgba(22,163,74,.14), 0 8px 24px rgba(16,35,63,.06);
  transform: scale(1.02);
  z-index:1;
}
.lp-plan.is-featured:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow:0 24px 56px rgba(22,163,74,.18), 0 12px 32px rgba(16,35,63,.08);
}
.lp-plan-tag {
  position:absolute; top:16px; right:16px;
  display:inline-flex; align-items:center;
  background:#0a0a0a; color:#fff;
  border-radius:999px; padding:6px 12px;
  text-transform:uppercase; letter-spacing:.8px;
  font-size:10px; font-weight:700;
}
.lp-plan-top { display:flex; flex-direction:column; gap:10px; padding-right:8px; }
.lp-plan h3 {
  font-family:var(--display); font-size:22px; font-weight:700;
  letter-spacing:-.6px; margin:0; color:#0a0a0a;
}
.lp-plan-price {
  font-family:var(--display); font-size:clamp(40px, 4vw, 48px); font-weight:700;
  letter-spacing:-2.2px; line-height:1; color:#0a0a0a;
}
.lp-plan-price span {
  font-size:15px; letter-spacing:-.3px; color:#798282;
  margin-left:6px; font-weight:600; font-family:var(--font);
}
.lp-plan-cycles {
  display:flex; flex-wrap:wrap; gap:8px; margin-top:2px;
}
.lp-plan-cycles span {
  display:inline-flex; align-items:center;
  background:#f4f5f5; color:#52525b; border:1px solid #eaeaea;
  border-radius:999px; padding:6px 11px; font-size:12px; font-weight:600;
  letter-spacing:-.2px;
}
.lp-plan.is-featured .lp-plan-cycles span {
  background:#f0fdf4; border-color:#bbf7d0; color:#166534;
}
.lp-plan-features {
  list-style:none; padding:0; margin:0;
  display:flex; flex-direction:column; gap:0;
  border-top:1px solid #f0f0f0; padding-top:4px;
}
.lp-plan-features li {
  display:flex; align-items:center; gap:12px;
  padding:13px 0; border-bottom:1px solid #f4f4f5;
  font-size:14.5px; color:#3f3f46; letter-spacing:-.2px; line-height:1.35;
}
.lp-plan-features li:last-child { border-bottom:0; }
.lp-plan-features li::before {
  content:""; flex-shrink:0; width:22px; height:22px; border-radius:50%;
  background:#f0fdf4 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/12px no-repeat;
  border:1px solid #bbf7d0;
}
.lp-plan .lp-btn {
  width:100%; margin-top:auto; padding:13px 18px; font-size:15px;
}
.lp-plan.is-featured .lp-btn-solid {
  background:#0a0a0a; color:#fff;
  box-shadow:0 10px 24px rgba(10,10,10,.16);
}
.lp-plan.is-featured .lp-btn-solid:hover { background:#16345c; }

@media (max-width: 980px) {
  .lp-plan.is-featured { transform:none; }
  .lp-plan.is-featured:hover { transform:translateY(-4px); }
}

.lp-final { max-width:1440px; margin:0 auto; padding:0 clamp(20px, 8vw, 138px) 88px; }
.lp-final-card {
  text-align:center; border-radius:28px; padding:72px 48px;
  display:flex; flex-direction:column; align-items:center; gap:20px;
  background:
    radial-gradient(700px 360px at 80% 100%, #34c75959, transparent 70%),
    linear-gradient(140deg, #0c2313, #143d1f 55%, #1f9d4d 130%);
}
.lp-final-card h2 { color:#fff; letter-spacing:-1.6px; max-width:760px; font-size:clamp(28px, 3vw, 40px); }
.lp-final-card p { color:#ffffffbf; max-width:620px; font-size:17px; line-height:1.55; margin:0; }

.lp-footer {
  border-top:1px solid #eaeaea; padding:28px clamp(20px, 8vw, 138px);
  display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap;
  color:#798282; font-size:13px;
}

@media (max-width: 980px) {
  .lp-header-bar { padding:0 20px; height:68px; }
  .lp-hero { padding:calc(68px + 36px) 20px 48px; }
  .lp-logo { height:54px; }
  .lp-hero-title { font-size:clamp(32px, 8vw, 44px); }
  .lp-problem, .lp-feature, .lp-plans, .lp-final { padding-left:20px; padding-right:20px; }
  .lp-loss-grid, .lp-plan-grid { grid-template-columns:1fr; }
  .lp-feature, .lp-feature-reverse { flex-direction:column; gap:28px; }
  .lp-final-card { padding:48px 24px; }
}

.app-shell {
  display:grid; grid-template-columns:var(--sidebar) 1fr; height:100vh; overflow:hidden;
  background:var(--bg);
}
.app-body {
  min-width:0; height:100vh; overflow:hidden; background:var(--bg);
  display:flex; flex-direction:column; min-height:0;
}
.app-flash { margin:10px 14px 0; flex-shrink:0; }
.rail {
  background:#fff; border-right:1px solid var(--border);
  display:flex; flex-direction:column; align-items:center; padding:12px 0; gap:8px;
}
.rail a, .rail button {
  width:44px; height:44px; border-radius:12px; display:grid; place-items:center;
  color:var(--muted); background:transparent; border:0; cursor:pointer; transition:.15s;
}
.rail a.active, .rail a:hover { background:rgba(22,163,74,.12); color:var(--blue2); }
.rail .spacer { flex:1; }
.rail .avatar-sm {
  width:40px; height:40px; border-radius:12px; background:var(--ink); color:#fff;
  display:grid; place-items:center; font-size:12px; font-weight:700; overflow:hidden;
}
.rail .avatar-sm.is-empty { background:#e4e4e7; }
.rail .avatar-sm.has-photo { background:transparent; padding:0; }
.rail .avatar-sm-ini { display:grid; place-items:center; width:100%; height:100%; overflow:hidden; border-radius:12px; }
.rail .avatar-sm-ini img { width:100%; height:100%; object-fit:cover; display:block; }
.rail .avatar-sm-ini.is-empty { background:#e4e4e7; }
.rail-label { display:none; }
.rail .rail-more-btn { display:none; }
.rail-backdrop { display:none; }
.rail-extra {
  display:flex; flex-direction:column; align-items:center; flex:1; width:100%; gap:8px;
}
.chat-back { display:none; }
.btn-nova { gap:6px; }
.btn-nova-ico { display:block; width:16px; height:16px; }
.rail .brand-mark {
  margin-bottom:8px; width:72px; height:42px; min-width:72px; min-height:42px;
  border-radius:0; background:transparent; border:0; padding:0; overflow:visible;
}
.rail .brand-mark img {
  width:72px; height:42px; max-width:none; object-fit:contain; display:block;
}
.rail .brand-mark:hover,
.rail a.brand-mark:hover { background:transparent; }

.app-main {
  display:grid; grid-template-columns:var(--panel) 1fr; min-width:0;
  height:100%; min-height:0; overflow:hidden; flex:1;
}
.panel {
  background:#fff; border-right:1px solid var(--border);
  display:flex; flex-direction:column; min-height:0; overflow:hidden;
}
.panel-head {
  padding:18px 16px 12px; display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.panel-head h1 { font-size:1.15rem; margin:0; font-family:var(--display); letter-spacing:-.02em; }
.search-wrap { padding:0 16px 12px; position:relative; }
.search-wrap .input { padding-right:40px; background:var(--bg); }
.search-wrap .icon {
  position:absolute; right:28px; top:50%; transform:translateY(-50%); color:var(--muted);
}
.tabs {
  display:flex; border-bottom:1px solid var(--border); padding:0 8px; overflow:auto;
}
.tabs a {
  flex:1; display:inline-flex; align-items:center; justify-content:center; gap:6px;
  text-align:center; padding:12px 8px; color:var(--muted); font-size:12.5px; font-weight:700;
  border-bottom:2px solid transparent; white-space:nowrap;
}
.tabs a.active { color:var(--blue2); border-bottom-color:var(--blue); }
.tab-dot {
  width:8px; height:8px; border-radius:50%; flex-shrink:0; display:inline-block;
}
.tab-dot-wait { background:#22c55e; box-shadow:0 0 0 3px rgba(34,197,94,.18); }
.tab-dot-wait.is-on { animation: tabWaitPulse 1.5s ease-out infinite; }
@keyframes tabWaitPulse {
  0% { box-shadow:0 0 0 0 rgba(34,197,94,.55); }
  70% { box-shadow:0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow:0 0 0 0 rgba(34,197,94,0); }
}
.conv-list { overflow:auto; flex:1; background:#fbfcfe; }
.conv-item {
  position:relative; display:block; border-bottom:1px solid #eef2f7; color:inherit;
}
.conv-item.is-prio { background:#fffbeb; }
.conv-link {
  display:grid; grid-template-columns:46px 1fr auto; gap:10px; padding:13px 36px 13px 14px;
  align-items:start; color:inherit; text-decoration:none; cursor:pointer;
}
.conv-item:hover, .conv-item.active { background:#fff; box-shadow:inset 3px 0 0 var(--blue); }
.conv-item.is-prio:hover, .conv-item.is-prio.active { background:#fffbeb; }
.conv-more {
  position:absolute; top:10px; right:8px; width:28px; height:28px; border:0;
  border-radius:8px; background:transparent; color:#a1a1aa; font-size:18px; line-height:1;
  cursor:pointer; opacity:0; transition:opacity .15s, background .15s;
}
.conv-item:hover .conv-more, .conv-item.active .conv-more { opacity:1; }
.conv-more:hover { background:#f4f4f5; color:#3f3f46; }
.av {
  width:42px; height:42px; border-radius:50%; display:grid; place-items:center; font-weight:700;
  background:linear-gradient(145deg, #d8f5f2, #c7e9ff); color:var(--ink); position:relative;
  overflow:hidden; flex-shrink:0;
}
.av.has-photo { background:#e5e7eb; padding:0; }
.av.has-photo img {
  width:100%; height:100%; object-fit:cover; display:block;
}
.av .wa {
  position:absolute; right:-2px; bottom:-2px; width:16px; height:16px; border-radius:50%;
  background:#25D366; border:2px solid #fff; font-size:8px; display:grid; place-items:center; color:#fff;
  z-index:1;
}
.conv-name { font-weight:700; font-size:14px; color:var(--ink); }
.conv-preview { color:var(--muted); font-size:12px; margin-top:2px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:210px; }
.conv-meta { text-align:right; font-size:11px; color:var(--muted); }
.unread {
  display:inline-grid; place-items:center; min-width:18px; height:18px; padding:0 5px; border-radius:8px;
  background:var(--blue); color:#062524; font-weight:800; font-size:11px; margin-top:6px;
}
.tag-pill {
  display:inline-block; font-size:10px; padding:3px 8px; border-radius:8px; margin:5px 4px 0 0; font-weight:700;
}

/* Context menu inbox */
.ctx-menu {
  position:fixed; z-index:9999; min-width:220px; max-width:260px;
  background:#fff; border:1px solid #e4e4e7; border-radius:14px;
  box-shadow:0 12px 40px rgba(15,23,42,.14); padding:6px; 
}
.ctx-menu[hidden] { display:none !important; }
.ctx-head {
  padding:8px 10px 6px; font-size:12px; font-weight:800; color:#0a0a0a;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.ctx-label {
  padding:8px 10px 4px; font-size:10px; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; color:#a1a1aa;
}
.ctx-item {
  display:block; width:100%; text-align:left; border:0; background:transparent;
  padding:9px 10px; border-radius:10px; font-size:13px; font-weight:600; color:#3f3f46;
  cursor:pointer;
}
.ctx-item:hover { background:#f4f4f5; }
.ctx-item.is-current { background:#dcfce7; color:#166534; }
.ctx-item.ctx-danger { color:#b91c1c; }
.ctx-item.ctx-danger:hover { background:#fef2f2; color:#991b1b; }
.ctx-sep { height:1px; background:#f0f0f0; margin:4px 6px; }
.ctx-tags { display:flex; flex-direction:column; gap:2px; max-height:180px; overflow:auto; }
.ctx-tag {
  display:flex; align-items:center; gap:8px; width:100%; text-align:left; border:0;
  background:transparent; padding:8px 10px; border-radius:10px; font-size:13px;
  font-weight:600; color:#3f3f46; cursor:pointer;
}
.ctx-tag i { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.ctx-tag:hover { background:#f4f4f5; }
.ctx-tag.is-on { background:#f0fdf4; color:#166534; }
.ctx-empty-tags { padding:8px 10px 10px; font-size:12px; color:#a1a1aa; }

.chat {
  display:flex; flex-direction:column; min-width:0; min-height:0; height:100%;
  overflow:hidden;
  background:#eef1f6;
}
.chat-head {
  flex-shrink:0;
  padding:10px 14px; border-bottom:1px solid #e8e8e8;
  display:flex; align-items:center; justify-content:space-between; gap:12px; background:#f0f2f5;
}
.chat-head .left { display:flex; align-items:center; gap:12px; min-width:0; }
.chat-head-meta { min-width:0; }
.chat-head-meta strong {
  display:block; font-size:15px; color:#111; letter-spacing:-.01em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.chat-head-sub {
  display:flex; align-items:center; gap:8px; margin-top:3px; flex-wrap:wrap;
}
.chat-phone { font-size:12px; color:#667781; }
.chat-st {
  font-size:10.5px; font-weight:800; padding:2px 8px; border-radius:999px;
  letter-spacing:.02em;
}
.chat-st-wait { background:#ffedd5; color:#c2410c; }
.chat-st-live { background:#dcfce7; color:#166534; }
.chat-st-done { background:#e2e8f0; color:#475569; }
.chat-actions { display:flex; gap:4px; align-items:center; flex-shrink:0; }
.chat-ico-btn {
  width:40px; height:40px; border:0; border-radius:50%; background:transparent;
  color:#54656f; display:grid; place-items:center; cursor:pointer;
}
.chat-ico-btn:hover { background:rgba(0,0,0,.06); color:#111; }
.chat-more-wrap { position:relative; }
.chat-more-menu {
  position:absolute; right:0; top:calc(100% + 6px); width:220px; z-index:40;
  background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.14); padding:6px;
}
.chat-more-menu[hidden] { display:none !important; }
.chat-more-label {
  padding:8px 10px 4px; font-size:10px; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; color:#a1a1aa;
}
.chat-more-item {
  width:100%; display:flex; align-items:center; gap:8px; border:0; background:transparent;
  padding:9px 10px; border-radius:10px; cursor:pointer; text-align:left;
  font-size:13px; font-weight:600; color:#3f3f46;
}
.chat-more-item:hover { background:#f4f4f5; }
.chat-more-item .dot {
  width:8px; height:8px; border-radius:50%; flex-shrink:0;
}
.chat-more-item .dot.wait { background:#f59e0b; }
.chat-more-item .dot.live { background:#16a34a; }
.chat-more-item .dot.done { background:#64748b; }
.chat-more-item .ok { margin-left:auto; color:#16a34a; }
.chat-more-sep { height:1px; background:#f0f0f0; margin:4px 6px; }
.messages {
  flex:1; overflow:auto; min-height:0; padding:18px 16px 14px;
  display:flex; flex-direction:column; gap:10px;
}
.msg-row {
  display:flex; align-items:flex-end; gap:8px; max-width:100%;
  animation: msgIn .22s ease both;
}
.msg-row.in { align-self:stretch; justify-content:flex-start; }
.msg-row.out { align-self:stretch; justify-content:flex-end; }
.msg-row.out .bubble { order:1; }
.msg-row.out .msg-avatar { order:2; }
.msg-avatar {
  width:34px; height:34px; border-radius:50%; flex-shrink:0;
  display:grid; place-items:center; overflow:hidden;
  background:#6ea8e8; color:#fff;
  box-shadow:0 1px 2px rgba(15,23,42,.08);
}
.msg-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.msg-avatar svg { width:20px; height:20px; display:block; }
.msg-row.in .msg-avatar { background:#94a3b8; }
.msg-row.out .msg-avatar { background:#5b9bd5; }
.bubble {
  max-width:min(72%, 520px); padding:10px 12px 6px; border-radius:14px; font-size:14.2px; line-height:1.45;
  word-wrap:break-word; box-shadow:0 1px 1px rgba(0,0,0,.05); position:relative;
}
.bubble.in {
  background:#fff; color:#111; border-bottom-left-radius:4px;
}
.bubble.out {
  background:#eaf8e4; color:#111; border-bottom-right-radius:4px;
}
.bubble .time {
  display:block; font-size:10px; opacity:.65; margin-top:4px; text-align:right; color:#667781;
}
.bubble.ai-badge { font-size:10px; color:#0f766e; margin-bottom:4px; font-weight:700; }
@keyframes msgIn {
  from { opacity:0; transform:translateY(6px); }
  to { opacity:1; transform:none; }
}
.bubble-text { white-space:pre-wrap; }
.bubble-media { display:block; margin:-2px -2px 6px; }
.bubble-media img {
  display:block; max-width:280px; width:100%; border-radius:10px; max-height:320px; object-fit:cover;
}
.bubble-audio { width:min(260px, 100%); margin:2px 0 4px; }
.wa-audio {
  display:flex; align-items:center; gap:10px;
  min-width:min(240px, 100%); max-width:280px;
  margin:2px 0 6px; padding:4px 2px 2px;
  user-select:none;
}
.wa-audio audio { display:none; }
.wa-audio-btn {
  flex:0 0 auto; width:40px; height:40px; border:0; border-radius:50%;
  background:#16a34a; color:#fff; cursor:pointer;
  display:inline-grid; place-items:center;
  box-shadow:0 1px 2px rgba(0,0,0,.12);
  transition: transform .12s ease, background .12s ease;
}
.wa-audio-btn:hover { background:#15803d; }
.wa-audio-btn:active { transform:scale(.96); }
.wa-audio-btn .ico-pause { display:none; }
.wa-audio.is-playing .wa-audio-btn .ico-play { display:none; }
.wa-audio.is-playing .wa-audio-btn .ico-pause { display:block; }
.wa-audio-track {
  flex:1; height:6px; border-radius:999px; background:rgba(0,0,0,.12);
  position:relative; cursor:pointer; overflow:hidden; min-width:72px;
}
.bubble.out .wa-audio-track { background:rgba(0,0,0,.14); }
.wa-audio-bar {
  position:absolute; left:0; top:0; bottom:0; width:0%;
  background:#16a34a; border-radius:inherit;
}
.wa-audio-time {
  flex:0 0 auto; font-size:11px; font-weight:700; color:#667781;
  font-variant-numeric:tabular-nums; min-width:34px; text-align:right;
}
.wa-audio.is-error .wa-audio-btn { background:#b91c1c; }
.wa-audio.is-missing {
  min-width:0; padding:6px 0; color:#a1a1aa; font-size:12.5px; font-weight:600;
}
.wa-audio-missing { opacity:.85; }
.bubble-video { width:min(280px, 100%); border-radius:10px; margin-bottom:4px; background:#000; }
.bubble-file {
  display:inline-flex; align-items:center; gap:6px; padding:8px 10px; border-radius:8px;
  background:rgba(0,0,0,.05); color:#166534; font-weight:700; text-decoration:none; margin-bottom:4px;
}
.chat-tagbar {
  flex-shrink:0;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  padding:8px 14px; background:rgba(255,255,255,.75); border-top:1px solid rgba(0,0,0,.04);
}
.chat-tagbar-left { display:flex; align-items:center; gap:5px; min-height:18px; flex:1; }
.chat-tag-chip {
  width:10px; height:10px; border-radius:50%; display:inline-block;
  box-shadow:0 0 0 2px #fff;
}
.chat-tag-wrap { position:relative; }
.chat-tag-btn {
  display:inline-flex; align-items:center; gap:6px; border:1px solid #e5e7eb;
  background:#fff; color:#3b4a54; border-radius:999px; padding:7px 12px;
  font-size:12.5px; font-weight:700; cursor:pointer;
}
.chat-tag-btn:hover { background:#f4f4f5; }
.chat-tag-btn em {
  font-style:normal; min-width:18px; height:18px; padding:0 5px; border-radius:999px;
  background:#16a34a; color:#fff; font-size:11px; font-weight:800;
  display:inline-grid; place-items:center;
}
.chat-tag-btn em[hidden] { display:none !important; }
.chat-tag-menu {
  position:absolute; right:0; bottom:calc(100% + 8px); width:240px; z-index:30;
  background:#fff; border:1px solid #e5e7eb; border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.14); padding:6px; max-height:280px; overflow:auto;
}
.chat-tag-menu[hidden] { display:none !important; }
.chat-tag-menu-head {
  padding:8px 10px 6px; font-size:11px; font-weight:800; letter-spacing:.05em;
  text-transform:uppercase; color:#a1a1aa;
}
.chat-tag-empty { margin:0; padding:10px; font-size:12px; color:#a1a1aa; }
.chat-tag-opt {
  width:100%; display:flex; align-items:center; gap:8px; border:0; background:transparent;
  padding:9px 10px; border-radius:10px; cursor:pointer; text-align:left; font-size:13px;
  font-weight:600; color:#3f3f46;
}
.chat-tag-opt i { width:8px; height:8px; border-radius:50%; flex-shrink:0; }
.chat-tag-opt span { flex:1; }
.chat-tag-opt .chat-tag-check { opacity:0; color:#16a34a; flex-shrink:0; }
.chat-tag-opt.is-on { background:#f0fdf4; color:#166534; }
.chat-tag-opt.is-on .chat-tag-check { opacity:1; }
.chat-tag-opt:hover { background:#f4f4f5; }
.chat-tag-opt.is-on:hover { background:#e7f8ec; }

.wa-composer {
  position:relative; flex-shrink:0; z-index:5;
  background:#f0f2f5; border-top:1px solid #e8e8e8; padding:8px 10px 10px;
}

/* Nova conversa — modal moderno */
.nova-modal {
  border:0; border-radius:28px; padding:0; width:min(560px, 94vw);
  background:transparent; color:var(--text);
  box-shadow:none;
}
.nova-modal::backdrop {
  background:rgba(10, 18, 28, .48);
  backdrop-filter: blur(6px);
}
.nova-shell {
  background:
    radial-gradient(680px 260px at 0% 0%, rgba(22,163,74,.12), transparent 55%),
    #fff;
  border:1px solid rgba(234,234,234,.95);
  border-radius:28px;
  overflow:hidden;
  box-shadow:0 28px 80px rgba(15,23,42,.22);
  animation: novaIn .28s ease both;
}
@keyframes novaIn {
  from { opacity:0; transform:translateY(10px) scale(.98); }
  to { opacity:1; transform:none; }
}
.nova-head {
  display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
  padding:22px 22px 8px;
}
.nova-eyebrow {
  display:inline-block; margin:0 0 6px; font-size:11px; font-weight:800;
  letter-spacing:.08em; text-transform:uppercase; color:#16a34a;
}
.nova-head h3 {
  margin:0; font-family:var(--display); font-size:1.45rem;
  letter-spacing:-.03em; font-weight:800;
}
.nova-head-copy p {
  margin:6px 0 0; font-size:13px; color:#798282; line-height:1.45; max-width:340px;
}
.nova-close {
  width:40px; height:40px; border:1px solid #eee; border-radius:14px;
  background:#fff; color:#71717a; display:grid; place-items:center; cursor:pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.nova-close:hover { background:#f4f4f5; color:#0a0a0a; border-color:#e4e4e7; }

.nova-search {
  position:relative; padding:10px 22px 14px;
}
.nova-search-ico {
  position:absolute; left:36px; top:50%; transform:translateY(-42%);
  color:#16a34a; pointer-events:none; display:grid; place-items:center;
}
.nova-search-input {
  width:100%; border:1px solid #e5e7eb; background:#f7f8f8; color:#0a0a0a;
  border-radius:16px; padding:14px 16px 14px 44px; outline:none; font-size:14.5px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.nova-search-input:focus {
  background:#fff; border-color:#16a34a;
  box-shadow:0 0 0 4px rgba(22,163,74,.14);
}
.nova-search-input::placeholder { color:#a1a1aa; }

.nova-list {
  max-height:min(46vh, 380px); overflow:auto;
  border-top:1px solid #f1f1f1;
  padding:10px 12px 8px;
  background:linear-gradient(180deg, #fcfcfc 0%, #fff 28%);
}
.nova-list::-webkit-scrollbar { width:8px; }
.nova-list::-webkit-scrollbar-thumb { background:#e4e4e7; border-radius:999px; }
.nova-count {
  margin:0 8px 10px; padding:8px 12px; border-radius:999px;
  background:#f0fdf4; color:#166534; font-size:12px; font-weight:600;
  display:inline-flex; align-items:center; gap:4px;
}
.nova-count b { font-weight:800; }
.nova-items { display:flex; flex-direction:column; gap:4px; }
.nova-item {
  width:100%; display:grid; grid-template-columns:46px minmax(0,1fr) 24px;
  align-items:center; gap:12px; text-align:left;
  border:1px solid transparent; background:#fff; padding:10px 12px;
  border-radius:16px; cursor:pointer; transition: background .15s, border-color .15s, transform .15s;
}
.nova-item:hover {
  background:#f0fdf4; border-color:#bbf7d0; transform:translateY(-1px);
}
.nova-item:hover .nova-go { color:#16a34a; opacity:1; }
.nova-av {
  width:46px; height:46px; border-radius:50%; background:linear-gradient(145deg,#dcfce7,#bbf7d0);
  color:#166534; display:grid; place-items:center; font-size:13px; font-weight:800;
  overflow:hidden; flex-shrink:0; box-shadow:inset 0 0 0 1px rgba(22,163,74,.12);
}
.nova-av img { width:100%; height:100%; object-fit:cover; display:block; }
.nova-meta { min-width:0; }
.nova-meta strong {
  display:block; font-size:14px; color:#0a0a0a; letter-spacing:-.01em;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.nova-meta small { display:block; margin-top:3px; color:#798282; font-size:12px; }
.nova-go {
  color:#a1a1aa; opacity:.55; display:grid; place-items:center; transition: opacity .15s, color .15s;
}
.nova-empty {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:8px; min-height:180px; padding:28px 16px; text-align:center; color:#798282;
}
.nova-empty p { margin:0; font-size:14px; font-weight:600; color:#3f3f46; }
.nova-empty small { font-size:12.5px; color:#a1a1aa; }
.nova-empty-ico {
  width:44px; height:44px; border-radius:14px; display:grid; place-items:center;
  background:#f4f4f5; color:#71717a; font-size:18px; font-weight:800; margin-bottom:4px;
}
.nova-empty-spin {
  width:28px; height:28px; border-radius:50%;
  border:3px solid #dcfce7; border-top-color:#16a34a;
  animation: novaSpin .7s linear infinite; margin-bottom:6px;
}
@keyframes novaSpin { to { transform:rotate(360deg); } }

.nova-manual {
  padding:10px 16px 14px;
  background:#fff;
  border-top:1px solid #f1f1f1;
}
.nova-by-num {
  width:100%; display:flex; align-items:center; justify-content:center; gap:8px;
  height:44px; border:1px solid #dcfce7; background:#f0fdf4; color:#166534;
  border-radius:12px; font-weight:700; font-size:14px; cursor:pointer;
}
.nova-by-num:hover { background:#dcfce7; }
.nova-by-num svg { flex-shrink:0; }
.nova-manual.is-open .nova-by-num { background:#fff; border-color:#e5e7eb; color:#52525b; }
.nova-manual.is-open .nova-by-num span::before { content:"Fechar · "; font-weight:700; }
.nova-manual-fields { margin-top:12px; }
.nova-manual-fields[hidden] { display:none !important; }
.nova-manual-title {
  display:flex; align-items:center; gap:10px; margin-bottom:12px;
}
.nova-manual-title em {
  font-style:normal; font-size:11px; font-weight:800; letter-spacing:.07em;
  text-transform:uppercase; color:#a1a1aa; white-space:nowrap;
}
.nova-manual-title span {
  flex:1; height:1px; background:#eee;
}
.nova-manual-row {
  display:grid; grid-template-columns:1fr 1.15fr auto; gap:10px; align-items:end;
}
.nova-field label {
  display:block; font-size:11.5px; font-weight:700; color:#71717a;
  margin-bottom:6px; letter-spacing:.02em;
}
.nova-field .input {
  border-radius:14px; background:#f7f8f8; border-color:#e8e8e8;
}
.nova-field .input:focus {
  background:#fff;
}
.nova-open-btn {
  height:46px; min-width:96px; border-radius:14px; font-weight:800;
  box-shadow:0 8px 20px rgba(22,163,74,.22);
}
@media (max-width: 640px) {
  .nova-manual-row { grid-template-columns:1fr; }
  .nova-open-btn { width:100%; }
  .nova-shell { border-radius:22px; }
  .nova-modal { border-radius:22px; }
}
.wa-bar {
  display:flex; align-items:flex-end; gap:6px;
}
.wa-icon-btn {
  width:42px; height:42px; border:0; border-radius:50%; background:transparent; color:#54656f;
  display:grid; place-items:center; cursor:pointer; flex-shrink:0; font-size:18px;
}
.wa-icon-btn:hover { background:rgba(0,0,0,.06); }
.wa-input-wrap {
  flex:1; background:#fff; border-radius:24px; min-height:42px;
  display:flex; align-items:center; padding:4px 4px 4px 14px;
  box-shadow:0 1px 1px rgba(0,0,0,.04);
}
.wa-input-wrap textarea {
  width:100%; border:0; outline:none; resize:none; background:transparent;
  min-height:34px; max-height:120px; padding:8px 8px 8px 0; font-size:15px; line-height:1.35;
  color:#111; font-family:inherit;
}
.wa-send {
  width:46px; height:46px; border:0; border-radius:50%; background:#16a34a; color:#fff;
  display:grid; place-items:center; cursor:pointer; flex-shrink:0;
  box-shadow:0 2px 6px rgba(22,163,74,.35);
}
.wa-send:hover { background:#15803d; }
.wa-send:disabled { opacity:.6; cursor:wait; }
.wa-mic.is-rec { color:#ef4444; background:#fee2e2; }
.wa-emoji-pop {
  position:absolute; left:10px; bottom:64px; width:min(320px, calc(100% - 20px));
  background:#fff; border-radius:16px; border:1px solid #e5e7eb;
  box-shadow:0 12px 40px rgba(0,0,0,.12); padding:10px; display:grid;
  grid-template-columns:repeat(8, 1fr); gap:4px; z-index:20; max-height:220px; overflow:auto;
}
.wa-emoji {
  border:0; background:transparent; font-size:22px; line-height:1.2; cursor:pointer;
  border-radius:8px; padding:4px;
}
.wa-emoji:hover { background:#f4f4f5; }
.wa-attach-preview {
  display:flex; align-items:center; gap:10px; margin:0 0 8px; padding:8px 10px;
  background:#fff; border-radius:12px; border:1px solid #e5e7eb;
}
.wa-attach-preview img {
  width:44px; height:44px; object-fit:cover; border-radius:8px; flex-shrink:0;
}
.wa-attach-ico {
  width:44px; height:44px; border-radius:10px; background:#f0fdf4; color:#166534;
  display:grid; place-items:center; flex-shrink:0;
}
.wa-attach-preview span { flex:1; font-size:13px; color:#3f3f46; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wa-rec {
  display:flex; align-items:center; gap:10px; margin-top:8px; padding:10px 12px;
  background:#fff; border-radius:12px; border:1px solid #fecaca; color:#991b1b; font-size:13px;
}
.wa-rec-dot {
  width:10px; height:10px; border-radius:50%; background:#ef4444;
  animation: waPulse 1s infinite;
}
/* Impede display:flex de sobrescrever hidden */
.wa-rec[hidden],
.wa-attach-preview[hidden],
.wa-emoji-pop[hidden] {
  display: none !important;
}
@keyframes waPulse {
  0%, 100% { opacity:1; }
  50% { opacity:.35; }
}

.composer {
  padding:12px 16px; border-top:1px solid var(--border); background:#fff;
  display:grid; grid-template-columns:1fr auto; gap:10px; align-items:end;
}
.composer textarea {
  min-height:48px; max-height:140px; resize:none; background:var(--bg);
  border:1px solid var(--border); border-radius:14px; color:var(--text); padding:12px 14px;
}
.empty-chat { height:100%; display:grid; place-items:center; color:var(--muted); text-align:center; padding:40px; }
.empty-chat h2 { font-family:var(--display); color:var(--ink); }

.page { padding:24px; overflow:auto; flex:1; min-height:0; height:auto; background:var(--bg); }
.page-title { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:18px; }
.page-title h1 { margin:0; font-size:1.35rem; font-family:var(--display); letter-spacing:-.02em; }
.card {
  background:#fff; border:1px solid var(--border); border-radius:18px; padding:18px; margin-bottom:16px;
  box-shadow:0 1px 2px rgba(16,35,63,.03);
}
.grid-3 { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; }
.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.stat {
  padding:18px; border-radius:16px; background:#fff; border:1px solid var(--border);
}
.stat .n { font-size:1.55rem; font-weight:800; font-family:var(--display); color:var(--ink); }
.stat .l { color:var(--muted); font-size:13px; margin-top:4px; }
.table { width:100%; border-collapse:collapse; }
.table th, .table td { padding:11px 8px; border-bottom:1px solid #eef2f7; text-align:left; font-size:13px; }
.table th { color:var(--muted); font-weight:700; }
.kanban { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; align-items:start; }
.kanban-col { background:#fff; border:1px solid var(--border); border-radius:16px; min-height:60vh; }
.kanban-col h3 { margin:0; padding:14px; border-bottom:1px solid var(--border); font-size:14px; font-family:var(--display); }
.kanban-card {
  margin:10px; padding:12px; border-radius:12px; background:var(--bg); border:1px solid var(--border);
}

/* Modern Kanban */
.kb-page { background:linear-gradient(180deg, #f7f8f8 0%, #eef2f0 100%); }
.kb-hero {
  display:flex; justify-content:space-between; align-items:flex-end; gap:16px;
  margin-bottom:22px; flex-wrap:wrap;
}
.kb-eyebrow {
  margin:0 0 6px; font-size:12px; font-weight:700; letter-spacing:.08em;
  text-transform:uppercase; color:#16a34a;
}
.kb-hero h1 {
  margin:0; font-family:var(--display); font-size:clamp(1.6rem, 2.4vw, 2rem);
  letter-spacing:-.03em; font-weight:700;
}
.kb-sub { margin:8px 0 0; color:var(--muted); max-width:520px; font-size:14px; line-height:1.5; }
.kb-hero-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }

.rp-filters { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 18px; }
.rp-chip {
  display:inline-flex; align-items:center; padding:8px 14px; border-radius:999px;
  border:1px solid var(--border); background:#fff; color:var(--text); font-size:13px; font-weight:600;
}
.rp-chip.is-on { background:var(--ink); color:#fff; border-color:var(--ink); }
.rp-stats { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.rp-card h3 { margin:0 0 14px; font-family:var(--display); font-size:16px; letter-spacing:-.02em; }
.rp-chart {
  display:flex; align-items:flex-end; gap:6px; overflow:auto; min-height:150px; padding-top:8px;
}
.rp-bar { flex:1; min-width:22px; display:flex; flex-direction:column; align-items:center; gap:6px; }
.rp-bar i {
  display:block; width:100%; max-width:28px; border-radius:8px 8px 4px 4px;
  background:linear-gradient(180deg, #4ade80, #16a34a);
}
.rp-bar span { font-size:10px; color:var(--muted); white-space:nowrap; }
.rp-legend { margin:12px 0 0; font-size:12px; }
.rp-tags { display:flex; flex-wrap:wrap; gap:8px; }
.rp-table-wrap { overflow:auto; }
.rp-table a { color:inherit; }
.kb-board {
  display:grid; grid-template-columns:repeat(3, minmax(260px, 1fr)); gap:16px; align-items:start;
}
.kb-col {
  background:#fff; border:1px solid var(--border); border-radius:20px;
  min-height:62vh; display:flex; flex-direction:column; overflow:hidden;
}
.kb-col-head {
  display:flex; justify-content:space-between; align-items:flex-start; gap:10px;
  padding:16px 16px 14px; border-bottom:1px solid #f0f0f0;
}
.kb-col-head h3 { margin:0; font-family:var(--display); font-size:15px; letter-spacing:-.02em; }
.kb-col-head span { display:block; margin-top:3px; font-size:12px; color:var(--muted); }
.kb-count {
  min-width:28px; height:28px; border-radius:999px; display:grid; place-items:center;
  font-size:12px; font-weight:800; background:#f4f4f5; color:#3f3f46;
}
.kb-wait .kb-col-head { background:#fff7ed; }
.kb-wait .kb-count { background:#ffedd5; color:#c2410c; }
.kb-progress .kb-col-head { background:#f0fdf4; }
.kb-progress .kb-count { background:#dcfce7; color:#166534; }
.kb-done .kb-col-head { background:#f8fafc; }
.kb-done .kb-count { background:#e2e8f0; color:#334155; }
.kb-cards { padding:12px; display:flex; flex-direction:column; gap:10px; overflow:auto; flex:1; }
.kb-empty {
  border:1px dashed #d4d4d8; border-radius:14px; padding:22px 14px;
  text-align:center; color:#a1a1aa; font-size:13px;
}
.kb-card {
  border:1px solid #eaeaea; border-radius:16px; background:#fff; overflow:hidden;
  transition: border-color .15s, transform .15s;
}
.kb-card:hover { border-color:#bbf7d0; transform:translateY(-1px); }
.kb-card-main { display:block; padding:12px; color:inherit; text-decoration:none; }
.kb-card-top { display:flex; gap:10px; align-items:center; }
.kb-av {
  width:40px; height:40px; border-radius:14px; display:grid; place-items:center;
  font-size:12px; font-weight:800; flex-shrink:0; overflow:hidden;
}
.kb-av.has-photo { padding:0; background:#e5e7eb; }
.kb-av.has-photo img { width:100%; height:100%; object-fit:cover; display:block; }
.kb-card-meta { min-width:0; flex:1; }
.kb-card-meta strong { display:block; font-size:13.5px; color:#0a0a0a; }
.kb-card-meta span { display:block; font-size:11px; color:#71717a; margin-top:1px; }
.kb-unread {
  font-style:normal; min-width:20px; height:20px; padding:0 6px; border-radius:999px;
  background:#16a34a; color:#fff; font-size:11px; font-weight:800;
  display:grid; place-items:center;
}
.kb-preview {
  margin:10px 0 0; font-size:12.5px; color:#52525b; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.kb-card-foot {
  display:flex; justify-content:space-between; gap:8px; margin-top:10px;
  font-size:11px; color:#a1a1aa;
}
.kb-agent {
  background:#f4f4f5; color:#3f3f46; border-radius:999px; padding:2px 8px; font-weight:600;
}
.kb-tags { margin-top:8px; display:flex; flex-wrap:wrap; gap:4px; }
.kb-actions {
  display:flex; gap:6px; padding:0 10px 10px; flex-wrap:wrap;
}
.kb-btn {
  border:1px solid #e4e4e7; background:#fafafa; color:#3f3f46;
  border-radius:999px; padding:6px 10px; font-size:11px; font-weight:700; cursor:pointer;
}
.kb-btn:hover { background:#f4f4f5; }
.kb-btn-main { background:#dcfce7; border-color:#bbf7d0; color:#166534; }

.kb-card { position:relative; cursor:grab; }
.kb-card.is-dragging { opacity:.45; cursor:grabbing; transform:scale(.98); }
.kb-card.is-prio { border-color:#fbbf24; box-shadow:0 0 0 1px #fde68a; }
.kb-card-toolbar {
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 10px 0;
}
.kb-grip { color:#a1a1aa; display:inline-flex; cursor:grab; }
.kb-star {
  border:0; background:transparent; color:#a1a1aa; cursor:pointer;
  width:28px; height:28px; border-radius:8px; display:grid; place-items:center;
}
.kb-star:hover { background:#fffbeb; color:#d97706; }
.kb-star.is-on { color:#d97706; background:#fffbeb; }
.kb-prio-dot {
  display:inline-block; width:7px; height:7px; border-radius:50%;
  background:#f59e0b; margin-right:5px; vertical-align:middle;
}
.kb-empty.is-hidden { display:none; }
.kb-board.is-dnd .kb-col.is-over {
  outline:2px dashed #16a34a; outline-offset:-2px;
  background:#f0fdf4;
}
.kb-board.is-dnd .kb-col.is-over .kb-cards {
  background:rgba(220,252,231,.35);
}
.kb-card-main { cursor:pointer; }

.qrbox { text-align:center; padding:16px; }
.qrbox img { max-width:260px; border-radius:12px; background:#fff; padding:10px; margin:0 auto; }
.status-dot { width:8px; height:8px; border-radius:50%; display:inline-block; margin-right:6px; }
.status-dot.open { background:var(--green); }
.status-dot.qrcode, .status-dot.connecting { background:var(--warn); }
.status-dot.close, .status-dot.disconnected { background:var(--danger); }

/* Assinatura */
.as-status {
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 14px; border-radius:999px; font-size:12px; font-weight:800;
}
.as-status i { width:8px; height:8px; border-radius:50%; display:block; }
.as-status-on { background:#dcfce7; color:#166534; }
.as-status-on i { background:#16a34a; }
.as-status-warn { background:#ffedd5; color:#c2410c; }
.as-status-warn i { background:#f59e0b; }
.as-status-off { background:#f4f4f5; color:#71717a; }
.as-status-off i { background:#a1a1aa; }
.as-layout {
  display:grid; grid-template-columns:1.2fr minmax(300px, 380px); gap:18px; align-items:start;
  margin-bottom:18px;
}
.as-current, .as-renew, .as-plans-wrap {
  background:#fff; border:1px solid var(--border); border-radius:20px;
  box-shadow:0 1px 2px rgba(16,35,63,.03);
}
.as-current { padding:20px; }
.as-current.is-active { border-color:#bbf7d0; background:linear-gradient(180deg, #fff 0%, #f7fdf9 100%); }
.as-renew { padding:20px; }
.as-panel-head { margin-bottom:16px; }
.as-panel-head h3 {
  margin:0; font-family:var(--display); font-size:1.05rem; letter-spacing:-.02em;
}
.as-panel-head p { margin:6px 0 0; color:var(--muted); font-size:13px; line-height:1.45; }
.as-plan-name {
  display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:16px;
}
.as-plan-name strong {
  font-family:var(--display); font-size:1.45rem; letter-spacing:-.03em; color:var(--ink);
}
.as-chip {
  font-size:11px; font-weight:800; padding:4px 10px; border-radius:999px;
  background:#f0fdf4; color:#166534; border:1px solid #dcfce7;
}
.as-metrics {
  display:grid; grid-template-columns:repeat(2, 1fr); gap:10px;
}
.as-metric {
  padding:14px; border-radius:14px; background:#fafafa; border:1px solid #f0f0f0;
}
.as-metric span { display:block; font-size:11px; color:var(--muted); font-weight:700; margin-bottom:4px; }
.as-metric strong { font-size:14px; color:#0a0a0a; letter-spacing:-.02em; }
.as-progress { margin-top:16px; }
.as-progress-bar {
  height:8px; border-radius:999px; background:#f4f4f5; overflow:hidden; margin-bottom:8px;
}
.as-progress-bar i {
  display:block; height:100%; background:linear-gradient(90deg, #16a34a, #4ade80);
  border-radius:999px;
}
.as-progress span { font-size:12px; color:#71717a; }
.as-empty {
  margin:0; padding:28px 16px; border:1px dashed #d4d4d8; border-radius:16px;
  text-align:center; color:#a1a1aa; font-size:13px;
}
.as-cycles {
  display:grid; grid-template-columns:repeat(3, 1fr); gap:8px;
}
.as-cycle {
  position:relative; cursor:pointer;
}
.as-cycle input { position:absolute; opacity:0; pointer-events:none; }
.as-cycle span {
  display:grid; place-items:center; padding:11px 8px; border-radius:12px;
  border:1px solid #e4e4e7; background:#fafafa; font-size:12.5px; font-weight:700;
  color:#52525b; transition:border-color .15s, background .15s, color .15s;
}
.as-cycle input:checked + span {
  border-color:#16a34a; background:#f0fdf4; color:#166534;
}
.as-preview {
  margin-top:4px; padding:14px; border-radius:14px; background:#f0fdf4; border:1px solid #dcfce7;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.as-preview strong {
  font-family:var(--display); font-size:1.2rem; letter-spacing:-.03em; color:#166534;
}
.as-plans-wrap { padding:0; overflow:hidden; }
.as-list-head {
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 18px; border-bottom:1px solid #f0f0f0;
}
.as-list-head h3 {
  margin:0; font-family:var(--display); font-size:1.05rem; letter-spacing:-.02em;
}
.as-list-head span { font-size:12px; color:var(--muted); font-weight:600; }
.as-plans {
  padding:16px; display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:14px;
}
.as-plan {
  border:1px solid #ececec; border-radius:18px; padding:18px; background:#fff;
  display:flex; flex-direction:column; gap:14px;
  transition:border-color .15s, transform .15s;
}
.as-plan:hover { border-color:#bbf7d0; transform:translateY(-1px); }
.as-plan.is-featured { border-color:#86efac; background:linear-gradient(180deg, #fff 0%, #f0fdf4 100%); }
.as-plan.is-current { box-shadow:0 0 0 1px #16a34a22; }
.as-plan-labels { display:flex; gap:6px; flex-wrap:wrap; min-height:22px; }
.as-badge {
  font-style:normal; font-size:10px; font-weight:800; padding:3px 8px; border-radius:999px;
}
.as-badge-feat { background:#dcfce7; color:#166534; }
.as-badge-cur { background:#0a0a0a; color:#fff; }
.as-plan-top h4 {
  margin:0; font-family:var(--display); font-size:1.1rem; letter-spacing:-.02em;
}
.as-plan-price {
  margin-top:6px; font-family:var(--display); font-size:1.55rem; font-weight:800;
  letter-spacing:-.03em; color:var(--ink);
}
.as-plan-price span { font-size:13px; font-weight:600; color:var(--muted); margin-left:2px; }
.as-plan-cycles {
  list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px;
}
.as-plan-cycles li {
  display:flex; justify-content:space-between; gap:8px;
  font-size:12px; color:#71717a; padding:8px 10px; border-radius:10px; background:#fafafa;
}
.as-plan-cycles strong { color:#0a0a0a; font-size:12.5px; }
.as-plan-feats {
  list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; flex:1;
}
.as-plan-feats li {
  font-size:13px; color:#3f3f46; padding-left:18px; position:relative;
}
.as-plan-feats li::before {
  content:''; position:absolute; left:0; top:6px; width:8px; height:8px;
  border-radius:50%; background:#16a34a;
}
.as-pick { width:100%; margin-top:auto; }

/* Tags */
.tg-page, .cp-page, .cp2-page, .ia-page, .as-page, .cx-page, .bot-page { background:linear-gradient(180deg, #f7f8f8 0%, #eef2f0 100%); }

/* Chatbot / Menu — layout moderno */
.bot-page {
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(22,163,74,.10), transparent 60%),
    radial-gradient(700px 380px at 100% 0%, rgba(15,23,42,.05), transparent 55%),
    linear-gradient(180deg, #f7f8f8 0%, #eef2f0 100%);
}
.bot-shell { max-width:1180px; margin:0 auto; }
.bot-top {
  display:flex; align-items:flex-end; justify-content:space-between; gap:18px;
  margin-bottom:18px; flex-wrap:wrap;
}
.bot-top-copy h1 {
  margin:0; font-family:var(--display); font-size:clamp(1.7rem, 2.6vw, 2.15rem);
  letter-spacing:-.035em; font-weight:800; color:#0a0a0a;
}
.bot-top-sub { margin:8px 0 0; color:var(--muted); max-width:460px; font-size:14px; line-height:1.5; }
.bot-top-actions { display:flex; align-items:center; gap:10px; }
.bot-pill {
  display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px;
  font-size:12.5px; font-weight:700; border:1px solid transparent;
}
.bot-pill i { width:8px; height:8px; border-radius:50%; background:currentColor; }
.bot-pill.is-on { background:#dcfce7; color:#166534; border-color:#bbf7d0; }
.bot-pill.is-off { background:#f4f4f5; color:#71717a; border-color:#e4e4e7; }
.bot-flash { margin-bottom:14px; }

.bot-layout {
  display:grid; grid-template-columns:minmax(0, 1fr) 320px; gap:18px; align-items:start;
}
.bot-main { display:flex; flex-direction:column; gap:14px; min-width:0; }
.bot-panel {
  background:rgba(255,255,255,.92); border:1px solid rgba(234,234,234,.95);
  border-radius:22px; padding:18px; box-shadow:0 1px 2px rgba(16,35,63,.03);
  backdrop-filter: blur(6px);
}
.bot-panel-power { padding:14px 16px; }
.bot-power { display:flex; gap:14px; flex-wrap:wrap; align-items:stretch; }
.bot-switch {
  flex:1; min-width:220px; display:flex; gap:12px; align-items:flex-start;
  padding:12px 14px; border-radius:16px; background:#f7f8f8; border:1px solid #eee;
  cursor:pointer;
}
.bot-switch-sm { flex:0 1 220px; }
.bot-switch input { position:absolute; opacity:0; pointer-events:none; }
.bot-switch-ui {
  width:44px; height:26px; border-radius:999px; background:#d4d4d8; position:relative;
  flex-shrink:0; transition:background .18s ease; margin-top:2px;
}
.bot-switch-ui::after {
  content:""; position:absolute; top:3px; left:3px; width:20px; height:20px;
  border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.15);
  transition:transform .18s ease;
}
.bot-switch input:checked + .bot-switch-ui { background:#16a34a; }
.bot-switch input:checked + .bot-switch-ui::after { transform:translateX(18px); }
.bot-switch strong { display:block; font-size:13.5px; color:#0a0a0a; letter-spacing:-.01em; }
.bot-switch small { display:block; margin-top:2px; font-size:12px; color:#71717a; line-height:1.35; }

.bot-tabs {
  display:flex; gap:6px; padding:6px; background:rgba(255,255,255,.8);
  border:1px solid #eaeaea; border-radius:16px; overflow:auto;
}
.bot-tab {
  border:0; background:transparent; color:#71717a; font-weight:700; font-size:13px;
  padding:10px 14px; border-radius:12px; cursor:pointer; white-space:nowrap;
  transition: background .15s, color .15s;
}
.bot-tab:hover { color:#0a0a0a; background:#f4f4f5; }
.bot-tab.is-active { background:#0a0a0a; color:#fff; }
.bot-tabpane.is-active { animation: botRise .28s ease both; }
@keyframes botRise {
  from { opacity:0; transform:translateY(6px); }
  to { opacity:1; transform:none; }
}

.bot-panel-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px;
}
.bot-panel-head h2 { margin:0; font-family:var(--display); font-size:1.05rem; letter-spacing:-.02em; }
.bot-panel-head p { margin:4px 0 0; font-size:12.5px; color:#71717a; line-height:1.4; max-width:420px; }

.bot-field { margin-bottom:14px; }
.bot-field:last-child { margin-bottom:0; }
.bot-field label {
  display:flex; align-items:baseline; gap:8px; margin-bottom:7px;
  font-size:12.5px; font-weight:700; color:#3f3f46; letter-spacing:.01em;
}
.bot-field label em { font-style:normal; font-weight:600; color:#a1a1aa; font-size:11.5px; }
.bot-field .textarea { min-height:78px; }
.bot-field-hint { margin:8px 0 0; font-size:12px; color:#a1a1aa; }
.bot-field-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.bot-field-grid .bot-field { margin-bottom:14px; }

.bot-stack { display:flex; flex-direction:column; gap:10px; }
.bot-item {
  display:grid; grid-template-columns:36px minmax(0,1fr) 34px; gap:10px; align-items:start;
  padding:12px; border-radius:16px; background:#fafafa; border:1px solid #efefef;
}
.bot-item-num {
  width:36px; height:36px; border-radius:12px; display:grid; place-items:center;
  background:#0a0a0a; color:#fff; font-size:13px; font-weight:800;
}
.bot-item-body { display:flex; flex-direction:column; gap:8px; min-width:0; }
.bot-item-row { display:grid; grid-template-columns:1.1fr .9fr; gap:8px; }
.bot-un-grid { display:grid; grid-template-columns:1.1fr .9fr 1.2fr; gap:8px; }
.bot-x {
  width:34px; height:34px; border:0; border-radius:10px; background:#fff; color:#a1a1aa;
  cursor:pointer; font-size:20px; line-height:1; border:1px solid #eee;
}
.bot-x:hover { color:#b91c1c; background:#fef2f2; border-color:#fecaca; }

.bot-flow {
  display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:18px;
  padding:14px; border-radius:14px; background:#f0fdf4; border:1px solid #bbf7d0;
}
.bot-flow span {
  background:#fff; border:1px solid #dcfce7; color:#166534; font-size:12px; font-weight:700;
  padding:7px 10px; border-radius:999px;
}
.bot-flow i {
  width:18px; height:2px; background:#86efac; display:inline-block; border-radius:2px;
}

.bot-side { position:sticky; top:18px; }
.bot-phone {
  border-radius:28px; overflow:hidden; background:#0b141a;
  border:1px solid #1f2c33; box-shadow:0 18px 50px rgba(15,23,42,.18);
}
.bot-phone-bar {
  display:flex; align-items:center; gap:10px; padding:14px 14px 12px;
  background:#1f2c33; color:#e9edef;
}
.bot-phone-av {
  width:36px; height:36px; border-radius:50%; background:#16a34a; color:#fff;
  display:grid; place-items:center; font-weight:800; font-size:13px;
}
.bot-phone-bar strong { display:block; font-size:13px; }
.bot-phone-bar em { display:block; font-style:normal; font-size:11px; color:#8696a0; }
.bot-phone-chat {
  min-height:420px; padding:14px 12px 18px;
  background:
    linear-gradient(rgba(11,20,26,.55), rgba(11,20,26,.55)),
    radial-gradient(circle at 20% 10%, rgba(22,163,74,.12), transparent 40%),
    #0b141a;
  display:flex; flex-direction:column; gap:8px;
}
.bp-in, .bp-out {
  max-width:88%; padding:9px 11px; border-radius:12px; font-size:12.5px; line-height:1.45;
  white-space:pre-wrap; word-break:break-word;
}
.bp-in {
  align-self:flex-start; background:#202c33; color:#e9edef;
  border-bottom-left-radius:4px;
}
.bp-out {
  align-self:flex-end; background:#005c4b; color:#e9edef;
  border-bottom-right-radius:4px;
}

@media (max-width: 980px) {
  .bot-layout { grid-template-columns:1fr; }
  .bot-side { position:static; }
  .bot-phone { max-width:380px; margin:0 auto; }
}
@media (max-width: 720px) {
  .bot-field-grid, .bot-item-row, .bot-un-grid { grid-template-columns:1fr; }
  .bot-item { grid-template-columns:32px minmax(0,1fr) 30px; }
}

/* Canais WhatsApp */
.cx-create {
  display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap;
  background:#fff; border:1px solid var(--border); border-radius:18px;
  padding:14px 16px; box-shadow:0 1px 2px rgba(16,35,63,.03);
  animation: cxRise .45s ease both;
}
.cx-create-field { min-width:min(260px, 70vw); flex:1; }
.cx-create-field .label { margin-bottom:6px; }
.cx-create .btn { white-space:nowrap; height:46px; }
.cx-create[aria-disabled="true"] { opacity:.72; }
.cx-alert { margin-bottom:18px; }
.cx-stats {
  display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:12px;
  margin-bottom:18px;
}
.cx-stat {
  background:#fff; border:1px solid var(--border); border-radius:16px;
  padding:14px 16px; display:flex; flex-direction:column; gap:2px;
  box-shadow:0 1px 2px rgba(16,35,63,.03);
}
.cx-stat-n {
  font-family:var(--display); font-size:1.45rem; font-weight:700;
  letter-spacing:-.03em; color:var(--ink); line-height:1.1;
}
.cx-stat-l { font-size:12px; color:var(--muted); font-weight:600; }
.cx-stat.is-ok .cx-stat-n { color:#166534; }
.cx-stat.is-wait .cx-stat-n { color:#b45309; }
.cx-grid {
  display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:16px;
}
.cx-card {
  background:#fff; border:1px solid var(--border); border-radius:20px;
  padding:18px; display:flex; flex-direction:column; gap:14px;
  box-shadow:0 1px 2px rgba(16,35,63,.03);
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  animation: cxRise .5s ease both;
}
.cx-card:nth-child(2) { animation-delay:.05s; }
.cx-card:nth-child(3) { animation-delay:.1s; }
.cx-card:hover { transform:translateY(-1px); border-color:#d1fae5; }
.cx-card.is-online { border-color:#bbf7d0; }
.cx-card.is-focus {
  border-color:#86efac;
  box-shadow:0 0 0 4px rgba(22,163,74,.12), 0 12px 28px rgba(16,35,63,.06);
}
.cx-card-head { display:flex; align-items:center; gap:12px; }
.cx-avatar {
  width:46px; height:46px; border-radius:15px; flex-shrink:0;
  display:grid; place-items:center; color:#fff;
  background:linear-gradient(145deg, #22c55e 0%, #15803d 100%);
  box-shadow:0 8px 18px rgba(22,163,74,.28);
  overflow:hidden;
}
.cx-avatar.has-photo { padding:0; background:#f4f4f5; box-shadow:none; }
.cx-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.cx-card-meta { min-width:0; flex:1; }
.cx-card-meta strong {
  display:block; font-family:var(--display); font-size:1.05rem;
  letter-spacing:-.02em; color:#0a0a0a;
}
.cx-card-meta span {
  display:block; margin-top:2px; font-size:12px; color:#71717a;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cx-badge {
  display:inline-flex; align-items:center; gap:6px;
  padding:6px 10px; border-radius:999px; font-size:11px; font-weight:800;
  letter-spacing:.01em; white-space:nowrap; flex-shrink:0;
}
.cx-badge i { width:7px; height:7px; border-radius:50%; display:block; }
.cx-badge.tone-ok { background:#dcfce7; color:#166534; }
.cx-badge.tone-ok i { background:#16a34a; box-shadow:0 0 0 3px rgba(22,163,74,.2); }
.cx-badge.tone-wait { background:#ffedd5; color:#c2410c; }
.cx-badge.tone-wait i { background:#f59e0b; animation: cxPulse 1.2s ease infinite; }
.cx-badge.tone-off { background:#f4f4f5; color:#71717a; }
.cx-badge.tone-off i { background:#a1a1aa; }
.cx-online {
  display:flex; align-items:center; gap:12px;
  padding:14px 16px; border-radius:16px;
  background:linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border:1px solid #bbf7d0;
}
.cx-online-pulse {
  width:12px; height:12px; border-radius:50%; background:#16a34a;
  box-shadow:0 0 0 0 rgba(22,163,74,.55);
  animation: cxPing 1.6s ease infinite; flex-shrink:0;
}
.cx-online strong { display:block; font-size:13.5px; color:#166534; }
.cx-online p { margin:2px 0 0; font-size:12px; color:#4d7c0f; }
.cx-qr { text-align:center; }
.cx-qr-frame {
  width:min(240px, 100%); margin:0 auto 12px; padding:14px;
  border-radius:18px; background:
    linear-gradient(#fff,#fff) padding-box,
    linear-gradient(145deg, #86efac, #16a34a, #bbf7d0) border-box;
  border:2px solid transparent;
  box-shadow:0 10px 30px rgba(22,163,74,.12);
}
.cx-qr-frame img {
  width:100%; border-radius:10px; background:#fff; aspect-ratio:1;
  object-fit:contain;
}
.cx-qr p { margin:0; font-size:13px; color:var(--muted); line-height:1.45; }
.cx-qr p strong { color:#166534; }
.cx-waiting {
  padding:18px; border-radius:14px; border:1px dashed #d4d4d8;
  text-align:center; color:#a1a1aa; font-size:13px; background:#fafafa;
}
.cx-waiting p { margin:0; }
.cx-card-foot {
  display:flex; justify-content:space-between; align-items:center; gap:8px;
  margin-top:auto; padding-top:4px; flex-wrap:wrap;
}
.cx-card-foot form { margin:0; }
.cx-refresh.is-loading { opacity:.65; pointer-events:none; }
.cx-refresh.is-loading svg { animation: cxSpin .8s linear infinite; }
.cx-empty {
  background:#fff; border:1px dashed #d4d4d8; border-radius:20px;
  padding:48px 24px; text-align:center; color:var(--muted);
}
.cx-empty-ico {
  width:56px; height:56px; margin:0 auto 14px; border-radius:18px;
  display:grid; place-items:center; color:#166534; background:#dcfce7;
}
.cx-empty h3 {
  margin:0 0 6px; font-family:var(--display); color:var(--ink);
  letter-spacing:-.02em; font-size:1.15rem;
}
.cx-empty p { margin:0 auto; max-width:360px; font-size:14px; line-height:1.5; }
@keyframes cxRise {
  from { opacity:0; transform:translateY(8px); }
  to { opacity:1; transform:none; }
}
@keyframes cxPulse {
  0%, 100% { opacity:1; }
  50% { opacity:.35; }
}
@keyframes cxPing {
  0% { box-shadow:0 0 0 0 rgba(22,163,74,.45); }
  70% { box-shadow:0 0 0 10px rgba(22,163,74,0); }
  100% { box-shadow:0 0 0 0 rgba(22,163,74,0); }
}
@keyframes cxSpin {
  to { transform:rotate(360deg); }
}
.tg-layout {
  display:grid; grid-template-columns:320px 1fr; gap:18px; align-items:start;
}
.tg-create, .tg-list-wrap, .cp-create, .cp-list-wrap {
  background:#fff; border:1px solid var(--border); border-radius:20px;
  box-shadow:0 1px 2px rgba(16,35,63,.03);
}
.tg-create, .cp-create { padding:20px; }
.tg-create h3, .tg-list-head h3, .cp-panel-head h3 {
  margin:0; font-family:var(--display); font-size:1.05rem; letter-spacing:-.02em;
}
.tg-hint { margin:6px 0 16px; color:var(--muted); font-size:13px; line-height:1.45; }
.tg-swatches { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.tg-swatch {
  width:32px; height:32px; border-radius:10px; border:2px solid transparent;
  padding:0; background:transparent; cursor:pointer; display:grid; place-items:center;
}
.tg-swatch span { width:22px; height:22px; border-radius:8px; display:block; }
.tg-swatch.is-on { border-color:#16a34a; }
.tg-swatch-custom {
  overflow:hidden; border:1px dashed #d4d4d8; position:relative;
}
.tg-swatch-custom input {
  position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; height:100%; border:0; padding:0;
}
.tg-swatch-custom::after {
  content:'+'; font-weight:800; color:#71717a; font-size:16px;
}
.tg-preview-wrap {
  margin-top:12px; padding:12px; border-radius:14px; background:#fafafa; border:1px solid #f0f0f0;
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.tg-list-wrap { padding:0; overflow:hidden; min-height:420px; }
.tg-list-head {
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 18px; border-bottom:1px solid #f0f0f0;
}
.tg-list-head span { font-size:12px; color:var(--muted); font-weight:600; }
.tg-grid { padding:14px; display:grid; gap:10px; }
.tg-item {
  display:flex; align-items:center; gap:12px; padding:12px 14px;
  border:1px solid #ececec; border-radius:14px; background:#fff;
  transition:border-color .15s;
}
.tg-item:hover { border-color:#bbf7d0; }
.tg-item-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; }
.tg-item-body { flex:1; min-width:0; display:flex; flex-direction:column; gap:4px; align-items:flex-start; }
.tg-item-body span { font-size:12px; color:var(--muted); }
.tg-del {
  border:0; background:#fef2f2; color:#b91c1c; border-radius:999px;
  padding:6px 12px; font-size:11px; font-weight:700; cursor:pointer;
}
.tg-del:hover { background:#fee2e2; }
.tg-empty, .cp-empty {
  margin:18px; padding:36px 18px; border:1px dashed #d4d4d8; border-radius:16px;
  text-align:center; color:#a1a1aa; font-size:13px;
}
.cp-empty { display:flex; flex-direction:column; gap:6px; }
.cp-empty strong { color:#3f3f46; font-size:14px; }

/* Campanhas v2 */
.cp2-grid {
  display:grid; grid-template-columns:1.1fr 1fr; gap:18px; align-items:start; margin-bottom:22px;
}
.cp2-card, .cp2-list {
  background:#fff; border:1px solid var(--border); border-radius:20px;
  box-shadow:0 1px 2px rgba(16,35,63,.03);
}
.cp2-card { padding:22px; }
.cp2-card-head {
  display:flex; gap:12px; align-items:flex-start; margin-bottom:18px;
}
.cp2-step {
  width:28px; height:28px; border-radius:10px; background:#dcfce7; color:#166534;
  display:grid; place-items:center; font-size:13px; font-weight:800; flex-shrink:0;
}
.cp2-card-head h3 { margin:0; font-family:var(--display); font-size:1.05rem; letter-spacing:-.02em; }
.cp2-card-head p { margin:4px 0 0; font-size:13px; color:var(--muted); }
.cp2-2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.cp2-drop {
  display:flex; flex-direction:column; gap:4px; align-items:flex-start;
  padding:16px; border-radius:14px; border:1px dashed #d4d4d8; background:#fafafa;
  cursor:pointer; position:relative;
}
.cp2-drop input { position:absolute; inset:0; opacity:0; cursor:pointer; }
.cp2-drop strong { font-size:13px; color:#166534; }
.cp2-drop span { font-size:12px; color:#a1a1aa; }
.cp2-drop-xl {
  align-items:center; text-align:center; padding:28px 16px; min-height:120px; justify-content:center;
  border-color:#bbf7d0; background:#f0fdf4;
}
.cp2-drop-xl strong { font-size:14px; }
.cp2-delay {
  margin-top:4px; padding:14px; border-radius:14px; background:#f8fafc; border:1px solid #eef2f7;
}
.cp2-delay-title { font-size:12px; font-weight:800; color:#3f3f46; margin-bottom:10px; }
.cp2-tabs {
  display:flex; gap:6px; padding:4px; background:#f4f4f5; border-radius:12px; margin-bottom:14px;
}
.cp2-tab {
  flex:1; border:0; background:transparent; border-radius:10px; padding:10px 8px;
  font-size:12.5px; font-weight:700; color:#71717a; cursor:pointer;
}
.cp2-tab.is-on { background:#fff; color:#166534; box-shadow:0 1px 2px rgba(0,0,0,.06); }
.cp2-pane { display:none; }
.cp2-pane.is-on { display:block; }
.cp2-destinos {
  min-height:160px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-size:12.5px;
}
.cp2-hint { margin:10px 0 0; font-size:12px; color:#a1a1aa; line-height:1.45; }
.cp2-hint em { font-style:normal; color:#71717a; font-weight:600; }
.cp2-preview {
  margin-top:12px; padding:12px; border-radius:14px; border:1px solid #dcfce7; background:#fff;
}
.cp2-preview-top {
  display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom:8px;
}
.cp2-preview-top strong { font-size:13px; color:#166534; }
.cp2-preview ul { margin:0; padding:0 0 0 16px; font-size:12.5px; color:#3f3f46; }
.cp2-preview li { margin-bottom:4px; }
.cp2-crm-box {
  padding:22px; border-radius:14px; background:#f0fdf4; border:1px solid #dcfce7;
  display:flex; flex-direction:column; gap:6px;
}
.cp2-crm-box strong { font-size:1.2rem; color:#166534; font-family:var(--display); }
.cp2-crm-box span { font-size:13px; color:#71717a; }
.cp2-submit { width:100%; margin-top:16px; }
.cp2-list { padding:0; overflow:hidden; }
.cp2-list-head {
  display:flex; justify-content:space-between; align-items:center;
  padding:16px 18px; border-bottom:1px solid #f0f0f0;
}
.cp2-list-head h3 { margin:0; font-family:var(--display); font-size:1.05rem; }
.cp2-list-head span { font-size:12px; color:var(--muted); font-weight:600; }
.cp2-empty {
  margin:18px; padding:36px; border:1px dashed #d4d4d8; border-radius:16px;
  text-align:center; color:#a1a1aa; font-size:13px;
}
.cp2-table-wrap { overflow:auto; }
.cp2-table { width:100%; border-collapse:collapse; }
.cp2-table th, .cp2-table td {
  padding:14px 18px; text-align:left; border-bottom:1px solid #f0f0f0; vertical-align:middle;
}
.cp2-table th { font-size:11px; text-transform:uppercase; letter-spacing:.05em; color:#a1a1aa; }
.cp2-table td strong { display:block; font-size:14px; color:#0a0a0a; }
.cp2-meta { margin-top:4px; font-size:12px; color:#71717a; }
.cp2-actions { white-space:nowrap; }
.cp2-actions form { display:inline; }
.cp-badge {
  font-style:normal; font-size:11px; font-weight:800; padding:4px 10px; border-radius:999px;
  white-space:nowrap;
}
.cp-badge-draft { background:#f4f4f5; color:#52525b; }
.cp-badge-run { background:#dcfce7; color:#166534; }
.cp-badge-pause { background:#ffedd5; color:#c2410c; }
.cp-badge-ok { background:#e0f2fe; color:#0369a1; }
.cp-badge-err { background:#fee2e2; color:#b91c1c; }
.cp-progress-bar {
  height:8px; border-radius:999px; background:#f4f4f5; overflow:hidden;
}
.cp-progress-bar i {
  display:block; height:100%; background:linear-gradient(90deg, #16a34a, #4ade80);
  border-radius:999px;
}
.cp-fail { color:#b91c1c; font-weight:600; }

@media (max-width: 980px) {
  .app-shell { grid-template-columns:1fr; height:100dvh; height:100svh; min-height:100dvh; display:flex; flex-direction:column; overflow:hidden; }
  .app-body { height:auto; flex:1; min-height:0; }
  .app-main, .plans, .grid-3, .grid-2, .kanban { grid-template-columns:1fr; }
  .page { height:auto; min-height:0; flex:1; }
  .tg-layout, .cp-layout, .cp-row-2, .cp-delay, .cp2-grid, .cp2-2, .ia-layout, .as-layout { grid-template-columns:1fr; }
  .as-plans { grid-template-columns:1fr; }
  .as-metrics { grid-template-columns:1fr; }
  .kb-board { grid-template-columns:1fr; }
  .rp-stats { grid-template-columns:1fr 1fr; }
  .cx-grid, .cx-stats { grid-template-columns:1fr; }
  .cx-create { width:100%; }
}
@media (min-width: 981px) and (max-width: 1180px) {
  .as-plans { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}

/* Minha IA */
.ia-status {
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 14px; border-radius:999px; font-size:12px; font-weight:800;
}
.ia-status i { width:8px; height:8px; border-radius:50%; display:block; }
.ia-status.is-on { background:#dcfce7; color:#166534; }
.ia-status.is-on i { background:#16a34a; }
.ia-status.is-off { background:#f4f4f5; color:#71717a; }
.ia-status.is-off i { background:#a1a1aa; }
.ia-layout {
  display:grid; grid-template-columns:minmax(0, 1fr) 300px; gap:18px; align-items:start;
}
.ia-main, .ia-panel {
  background:#fff; border:1px solid var(--border); border-radius:20px;
  box-shadow:0 1px 2px rgba(16,35,63,.03);
}
.ia-main { padding:22px; }
.ia-panel { padding:18px; margin-bottom:14px; }
.ia-panel:last-child { margin-bottom:0; }
.ia-panel h3 {
  margin:0; font-family:var(--display); font-size:15px; letter-spacing:-.02em;
}
.ia-panel-hint { margin:6px 0 12px; font-size:12px; color:var(--muted); }
.ia-toggle {
  display:flex; align-items:center; gap:14px; padding:14px 16px;
  border:1px solid #dcfce7; border-radius:16px; background:#f0fdf4;
  cursor:pointer; margin-bottom:18px;
}
.ia-toggle input { position:absolute; opacity:0; pointer-events:none; }
.ia-switch {
  width:46px; height:28px; border-radius:999px; background:#d4d4d8;
  position:relative; flex-shrink:0; transition:background .2s;
}
.ia-switch i {
  position:absolute; top:3px; left:3px; width:22px; height:22px;
  border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.15);
  transition:transform .2s;
}
.ia-toggle input:checked + .ia-switch { background:#16a34a; }
.ia-toggle input:checked + .ia-switch i { transform:translateX(18px); }
.ia-toggle-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.ia-toggle-copy strong { font-size:14px; color:#0a0a0a; }
.ia-toggle-copy em { font-style:normal; font-size:12px; color:#71717a; }
.ia-prompt-head {
  display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px;
}
.ia-prompt-head .label { margin:0; }
.ia-chars { font-size:12px; color:#a1a1aa; }
.ia-chars b { color:#52525b; font-weight:700; }
.ia-textarea {
  min-height:280px; font-size:14px; line-height:1.55;
  border-radius:16px; resize:vertical;
}
.ia-actions {
  display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:16px;
}
.ia-actions-hint { font-size:12px; color:#a1a1aa; }
.ia-base {
  font-size:13px; line-height:1.5; color:#3f3f46;
  padding:12px; border-radius:12px; background:#fafafa; border:1px solid #f0f0f0;
  max-height:180px; overflow:auto;
}
.ia-tips { margin:12px 0 0; padding:0 0 0 18px; color:#52525b; font-size:13px; line-height:1.55; }
.ia-tips li { margin-bottom:8px; }
.ia-example pre {
  margin:12px 0 0; padding:12px; border-radius:12px; background:#0a0a0a; color:#e4e4e7;
  font-size:12px; line-height:1.5; white-space:pre-wrap; font-family:ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ===== Mobile — WhatsApp Android ===== */
@media (max-width: 980px) {
  html, body {
    height:100%;
    overscroll-behavior: none;
  }
  body.nav-inbox { background:#efeae2; }

  .app-shell {
    background:#fff;
  }
  .app-body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  .app-flash { margin:8px 10px 0; }

  /* Bottom tab bar */
  .rail {
    order:2;
    position:fixed; left:0; right:0; bottom:0; z-index:80;
    flex-direction:row;
    align-items:stretch;
    justify-content:space-around;
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    width:100%;
    padding: 4px 4px env(safe-area-inset-bottom, 0px);
    border-right:0;
    border-top:1px solid #e9edef;
    border-bottom:0;
    background:#fff;
    gap:0;
    overflow:visible;
    pointer-events:auto;
  }
  .rail .brand-mark { display:none !important; }
  .rail button.rail-more-btn { display:flex; }
  .rail a.rail-main,
  .rail button.rail-more-btn {
    width:auto; flex:1; height:auto; min-height:48px; max-width:none;
    border-radius:12px; padding:4px 2px 2px;
    display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
    color:#54656f; background:transparent; border:0;
  }
  .rail a.rail-main.active,
  .rail a.rail-main:hover,
  .rail button.rail-more-btn.active,
  .rail button.rail-more-btn:hover {
    background:transparent; color:#00a884;
  }
  .rail a.rail-main.active svg,
  .rail-more-btn.active svg { color:#00a884; }
  .rail-label {
    display:block; font-size:10px; font-weight:700; letter-spacing:-.01em; line-height:1.1;
  }

  .rail-extra {
    display:none;
    position:fixed;
    left:10px; right:10px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    width:auto; flex:none;
    background:#fff;
    border-radius:16px;
    padding:8px;
    box-shadow:0 12px 40px rgba(11,20,26,.22);
    z-index:82;
    pointer-events:auto;
    align-items:stretch;
    gap:2px;
    max-height: min(70vh, 420px);
    overflow:auto;
  }
  .rail-extra.is-open { display:flex; pointer-events:auto; }
  .rail-extra .spacer { display:none; }
  .rail-extra a,
  .rail-extra a.avatar-sm {
    width:100%; height:48px; min-height:48px; max-width:none;
    border-radius:12px; padding:0 14px;
    display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:14px;
    color:#111b21; background:transparent; font-size:15px; font-weight:600;
  }
  .rail-extra a .rail-label { display:block; font-size:15px; font-weight:600; color:inherit; }
  .rail-extra a.active { background:#f0fdf4; color:#008069; }
  .rail-extra a:hover { background:#f5f6f6; }
  .rail-extra a.avatar-sm {
    background:#fff; color:#111b21; border-radius:12px; margin-top:4px;
    border-top:1px solid #f0f2f5; padding-top:8px; height:56px;
  }
  .rail-extra .avatar-sm-ini {
    width:28px; height:28px; border-radius:50%; background:#111b21; color:#fff;
    font-size:11px; font-weight:800; display:grid; place-items:center; flex-shrink:0;
    overflow:hidden;
  }
  .rail-extra .avatar-sm-ini img { width:100%; height:100%; object-fit:cover; display:block; }
  .rail-extra .avatar-sm-ini.is-empty { background:#e4e4e7; }
  .rail-backdrop {
    display:none;
    position:fixed; inset:0; z-index:70;
    background:rgba(11,20,26,.4);
    pointer-events:auto;
  }
  .rail-backdrop.is-open,
  .rail-backdrop:not([hidden]) { display:block; }

  body:has(.app-main.is-chat-open) .rail,
  body:has(.app-main.is-chat-open) .rail-backdrop,
  body:has(.app-main.is-chat-open) .rail-extra { display:none !important; }
  body:has(.app-main.is-chat-open) .app-body { padding-bottom:0; }
  body:has(.app-main.is-chat-open) .support-banner { display:none; }

  /* Inbox: one screen at a time */
  .app-main {
    display:flex; flex-direction:column;
    height:100%; min-height:0; flex:1;
    grid-template-columns:none;
    grid-template-rows:none;
  }
  .app-main.is-list .chat { display:none !important; }
  .app-main.is-chat-open .panel { display:none !important; }
  .app-main.is-chat-open .chat {
    display:flex;
    position:fixed; top:0; left:0; right:0; bottom:auto;
    z-index:50; width:100%;
    height:100dvh; height:100svh;
    max-height:100%;
  }
  .panel {
    max-height:none; height:100%; min-height:0; flex:1;
    border-right:0; background:#fff;
  }

  /* List header — WhatsApp green */
  .nav-inbox .panel-head {
    background:#008069;
    color:#fff;
    padding:10px 12px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    min-height:56px;
  }
  .nav-inbox .panel-head h1 {
    color:#fff; font-size:1.35rem; font-family:var(--font); font-weight:700;
    letter-spacing:-.02em;
  }
  .btn-nova-ico { display:block; }
  .nav-inbox .panel-head .btn-nova {
    position:fixed;
    right:16px;
    bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    width:56px; height:56px; padding:0; border-radius:50%;
    background:#00a884; color:#fff;
    box-shadow:0 4px 12px rgba(0,168,132,.4);
    z-index:25;
    display:grid; place-items:center; gap:0;
  }
  .nav-inbox .panel-head .btn-nova:hover { background:#008f72; transform:none; }
  .nav-inbox .panel-head .btn-nova .btn-nova-ico { width:26px; height:26px; }
  .nav-inbox .btn-nova-txt { display:none; }
  .app-main.is-chat-open .btn-nova { display:none !important; }

  .search-wrap { padding:8px 12px 10px; background:#fff; }
  .search-wrap .input {
    background:#f0f2f5; border:0; border-radius:999px; height:42px;
    padding:10px 16px 10px 40px; font-size:16px;
  }
  .search-wrap .icon {
    left:26px; right:auto; font-size:16px;
  }
  .search-wrap .input { padding-right:16px; }

  .tabs {
    padding:0 12px 10px; gap:8px; border-bottom:0; background:#fff;
    scrollbar-width:none;
  }
  .tabs::-webkit-scrollbar { display:none; }
  .tabs a {
    flex:0 0 auto; padding:8px 14px; border-radius:999px; border-bottom:0;
    background:#f0f2f5; color:#54656f; font-size:13px; font-weight:700;
  }
  .tabs a.active {
    background:#d9fdd3; color:#075e54; border-bottom:0;
  }

  .conv-list {
    background:#fff; -webkit-overflow-scrolling:touch;
    padding-bottom: 88px;
  }
  .conv-item { border-bottom:1px solid #f0f2f5; }
  .conv-item:hover, .conv-item.active {
    background:#f5f6f6; box-shadow:none;
  }
  .conv-item.active { background:#f0f2f5; }
  .conv-link {
    grid-template-columns:56px 1fr auto;
    gap:12px; padding:12px 44px 12px 14px;
    align-items:center; min-height:72px;
  }
  .conv-item .av { width:52px; height:52px; font-size:16px; }
  .conv-name { font-size:16px; font-weight:600; letter-spacing:-.01em; }
  .conv-preview { max-width:none; font-size:14px; margin-top:3px; color:#667781; }
  .conv-meta { font-size:12px; padding-top:2px; }
  .unread {
    background:#25d366; color:#fff; min-width:20px; height:20px; border-radius:10px;
    font-size:11px; margin-top:4px;
  }
  .conv-more {
    opacity:1; width:36px; height:36px; top:50%; right:6px; transform:translateY(-50%);
    color:#667781; font-size:20px;
  }
  .tag-pill { font-size:10px; padding:2px 8px; border-radius:999px; }

  /* Chat — fullscreen WhatsApp */
  .chat { background:#efeae2; }
  .chat-back {
    display:grid; place-items:center;
    width:40px; height:40px; margin-left:-8px; flex-shrink:0;
    color:#fff; border-radius:50%;
  }
  .chat-head {
    background:#008069; color:#fff; border-bottom:0;
    padding:6px 8px 8px;
    padding-top: calc(6px + env(safe-area-inset-top, 0px));
    min-height: calc(56px + env(safe-area-inset-top, 0px));
    gap:6px;
  }
  .chat-head .left { gap:8px; }
  .chat-head .av { width:40px; height:40px; }
  .chat-head-meta strong { color:#fff; font-size:16px; font-weight:600; }
  .chat-head-sub { margin-top:1px; gap:6px; }
  .chat-phone { color:rgba(255,255,255,.82); font-size:12px; }
  .chat-st {
    background:rgba(255,255,255,.18); color:#fff; font-weight:700;
    padding:2px 8px;
  }
  .chat-st-wait { background:rgba(251,191,36,.35); color:#fff; }
  .chat-st-live { background:rgba(255,255,255,.22); color:#fff; }
  .chat-st-done { background:rgba(255,255,255,.14); color:#e2e8f0; }
  .chat-ico-btn { color:#fff; width:42px; height:42px; }
  .chat-ico-btn:hover { background:rgba(255,255,255,.12); color:#fff; }
  .chat-more-menu { top:calc(100% + 4px); }

  .messages {
    padding:8px 8px 12px;
    gap:4px;
    background-color:#efeae2;
    background-image:
      radial-gradient(circle at 18% 22%, rgba(0,0,0,.035) 1.2px, transparent 1.4px),
      radial-gradient(circle at 78% 64%, rgba(0,0,0,.03) 1px, transparent 1.2px);
    background-size: 42px 42px, 56px 56px;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }
  .msg-avatar { display:none !important; }
  .msg-row { gap:0; max-width:100%; }
  .msg-row.in { justify-content:flex-start; }
  .msg-row.out { justify-content:flex-end; }
  .bubble {
    max-width:82%; padding:6px 8px 4px 9px; border-radius:8px;
    font-size:14.5px; line-height:1.4;
    box-shadow:0 1px 0.5px rgba(11,20,26,.13);
  }
  .bubble.in {
    background:#fff; border-bottom-left-radius:2px;
  }
  .bubble.out {
    background:#d9fdd3; border-bottom-right-radius:2px;
  }
  .bubble .time {
    font-size:11px; margin-top:2px; opacity:.85;
  }
  .bubble-media img, .bubble-video { max-width:min(240px, 72vw); }

  .chat-tagbar {
    padding:6px 10px;
    background:#f0f2f5; border-top:0;
  }
  .chat-tag-btn {
    padding:6px 10px; font-size:12px;
  }

  .wa-composer {
    background:#f0f2f5; border-top:0;
    padding:6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .wa-icon-btn { width:40px; height:40px; }
  .wa-input-wrap {
    min-height:42px; border-radius:24px;
  }
  .wa-input-wrap textarea {
    font-size:16px; min-height:32px; max-height:100px;
  }
  .wa-send {
    width:48px; height:48px; background:#00a884;
    box-shadow:0 1px 3px rgba(0,0,0,.18);
  }
  .wa-composer:not(.has-draft) .wa-send { display:none; }
  .wa-composer.has-draft .wa-mic { display:none; }
  .wa-emoji-pop {
    left:8px; right:8px; width:auto; bottom:70px;
    grid-template-columns:repeat(8, 1fr);
  }

  .empty-chat { display:none; }

  .page {
    padding:16px 14px calc(24px + env(safe-area-inset-bottom, 0px));
  }

  .nova-modal {
    width:100vw; max-width:100vw; height:100dvh; height:100svh;
    max-height:100dvh; border-radius:0; margin:0;
  }
  .nova-shell {
    border-radius:0; height:100%; min-height:100%;
    display:flex; flex-direction:column;
    box-shadow:none;
  }
  .nova-head {
    background:#008069; color:#fff;
    padding:14px 16px 12px;
    padding-top: calc(14px + env(safe-area-inset-top, 0px));
    align-items:center;
  }
  .nova-eyebrow { color:#d9fdd3; }
  .nova-head h3 { color:#fff; font-size:1.25rem; }
  .nova-head-copy p { color:rgba(255,255,255,.8); }
  .nova-close { background:transparent; border-color:rgba(255,255,255,.25); color:#fff; }
  .nova-list { flex:1; max-height:none; }
  .nova-manual { padding:10px 16px calc(12px + env(safe-area-inset-bottom, 0px)); }

  .ctx-menu { max-width: min(280px, calc(100vw - 16px)); }
}

@media (max-width: 980px) {
  .rail a.rail-main svg, .rail-more-btn svg { display:block; width:22px; height:22px; }
  .btn, .chat-ico-btn, .wa-icon-btn, .conv-more, .tabs a, .conv-link {
    touch-action: manipulation;
  }
}
