:root {
  color-scheme: dark;
  --bg: #080e19;
  --surface: #101827;
  --surface-raised: #131e30;
  --surface-soft: #0d1522;
  --line: #243147;
  --line-strong: #31415b;
  --text: #f2f6fc;
  --muted: #95a3b8;
  --muted-2: #718198;
  --blue: #67a0ff;
  --blue-strong: #397cf0;
  --green: #52d6a0;
  --yellow: #f0bf62;
  --red: #ff7888;
  --purple: #ad95ff;
  --radius: 18px;
  --shadow: 0 18px 48px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 80% -15%, rgba(37, 91, 167, .13), transparent 34%),
    var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(103, 160, 255, .55);
  outline-offset: 2px;
}

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 5;
  display: flex;
  width: 250px;
  flex-direction: column;
  padding: 22px 15px 14px;
  border-right: 1px solid rgba(126, 148, 180, .13);
  background: linear-gradient(180deg, #0b1321 0%, #09111d 100%);
  transition: transform .2s ease;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 30px;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -.45px;
}
.brand-mark {
  display: inline-grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 13px;
  background: linear-gradient(145deg, #67a0ff, #2865df);
  box-shadow: 0 8px 24px rgba(36, 101, 220, .28);
  color: white;
  font-size: 11px;
  font-weight: 850;
}
.side-caption {
  padding: 11px 12px 7px;
  color: #687890;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 1.45px;
}
.nav-link {
  position: relative;
  display: flex;
  height: 41px;
  align-items: center;
  gap: 12px;
  margin: 2px 0;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #aab6c8;
  font-size: 13px;
  font-weight: 540;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.nav-link:hover { background: rgba(255,255,255,.045); color: #f3f7fd; }
.nav-link.active {
  border-color: rgba(79, 139, 239, .2);
  background: linear-gradient(100deg, rgba(47, 102, 190, .25), rgba(29, 54, 91, .34));
  color: #8eb8ff;
  box-shadow: inset 2px 0 #6da3ff;
}
.nav-icon { width: 18px; color: #8595ac; font-size: 16px; text-align: center; }
.nav-link.active .nav-icon { color: #85b2ff; }
.sidebar-bottom { margin-top: auto; }
.profile { display: flex; align-items: center; gap: 10px; padding: 15px 7px 12px; border-top: 1px solid rgba(126, 148, 180, .15); }
.profile strong, .profile small { display: block; }
.profile strong { max-width: 162px; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.profile small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(103,160,255,.14); border-radius: 50%; background: #1b3458; color: #a5c7ff; font-weight: 750; }
.avatar.small { width: 34px; height: 34px; }
.logout { width: 100%; padding: 10px 8px; border: 0; background: transparent; color: #98a6ba; text-align: left; }
.logout:hover { color: #fff; }
.logout span { float: right; }
.version { padding: 10px 8px; color: #64748a; font-size: 10px; }

.main-area { display: flex; min-height: 100vh; flex-direction: column; margin-left: 250px; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 38px;
  border-bottom: 1px solid rgba(126, 148, 180, .13);
  background: rgba(9, 15, 26, .89);
  backdrop-filter: blur(18px);
}
.breadcrumb { color: #8291a7; font-size: 11px; }
.breadcrumb span { padding: 0 7px; color: #51627a; }
.topbar h1 { margin: 5px 0 0; font-size: 21px; font-weight: 720; letter-spacing: -.45px; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.today-pill { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.02); color: #b2bfd0; font-size: 11px; font-variant-numeric: tabular-nums; }
.icon-btn { display: none; }
.content { width: min(1520px, 100%); flex: 1; margin: 0 auto; padding: 32px 38px 64px; }
.welcome-row, .section-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.welcome-row h2, .section-row h2 { margin: 2px 0 5px; font-size: 23px; font-weight: 730; letter-spacing: -.6px; line-height: 1.24; }
.eyebrow { margin: 0 0 8px; color: #7aaaff; font-size: 9px; font-weight: 780; letter-spacing: 1.55px; }
.muted, .section-row p { margin: 4px 0; color: var(--muted); font-size: 12px; }

.primary, .secondary, .danger {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  transition: transform .16s ease, filter .16s ease, border-color .16s ease;
}
.primary { background: linear-gradient(135deg, #4489f3, #2e6fe0); color: #fff; box-shadow: 0 7px 18px rgba(38, 101, 214, .22); }
.primary:hover, .secondary:hover, .danger:hover { filter: brightness(1.12); transform: translateY(-1px); }
.secondary { border-color: #2b3a51; background: #172337; color: #c5d0df; }
.danger { border-color: #58303b; background: #341e29; color: #ffa0a8; }
.button-link { min-height: 40px; }
.wide { width: 100%; min-height: 46px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card, .mini-metric, .panel {
  border: 1px solid rgba(121, 146, 181, .16);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 29, 46, .98), rgba(13, 21, 34, .98));
  box-shadow: 0 8px 28px rgba(0, 0, 0, .12);
}
.metric-card { position: relative; min-height: 148px; padding: 19px; }
.metric-icon { display: grid; width: 35px; height: 35px; place-items: center; margin-bottom: 14px; border: 1px solid rgba(103,160,255,.13); border-radius: 11px; background: #172a47; color: #82b0ff; font-size: 17px; }
.metric-icon.green { background: #12332d; color: var(--green); }
.metric-icon.amber { background: #352b1a; color: var(--yellow); }
.metric-icon.red { background: #38202a; color: var(--red); }
.metric-card p { margin: 0; color: #aebacd; font-size: 12px; }
.metric-card strong { display: block; margin: 5px 0; font-size: 24px; font-weight: 740; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.metric-card small { color: var(--muted-2); font-size: 10px; }
.secondary.metric-grid { margin-top: 12px; }
.mini-metric { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; color: var(--muted); font-size: 11px; }
.mini-metric strong { color: #eaf0f8; font-size: 15px; font-variant-numeric: tabular-nums; }
.dashboard-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin: 16px 0; }
.panel { min-width: 0; margin: 14px 0; padding: 22px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-head h3 { margin: 0; font-size: 14px; font-weight: 720; letter-spacing: -.15px; }
.panel-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.chart-panel canvas { display: block; width: 100%; max-height: 225px; }
.legend { display: flex; align-items: center; gap: 6px; color: #9aa9bc; font-size: 10px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.dot.purple { background: var(--purple); }
.quick-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(126, 148, 180, .13); }
.quick-item:first-of-type { border-top: 0; }
.quick-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: #183052; color: #9bc0ff; font-style: normal; }
.quick-icon.green { background: #15342e; color: var(--green); }
.quick-icon.amber { background: #342b1b; color: var(--yellow); }
.quick-item span { flex: 1; }
.quick-item b, .quick-item small { display: block; }
.quick-item b { font-size: 12px; }
.quick-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.quick-item em { color: #8090a8; font-style: normal; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; white-space: nowrap; }
th { padding: 12px; border-bottom: 1px solid var(--line); color: #8797ad; font-size: 10px; font-weight: 700; text-align: left; }
td { padding: 13px 12px; border-bottom: 1px solid rgba(126, 148, 180, .12); color: #cbd5e2; }
td b { font-weight: 650; }
td small { display: block; margin-top: 4px; color: #8190a5; font-size: 10px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: #15352e; color: #6ee0ac; font-size: 10px; font-weight: 680; white-space: nowrap; }
.badge.due { background: #3a301b; color: #f0c872; }
.badge.overdue { background: #3a2029; color: #ff8d99; }
.badge.suspended { background: #25303f; color: #b0bdcd; }
.badge.active { background: #15352e; color: #6ee0ac; }
.text-link, .table-action { color: #84b2ff; font-size: 11px; }
.table-action { border: 0; background: none; }
.actions { display: flex; align-items: center; gap: 9px; }
.action-menu { position: relative; }
.action-menu summary { color: #9baabd; cursor: pointer; list-style: none; }
.action-menu > div { position: absolute; top: 22px; right: 0; z-index: 2; width: 220px; padding: 11px; border: 1px solid var(--line-strong); border-radius: 13px; background: #142033; box-shadow: var(--shadow); }
.action-menu form { margin: 5px 0; }
.action-menu label { display: block; color: #a5b3c6; font-size: 10px; }
.action-menu input { width: 100%; margin: 4px 0 7px; }
.empty-state { padding: 38px 20px; color: var(--muted); font-size: 12px; text-align: center; }
.empty-state div { margin-bottom: 8px; color: #72dcb1; font-size: 25px; }
.empty-state b { display: block; color: #e0e8f3; font-size: 13px; }
.empty-state p { margin: 6px; }
.count-pill { padding: 4px 8px; border-radius: 99px; background: #1d2d45; color: #a8c5f5; font-size: 10px; font-weight: 600; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid label, .login-panel label, .install-card label { display: block; color: #b5c1d1; font-size: 11px; font-weight: 650; }
.form-grid input, .form-grid textarea, .form-grid select, .inline-form input, .inline-form select,
.filters input, .filters select, .action-menu input, .login-panel input, .install-card input {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #2b3a51;
  border-radius: 10px;
  outline: none;
  background: #0b1422;
  color: #edf3fb;
  font-size: 12px;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.form-grid input::placeholder, .inline-form input::placeholder, .filters input::placeholder { color: #71829a; opacity: 1; }
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus,
.inline-form input:focus, .inline-form select:focus, .filters input:focus, .filters select:focus {
  border-color: #5995f2;
  background: #0d192a;
  box-shadow: 0 0 0 3px rgba(74, 137, 238, .16);
}
.form-grid textarea { min-height: 88px; resize: vertical; }
.span-2 { grid-column: span 2; }
.check-label { display: flex !important; align-items: center; gap: 9px !important; color: #b2bece !important; }
.check-label input { width: auto !important; min-height: auto !important; margin: 0 !important; accent-color: var(--blue-strong); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-form > * { min-width: 120px; flex: 1; }
.inline-form input, .inline-form select { margin: 0; }
.filters { display: flex; align-items: center; gap: 9px; }
.filters input { width: 230px; margin: 0; }
.filters select { width: 145px; margin: 0; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan-card { margin: 0; }
.plan-card h3 { margin: 17px 0 4px; font-size: 16px; }
.plan-card p, .plan-card small { display: block; color: var(--muted); font-size: 11px; }
.plan-card strong { display: block; margin: 12px 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.finance-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 14px 0; }
.finance-summary .panel, .finance-summary > div { margin: 0; padding: 18px; border: 1px solid rgba(121, 146, 181, .16); border-radius: 16px; background: #111b2b; }
.finance-summary span, .finance-summary b { display: block; }
.finance-summary span { margin-bottom: 9px; color: var(--muted); font-size: 11px; }
.finance-summary b { font-size: 19px; font-variant-numeric: tabular-nums; }
.positive { color: var(--green); }
.negative { color: var(--red); }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }
.qr-image { display: block; width: min(245px, 100%); margin: 20px auto; padding: 12px; border-radius: 14px; background: #fff; }
.api-response { max-height: 190px; overflow: auto; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #080f19; color: #a8b7cb; font-size: 10px; white-space: pre-wrap; word-break: break-word; }
.alert { margin: 10px 0 15px; padding: 12px 14px; border-radius: 11px; font-size: 12px; }
.alert.ok { border: 1px solid #205c49; background: #12352e; color: #84e3b9; }
.alert.error { border: 1px solid #633440; background: #3b2028; color: #ffabb2; }
.app-footer { padding: 16px 38px; border-top: 1px solid rgba(126, 148, 180, .13); color: #74839a; font-size: 10px; }
.app-footer span { padding: 0 6px; }
.audit-line { padding: 9px 0; border-bottom: 1px solid var(--line); color: #95a3b8; font-size: 11px; }
.check-list { display: flex; flex-wrap: wrap; gap: 12px; padding: 13px; border: 1px solid rgba(121, 146, 181, .12); border-radius: 12px; background: #0b1422; }
.pix-panel { align-self: start; }
hr { margin: 23px 0; border: 0; border-top: 1px solid var(--line); }

/* WhatsApp / Evolution: clearer setup steps, status and technical details */
.connection-heading { margin-bottom: 20px; }
.connection-heading h2 { font-size: 25px; }
.connection-subtitle { max-width: 660px; line-height: 1.65; }
.connection-status { padding: 8px 12px; font-size: 11px; }
.connection-status .dot { box-shadow: 0 0 0 4px rgba(255,255,255,.035); }
.whatsapp-layout { grid-template-columns: minmax(0, 1.3fr) minmax(320px, .8fr); align-items: stretch; gap: 18px; margin: 0 0 18px; }
.whatsapp-panel { margin: 0; padding: 24px; }
.whatsapp-panel-head { align-items: center; margin-bottom: 23px; }
.panel-title-wrap { display: flex; min-width: 0; align-items: center; gap: 13px; }
.panel-symbol { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid rgba(103,160,255,.17); border-radius: 13px; background: linear-gradient(145deg, #1a3456, #14233a); color: #96bcff; font-size: 18px; }
.panel-step { padding: 6px 9px; border: 1px solid rgba(121,146,181,.16); border-radius: 99px; color: #91a0b5; font-size: 9px; font-weight: 750; letter-spacing: .6px; white-space: nowrap; }
.whatsapp-form { gap: 16px 14px; }
.whatsapp-form label { color: #bdc9d9; font-size: 11px; }
.whatsapp-form input, .whatsapp-form select { min-height: 44px; }
.field-help { display: block; margin-top: 6px; color: #7989a0; font-size: 10px; font-weight: 450; }
.whatsapp-save { min-width: 170px; }
.connection-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(126,148,180,.14); }
.connection-actions button { min-height: 40px; }
.connection-state-panel { display: flex; flex-direction: column; }
.connection-state-body { display: flex; min-height: 280px; flex: 1; flex-direction: column; align-items: center; justify-content: center; padding: 25px 22px; border: 1px dashed rgba(121,146,181,.25); border-radius: 15px; background: radial-gradient(ellipse at 50% 35%, rgba(35,78,127,.15), transparent 65%), rgba(8,15,25,.48); text-align: center; }
.connection-orb { position: relative; display: grid; width: 66px; height: 66px; place-items: center; margin-bottom: 19px; border: 1px solid rgba(103,160,255,.28); border-radius: 22px; background: linear-gradient(145deg, rgba(43,91,151,.32), rgba(23,43,70,.56)); box-shadow: 0 0 0 8px rgba(77,132,208,.045); }
.connection-orb::before { position: absolute; inset: 9px; border: 1px solid rgba(125,174,242,.18); border-radius: 17px; content: ""; }
.connection-orb-core { z-index: 1; width: 13px; height: 13px; border: 3px solid #aecfff; border-radius: 50%; background: #4d8df0; box-shadow: 0 0 16px rgba(77,141,240,.58); }
.connection-success .connection-orb { border-color: rgba(82,214,160,.3); background: linear-gradient(145deg, rgba(32,117,89,.28), rgba(20,55,48,.55)); }
.connection-success .connection-orb-core { border-color: #b3f4d8; background: var(--green); box-shadow: 0 0 16px rgba(82,214,160,.55); }
.connection-kicker { margin-bottom: 6px; color: #7e9cc6; font-size: 9px; font-weight: 800; letter-spacing: 1.3px; }
.connection-state-body h4 { margin: 0 0 7px; color: #eaf1fa; font-size: 16px; font-weight: 720; letter-spacing: -.2px; }
.connection-state-body p { max-width: 300px; margin: 0; color: #91a0b5; font-size: 11px; line-height: 1.7; }
.qr-stage { display: flex; min-height: 280px; flex-direction: column; align-items: center; justify-content: center; padding: 18px; border: 1px solid rgba(121,146,181,.16); border-radius: 15px; background: rgba(8,15,25,.5); text-align: center; }
.qr-stage .qr-image { width: min(220px, 100%); margin: 0 auto 14px; }
.qr-stage strong { display: block; color: #edf3fb; font-size: 13px; }
.qr-stage p { max-width: 270px; margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.api-response-details { margin-top: 13px; border: 1px solid rgba(121,146,181,.13); border-radius: 11px; background: rgba(8,15,25,.55); }
.api-response-details summary { padding: 10px 12px; color: #91a1b7; cursor: pointer; font-size: 10px; font-weight: 650; }
.api-response-details[open] summary { border-bottom: 1px solid rgba(121,146,181,.13); }
.api-response-details .api-response { max-height: 150px; margin: 10px; }
.whatsapp-test-panel { margin-top: 0; }
.whatsapp-test-panel .panel-head { margin-bottom: 15px; }
.whatsapp-test-form { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.6fr) auto; align-items: end; gap: 12px; }
.whatsapp-test-form input { min-height: 43px; }
.whatsapp-test-form button { min-width: 170px; }

/* Login and first-run installer */
.login-page { display: grid; min-height: 100vh; grid-template-columns: 1.1fr .9fr; background: #070d17; }
.login-art { display: flex; flex-direction: column; justify-content: space-between; padding: 40px 7vw; border-right: 1px solid #233149; background: radial-gradient(ellipse at 75% 25%, #173d78 0, transparent 40%), radial-gradient(ellipse at 20% 90%, #102548 0, transparent 44%), linear-gradient(145deg, #0e1a30, #080e1a 70%); }
.login-brand { display: flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 800; }
.login-art h1 { max-width: 550px; margin: 0 0 15px; font-size: clamp(32px, 4vw, 56px); font-weight: 800; letter-spacing: -2px; line-height: 1.15; }
.login-art p:not(.eyebrow) { color: #a1b3ce; font-size: 14px; }
.login-meta { color: #7189a8; font-size: 11px; }
.login-panel { display: flex; width: 100%; max-width: 650px; flex-direction: column; justify-content: center; margin: auto; padding: 8vw; }
.login-panel section { width: 100%; max-width: 370px; margin: auto; }
.login-panel h2 { margin: 5px 0; font-size: 27px; font-weight: 740; letter-spacing: -.6px; }
.login-panel form { margin-top: 25px; }
.login-panel label { margin: 15px 0; }
.login-panel input { min-height: 46px; padding: 12px; }
.login-foot { margin-top: 19px; color: #8593a8; font-size: 11px; }
.login-foot a { color: #8db7ff; }
.login-panel footer { color: #67768d; font-size: 10px; }
.login-mobile-brand { display: none; }
.install { display: grid; min-height: 100vh; place-items: center; background: radial-gradient(ellipse at top, #173665 0, transparent 50%), var(--bg); }
.install-card { width: min(470px, calc(100% - 30px)); padding: 32px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(145deg, #121e30, #0e1726); box-shadow: var(--shadow); }
.install-card h1 { margin: 8px 0; font-size: 24px; }
.install-card > p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.install-card form { margin: 20px 0; }
.install-card label { margin: 13px 0; }
.install-card input { min-height: 44px; padding: 12px; }
.install-card .muted { font-size: 10px; }

@media (max-width: 1100px) {
  .sidebar { width: 224px; }
  .main-area { margin-left: 224px; }
  .content { padding: 27px 25px 54px; }
  .topbar { padding: 16px 25px; }
  .metric-card { padding: 16px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 0; }
  .whatsapp-layout { grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 14px; }
  .filters { flex-wrap: wrap; }
  .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .whatsapp-layout { grid-template-columns: 1fr; }
  .connection-state-body, .qr-stage { min-height: 240px; }
}
@media (max-width: 760px) {
  .sidebar { width: 270px; transform: translateX(-100%); box-shadow: 15px 0 40px rgba(0,0,0,.55); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin: 0; }
  .topbar { min-height: 76px; gap: 11px; padding: 11px 15px; }
  .topbar h1 { font-size: 18px; }
  .icon-btn { display: block; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #121e2e; color: #fff; }
  .today-pill { display: none; }
  .content { padding: 22px 15px 44px; }
  .welcome-row, .section-row { align-items: flex-start; flex-direction: column; }
  .welcome-row .button-link { align-self: stretch; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .metric-card { min-height: 137px; padding: 14px; }
  .metric-card strong { font-size: 20px; }
  .secondary.metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-metric { display: block; padding: 12px; }
  .mini-metric strong { display: block; margin-top: 7px; }
  .panel { margin: 11px 0; padding: 17px; border-radius: 15px; }
  .panel-head { flex-direction: column; }
  .whatsapp-panel-head { flex-direction: row; align-items: center; }
  .whatsapp-panel { padding: 18px; }
  .connection-heading { gap: 12px; }
  .connection-heading h2 { font-size: 21px; }
  .connection-status { align-self: flex-start; }
  .whatsapp-form { grid-template-columns: 1fr; }
  .whatsapp-form .span-2 { grid-column: auto; }
  .connection-actions { grid-template-columns: 1fr; }
  .connection-actions button { width: 100%; }
  .whatsapp-test-form { grid-template-columns: 1fr; }
  .whatsapp-test-form button { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .filters { width: 100%; }
  .filters input { width: 100%; flex: 1; }
  .filters select { width: auto; flex: 1; }
  .inline-form { align-items: stretch; }
  .inline-form > * { min-width: 100%; }
  .plan-grid { grid-template-columns: 1fr; }
  .finance-summary { grid-template-columns: 1fr; }
  .finance-summary .panel { margin: 0; }
  .chart-panel .panel-head { gap: 9px; }
  .legend { font-size: 9px; }
  .app-footer { padding: 14px; }
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { width: 100%; max-width: none; min-height: 100vh; padding: 25px; }
  .login-panel section { max-width: 430px; }
  .login-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 46px; font-size: 15px; font-weight: 800; }
  .login-panel footer { margin-top: auto; }
  .toolbar-actions > * { flex: 1; }
  .table-wrap { margin: 0 -5px; }
  table { min-width: 600px; }
  .app-footer { font-size: 9px; }
}
@media (max-width: 420px) {
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 124px; }
  .secondary.metric-grid { grid-template-columns: 1fr 1fr; }
  .whatsapp-panel-head { align-items: flex-start; }
  .panel-step { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  body { background: #fff; color: #111; }
  .sidebar, .topbar, .quick-panel, .button-link, button, .filters, .actions { display: none !important; }
  .main-area { margin: 0; }
  .content { padding: 0; }
  .panel, .metric-card { border: 1px solid #ddd; background: #fff; color: #111; break-inside: avoid; }
  .panel-head p, .muted, td, th, .metric-card p { color: #444; }
  .app-footer { color: #555; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Account access and first-run registration */
.auth-page {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(330px, .88fr) minmax(500px, 1.12fr);
  background: #080e19;
}
.auth-story {
  position: relative;
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 38px clamp(30px, 5.2vw, 84px);
  border-right: 1px solid rgba(126, 148, 180, .14);
  background:
    radial-gradient(ellipse at 74% 24%, rgba(55, 122, 225, .25), transparent 42%),
    radial-gradient(ellipse at 15% 88%, rgba(34, 84, 154, .2), transparent 42%),
    linear-gradient(145deg, #0e1b31 0%, #09111e 75%);
}
.auth-story::after {
  position: absolute;
  right: -105px;
  bottom: 11%;
  width: 330px;
  height: 330px;
  border: 1px solid rgba(138, 181, 246, .1);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(138,181,246,.025), 0 0 0 70px rgba(138,181,246,.018);
  content: "";
  pointer-events: none;
}
.auth-brand { position: relative; z-index: 1; display: inline-flex; width: fit-content; align-items: center; gap: 11px; font-size: 16px; font-weight: 780; letter-spacing: -.4px; }
.auth-promise { position: relative; z-index: 1; max-width: 510px; margin: 48px 0; }
.auth-overline { margin: 0 0 13px; color: #8ab5ff; font-size: 9px; font-weight: 800; letter-spacing: 1.7px; }
.auth-promise h1 { max-width: 510px; margin: 0; color: #f3f7fd; font-size: clamp(34px, 4.2vw, 58px); font-weight: 780; letter-spacing: -2.5px; line-height: 1.07; }
.auth-promise > p:not(.auth-overline) { max-width: 400px; margin: 18px 0 0; color: #aabbd2; font-size: 14px; line-height: 1.7; }
.auth-benefits { display: grid; gap: 13px; margin-top: 30px; color: #c3d0e1; font-size: 12px; }
.auth-benefits span { display: flex; align-items: center; gap: 10px; }
.auth-benefits i { display: grid; width: 21px; height: 21px; place-items: center; border: 1px solid rgba(82,214,160,.2); border-radius: 50%; background: rgba(40,125,92,.17); color: #73deb0; font-size: 11px; font-style: normal; }
.auth-story-foot { position: relative; z-index: 1; margin: 0; color: #7186a3; font-size: 11px; }
.auth-main { display: grid; min-width: 0; place-items: center; padding: 40px clamp(20px, 5vw, 74px); }
.auth-card { width: min(470px, 100%); padding: 36px; border: 1px solid rgba(126,148,180,.18); border-radius: 22px; background: linear-gradient(145deg, rgba(18,29,46,.97), rgba(12,20,33,.98)); box-shadow: 0 26px 75px rgba(0,0,0,.3); }
.auth-card-wide { width: min(560px, 100%); padding: 31px 34px; }
.auth-card-locked { width: min(470px, 100%); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 29px; padding: 4px; border: 1px solid rgba(126,148,180,.15); border-radius: 12px; background: #0a1320; }
.auth-tab { display: flex; min-height: 38px; align-items: center; justify-content: center; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; color: #8e9db2; font-size: 12px; font-weight: 650; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.auth-tab:hover { color: #eaf1fa; }
.auth-tab.active { border-color: rgba(121,160,222,.17); background: #1b2a40; color: #eff5ff; box-shadow: 0 3px 10px rgba(0,0,0,.17); }
.auth-card .eyebrow { margin-bottom: 7px; }
.auth-card h2 { margin: 0; color: var(--text); font-size: 25px; font-weight: 750; letter-spacing: -.65px; }
.auth-card-copy { margin: 7px 0 22px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.auth-form { display: grid; gap: 15px; margin-top: 22px; }
.auth-form label { display: block; min-width: 0; color: #bac7d8; font-size: 11px; font-weight: 650; }
.auth-form input { width: 100%; min-height: 44px; margin-top: 7px; padding: 11px 12px; border: 1px solid #2b3a51; border-radius: 10px; outline: none; background: #0a1422; color: #eef4fc; font-size: 12px; transition: border-color .16s ease, box-shadow .16s ease, background .16s ease; }
.auth-form input::placeholder { color: #71829a; }
.auth-form input:focus { border-color: #5995f2; background: #0d192a; box-shadow: 0 0 0 3px rgba(74,137,238,.16); }
.auth-form .auth-full { grid-column: 1 / -1; }
.auth-signup-form { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px 14px; margin-top: 18px; }
.auth-signup-form input { min-height: 42px; }
.password-advice { margin: -2px 0 0; color: #8595aa; font-size: 10px; line-height: 1.55; }
.auth-submit { min-height: 46px; margin-top: 4px; font-size: 13px; }
.auth-note { margin-top: 22px; padding: 14px 15px; border: 1px solid rgba(121,146,181,.14); border-radius: 12px; background: rgba(8,15,25,.52); }
.auth-note strong { color: #d8e2ef; font-size: 11px; }
.auth-note p { margin: 5px 0 0; color: #93a2b7; font-size: 10px; line-height: 1.65; }
.auth-note-compact { margin-top: 16px; color: #8d9bb0; font-size: 10px; line-height: 1.6; }
.auth-copyright { margin: 22px 0 0; color: #6f7f95; font-size: 10px; }
.auth-copyright span { padding: 0 4px; color: #45566e; }
.auth-login-link { margin-top: 20px; text-decoration: none; }
@media (max-width: 900px) {
  .auth-page { grid-template-columns: minmax(280px, .75fr) minmax(440px, 1.25fr); }
  .auth-story { padding: 30px 28px; }
  .auth-promise h1 { font-size: clamp(32px, 4vw, 45px); }
  .auth-main { padding: 28px; }
}
@media (max-width: 700px) {
  .auth-page { display: block; min-height: 100vh; }
  .auth-story { min-height: auto; padding: 18px 20px; border-right: 0; border-bottom: 1px solid rgba(126,148,180,.13); background: linear-gradient(120deg,#10203a,#0b1422); }
  .auth-story::after, .auth-promise, .auth-story-foot { display: none; }
  .auth-main { min-height: calc(100vh - 76px); padding: 22px 15px 35px; }
  .auth-card, .auth-card-wide { width: min(500px,100%); padding: 25px 20px; border-radius: 18px; }
  .auth-tabs { margin-bottom: 24px; }
  .auth-card h2 { font-size: 23px; }
}
@media (max-width: 430px) {
  .auth-signup-form { grid-template-columns: 1fr; }
  .auth-signup-form .auth-full { grid-column: auto; }
}


/* Professional dark-mode refinement: compact controls and restrained hierarchy. */
:root {
  --radius: 14px;
  --shadow: 0 14px 34px rgba(0, 0, 0, .22);
}
body {
  font-family: Inter, "Segoe UI Variable", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: .005em;
}
.topbar h1 { font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
.welcome-row h2, .section-row h2 { font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.panel-head h3 { font-size: 13px; font-weight: 650; letter-spacing: -.01em; }
.primary, .secondary, .danger {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 650;
  box-shadow: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.primary { border-color: #456b9e; background: #355b8e; box-shadow: 0 2px 8px rgba(24, 52, 91, .22); }
.primary:hover { border-color: #5b82b6; background: #41699d; filter: none; transform: none; }
.secondary { border-color: #34445c; background: #172337; }
.secondary:hover { border-color: #50617b; background: #1d2c42; filter: none; transform: none; }
.danger:hover { filter: brightness(1.08); transform: none; }
.button-link { min-height: 36px; }
.wide { min-height: 40px; }
.auth-submit { min-height: 40px; margin-top: 2px; font-size: 12px; }
.auth-card h2 { font-size: 23px; font-weight: 650; letter-spacing: -.03em; }
.auth-card-copy { font-size: 13px; }
.auth-form label { font-size: 12px; }
.auth-form input { min-height: 40px; font-size: 13px; }
.nav-link { height: 39px; border-radius: 9px; }
.metric-card, .mini-metric, .panel { border-radius: var(--radius); }
.panel { padding: 20px; }
@media (max-width: 760px) {
  .welcome-row .button-link { align-self: flex-start; width: auto; }
  .inline-form > button { width: auto; min-width: 0; flex: 0 0 auto; align-self: flex-start; }
  .auth-submit { width: 100%; }
}
/* Premium readability and message editor */
body {font-size:14px;line-height:1.65;}
.panel-head h3,.template-heading h3 {font-size:16px;font-weight:700;letter-spacing:-.025em;}
.panel-head p,.form-grid label {font-size:13px;}
.panel,.metric-card {border:1px solid #2a3950;box-shadow:0 8px 24px #0002;}
.metric-card {background:linear-gradient(145deg,#17243a,#101a2a);}
.primary {background:#2864d5;border-color:#4c82ec;color:#fff;}
.primary:hover {background:#3675e7;}
.form-grid input,.form-grid select,.form-grid textarea {font-size:14px;}
.alert {font-size:14px;font-weight:600;padding:14px 18px;}
.alert.ok:before {content:'✓ ';}.alert.error:before {content:'⚠ ';}
.template-intro h3,.template-heading h3 {margin:0;}.template-intro p {margin:4px 0 12px;color:var(--muted);}
.variable-list {display:flex;flex-wrap:wrap;gap:7px;}.variable-list code {padding:3px 8px;background:#172b44;border:1px solid #304968;border-radius:6px;color:#a8caff;font-size:12px;}
.template-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.template-card {min-width:0;padding:18px;border:1px solid #30405a;border-radius:14px;background:#101b2b;}
.template-heading {display:flex;align-items:center;gap:10px;margin-bottom:14px;}.template-heading>span {font-size:22px;}
.template-card textarea {min-height:230px;line-height:1.55;}.template-tools {display:flex;align-items:center;justify-content:space-between;gap:8px;margin:10px 0 18px;}.template-tools small,.preview-label {color:var(--muted);font-size:11px;}.preview-label {font-weight:700;letter-spacing:.06em;margin-bottom:8px;}
.message-preview {white-space:pre-wrap;overflow-wrap:anywhere;background:#163c35;border:1px solid #28564a;color:#e5f5ed;border-radius:12px 12px 3px 12px;padding:15px;font-size:13px;min-height:90px;}
.message-history {white-space:pre-wrap;overflow-wrap:anywhere;min-width:220px;max-width:420px;line-height:1.6;}
@media(max-width:900px){.template-grid{grid-template-columns:1fr;}}@media(max-width:600px){.template-card{padding:13px;}.template-tools{flex-wrap:wrap;}.panel{padding:15px;}}
.client-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:16px;margin-top:18px}.client-card{background:#0d1726;border:1px solid #2a3c55;border-radius:15px;padding:18px;min-width:0;overflow-wrap:anywhere}.client-top{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.client-top h3{font-size:16px;margin:0 0 5px}.client-top p,.client-card p{color:#91a6c0;font-size:12px;margin:4px 0}.client-info{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:16px 0}.client-info small{display:block;color:#91a6c0;margin-bottom:5px}.client-info b{font-size:13px}.client-buttons{display:flex;gap:10px;flex-wrap:wrap}.client-details{margin-top:14px;border-top:1px solid #26374e;padding-top:12px}.client-details summary{cursor:pointer;color:#9ebcf1;font-size:13px}.client-details form{margin-top:12px}.client-details label{display:block;color:#aebed3;font-size:12px;margin:8px 0}.client-details input:not([type=hidden]),.client-details select{display:block;width:100%;padding:10px;background:#101c2d;color:#e3edfa;border:1px solid #354b67;border-radius:8px;margin-top:5px}.filters{flex-wrap:wrap}.panel-head{flex-wrap:wrap}.client-details:not([open])> :not(summary){display:none!important}

/* V4 — unified responsive interface */
@media screen {
:root{--bg:#080d16;--surface:#111a29;--surface-raised:#172337;--line:#26364b;--muted:#a1b1c7;--radius:18px;--blue:#79afff}
body{background:radial-gradient(ellipse at 85% 0%,#14243e 0,transparent 42%),var(--bg);font-size:14px;line-height:1.55}
.sidebar{background:#0c1422;overflow-y:auto;overscroll-behavior:contain;padding-top:24px;scrollbar-width:thin}
.brand{font-size:18px;letter-spacing:-.6px}.brand-mark{width:44px;height:44px;font-size:14px;border-radius:14px}.side-caption{font-size:10px;color:#8b9bb1;margin-top:6px}.nav-link{min-height:42px;height:auto;padding:10px 12px;font-size:13px;flex-shrink:0}.nav-link.active{background:#1a3152;border-color:#31598b;color:#b8d5ff}.sidebar-bottom{padding-top:12px}
.topbar{background:#0c1422eF;border-bottom:1px solid #233247}.topbar h1{font-size:22px}.content{padding-top:32px}.section-row h2,.welcome-row h2{font-size:clamp(23px,3vw,30px);letter-spacing:-.045em}.section-row p,.welcome-row p{font-size:14px;color:var(--muted)}
.panel,.metric-card,.mini-metric{background:#111b2b;border:1px solid #29394f;box-shadow:0 8px 24px #0002}.panel{padding:24px;overflow:visible}.panel-head{align-items:center;gap:16px;margin-bottom:22px}.panel-head h3{font-size:18px}.panel-head p{font-size:13px}.metric-card{padding:22px;min-height:165px}.metric-card strong{font-size:clamp(22px,2.4vw,32px);letter-spacing:-1px;overflow-wrap:anywhere}.metric-card small,.mini-metric{font-size:12px}.metric-icon{width:42px;height:42px}.secondary.metric-grid{background:transparent;border:0;padding:0;display:grid;box-shadow:none}
.primary,.secondary,.danger{min-height:42px;padding:10px 15px;border-radius:10px;font-size:13px}.primary{background:#2866dc;border-color:#4784f0}.primary:hover{background:#3979ec}.secondary{background:#1a293d;border-color:#354a65}.danger{background:#39202c}.badge{font-size:11px;padding:6px 10px}.form-grid label,.client-details label{font-size:13px}.form-grid input,.form-grid select,.form-grid textarea,.inline-form input,.inline-form select,.filters input,.filters select,.client-details input:not([type=hidden]),.client-details select{min-height:44px;font-size:14px;border-radius:10px;background:#0b1422;border-color:#354760;color:#edf3fb}.filters{gap:10px;max-width:100%}.filters input{flex:1 1 210px;min-width:0}.filters select{flex:1 1 135px;min-width:0}.filters button{flex:0 0 auto}.table-wrap{border:1px solid #26364b;border-radius:12px}table{font-size:13px}th{background:#152237;font-size:11px}td{padding:15px 12px}tr:hover td{background:#172337}.action-menu>div{position:static;width:min(260px,100%);margin-top:8px;box-shadow:none}.action-menu:not([open])>div{display:none}
.client-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,330px),1fr));align-items:start;gap:18px}.client-card{padding:20px;background:#0d1726;border-radius:18px;border:1px solid #30445f;box-shadow:0 6px 18px #0002}.client-top{align-items:center}.client-top>div{min-width:0}.client-top h3{font-size:18px;line-height:1.3}.client-top p{font-size:13px}.client-info{background:#142135;border:1px solid #25374f;border-radius:12px;padding:15px;margin:18px 0;gap:18px 12px}.client-info>div{min-width:0}.client-info small{font-size:11px;letter-spacing:.02em}.client-info b{font-size:14px}.client-buttons>*{flex:1;min-width:0}.client-buttons button,.client-buttons>a{width:100%}.client-details{padding-top:14px}.client-details summary{padding:10px 12px;background:#16253a;border-radius:10px;font-weight:600;line-height:1.5}.client-details[open] summary{margin-bottom:14px}.client-details form{position:static;max-width:100%}.client-payment{padding:14px;background:#111e30;border:1px solid #2a3d57;border-radius:12px}.client-payment button{width:100%}.template-card{background:#0d1726;border-radius:16px}.template-card textarea{font-size:14px}.message-preview{font-size:14px;line-height:1.65}.quick-item b{font-size:14px}.quick-item small{font-size:12px}.empty-state{padding:45px 15px;font-size:14px}.empty-state b{font-size:16px}
@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-grid{grid-template-columns:1fr}}
@media(max-width:760px){.content{padding:20px 14px 40px}.panel{padding:16px}.panel-head{align-items:stretch}.filters{width:100%}.filters input,.filters select{width:100%}.client-grid{grid-template-columns:1fr}.client-card{padding:16px}.metric-card{padding:15px;min-height:140px}.metric-card strong{font-size:23px}.form-grid{grid-template-columns:1fr}.span-2{grid-column:1/-1}.form-actions{flex-wrap:wrap}.template-card{padding:14px}.section-row{flex-wrap:wrap}.topbar h1{font-size:19px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
}
.home-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.pix-workspace{align-items:start}.pix-result{display:grid;gap:16px}.pix-result textarea{width:100%;overflow-wrap:anywhere}.pix-total{font-size:2rem;font-weight:750;color:#75b6ff}.pix-qr-box{background:white;padding:16px;border-radius:12px;width:max-content;max-width:100%;margin:auto}.pix-qr-box img,.pix-qr-box canvas{max-width:100%;height:auto}.metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.metric-card,.mini-metric{min-width:0;min-height:110px;display:flex;flex-direction:column;justify-content:center;overflow-wrap:anywhere}.metric-card strong,.mini-metric strong{font-size:clamp(19px,2vw,29px);line-height:1.25}.metric-card small{line-height:1.5}@media(max-width:1100px){.metric-grid,.metric-grid.secondary{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:560px){.metric-grid,.metric-grid.secondary{gap:9px}.metric-card,.mini-metric{padding:12px;min-height:105px}.pix-workspace{grid-template-columns:1fr}.home-actions{width:100%}}
/* V6 — interactive overview and billing */
.metric-link{position:relative;text-decoration:none;color:inherit;transition:transform .18s,border-color .18s,box-shadow .18s;padding-right:35px!important}.metric-link:hover,.metric-link:focus-visible{transform:translateY(-3px);border-color:#5489e8;box-shadow:0 8px 28px #0004;outline:2px solid #5489e8;outline-offset:2px}.metric-arrow{position:absolute;right:15px;top:15px;color:#8daee0;font-size:17px}.billing-action{margin:10px 0}.billing-button{width:100%;background:#12392f!important;color:#8ce8c2!important;border:1px solid #28664f!important;min-height:42px;border-radius:10px}.billing-button:disabled{opacity:.45;cursor:not-allowed}.pix-heading{display:flex;align-items:center;gap:12px;margin-bottom:22px}.pix-heading h3,.pix-heading p{margin:0}.pix-symbol{display:grid;place-items:center;width:46px;height:46px;border-radius:14px;background:#153c38;color:#72e0bd;font-size:30px}.pix-amount-label{text-align:center;color:#9aabc3;font-size:11px;letter-spacing:1.5px}.pix-result{border-color:#365478!important}.pix-result .pix-total{font-size:clamp(28px,4vw,44px);letter-spacing:-1.5px;text-align:center;margin:8px 0 18px}.pix-result .pix-qr-box{margin:18px auto;padding:18px;background:white;border-radius:18px;width:fit-content;max-width:100%;box-shadow:0 8px 30px #0004}.pix-result textarea{font-family:monospace;font-size:12px;line-height:1.6;overflow-wrap:anywhere}.pix-result .home-actions{display:flex;flex-wrap:wrap;gap:10px;margin:12px 0}.pix-result .home-actions button{flex:1}.pix-result>a.button-link{display:flex;justify-content:center;background:#17654b;border-color:#278664;margin-top:12px}.panel,.client-card{border-radius:18px}.client-card{transition:border-color .18s}.client-card:hover{border-color:#42618a}.client-buttons{gap:10px}.client-info{line-height:1.5}
/* V10 — visual unificado */
.brand-mark{background:transparent!important;box-shadow:none!important;overflow:visible!important}.brand-mark img{display:block;width:44px;height:44px;border-radius:13px}.content{max-width:1600px;margin:auto}.panel,.client-card,.metric-card,.mini-metric,.plan-card{border:1px solid #26364d!important;border-radius:20px!important;background:linear-gradient(145deg,#142034,#101827)!important;box-shadow:0 8px 24px #0002!important}.panel{padding:clamp(16px,2vw,28px)!important}.metric-link:hover,.client-card:hover{border-color:#4b78bb!important;transform:translateY(-2px)}.metric-link,.client-card{transition:transform .18s,border-color .18s}.panel-head{gap:18px;flex-wrap:wrap}.filters{display:flex!important;flex-wrap:wrap;gap:10px!important;padding:12px;background:#0b1422;border:1px solid #24344a;border-radius:16px;width:100%}.filters input{flex:2 1 220px}.filters select{flex:1 1 160px;min-width:0}.filters button{flex:0 1 auto}.filters select,select,input,textarea{border-radius:11px!important;border-color:#334761!important;background-color:#0d1727!important;color:#e8f0ff!important;min-height:42px}.filters select{appearance:auto;padding-right:14px!important}input:focus,select:focus,textarea:focus{outline:2px solid #60a5fa;outline-offset:1px}.primary,.secondary,.button-link,.billing-button{border-radius:11px!important;min-height:42px;font-weight:650}.client-info{background:#0c1625;border-radius:14px;padding:14px!important;gap:16px!important}.client-buttons{gap:10px!important}.client-details summary{padding:12px;border-radius:10px;background:#18263b;cursor:pointer}.plan-grid{gap:18px!important}.inline-form{display:flex;flex-wrap:wrap;gap:12px!important}.inline-form input{flex:1 1 150px;min-width:0}.form-grid{gap:18px!important}.form-grid label{font-weight:600}.pix-result{text-align:center}.pix-result label{text-align:left}.pix-total{font-size:clamp(32px,5vw,48px)!important;letter-spacing:-1.5px}.pix-qr-box{padding:16px!important;border-radius:18px!important}.pix-mode{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:20px}.pix-mode a{flex:1;text-align:center}.nav-link.active{background:#1b365d!important;border-radius:12px}.nav-link{border-radius:12px}.section-row h2{letter-spacing:-.5px}.checkout-wrap{max-width:540px;margin:40px auto;padding:16px}.checkout-wrap .panel{text-align:center}.checkout-wrap textarea{width:100%}.checkout-wrap .pix-qr-box{display:inline-block;background:white}.checkout-wrap .pix-qr-box img,.checkout-wrap .pix-qr-box canvas{max-width:100%;height:auto}.checkout-wrap .brand-mark{display:inline-flex}.checkout-wrap .home-actions{justify-content:center}.checkout-wrap .alert{margin:16px 0}@media(max-width:600px){.filters button{flex:1 1 100%}.panel{padding:16px!important}.checkout-wrap{margin:12px auto}.inline-form input{flex-basis:100%}}
.billing-days{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px}.billing-days .check-label{padding:14px;border:1px solid #293c55;border-radius:12px;background:#101b2b;cursor:pointer}.billing-days .check-label:has(input:checked){border-color:#528dff;background:#152b4b}.billing-days input{accent-color:#528dff}.checkout-wrap .alert{border-radius:12px}.checkout-wrap .pix-total{font-size:clamp(32px,7vw,48px)}

.checkout-public{min-height:100vh;background:radial-gradient(ellipse at top,#162c43,#080f1b 65%);color:#eaf2ff}.checkout-public .checkout-wrap{max-width:480px;margin:0 auto;padding:28px 14px}.checkout-public .panel{text-align:center;padding:30px 24px!important;border-radius:26px!important}.checkout-public .brand-mark{display:inline-flex;margin-bottom:12px}.checkout-public .pix-total{font-weight:800;letter-spacing:-1.5px;margin:18px 0}.checkout-pending{display:flex;align-items:center;justify-content:center;gap:10px;color:#86efac;background:#123329;border:1px solid #28634c;border-radius:999px;padding:12px;font-weight:600;margin:18px 0}.checkout-spinner{width:17px;height:17px;border:2px solid #3b755a;border-top-color:#86efac;border-radius:50%;animation:checkout-spin .9s linear infinite}@keyframes checkout-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.checkout-spinner{animation:none}}.checkout-public .pix-qr-box{background:#fff;padding:16px;border-radius:18px;width:max-content;max-width:100%;margin:22px auto}.checkout-public .checkout-code{width:100%;font-size:12px;overflow-wrap:anywhere;resize:none}.checkout-public .home-actions{display:flex;margin-top:14px}.checkout-public .home-actions button{width:100%;padding:14px;border-radius:13px}.checkout-public #pixFeedback{color:#86efac;min-height:20px}
/* V13 */
.payment-links{margin-top:24px}.payment-item{padding:18px;margin-top:12px;border:1px solid #263b57;border-radius:16px;background:#101c30}.payment-item .home-actions{margin-top:14px;flex-wrap:wrap;gap:8px}.payment-item form{margin:0}.pix-workspace .panel{border-radius:22px;padding:24px}.pix-workspace input{min-height:48px}.pix-workspace .pix-total{font-size:clamp(32px,5vw,48px);letter-spacing:-.04em}.install-app{border:1px solid #385c92;border-radius:12px;padding:9px 14px;color:#bfdbfe;background:#172c4d}.billing-days{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px}.billing-days .check-label{padding:13px;border:1px solid #293d59;border-radius:12px;background:#111d30}.panel{border-radius:18px}.brand-mark img{width:100%;height:100%;object-fit:contain}.payment-item .danger{color:#fda4af;border-color:#713346;background:#321c2b}@media(max-width:600px){.pix-workspace .panel{padding:16px}.install-app{font-size:12px;padding:8px}.payment-item .home-actions>*{max-width:100%}}
/* V15 — mobile layout */
@media screen and (max-width:760px){
.app-shell,.main-area{width:100%;min-width:0;max-width:100%;margin:0}.content{width:100%;min-width:0;margin:0;padding:20px 14px 36px;box-sizing:border-box}.topbar{position:sticky;min-height:64px;padding:12px 14px;gap:10px;flex-wrap:wrap}.topbar>div{min-width:0}.topbar h1{font-size:18px;margin:0}.topbar .breadcrumb{display:none}.top-actions{margin-left:auto;gap:6px}.top-actions .avatar{display:none}.welcome-row{gap:14px;margin:0 0 18px;min-width:0}.welcome-row .home-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.welcome-row .home-actions a{min-width:0;white-space:normal;text-align:center}.metric-grid,.metric-grid.secondary{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%}.metric-card,.mini-metric{min-width:0;padding:13px!important;min-height:116px}.metric-link{padding-right:22px!important}.metric-arrow{right:9px;top:9px;font-size:13px}.metric-card strong,.mini-metric strong{font-size:clamp(16px,4.5vw,23px);overflow-wrap:anywhere}.metric-card p,.mini-metric span{font-size:12px}.dashboard-grid,.client-grid,.pix-workspace,.plan-grid{grid-template-columns:minmax(0,1fr)!important;min-width:0;width:100%}.panel,.client-card,.chart-panel{min-width:0;max-width:100%;box-sizing:border-box}.chart-panel canvas{max-width:100%;width:100%}.table-wrap{max-width:100%;overflow-x:auto;margin:0}.sidebar{max-width:85vw}.home-actions>*{min-width:0;white-space:normal}.client-top{flex-wrap:wrap}.billing-days{grid-template-columns:minmax(0,1fr)}
}
@media screen and (max-width:350px){.metric-grid,.metric-grid.secondary{grid-template-columns:minmax(0,1fr)}.topbar .install-app{font-size:11px}}
body[style*="--brand-accent"] {--blue:var(--brand-accent);--blue-strong:var(--brand-accent)}
body[style*="--brand-accent"] .primary,body[style*="--brand-accent"] .install-app {background:var(--brand-accent)!important;color:white;text-shadow:0 1px 3px #0009;border-color:var(--brand-accent)!important}
body[style*="--brand-accent"] .nav-link.active {background:color-mix(in srgb,var(--brand-accent) 22%,#101827);box-shadow:inset 3px 0 var(--brand-accent);border-color:var(--brand-accent);color:#fff}
.brand-mark img {object-fit:contain;width:100%;height:100%;border-radius:inherit}.brand-name{overflow-wrap:anywhere;min-width:0}.form-grid input[type=color]{min-height:46px;width:100%;padding:5px}.checkout-public .brand-mark{width:80px;height:80px}

/* V17: acesso e navegação de pagamentos */
.auth-page{background:radial-gradient(ellipse at 15% 15%,#142c52 0,transparent 45%),#080e19}.auth-card{border-radius:26px;box-shadow:0 24px 80px #0005}.auth-tab{text-decoration:none}.auth-tab.active{background:#2563eb;color:white}.auth-form input{min-height:46px}.auth-submit{min-height:48px}.payment-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:6px;border:1px solid #26364c;background:#101a2a;border-radius:16px;margin:0 0 18px;max-width:560px}.payment-tabs a{min-width:0;text-align:center;padding:13px 8px;border-radius:11px;color:#aebdd1;text-decoration:none;font-weight:700}.payment-tabs a.selected{background:var(--accent,#2563eb);color:white}.payment-tabs a:focus-visible{outline:2px solid #93c5fd}.payment-links,.pix-workspace>*{min-width:0}.payment-links .inline-form{flex-wrap:wrap}.payment-links input{min-width:0;max-width:100%}@media(max-width:600px){.payment-tabs{max-width:none}.payment-tabs a{font-size:13px}.payment-links .inline-form>*{width:100%}.auth-card{padding:22px!important}.auth-main{padding:16px!important}}

.payment-tabs{display:flex!important;gap:10px!important;margin:18px 0!important;padding:6px!important;border:1px solid #334155!important;border-radius:14px!important}.payment-tabs a{display:block!important;flex:1;padding:14px!important;text-align:center!important;border-radius:10px!important;background:#17253b!important}.payment-tabs a.selected{background:var(--brand-accent,#2563eb)!important;color:white!important}.sidebar .brand-mark{width:38px!important;height:38px!important;flex:0 0 38px!important;padding:0!important;overflow:hidden}.sidebar .brand-mark img{width:100%!important;height:100%!important;object-fit:contain!important}.pix-qr-box canvas,.pix-qr-box img{max-width:100%;height:auto;image-rendering:pixelated}.pix-qr-box{overflow:hidden}

/* V20 */
.wa-simple{max-width:780px;margin:0 auto;width:100%;box-sizing:border-box;padding:26px}.wa-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}.wa-heading h2{margin:6px 0}.wa-heading p,.wa-center p{color:#aebdd1;line-height:1.5}.wa-status{border-radius:30px;padding:8px 12px;background:#38242a;color:#fca5a5;font-size:13px}.wa-status.wa-online{background:#12382b;color:#86efac}.wa-center{display:flex;flex-direction:column;align-items:center;text-align:center;background:#0c1422;border:1px solid #26364c;border-radius:18px;padding:24px 12px;margin:24px 0;gap:10px}.wa-qr{display:block;width:260px;max-width:100%;height:auto;background:white;padding:12px;border-radius:10px;box-sizing:border-box}.wa-center h3,.wa-center p{margin:0}.wa-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.wa-buttons button{min-height:46px;border-radius:10px;font-weight:700;white-space:normal;padding:10px;cursor:pointer}.wa-buttons .secondary{background:#1b2a40;color:#e2e8f0;border:1px solid #35465e}.wa-buttons .danger{background:#38232d;color:#fca5a5;border:1px solid #69404a}.payment-tabs{max-width:440px}.payment-tabs a{overflow-wrap:anywhere}@media(max-width:600px){.wa-simple{padding:16px}.wa-buttons{grid-template-columns:1fr}.wa-center{padding:18px 10px}.payment-tabs{max-width:100%;gap:6px!important}.payment-tabs a{padding:12px 5px!important}}
.settings-v22{display:grid;gap:20px;max-width:1000px;margin:0 auto}.settings-section{min-width:0}.settings-section .form-grid{margin-top:16px}.gateway-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:16px 0}.gateway-option{display:flex!important;align-items:center;gap:12px;padding:16px;border:1px solid #35465e;border-radius:14px;background:#101827;cursor:pointer;min-width:0}.gateway-option:has(input:checked){border-color:var(--brand-accent,#2563eb);background:#1c2c46}.gateway-option input{width:18px!important;height:18px!important;min-height:0!important;flex:none;accent-color:var(--brand-accent,#2563eb)}.gateway-option span{display:grid;gap:5px;min-width:0}.gateway-option small{color:#a6b5ca;font-size:12px}.gateway-detail{padding:18px;border:1px solid #2b3c53;border-radius:14px;background:#0d1727}.gateway-detail[hidden]{display:none!important}.settings-save{display:flex;justify-content:flex-end}.settings-section>a{margin-top:16px;display:inline-flex}@media(max-width:650px){.gateway-options{grid-template-columns:1fr}.settings-v22{gap:14px}.gateway-detail{padding:12px}.settings-save button{width:100%}}
#push-settings{margin-top:20px}#push-settings .push-actions{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}#push-settings output{display:block;color:var(--muted,#9ca3af)}#push-settings input[type=checkbox]{width:auto;margin-right:8px}
/* V30 — consistent forms and tutorial workspace */
.tutorial-editor{max-width:1100px;margin:0 auto 20px}.tutorial-heading{margin-bottom:24px}.tutorial-heading h3{font-size:20px;margin:0 0 6px}.tutorial-heading p{margin:0;color:var(--muted)}.tutorial-form{display:grid;gap:20px}.tutorial-form label{display:grid;gap:8px;font-weight:600;color:var(--text);min-width:0}.tutorial-form input:not([type=checkbox]),.tutorial-form textarea{display:block;width:100%;min-width:0;max-width:100%;padding:12px 14px;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface-soft);color:var(--text)}.tutorial-form textarea{resize:vertical;min-height:150px}.tutorial-media-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.tutorial-upload{display:grid;align-content:start;gap:12px;padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface-soft);min-width:0}.tutorial-upload h4{margin:0;font-size:16px}.tutorial-upload small{color:var(--muted)}.tutorial-upload input[type=file]{font-size:12px;overflow:hidden}.tutorial-upload input::file-selector-button{background:var(--surface-raised);color:var(--text);border:1px solid var(--line-strong);border-radius:8px;padding:8px;margin-right:8px;cursor:pointer}.tutorial-form .tutorial-remove{display:flex;align-items:center;gap:8px}.tutorial-form .form-actions{display:flex;gap:10px;justify-content:flex-end;flex-wrap:wrap}.tutorial-form .primary{min-height:46px;padding:12px 24px}.panel{min-width:0;border-radius:18px}.panel h3{letter-spacing:-.3px}.form-grid>*{min-width:0}.form-grid input:not([type=checkbox]):not([type=radio]),.form-grid select,.form-grid textarea{max-width:100%;min-width:0}.sidebar{overflow-y:auto;scrollbar-width:thin}.nav-link{flex-shrink:0}.primary,.secondary,.button-link{transition:filter .15s ease,background .15s ease}.primary:hover,.secondary:hover{filter:brightness(1.12)}@media(max-width:650px){.tutorial-media-grid{grid-template-columns:1fr}.tutorial-editor{padding:16px}.tutorial-form .form-actions>*{width:100%}.tutorial-upload{padding:14px}.tutorial-form input,.tutorial-form textarea{font-size:16px}}
body[style*="--brand-background"]{--bg:var(--brand-background);background:var(--brand-background);min-height:100vh}.app-shell{background:var(--brand-background,var(--bg))}.branding-panel{max-width:980px;margin:0 auto}.branding-form{gap:20px}.branding-form label{display:grid;gap:8px}.branding-form input[type=color]{width:100%;height:52px;padding:6px;cursor:pointer}.branding-form .brand-reset{display:flex;align-items:center;gap:10px}.branding-form .brand-reset input{width:18px!important;height:18px!important;min-height:0!important;margin:0;accent-color:var(--brand-accent)}.brand-preview{display:flex;align-items:center;gap:20px;padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface-soft)}.brand-preview img{width:96px;height:96px;object-fit:contain;border-radius:12px}.brand-preview h3,.brand-preview p{margin:4px 0}.brand-preview small{color:var(--muted)}.branding-form input[type=file]::file-selector-button{background:var(--surface-raised);color:var(--text);border:1px solid var(--line);border-radius:8px;padding:8px;margin-right:10px}.checkout-public[style*="--brand-background"]{background:var(--brand-background)}@media(max-width:600px){.brand-preview{padding:14px;gap:12px}.brand-preview img{width:64px;height:64px}.branding-form{gap:14px}}
.sub-hero,.sub-ref{padding:28px!important}.sub-kicker{font-size:11px;letter-spacing:.12em;font-weight:700;color:#8bbaff}.sub-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:18px 0}.sub-plan{display:flex;flex-direction:column;gap:12px;margin:0!important}.sub-plan h2,.sub-ref h2{font-size:28px;margin:8px 0}.sub-plan form{margin-top:auto}.sub-plan p{line-height:1.8}.sub-center{text-align:center;color:#aab8cc}.sub-ref .sub-grid>div{background:rgba(127,153,190,.1);padding:18px;border-radius:12px;text-align:center}.sub-ref strong{display:block;font-size:25px}.sub-ref small{display:block;color:#aab8cc}.sub-ref label{display:grid;gap:8px}.sub-ref input{width:100%}.sub-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:16px}.sub-actions>*{flex:1;text-align:center}.sub-plan button:disabled{opacity:.45;cursor:not-allowed}@media(max-width:760px){.sub-grid{grid-template-columns:1fr}.sub-ref .sub-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.sub-ref .sub-grid>div{padding:10px 4px}.sub-ref small{font-size:11px}.sub-hero,.sub-ref{padding:18px!important}}
/* V35 — interface premium, preservando a identidade de cada conta */
.app-shell{--ui-accent:color-mix(in srgb,var(--brand-accent,#397cf0) 68%,#779bda);--ui-border:rgba(145,169,202,.16)}
.app-shell .sidebar{background:color-mix(in srgb,var(--brand-background,#0b1220) 78%,#182438);border-right:1px solid var(--ui-border)}
.app-shell .topbar{min-height:72px;background:color-mix(in srgb,var(--brand-background,#0b1220) 90%,#23344d);padding-block:12px}
.app-shell .nav-link{min-height:39px;border-radius:9px;margin:1px 0}.app-shell .nav-link.active{background:color-mix(in srgb,var(--ui-accent) 17%,#101827)!important;border-color:color-mix(in srgb,var(--ui-accent) 45%,#182438)!important;color:#e7efff!important;box-shadow:none!important}
.app-shell .primary,.app-shell .install-app{background:color-mix(in srgb,var(--brand-accent,#2563eb) 72%,#355d9d)!important;border:1px solid color-mix(in srgb,var(--ui-accent) 65%,#25354c)!important;box-shadow:0 3px 12px #0002!important;border-radius:9px;color:#fff!important}
.app-shell .content{padding-top:24px}.app-shell .welcome-row{padding:22px 24px;background:linear-gradient(110deg,color-mix(in srgb,var(--ui-accent) 13%,#111b2b),#111b2b 80%);border:1px solid var(--ui-border);border-radius:16px;margin-bottom:18px}.app-shell .welcome-row h2{font-size:clamp(23px,2.6vw,30px)}.app-shell .welcome-row .eyebrow{font-size:10px;color:#a9c8fa;letter-spacing:.13em}
.app-shell .metric-grid{gap:12px}.app-shell .metric-card,.app-shell .mini-metric,.app-shell .panel{background:#121c2b;border:1px solid var(--ui-border);border-radius:14px;box-shadow:0 4px 18px #0002}.app-shell .metric-card{padding:16px!important;min-height:142px;justify-content:flex-start}.app-shell .metric-icon{width:34px;height:34px;margin-bottom:9px;border-radius:9px}.app-shell .metric-card p{margin:2px 0 4px;font-size:12px}.app-shell .metric-card strong,.app-shell .mini-metric strong{font-size:clamp(19px,2vw,27px);font-variant-numeric:tabular-nums;letter-spacing:-.04em}.app-shell .metric-card small{margin-top:5px;color:#9aacc3}.app-shell .mini-metric{min-height:88px;padding:14px 28px 14px 14px!important;text-align:left;align-items:flex-start}.app-shell .metric-link:hover{transform:translateY(-2px);outline:none;border-color:var(--ui-accent)}.app-shell .metric-link:focus-visible{outline:2px solid var(--ui-accent);outline-offset:2px}.app-shell .metric-arrow{font-size:14px;top:12px;right:12px}.app-shell .dashboard-grid{gap:14px;margin-top:16px}.app-shell .panel-head h3{font-size:17px}.app-shell .panel-head p{color:#9aacc3}.tutorial-hero{padding:24px;border:1px solid var(--ui-border);border-radius:16px;background:linear-gradient(110deg,#1a2d48,#121c2b)}.tutorial-library-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:24px 0 12px}.tutorial-library-heading h3{margin:0}.tutorial-library-heading span{color:#a5b6ce;font-size:12px}.tutorial-library{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px;align-items:start}.tutorial-card{overflow-wrap:anywhere;margin:0!important;display:flex;flex-direction:column;gap:12px}.tutorial-card h3,.tutorial-card p{margin:0}.tutorial-card img,.tutorial-card video{width:100%;object-fit:contain;background:#0b1320;border-radius:10px}.tutorial-card .form-actions{display:flex;gap:8px;flex-wrap:wrap}.tutorial-editor{max-width:none}.tutorial-library>.panel:only-child{grid-column:1/-1}
@media(max-width:760px){.app-shell .topbar{padding:12px 14px}.app-shell .welcome-row{padding:16px;flex-wrap:wrap}.app-shell .content{padding-top:16px}.app-shell .metric-card{padding:12px!important;min-height:130px}.app-shell .mini-metric{min-height:90px}.app-shell .metric-grid{gap:9px}.tutorial-hero{padding:16px}}

.email-center .email-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.email-center h3,.email-center h4{margin:0 0 8px}.email-center p{margin:6px 0 12px}.email-status{font-size:12px;padding:6px 12px;border:1px solid #64748b;border-radius:20px}.email-server{font-size:13px;color:#94a3b8}.email-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:center}.email-fields>label{min-width:0}.email-fields input:not([type=checkbox]){width:100%;box-sizing:border-box}.email-center .email-toggle{display:flex;align-items:center;gap:12px;min-height:48px}.email-center .email-toggle input[type=checkbox]{appearance:auto!important;width:18px!important;height:18px!important;min-height:0!important;min-width:0!important;margin:0!important;padding:0!important;flex:0 0 18px;accent-color:var(--brand-accent,#2563eb)}.email-toggle small{display:block;color:#94a3b8;margin-top:4px}.email-actions{display:flex;justify-content:flex-end}.email-center button{width:auto!important;min-height:42px!important;height:auto!important;padding:10px 18px!important}.email-test{border-top:1px solid #334155;border-bottom:1px solid #334155;padding:18px 0;margin:20px 0}.email-test-form{display:flex;gap:10px;align-items:center}.email-test-form input{flex:1;min-width:0}.email-log{display:flex;flex-direction:column;gap:4px;padding:10px 0;border-bottom:1px solid #334155;overflow-wrap:anywhere}.email-log small,.email-log span{color:#94a3b8}@media(max-width:650px){.email-fields{grid-template-columns:1fr}.email-actions{justify-content:stretch}.email-center .email-actions button{width:100%!important}.email-test-form{flex-wrap:wrap}.email-test-form input{flex-basis:100%}}

.created-card{display:grid;gap:12px;padding:20px;margin:16px 0;border:1px solid #287b65;border-radius:16px;background:#102b29;color:#e8fff5}.created-card>strong{font-size:18px;color:#78e5b7}.created-card p{margin:0;color:#a7c9c3}.created-card label{display:grid;gap:6px;font-size:13px}.created-card input{width:100%;min-width:0;box-sizing:border-box}.created-card button{min-height:42px;width:100%}

/* V38: confirmation card only */
.created-card{background:#101d2e;border:1px solid #314761;border-radius:20px;padding:20px;gap:14px;box-shadow:0 12px 30px #0002;color:#e9f1fc}.created-head{display:flex;align-items:center;gap:12px}.created-icon{display:grid;place-items:center;width:44px;height:44px;flex:none;border-radius:50%;background:#153d35;color:#79e6b6;font-size:24px}.created-head strong{font-size:17px;color:#f0f6ff}.created-head p,.created-card .created-hint{font-size:12px;color:#a9bbd0}.created-trial{background:#15352f;color:#8be9bc;border-radius:8px;padding:9px 12px;font-size:11px;font-weight:700;letter-spacing:.04em}.created-card label{color:#b7c8dc;font-weight:600}.created-card input{background:#0b1524;border:1px solid #34465e;border-radius:9px;box-shadow:none;font-size:13px;padding:10px 12px;min-height:42px;color:#f1f6ff}.created-password{display:flex;gap:8px;align-items:center}.created-password input{flex:1;min-width:0}.created-password button{width:auto;flex:none;padding:0 12px;font-size:12px}.created-card .primary{border-radius:10px;min-height:46px}.created-card .created-hint{margin:0}

/* V39: client dialog and compact desktop layout */
.client-modal{width:min(720px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #354962;border-radius:16px;background:#121c2b;color:#eaf1fc;overflow:auto;box-shadow:0 24px 90px #0009;box-sizing:border-box}.client-modal::backdrop{background:#050a13bb;backdrop-filter:blur(4px)}.client-modal .form-panel{margin:0!important;padding:22px!important;border:0!important;box-shadow:none!important;max-width:none}.client-modal .panel-head{align-items:flex-start}.client-modal .modal-close{width:36px!important;height:36px!important;min-height:0!important;padding:0!important;font-size:23px;flex:none}.client-modal .form-grid{gap:12px!important}.client-modal .form-actions{position:sticky;bottom:-22px;background:#121c2b;padding:12px 0;z-index:1}.client-modal-open{overflow:hidden}.client-modal input[type=checkbox]{width:16px!important;height:16px!important;min-height:0!important;flex:none}.client-modal:not([open]){display:none!important}
@media(min-width:1000px){.app-shell .welcome-row{padding:14px 18px;margin-bottom:12px}.app-shell .metric-grid{gap:10px}.app-shell .metric-card{min-height:112px!important;padding:12px!important;border-radius:12px!important}.app-shell .metric-icon{width:28px;height:28px;margin-bottom:5px}.app-shell .metric-card strong,.app-shell .mini-metric strong{font-size:23px}.app-shell .mini-metric{min-height:70px!important;padding:10px 24px 10px 12px!important;border-radius:12px!important}.app-shell .client-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,270px),1fr));gap:12px}.app-shell .client-card{padding:12px!important;border-radius:12px!important}.app-shell .dashboard-grid{margin-top:12px;gap:12px}.app-shell .content{padding-top:18px}}
@media(max-width:600px){.client-modal{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}.client-modal .form-panel{padding:14px!important}.client-modal .form-actions{bottom:-14px}}

/* V40: local vector icon system and refined visual hierarchy */
.ui-icon{display:inline-block;width:19px;height:19px;vertical-align:middle;flex-shrink:0}.nav-icon{display:grid;place-items:center;width:22px;flex:0 0 22px}.nav-icon .ui-icon{width:19px;height:19px}.wa-icon{color:inherit}.nav-link[href$="page=whatsapp"] .nav-icon{color:inherit}.nav-link{transition:background .16s,border-color .16s,color .16s}.nav-link:hover{background:#ffffff0b}.nav-link.active .nav-icon:not(:has(.wa-icon)){color:var(--brand-accent,#60a5fa)}.metric-icon .ui-icon,.quick-icon .ui-icon{width:19px;height:19px}.metric-arrow .ui-icon{width:15px;height:15px}.wa-tile{color:inherit}.wa-title{display:flex;align-items:center;gap:9px}.wa-title .ui-icon{width:27px;height:27px}.button-link .ui-icon,.billing-button .ui-icon{width:17px;height:17px;margin-right:5px}.panel,.metric-card,.mini-metric,.client-card{transition:border-color .18s,box-shadow .18s}.metric-link:hover,.client-card:hover{border-color:color-mix(in srgb,var(--brand-accent,#2563eb) 40%,#334155)}.side-caption{letter-spacing:.12em;font-size:10px}.quick-icon{display:grid;place-items:center;font-style:normal}.icon-btn .ui-icon{width:22px;height:22px}.logout .ui-icon{width:17px;height:17px}@media(prefers-reduced-motion:reduce){.nav-link,.panel,.metric-card,.mini-metric,.client-card{transition:none}}
/* V41: centered client workspace with independent scrolling and fixed actions */
.client-modal{position:fixed;inset:0;margin:auto;width:min(790px,calc(100vw - 32px));max-height:calc(100dvh - 32px);height:auto;overflow:hidden;border-radius:20px;background:#111b2b;border:1px solid #34465f;box-shadow:0 30px 100px #000a}.client-modal[open]{animation:client-enter .18s ease-out}.client-dialog-shell{display:flex;flex-direction:column;max-height:calc(100dvh - 34px);min-height:0}.client-dialog-head{display:flex;justify-content:space-between;align-items:center;padding:20px 24px 14px;border-bottom:1px solid #28374d}.client-dialog-head h3{margin:0;font-size:21px;letter-spacing:-.5px}.client-dialog-head p{margin:5px 0 0;color:#9bacc3;font-size:12px}.client-dialog-form{display:flex;flex-direction:column;min-height:0;overflow:hidden}.client-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:5px;margin:16px 24px 0;background:#0b1422;border:1px solid #29394e;border-radius:12px;flex:none}.client-tabs button{display:flex;align-items:center;justify-content:center;gap:7px;border:0;background:transparent;color:#a8b8ce;font-size:13px;min-height:40px;border-radius:8px;cursor:pointer}.client-tabs button[aria-pressed=true]{background:color-mix(in srgb,var(--brand-accent,#2563eb) 24%,#17243a);color:#f0f6ff;box-shadow:inset 0 0 0 1px var(--brand-accent,#2563eb)}.client-dialog-body{overflow:auto;padding:20px 24px;min-height:0;scrollbar-width:thin}.client-step{min-height:235px;align-content:start}.client-step[hidden],.client-dialog-footer [hidden]{display:none!important}.client-step h4{margin:0;color:#e7efff;font-size:15px}.client-step label{display:grid;gap:6px}.client-dialog-footer{display:flex;align-items:center;justify-content:flex-end;gap:9px;padding:15px 24px;border-top:1px solid #29394e;background:#152034;flex:none}.client-step-count{margin-right:auto;color:#9bacc3;font-size:12px}.client-dialog-footer button{white-space:nowrap}.client-dialog-footer .primary{display:flex;align-items:center;gap:6px}.client-modal::backdrop{background:#050914c9;backdrop-filter:blur(5px)}@keyframes client-enter{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}@media(max-width:600px){.client-modal{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:14px}.client-dialog-shell{max-height:calc(100dvh - 18px)}.client-dialog-head,.client-dialog-body,.client-dialog-footer{padding:14px}.client-tabs{margin:12px 14px 0}.client-tabs button{font-size:11px;gap:4px}.client-tabs .ui-icon{width:15px}.client-dialog-footer{flex-wrap:wrap}.client-step-count{width:100%}.client-dialog-footer button{flex:1}.client-step{min-height:0}}@media(prefers-reduced-motion:reduce){.client-modal[open]{animation:none}}

/* V43: action controls only; preserve card layout and account theme. */
.app-shell :is(button.primary,a.primary.button-link,button.secondary,a.secondary.button-link,button.danger,button.billing-button,.install-app),.client-dialog-footer button{border-radius:11px;min-height:39px;padding:9px 15px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font-weight:650;letter-spacing:.005em;line-height:1.25;transition:background .16s,border-color .16s,box-shadow .16s,transform .16s;}
.app-shell :is(button.primary,a.primary.button-link),.client-dialog-footer button.primary{background:linear-gradient(155deg,color-mix(in srgb,var(--brand-accent,#397cf0) 88%,white),color-mix(in srgb,var(--brand-accent,#397cf0) 85%,#111827));border:1px solid color-mix(in srgb,var(--brand-accent,#397cf0) 72%,white);color:#fff;box-shadow:0 3px 9px #0003;}
.app-shell :is(button.secondary,a.secondary.button-link),.client-dialog-footer button.secondary{background:#ffffff08;border:1px solid #8295b340;color:inherit;box-shadow:none;}
.app-shell button.danger{background:#dc262614;color:#fca5a5;border:1px solid #ef444440;box-shadow:none;}
.app-shell button.billing-button{background:#ffffff08;border:1px solid #8295b340;color:inherit;}
.app-shell :is(button.primary,a.primary.button-link,button.secondary,a.secondary.button-link,button.danger,button.billing-button,.install-app):not(:disabled):hover,.client-dialog-footer button:not(:disabled):hover{filter:brightness(1.13);transform:translateY(-1px);}
.app-shell :is(button,a.button-link):focus-visible,.client-dialog-footer button:focus-visible{outline:2px solid var(--brand-accent,#397cf0);outline-offset:3px;}
.app-shell :is(button,a.button-link) .ui-icon,.client-dialog-footer .ui-icon{width:16px;height:16px;margin:0;flex:none;}
.app-shell button:disabled{opacity:.5;cursor:not-allowed;}
@media(prefers-reduced-motion:reduce){.app-shell :is(button,a.button-link),.client-dialog-footer button{transition:none!important;transform:none!important}}
