:root {
  --bg: #f5f7fb;
  --bg-soft: #eef4ff;
  --panel: rgba(255, 255, 255, .92);
  --panel-solid: #ffffff;
  --panel-2: #eef7ff;
  --text: #101827;
  --muted: #6b7891;
  --border: rgba(20, 31, 52, .10);
  --primary: #4f35f5;
  --primary-600: #3b25d1;
  --primary-soft: rgba(79, 53, 245, .12);
  --cyan: #0ea5e9;
  --green: #15b86a;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #f59e0b;
  --orange: #f97316;
  --sidebar: #07111f;
  --sidebar-2: #0c1d32;
  --shadow: 0 22px 55px rgba(20, 31, 52, .10);
  --shadow-soft: 0 14px 35px rgba(20, 31, 52, .08);
  --radius: 24px;
  --radius-sm: 16px;
}

[data-theme="dark"] {
  --bg: #08111f;
  --bg-soft: #0f1b2e;
  --panel: rgba(15, 27, 46, .88);
  --panel-solid: #101b2d;
  --panel-2: #14223a;
  --text: #edf5ff;
  --muted: #9caec6;
  --border: rgba(226, 232, 240, .10);
  --primary: #7c5cff;
  --primary-600: #6043f4;
  --primary-soft: rgba(124, 92, 255, .15);
  --sidebar: #050b14;
  --sidebar-2: #0b1728;
  --shadow: 0 24px 60px rgba(0, 0, 0, .32);
  --shadow-soft: 0 16px 40px rgba(0, 0, 0, .22);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(79, 53, 245, .12), transparent 28rem),
    radial-gradient(circle at 85% 15%, rgba(21, 184, 106, .10), transparent 25rem),
    var(--bg);
  color: var(--text);
  letter-spacing: -.01em;
}
body::selection { background: var(--primary); color: white; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(107, 120, 145, .35); border-radius: 999px; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  background:
    radial-gradient(circle at 20% 30%, rgba(21, 184, 106, .22), transparent 18rem),
    radial-gradient(circle at 70% 20%, rgba(79, 53, 245, .20), transparent 22rem),
    var(--bg);
}
.login-brand {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(135deg, rgba(7, 17, 31, .97), rgba(21, 31, 53, .92)),
    radial-gradient(circle at 80% 15%, rgba(21, 184, 106, .42), transparent 23rem),
    radial-gradient(circle at 15% 75%, rgba(79, 53, 245, .42), transparent 25rem);
  color: white;
}
.login-brand::after {
  content: "";
  position: absolute;
  right: -8rem;
  bottom: -11rem;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(21, 184, 106, .38), rgba(79, 53, 245, .35));
  filter: blur(5px);
}
.brand-mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -.03em;
}
.brand-mark img {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .18);
}
.login-copy { position: relative; z-index: 1; max-width: 790px; }
.eyebrow, .form-kicker, .top-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.88);
  border-radius: 999px;
  padding: 8px 13px;
  font-weight: 850;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.login-copy h1 {
  max-width: 790px;
  margin: 22px 0 18px;
  font-size: clamp(42px, 6vw, 72px);
  line-height: .96;
  letter-spacing: -.07em;
}
.login-copy p {
  max-width: 650px;
  margin: 0;
  font-size: 19px;
  line-height: 1.65;
  color: rgba(255,255,255,.76);
}
.login-highlights, .platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}
.login-highlights span, .platform-pills span {
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.10);
  color: rgba(255,255,255,.86);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
}
.brand-footer { position: relative; z-index: 1; color: rgba(255,255,255,.66); font-size: 13px; }
.login-card-wrap { display: grid; place-items: center; align-content: center; gap: 18px; padding: clamp(22px, 4vw, 48px); }
.login-card {
  width: min(460px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 38px);
  backdrop-filter: blur(16px);
}
.form-kicker {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(79, 53, 245, .16);
}
.login-card h2 { margin: 14px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.login-note { margin: 16px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.signup-card {
  padding: 24px;
}

.signup-card h2 {
  font-size: 24px;
}

.field, .field-label {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}
.field input, .field select, .field textarea, .field-label select, input, select, textarea {
  width: 100%;
  min-width: 0;
  background: var(--panel-solid);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 13px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, input:focus, select:focus, textarea:focus {
  border-color: rgba(79, 53, 245, .55);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  color: var(--text);
  border-radius: 16px;
  padding: 10px 15px;
  font-weight: 850;
  box-shadow: 0 8px 22px rgba(20, 31, 52, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 32px rgba(20, 31, 52, .10); }
.btn.primary { background: linear-gradient(135deg, var(--primary), var(--primary-600)); border-color: transparent; color: white; }
.btn.success { background: var(--success); border-color: var(--success); color: white; }
.btn.danger { background: #fff2f2; border-color: rgba(220,38,38,.20); color: var(--danger); }
[data-theme="dark"] .btn.danger { background: rgba(220,38,38,.12); }
.btn.full { width: 100%; padding: 13px; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  isolation: isolate;
}
.sidebar {
  position: sticky;
  top: 0;
  z-index: 70;
  height: 100vh;
  overflow: visible;
  background:
    radial-gradient(circle at top right, rgba(79, 53, 245, .24), transparent 16rem),
    linear-gradient(180deg, var(--sidebar), var(--sidebar-2));
  color: #e5edf7;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(255,255,255,.08);
}
.sidebar .brand-mark { font-size: 18px; }
.sidebar .brand-mark img { width: 38px; height: 38px; border-radius: 14px; }
.sidebar-caption {
  color: rgba(229, 237, 247, .62);
  font-size: 13px;
  line-height: 1.5;
  margin: -6px 0 2px;
}
.nav { display: grid; gap: 8px; }
.nav button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  background: transparent;
  color: #aebbd0;
  border: 1px solid transparent;
  border-radius: 18px;
  padding: 11px 12px;
  font-weight: 850;
  transition: background .18s ease, color .18s ease, transform .18s ease, border-color .18s ease;
}
.nav button:hover { background: rgba(255,255,255,.07); color: white; transform: translateX(2px); }
.nav button.active {
  background: linear-gradient(135deg, rgba(79, 53, 245, .30), rgba(21, 184, 106, .18));
  border-color: rgba(255,255,255,.10);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 14px 32px rgba(0,0,0,.13);
}
.nav-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: white;
  flex: 0 0 auto;
}
.sidebar-card {
  margin-top: auto;
  display: grid;
  gap: 7px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  border-radius: 22px;
  padding: 15px;
}
.sidebar-card strong { font-size: 14px; }
.sidebar-card span, .sidebar-footer { color: rgba(229, 237, 247, .62); font-size: 12px; line-height: 1.45; }
.sidebar-footer { margin-top: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  min-height: 82px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(18px, 3vw, 32px);
  background: color-mix(in srgb, var(--panel-solid) 85%, transparent);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar-copy { display: grid; gap: 3px; }
.topbar h2 { margin: 0; font-size: 24px; letter-spacing: -.04em; }
.top-kicker {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: rgba(79, 53, 245, .14);
  padding: 5px 10px;
  font-size: 10px;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(21,184,106,.14);
}
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-actions select { width: min(280px, 42vw); }
.content { padding: clamp(18px, 3vw, 32px); display: grid; gap: 20px; }

.hero-panel {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 26px;
  min-height: 310px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 34px;
  background:
    radial-gradient(circle at 86% 16%, rgba(21,184,106,.18), transparent 20rem),
    radial-gradient(circle at 25% 5%, rgba(79,53,245,.18), transparent 26rem),
    var(--panel);
  box-shadow: var(--shadow);
}
.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -5rem -11rem auto;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79,53,245,.25), rgba(21,184,106,.18));
  pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; }
.hero-copy .eyebrow {
  background: var(--primary-soft);
  border-color: rgba(79,53,245,.16);
  color: var(--primary);
}
.hero-copy h1 {
  max-width: 820px;
  margin: 15px 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1;
  letter-spacing: -.07em;
}
.hero-copy p { max-width: 720px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.platform-pills span { background: var(--panel-solid); color: var(--muted); border-color: var(--border); }
.hero-visual { position: relative; z-index: 1; display: grid; place-items: center; }
.mock-window {
  width: min(400px, 100%);
  border-radius: 30px;
  overflow: hidden;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transform: rotate(-2deg);
}
.mock-top { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 18px; background: #07111f; }
.mock-top span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.7); }
.mock-chat { display: grid; gap: 13px; padding: 24px; background: linear-gradient(180deg, var(--panel-solid), var(--bg-soft)); }
.mock-message { width: 78%; border-radius: 18px 18px 18px 6px; padding: 12px 14px; background: var(--panel-solid); border: 1px solid var(--border); box-shadow: var(--shadow-soft); font-weight: 700; font-size: 13px; }
.mock-message.out { margin-left: auto; background: #dff8ea; color: #075c34; border-color: rgba(21,184,106,.20); border-radius: 18px 18px 6px 18px; }
.mock-kanban { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-radius: 18px; background: var(--primary); color: white; padding: 16px; }
.mock-kanban b { font-size: 30px; }
.mock-kanban small { color: rgba(255,255,255,.75); font-weight: 800; }

.grid { display: grid; gap: 18px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.crm { grid-template-columns: 350px minmax(0, 1fr) 360px; align-items: start; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--border);
}
.panel-head h3 { margin: 0; font-size: 16px; letter-spacing: -.03em; }
.panel-body { padding: 18px; }
.stat { position: relative; overflow: hidden; padding: 20px; min-height: 144px; }
.stat::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 98px;
  height: 98px;
  border-radius: 50%;
  background: var(--primary-soft);
}
.stat span { display: block; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { position: relative; z-index: 1; display: block; font-size: clamp(30px, 3.5vw, 44px); margin-top: 10px; letter-spacing: -.06em; }
.stat em { display: block; color: var(--muted); font-style: normal; font-size: 13px; margin-top: 4px; }
.stat.green::after { background: rgba(21,184,106,.16); }
.stat.blue::after { background: rgba(14,165,233,.16); }
.stat.orange::after { background: rgba(249,115,22,.15); }
.stat.purple::after { background: var(--primary-soft); }

.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.compact-row:last-child { border-bottom: 0; }
.operation-list { display: grid; gap: 12px; }
.operation-list p { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.operation-list b { font-size: 24px; letter-spacing: -.05em; }
.operation-list span { color: var(--muted); font-size: 13px; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.table th, .table td { padding: 13px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.table tbody tr:hover { background: rgba(79,53,245,.04); }
.muted { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 900;
  background: var(--panel-2);
  color: var(--muted);
  white-space: nowrap;
}
.badge.green { color: #078348; background: rgba(21,184,106,.12); }
.badge.warn { color: #9a6200; background: rgba(245,158,11,.13); }
[data-theme="dark"] .badge.green { color: #69f2ad; }
[data-theme="dark"] .badge.warn { color: #ffd37a; }
.avatar {
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--green));
  color: white;
  font-weight: 900;
  flex: 0 0 auto;
  box-shadow: 0 10px 24px rgba(20,31,52,.12);
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.lg { width: 66px; height: 66px; font-size: 22px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-btn { cursor: zoom-in; padding: 0; }
.title-with-avatar, .customer-card { display: flex; align-items: center; gap: 11px; }
.customer-card { margin-bottom: 16px; }
.customer-card p { margin: 0 0 5px; }
.actions-stack, .actions-row { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.actions-row { margin-top: 14px; }
.mini-section { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; display: grid; gap: 9px; }
.mini-section h4 { margin: 0; font-size: 14px; }
.mini-form { display: grid; gap: 9px; }
.schedule-line { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--border); border-radius: 16px; margin: 0; background: var(--bg-soft); }
.schedule-line span, .schedule-line em { color: var(--muted); font-size: 12px; font-style: normal; }

.conversation-list { display: grid; gap: 10px; max-height: calc(100vh - 188px); overflow: auto; padding-right: 2px; }
.conversation-item {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  border-radius: 20px;
  padding: 13px;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.conversation-item:hover { transform: translateY(-1px); box-shadow: var(--shadow-soft); }
.conversation-item.active { border-color: rgba(79,53,245,.42); background: linear-gradient(135deg, var(--primary-soft), var(--panel-solid)); }
.conversation-item.with-avatar { display: grid; grid-template-columns: 42px 1fr; align-items: center; gap: 11px; }
.conversation-copy { min-width: 0; display: grid; gap: 5px; }
.conversation-copy .muted { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.conversation-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 900; }

.chat {
  height: calc(100vh - 172px);
  min-height: 620px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
}
.messages {
  padding: 18px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background:
    linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,.55)),
    radial-gradient(circle at 12px 12px, rgba(107,120,145,.11) 1px, transparent 1px);
  background-size: auto, 18px 18px;
}
[data-theme="dark"] .messages { background: radial-gradient(circle at 12px 12px, rgba(226,232,240,.06) 1px, transparent 1px), var(--bg-soft); background-size: 18px 18px, auto; }
.msg {
  max-width: 76%;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  padding: 11px 13px;
  border-radius: 18px 18px 18px 6px;
  display: grid;
  gap: 8px;
  box-shadow: 0 10px 26px rgba(20,31,52,.06);
}
.msg.out { margin-left: auto; background: #dff8ea; color: #075c34; border-color: rgba(21,184,106,.22); border-radius: 18px 18px 6px 18px; }
[data-theme="dark"] .msg.out { background: rgba(21,184,106,.18); color: #dcffe9; }
.msg audio, .msg video { width: min(360px, 100%); }
.media-image { border: 0; padding: 0; background: transparent; cursor: zoom-in; }
.media-image img { max-width: min(340px, 100%); max-height: 260px; border-radius: 14px; display: block; }
.media-doc { color: inherit; font-weight: 900; }
.quoted, .transcription {
  border-left: 3px solid var(--primary);
  padding: 7px 9px;
  background: var(--primary-soft);
  border-radius: 10px;
  color: var(--muted);
  font-size: 12px;
}
.msg-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; }
.reply-btn { border: 0; background: transparent; color: var(--primary); font-weight: 900; padding: 2px 0; }
.composer { display: grid; gap: 9px; padding: 13px; border-top: 1px solid var(--border); background: var(--panel-solid); }
.composer-row { display: flex; gap: 9px; align-items: center; }
.composer input { flex: 1; min-width: 0; }
.icon-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-weight: 900;
  transition: transform .18s ease, background .18s ease;
}
.icon-btn:hover { transform: translateY(-1px); background: var(--bg-soft); }
.icon-btn.recording { background: var(--danger); color: white; border-color: var(--danger); }
.emoji-tray { display: flex; flex-wrap: wrap; gap: 7px; }
.emoji-tray button { border: 1px solid var(--border); background: var(--panel-solid); border-radius: 12px; width: 36px; height: 36px; }
.reply-preview { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid var(--border); border-left: 3px solid var(--primary); border-radius: 14px; padding: 9px 11px; color: var(--muted); font-size: 13px; background: var(--primary-soft); }
.reply-preview button { border: 0; background: transparent; color: var(--danger); font-size: 20px; }

.qr-box {
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed rgba(79,53,245,.35);
  background: var(--bg-soft);
  border-radius: 20px;
  padding: 16px;
  margin-top: 12px;
}
.qr-box img { width: min(240px, 100%); height: auto; border-radius: 16px; background: white; padding: 8px; }
.qr-box span, .test-result { color: var(--muted); font-size: 13px; }
.channel-error {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(220, 38, 38, .22);
  background: rgba(220, 38, 38, .08);
  color: var(--danger);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.4;
}
.channel-error b { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.channel-error span { color: var(--text); }
.checkline { display: flex; align-items: center; gap: 10px; margin: 8px 0 16px; color: var(--text); font-size: 14px; font-weight: 850; }
.checkline input { width: 19px; height: 19px; }
.test-result { margin-top: 14px; white-space: pre-wrap; line-height: 1.45; }
.audio-settings-box {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(21,184,106,.22);
  background: var(--bg-soft);
  border-radius: 20px;
  padding: 14px;
  margin: 12px 0;
}
.audio-settings-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.audio-settings-head b, .switch-line { color: var(--text); font-weight: 900; }
.audio-settings-head span { display: block; margin-top: 3px; font-size: 12px; }
.switch-line { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.form-grid.compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.kanban-summary { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kanban-summary span {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.kanban-summary b { color: var(--text); font-size: 20px; line-height: 1; }
.kanban { display: grid; grid-template-columns: repeat(5, minmax(255px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 4px; }
.kanban-col { background: var(--bg-soft); border: 1px solid var(--border); border-radius: 22px; min-height: 360px; padding: 12px; }
.kanban-col h4 { margin: 0 0 12px; font-size: 13px; display: flex; justify-content: space-between; align-items: center; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kanban-col h4 span { color: var(--muted); }
.kanban-col h4 b { color: var(--text); background: var(--panel-solid); border: 1px solid var(--border); border-radius: 999px; padding: 4px 8px; }
.kanban-card { background: var(--panel-solid); border: 1px solid var(--border); border-radius: 20px; padding: 12px; display: grid; gap: 10px; margin-bottom: 10px; box-shadow: 0 12px 28px rgba(20,31,52,.06); }
.kanban-card-head { display: flex; gap: 9px; align-items: center; }
.kanban-card-head small { display: block; color: var(--muted); margin-top: 2px; }
.kanban-card p { margin: 0; color: var(--muted); font-size: 13px; }
.kanban-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 850; }
.kanban-card select { width: 100%; }
.kanban-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.kanban-actions .btn { padding: 8px 10px; border-radius: 13px; }
.kanban-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: 16px;
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-solid) 65%, transparent);
}
.kanban-empty b { color: var(--text); }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #07111f;
  color: white;
  padding: 13px 15px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  z-index: 100;
  max-width: min(440px, calc(100vw - 36px));
}
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0,0,0,.78);
  display: grid;
  place-items: center;
  padding: 30px;
}
.image-modal img { max-width: min(920px, 94vw); max-height: 86vh; border-radius: 18px; background: white; }
.image-modal-close { position: fixed; top: 18px; right: 18px; border: 0; border-radius: 14px; padding: 10px 14px; font-weight: 900; }

@media (max-width: 1280px) {
  .grid.crm { grid-template-columns: 320px minmax(0, 1fr); }
  .grid.crm > .panel:last-child { grid-column: 1 / -1; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .hero-panel, .login-shell { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .grid.cols-3, .grid.crm { grid-template-columns: 1fr; }
  .chat { height: auto; min-height: 620px; }
  .conversation-list { max-height: none; }
}
@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-card { display: none; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .top-actions, .top-actions select { width: 100%; }
  .top-actions select, .top-actions .btn { flex: 1; }
  .grid.cols-4 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .login-brand { min-height: 440px; }
  .login-copy h1 { font-size: 40px; }
  .content { padding: 14px; }
  .hero-panel { border-radius: 24px; padding: 22px; }
  .hero-copy h1 { font-size: 34px; }
  .nav { grid-template-columns: 1fr; }
  .composer-row { flex-wrap: wrap; }
  .composer input { flex-basis: 100%; order: -1; }
  .msg { max-width: 92%; }
}


.row-end { display: flex; align-items: center; gap: 10px; }
.hero-compact { min-height: 280px; }
.hero-summary { align-items: stretch; }
.summary-card {
  width: min(340px, 100%);
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, var(--panel-solid), rgba(79,53,245,.04));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 12px;
}
.summary-label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 900; }
.summary-card strong { font-size: clamp(42px, 6vw, 64px); letter-spacing: -.08em; line-height: .9; }
.summary-card small { color: var(--muted); font-size: 14px; }
.summary-meter { height: 10px; background: var(--panel-2); border-radius: 999px; overflow: hidden; }
.summary-meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--green)); }
.summary-mini { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.summary-mini b { font-size: 22px; letter-spacing: -.05em; }
.summary-mini span { color: var(--muted); font-size: 13px; }
.focus-list { display: grid; gap: 12px; }
.focus-item {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--panel-solid), rgba(255,255,255,.4));
}
.focus-item b { font-size: 24px; letter-spacing: -.05em; }
.focus-item span { color: var(--muted); font-size: 13px; }
.shortcut-stack { display: grid; gap: 12px; }
.shortcut-btn {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--panel-solid), rgba(79,53,245,.03));
  border-radius: 18px;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}
.shortcut-btn b { font-size: 16px; letter-spacing: -.03em; }
.shortcut-btn span { color: var(--muted); line-height: 1.5; }
.channel-intro { border-radius: 28px; }
.channel-intro-body {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: center;
}
.channel-intro-body h3 { margin: 10px 0 8px; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.04em; }
.channel-intro-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.channel-intro-stats div {
  min-width: 150px;
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--panel-2);
  display: grid;
  gap: 4px;
}
.channel-intro-stats b { font-size: 28px; letter-spacing: -.06em; }
.channel-intro-stats span { color: var(--muted); font-size: 13px; }
.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.channel-card.connected { border-color: rgba(21,184,106,.22); }
.channel-kind { margin: 3px 0 0; font-size: 13px; }
.channel-copy { margin: 0 0 16px; line-height: 1.6; }
.channel-form { display: grid; gap: 12px; }
.pair-code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.pair-code-row .field { margin-bottom: 0; }
.wrap-top { align-items: flex-start; }
.small-copy { font-size: 12px; }
.soft-pills { margin-top: 18px; }
@media (max-width: 1100px) {
  .channel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .channel-intro-body { flex-direction: column; align-items: flex-start; }
  .pair-code-row { grid-template-columns: 1fr; }
}

/* v3 - Atendimento mais amplo e operacional */
.brand-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar-toggle {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.app-shell.sidebar-collapsed { grid-template-columns: 88px minmax(0, 1fr); }
.sidebar-collapsed .sidebar { padding: 18px 12px; align-items: center; overflow-x: hidden; }
.sidebar-collapsed .brand-line { width: 100%; justify-content: center; }
.sidebar-collapsed .brand-mark span,
.sidebar-collapsed .sidebar-caption,
.sidebar-collapsed .sidebar-card,
.sidebar-collapsed .sidebar-footer,
.sidebar-collapsed .nav button span:not(.nav-icon) { display: none; }
.sidebar-collapsed .brand-mark img { width: 42px; height: 42px; }
.sidebar-collapsed .nav { width: 100%; }
.sidebar-collapsed .nav button { justify-content: center; padding: 10px; }
.sidebar-collapsed .nav button:hover { transform: none; }
.sidebar-collapsed .nav-icon { width: 42px; height: 42px; }
.sidebar-collapsed .sidebar-toggle { position: static; }

.inbox-toolbar { border-radius: 28px; }
.inbox-toolbar-body { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.inbox-toolbar h3 { margin: 8px 0 6px; font-size: clamp(20px, 2vw, 28px); letter-spacing: -.04em; }
.inbox-toolbar p { margin: 0; }
.inbox-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  color: var(--text);
  border-radius: 999px;
  padding: 9px 12px;
  font-weight: 850;
}
.filter-chip b {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--muted);
  font-size: 12px;
}
.filter-chip.active { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 14px 26px rgba(79,53,245,.20); }
.filter-chip.active b { background: rgba(255,255,255,.18); color: #fff; }
.owner-line { font-size: 12px; }
.chat-owner { margin: 5px 0 0; font-size: 12px; }
.msg-actions { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.danger-link { color: var(--danger) !important; }
.msg.system { border-style: dashed; }
.msg.system .msg-text::before { content: "Aviso: "; font-weight: 900; }
.msg.deleted { opacity: .72; }
.msg.deleted .msg-text { font-style: italic; color: var(--muted); }

@media (max-width: 1200px) {
  .inbox-toolbar-body { flex-direction: column; align-items: flex-start; }
  .inbox-tabs { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .app-shell.sidebar-collapsed { grid-template-columns: 1fr; }
  .sidebar-collapsed .sidebar { align-items: stretch; }
  .sidebar-collapsed .brand-mark span,
  .sidebar-collapsed .sidebar-caption,
  .sidebar-collapsed .nav button span:not(.nav-icon) { display: inline; }
  .sidebar-collapsed .nav button { justify-content: flex-start; }
}

/* v4 - atendimento com mais espaço útil e drawer lateral */
.app-shell.sidebar-collapsed.sidebar-peek { grid-template-columns: 286px minmax(0, 1fr); }
.app-shell.sidebar-collapsed.sidebar-peek .sidebar {
  padding: 22px;
  align-items: stretch;
  overflow-x: hidden;
}
.app-shell.sidebar-collapsed.sidebar-peek .brand-line { width: auto; justify-content: space-between; }
.app-shell.sidebar-collapsed.sidebar-peek .brand-mark span,
.app-shell.sidebar-collapsed.sidebar-peek .sidebar-caption,
.app-shell.sidebar-collapsed.sidebar-peek .sidebar-card,
.app-shell.sidebar-collapsed.sidebar-peek .sidebar-footer,
.app-shell.sidebar-collapsed.sidebar-peek .nav button span:not(.nav-icon) { display: inline; }
.app-shell.sidebar-collapsed.sidebar-peek .nav button { justify-content: flex-start; padding: 11px 12px; }
.app-shell.sidebar-collapsed.sidebar-peek .nav-icon { width: 34px; height: 34px; }
.app-shell.sidebar-collapsed.sidebar-peek .sidebar-toggle { position: static; }

.grid.crm.crm-expanded {
  grid-template-columns: 320px minmax(0, 1fr) 320px;
  align-items: start;
}
.grid.crm.crm-expanded > .panel { min-width: 0; }
.side-rail .panel-head { align-items: flex-start; gap: 12px; }
.side-rail .panel-head .btn { margin-left: auto; }
.compact-actions { margin-top: 12px; }
.compact-actions .btn { flex: 1 1 calc(50% - 8px); }
.rail-status {
  display: grid;
  gap: 8px;
  margin: 12px 0 16px;
}
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 12px;
}
.muted-pill {
  background: var(--panel-2);
  color: var(--muted);
}
.soft-btn {
  background: linear-gradient(180deg, var(--panel-solid), rgba(79,53,245,.05));
}

.ops-drawer {
  position: fixed;
  top: 0;
  right: -440px;
  width: min(420px, calc(100vw - 24px));
  height: 100vh;
  z-index: 35;
  background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
  border-left: 1px solid var(--border);
  box-shadow: -24px 0 56px rgba(20,31,52,.18);
  display: grid;
  grid-template-rows: auto 1fr;
  transition: right .22s ease;
  backdrop-filter: blur(18px);
}
.ops-drawer.open { right: 0; }
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
  z-index: 34;
}
.drawer-backdrop.show { opacity: 1; pointer-events: auto; }
.ops-drawer-head {
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.ops-drawer-head h3 { margin: 8px 0 6px; font-size: 24px; letter-spacing: -.04em; }
.ops-drawer-head p { margin: 0; max-width: 290px; }
.drawer-close {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  color: var(--text);
  font-size: 28px;
  line-height: 1;
}
.ops-drawer-body {
  overflow: auto;
  padding: 18px 22px 24px;
  display: grid;
  gap: 16px;
}
.no-border { border-top: 0; margin-top: 0; padding-top: 0; }

@media (max-width: 1380px) {
  .grid.crm.crm-expanded { grid-template-columns: 300px minmax(0, 1fr) 290px; }
}
@media (max-width: 1200px) {
  .grid.crm.crm-expanded { grid-template-columns: 300px minmax(0, 1fr); }
  .grid.crm.crm-expanded > .side-rail { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .app-shell.sidebar-collapsed.sidebar-peek { grid-template-columns: 1fr; }
  .grid.crm.crm-expanded { grid-template-columns: 1fr; }
  .ops-drawer { width: 100%; right: -100%; }
}

/* v5 - visual mais limpo, profissional e atendimento mais parecido com WhatsApp */
body {
  font-size: 14px;
  line-height: 1.45;
}
.topbar {
  min-height: 72px;
  padding: 14px clamp(18px, 2vw, 26px);
}
.topbar h2 {
  font-size: 18px;
  letter-spacing: -.03em;
}
.top-kicker { font-size: 10px; }
.content { padding: clamp(14px, 2vw, 24px); gap: 16px; }
.panel {
  border-radius: 20px;
  box-shadow: 0 12px 30px rgba(20,31,52,.06);
}
.panel-head {
  padding: 14px 16px 0;
}
.panel-head h3 {
  font-size: 15px;
  letter-spacing: -.02em;
}
.panel-body {
  padding: 14px 16px 16px;
}
.btn, .top-actions select, input, select, textarea {
  font-size: 13px;
}
.btn {
  border-radius: 14px;
  padding: 10px 14px;
}
.badge {
  font-size: 10px;
  padding: 5px 9px;
}
.brand-mark { font-size: 18px; }
.brand-mark img { width: 38px; height: 38px; }
.sidebar-caption,
.sidebar-card span,
.sidebar-footer,
.muted,
.schedule-line span,
.schedule-line em,
.owner-line,
.chat-owner {
  font-size: 12px;
}
.nav button {
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 14px;
}
.nav-icon { width: 32px; height: 32px; }
.eyebrow { font-size: 10px; padding: 5px 9px; }

.hero-copy h1,
.login-copy h1,
.summary-card strong,
.stat strong,
.focus-item b,
.channel-intro-body h3 {
  letter-spacing: -.04em;
}
.hero-copy h1,
.login-copy h1 { font-size: clamp(30px, 4vw, 46px); }
.hero-copy p,
.login-copy p,
.focus-item span,
.shortcut-btn span,
.channel-copy,
.operation-list span { font-size: 13px; }
.summary-card strong { font-size: clamp(34px, 4vw, 48px); }
.stat strong { font-size: clamp(24px, 3vw, 34px); }
.top-actions { gap: 8px; }

.grid.crm.crm-expanded {
  grid-template-columns: 300px minmax(0, 1fr) 290px;
}
.conversation-list {
  max-height: calc(100vh - 172px);
}
.conversation-item {
  padding: 11px 12px;
  border-radius: 18px;
}
.conversation-title { font-size: 13px; }
.chat {
  height: calc(100vh - 154px);
  min-height: 560px;
}
.messages {
  background: linear-gradient(180deg, rgba(243,247,255,.9), rgba(248,250,255,.96));
}
[data-theme="dark"] .messages {
  background: linear-gradient(180deg, rgba(15,27,46,.95), rgba(9,18,31,.98));
}
.msg {
  border-radius: 18px 18px 18px 8px;
  max-width: min(76%, 720px);
  padding: 10px 12px;
}
.msg.out {
  border-radius: 18px 18px 8px 18px;
}
.msg-text { font-size: 13px; line-height: 1.55; }
.msg-meta { font-size: 11px; gap: 10px; }
.reply-btn { font-size: 11px; }
.quoted { font-size: 11px; }

.whatsapp-composer {
  gap: 10px;
  padding-top: 12px;
}
.whatsapp-row {
  align-items: center;
  gap: 10px;
  background: transparent;
}
.composer-tools {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 18px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.composer-input-shell {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  background: var(--panel-solid);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
.composer input#messageInput {
  min-height: 46px;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
}
.composer input#messageInput:focus { outline: none; box-shadow: none; }
.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 18px;
  background: transparent;
}
.icon-btn:hover {
  background: rgba(79,53,245,.08);
  transform: translateY(-1px);
}
.send-btn {
  min-width: 96px;
  min-height: 46px;
  border-radius: 16px;
}
.emoji-tray,
.sticker-tray {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px;
  border-radius: 18px;
  background: var(--panel-2);
  border: 1px solid var(--border);
}
.emoji-tray button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--panel-solid);
  font-size: 20px;
}
.sticker-option {
  min-width: 78px;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  border-radius: 16px;
  padding: 8px 10px;
  display: grid;
  gap: 4px;
  justify-items: center;
}
.sticker-option span { font-size: 28px; line-height: 1; }
.sticker-option small { color: var(--muted); font-size: 11px; }
.upload-sticker {
  background: linear-gradient(180deg, var(--panel-solid), rgba(79,53,245,.05));
}
.reply-preview {
  border-radius: 16px;
  font-size: 12px;
  padding: 10px 12px;
}
.side-rail .panel-body,
.ops-drawer-body { font-size: 13px; }
.status-pill { font-size: 11px; }

.table th, .table td { padding: 10px 10px; font-size: 13px; }
.table th { font-size: 10px; }

@media (max-width: 1200px) {
  .grid.crm.crm-expanded { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .topbar h2 { font-size: 17px; }
  .chat { min-height: 520px; height: auto; }
  .whatsapp-row { flex-wrap: wrap; }
  .composer-tools { order: 2; }
  .send-btn { width: 100%; }
}

/* v6 - revisão geral sem mexer na lógica: mais limpo, denso e profissional */
:root {
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 42px rgba(20,31,52,.08);
  --shadow-soft: 0 10px 26px rgba(20,31,52,.055);
}
body {
  font-size: 13px;
  background:
    radial-gradient(circle at top left, rgba(79, 53, 245, .07), transparent 24rem),
    radial-gradient(circle at 92% 8%, rgba(21, 184, 106, .065), transparent 22rem),
    var(--bg);
}
button, input, select, textarea { font-size: 13px; }
input, select, textarea {
  min-height: 40px;
  border-radius: 12px !important;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(79,53,245,.45) !important;
  box-shadow: 0 0 0 4px rgba(79,53,245,.08);
}
textarea { line-height: 1.5; resize: vertical; }
.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: none;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease, background .14s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,31,52,.07); }
.btn.primary { box-shadow: 0 10px 22px rgba(79,53,245,.18); }
.btn.danger { background: #fff5f5; border-color: rgba(220,38,38,.22); color: #c81e1e; }
[data-theme="dark"] .btn.danger { background: rgba(220,38,38,.10); color: #ff9a9a; }

.app-shell { grid-template-columns: 272px minmax(0, 1fr); }
.app-shell.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
.app-shell.sidebar-collapsed.sidebar-peek { grid-template-columns: 272px minmax(0, 1fr); }
.sidebar { padding: 18px; gap: 14px; }
.sidebar-collapsed .sidebar { padding: 16px 10px; }
.sidebar .brand-mark { font-size: 16px; }
.sidebar .brand-mark img { width: 34px; height: 34px; border-radius: 12px; }
.sidebar-caption { margin: -3px 0 0; }
.sidebar-card { border-radius: 18px; padding: 13px; }
.sidebar-toggle { width: 32px; height: 32px; border-radius: 11px; }
.nav { gap: 6px; }
.nav button { padding: 9px 10px; border-radius: 14px; font-size: 13px; }
.nav-icon { width: 30px; height: 30px; border-radius: 10px; }
.sidebar-collapsed .nav-icon { width: 38px; height: 38px; }
.sidebar-collapsed .nav button { padding: 8px; }

.topbar {
  min-height: 64px;
  padding: 12px clamp(16px, 2vw, 22px);
}
.topbar-copy { gap: 2px; }
.topbar h2 { font-size: 17px; }
.top-actions select { height: 40px; width: min(250px, 38vw); }
.content { padding: clamp(12px, 1.7vw, 20px); gap: 14px; }
.panel {
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
}
.panel-head { padding: 13px 14px 0; min-height: 46px; }
.panel-head h3 { font-size: 14px; }
.panel-body { padding: 13px 14px 14px; }
.badge { font-size: 10px; padding: 4px 8px; }
.field { margin-bottom: 12px; gap: 6px; font-size: 12px; }
.field-label { font-size: 12px; }
.checkline { font-size: 13px; margin: 6px 0 12px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 12px 0; }

/* Dashboard mais padrão SaaS, sem cara de página pesada */
.hero-panel {
  min-height: 220px;
  border-radius: 22px;
  padding: clamp(20px, 2.5vw, 28px);
}
.hero-copy h1 { font-size: clamp(26px, 3.1vw, 40px); line-height: 1.06; margin: 10px 0 8px; max-width: 740px; }
.hero-copy p { font-size: 13px; max-width: 690px; line-height: 1.55; }
.hero-actions { margin-top: 16px; gap: 9px; }
.platform-pills { gap: 8px; }
.platform-pills span { padding: 7px 10px; font-size: 11px; }
.summary-card { border-radius: 20px; padding: 18px; }
.summary-card strong { font-size: clamp(30px, 3.5vw, 42px); }
.grid { gap: 14px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(160px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.stat { min-height: 112px; padding: 15px; border-radius: 18px; }
.stat strong { font-size: clamp(24px, 2.6vw, 32px); margin-top: 8px; }
.stat span { font-size: 10px; }
.stat em { font-size: 12px; }
.focus-item { border-radius: 14px; padding: 11px 12px; }
.focus-item b { font-size: 20px; }
.shortcut-btn { border-radius: 14px; padding: 13px 14px; }
.shortcut-btn b { font-size: 14px; }

/* Atendimento: menos aperto, mais foco no chat */
.inbox-toolbar { border-radius: 18px; }
.inbox-toolbar-body { padding: 13px 14px; gap: 12px; }
.inbox-toolbar h3 { font-size: clamp(17px, 1.8vw, 22px); margin: 6px 0 4px; }
.inbox-toolbar p { max-width: 760px; }
.inbox-tabs { gap: 6px; }
.filter-chip { padding: 7px 10px; font-size: 12px; }
.filter-chip b { height: 20px; min-width: 20px; font-size: 11px; }
.grid.crm.crm-expanded { grid-template-columns: 290px minmax(0, 1fr) 280px; gap: 14px; }
.conversation-list { max-height: calc(100vh - 150px); gap: 8px; }
.conversation-item { border-radius: 15px; padding: 10px; }
.conversation-item.with-avatar { grid-template-columns: 38px 1fr; gap: 9px; }
.avatar { width: 38px; height: 38px; font-size: 13px; }
.avatar.sm { width: 28px; height: 28px; }
.avatar.lg { width: 54px; height: 54px; }
.conversation-title { font-size: 12.5px; }
.owner-line, .conversation-copy .muted { font-size: 11.5px; }
.chat { height: calc(100vh - 136px); min-height: 540px; }
.chat .panel-head { padding: 12px 14px 10px; }
.chat .panel-head h3 { font-size: 14px; }
.messages { padding: 14px; gap: 8px; }
.msg { padding: 9px 11px; max-width: min(74%, 690px); }
.msg-text { font-size: 12.8px; }
.composer { padding: 10px; }
.composer-tools { padding: 5px; gap: 6px; border-radius: 15px; }
.icon-btn { width: 34px; height: 34px; border-radius: 11px; font-size: 16px; }
.composer-input-shell { border-radius: 15px; padding: 0 11px; }
.composer input#messageInput { min-height: 42px; font-size: 13px; }
.send-btn { min-height: 42px; min-width: 84px; border-radius: 14px; }
.emoji-tray, .sticker-tray { border-radius: 15px; padding: 8px; gap: 6px; }
.emoji-tray button { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.sticker-option { min-width: 68px; border-radius: 13px; padding: 7px 8px; }
.sticker-option span { font-size: 24px; }
.side-rail .customer-card { align-items: flex-start; }
.rail-status { gap: 6px; margin: 10px 0 13px; }
.status-pill { padding: 7px 10px; }
.compact-actions { gap: 7px; margin-top: 10px; }
.ops-drawer { width: min(390px, calc(100vw - 22px)); }
.ops-drawer-head { padding: 18px 18px 14px; }
.ops-drawer-head h3 { font-size: 20px; }
.ops-drawer-body { padding: 14px 18px 20px; }

/* Funil/Kanban */
.kanban { gap: 10px; }
.kanban-col { border-radius: 16px; padding: 9px; min-height: 300px; }
.kanban-col h4 { font-size: 12px; padding: 2px 2px 8px; }
.kanban-card { border-radius: 15px; padding: 10px; gap: 7px; }
.kanban-card p { font-size: 12px; }
.kanban-card-head b { font-size: 12.5px; }
.kanban-card-head small { font-size: 11px; }
.kanban-actions .btn { padding: 7px 9px; font-size: 11.5px; min-height: 32px; }

/* Contatos e tabelas */
.table { font-size: 12.5px; }
.table th, .table td { padding: 9px 10px; }
.table thead th { background: color-mix(in srgb, var(--panel-2) 72%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.table td:first-child, .table th:first-child { padding-left: 12px; }
.table td:last-child, .table th:last-child { padding-right: 12px; }
.title-with-avatar b { font-size: 13px; }

/* Canais */
.channel-intro { border-radius: 20px; }
.channel-intro-body { padding: 16px; }
.channel-intro-body h3 { font-size: clamp(18px, 1.9vw, 24px); margin: 7px 0 5px; }
.channel-intro-stats div { border-radius: 15px; padding: 12px 14px; min-width: 135px; }
.channel-intro-stats b { font-size: 22px; }
.channel-grid { gap: 14px; }
.channel-card .panel-head { padding-bottom: 10px; }
.channel-kind { font-size: 12px; }
.channel-copy { font-size: 12.5px; margin-bottom: 12px; }
.channel-form { gap: 9px; }
.qr-box { border-radius: 15px; padding: 12px; }
.qr-box img { max-width: 210px; }

/* IA, equipe, superadmin e formulários */
#aiConfigForm, #teamForm, #companyForm, #aiForm, #followForm { display: grid; gap: 10px; }
#aiConfigForm .field, #teamForm .field, #companyForm .field { margin-bottom: 0; }
#aiPrompt, #aiKb, #followMessages { min-height: 110px; }
.test-result { font-size: 12.5px; border-radius: 14px; background: var(--panel-2); padding: 10px; min-height: 42px; }
.mini-section { margin-top: 12px; padding-top: 12px; }
.mini-section h4 { font-size: 13px; }
.mini-form { gap: 8px; }
.schedule-line { border-radius: 14px; padding: 9px; }

/* Login também no mesmo padrão visual */
.login-card { border-radius: 20px; padding: 24px; }
.login-card h2 { font-size: 22px; margin: 6px 0 12px; }
.login-copy h1 { font-size: clamp(30px, 4vw, 44px); }
.login-highlights span { font-size: 12px; }
.form-kicker { font-size: 10px; }

@media (max-width: 1320px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.crm.crm-expanded { grid-template-columns: 280px minmax(0, 1fr); }
}
@media (max-width: 1020px) {
  .grid.cols-3, .grid.cols-4, .grid.crm.crm-expanded { grid-template-columns: 1fr; }
  .chat { height: auto; min-height: 560px; }
  .conversation-list { max-height: none; }
  .hero-visual { display: none; }
}
@media (max-width: 700px) {
  body { font-size: 13px; }
  .topbar { align-items: stretch; }
  .top-actions { width: 100%; }
  .top-actions select, .top-actions .btn { width: 100%; }
  .panel-head { flex-wrap: wrap; }
  .msg { max-width: 90%; }
  .composer-tools { width: 100%; justify-content: space-between; }
  .composer-input-shell { width: 100%; flex-basis: 100%; order: -1; }
  .send-btn { width: 100%; }
}

/* v7 - correções WhatsApp: áudio recebido e figurinhas reais */
.media-sticker img {
  max-width: 180px;
  max-height: 180px;
  object-fit: contain;
  background: transparent;
  border-radius: 20px;
  box-shadow: none;
}
.msg audio {
  height: 42px;
  max-width: 100%;
}
.msg .media-image + .msg-text,
.msg audio + .msg-text,
.msg video + .msg-text {
  margin-top: 4px;
}
.sticker-option:hover,
.emoji-tray button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(20,31,52,.08);
}

/* v8 - CRM profissional: dashboard analítico, contatos editáveis e follow-up claro */
.dashboard-analytics .panel-body { min-height: 180px; }
.mini-chart {
  height: 132px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 12px 4px 2px;
}
.mini-chart span {
  flex: 1;
  min-width: 10px;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, var(--primary), rgba(79,53,245,.28));
  box-shadow: 0 10px 22px rgba(79,53,245,.12);
}
.metric-bars { display: grid; gap: 14px; }
.metric-bar { display: grid; gap: 8px; }
.metric-bar div { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.metric-bar div span { color: var(--muted); font-weight: 800; }
.metric-bar i {
  display: block;
  height: 10px;
  min-width: 18px;
  border-radius: 999px;
  background: var(--primary);
}
.metric-bar i.green { background: var(--green); }
.metric-bar i.blue { background: var(--cyan); }
.metric-bar i.purple { background: var(--primary); }
.metric-bar i.orange { background: var(--orange); }
.report-stack { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-header-body { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.report-header-body h3 { margin: 8px 0 6px; font-size: clamp(22px, 2vw, 30px); }
.report-period-badge {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--primary-soft);
  color: var(--primary-600);
  font-weight: 900;
  white-space: nowrap;
}
.timeline-chart {
  min-height: 180px;
  display: flex;
  align-items: end;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 2px;
}
.timeline-day {
  min-width: 54px;
  display: grid;
  grid-template-rows: auto 120px auto;
  gap: 7px;
  align-items: end;
  justify-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.timeline-day div { height: 120px; display: flex; align-items: end; gap: 4px; }
.timeline-day i { width: 12px; min-height: 8px; border-radius: 999px 999px 6px 6px; display: block; }
.timeline-day i.green { background: var(--green); }
.timeline-day i.blue { background: var(--cyan); }
.timeline-day b { color: var(--text); font-size: 12px; }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: conic-gradient(var(--green) 0 33%, var(--primary) 33% 66%, var(--orange) 66% 100%);
}
.donut::after { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: var(--panel-solid); }
.donut b, .donut span { position: relative; z-index: 1; display: block; text-align: center; }
.donut b { font-size: 26px; line-height: 1; }
.donut span { color: var(--muted); font-size: 11px; }
.donut-legend { display: grid; gap: 8px; color: var(--muted); font-size: 12px; }
.contacts-layout .compact-form { display: grid; gap: 4px; }
.contacts-table .btn { padding: 7px 10px; }
.contacts-table .selected-row { background: var(--primary-soft); }
.contacts-table .table-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.follow-preview {
  display: grid;
  gap: 8px;
  margin: -4px 0 10px;
}
.follow-preview div {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-2);
}
.follow-preview b {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
}
.follow-preview span { font-size: 13px; line-height: 1.45; }
.file-trigger-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}
.file-trigger-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.3fr) minmax(120px, 1fr) minmax(150px, 1fr) 92px 92px auto auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-2);
}
.file-trigger-row > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}
.file-trigger-row b,
.file-trigger-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-trigger-row span,
.small-check {
  color: var(--muted);
  font-size: 12px;
}
.file-trigger-row input {
  min-width: 0;
}
.danger-soft {
  color: #dc2626;
  border-color: color-mix(in srgb, #dc2626 35%, var(--border));
}
.media-sticker img { max-width: 180px !important; max-height: 180px !important; object-fit: contain; background: transparent; }
@media (max-width: 1100px) {
  .contacts-layout { grid-template-columns: 1fr !important; }
  .contacts-layout > .panel { grid-column: auto !important; }
  .dashboard-analytics { grid-template-columns: 1fr !important; }
  .file-trigger-row { grid-template-columns: 1fr 1fr; }
  .file-trigger-row > div { grid-column: span 2; }
}

/* v10 - leitura geral 10% maior */
body { font-size: 14.3px; }
button, input, select, textarea { font-size: 14.3px; }
.nav button,
.field,
.checkline,
.conversation-title,
.msg-text,
.panel-body,
.table,
.channel-copy,
.side-rail .panel-body,
.ops-drawer-body {
  font-size: 1.1em;
}
.muted,
.small-copy,
.msg-meta,
.owner-line,
.conversation-copy .muted,
.schedule-line span,
.schedule-line em,
.test-result {
  font-size: 1em;
}
.panel-head h3 { font-size: 15.4px; }
.topbar h2 { font-size: 18.7px; }
.btn { font-size: 14.3px; }
.composer input#messageInput { font-size: 14.3px; }
.msg { line-height: 1.58; }
@media (max-width: 700px) {
  body { font-size: 14px; }
}

/* v11 - acabamento SaaS HanyTech: preto, verde e branco */
:root {
  --bg: #f4f8f5;
  --bg-soft: #edf5ef;
  --panel: rgba(255, 255, 255, .96);
  --panel-solid: #ffffff;
  --panel-2: #f1f7f2;
  --text: #07130c;
  --muted: #5e7065;
  --border: rgba(7, 19, 12, .10);
  --primary: #18c35f;
  --primary-600: #0b8f42;
  --primary-soft: rgba(24, 195, 95, .14);
  --cyan: #22bfa0;
  --green: #18c35f;
  --success: #12a852;
  --sidebar: #020604;
  --sidebar-2: #07140d;
  --shadow: 0 18px 42px rgba(7, 19, 12, .10);
  --shadow-soft: 0 10px 28px rgba(7, 19, 12, .08);
  --radius: 8px;
  --radius-sm: 8px;
}

[data-theme="dark"] {
  --bg: #030704;
  --bg-soft: #07140d;
  --panel: rgba(9, 18, 12, .94);
  --panel-solid: #09120c;
  --panel-2: #0e1e14;
  --text: #f2fff6;
  --muted: #a8b9ad;
  --border: rgba(230, 255, 238, .11);
  --primary: #ccff00;
  --primary-600: #18c35f;
  --primary-soft: rgba(204, 255, 0, .15);
  --green: #18c35f;
  --sidebar: #010302;
  --sidebar-2: #061109;
}

body {
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(244, 248, 245, .96)),
    var(--bg);
}

[data-theme="dark"] body {
  background: linear-gradient(180deg, #030704, #07140d);
}

.login-brand {
  background:
    linear-gradient(140deg, rgba(2, 6, 4, .98), rgba(7, 20, 13, .95)),
    var(--sidebar);
}

.panel,
.login-card,
.conversation-card,
.channel-card,
.modal,
.ops-drawer,
.file-trigger-row,
.follow-preview div {
  border-radius: 8px;
}

.btn,
input,
select,
textarea,
.badge,
.eyebrow,
.form-kicker,
.top-kicker {
  border-radius: 8px;
  letter-spacing: 0;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-600));
  box-shadow: 0 10px 22px rgba(24, 195, 95, .18);
}

.nav button.active,
.nav button:hover {
  background: rgba(24, 195, 95, .14);
  color: #f6fff8;
}

.table tbody tr:hover {
  background: rgba(24, 195, 95, .06);
}

.mini-chart span {
  background: linear-gradient(180deg, var(--primary), rgba(24, 195, 95, .22));
  box-shadow: 0 10px 22px rgba(24, 195, 95, .12);
}

.msg.out {
  background: #e7fbe9;
  border-color: rgba(24, 195, 95, .26);
  color: #06220f;
}

[data-theme="dark"] .msg.out {
  background: rgba(24, 195, 95, .18);
  color: #e9ffef;
}

.billing-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(2, 6, 4, .96), rgba(9, 32, 18, .94)),
    var(--sidebar);
  color: #ffffff;
  border-color: rgba(24, 195, 95, .24);
  overflow: hidden;
}

.billing-hero .panel-body,
.billing-hero p,
.billing-hero .muted {
  color: rgba(255, 255, 255, .72);
}

.billing-hero h3 {
  margin: 10px 0 8px;
  max-width: 720px;
  font-size: 24px;
  line-height: 1.25;
}

.billing-summary {
  min-width: 190px;
  padding: 18px;
  border: 1px solid rgba(204, 255, 0, .26);
  background: rgba(255, 255, 255, .08);
  display: grid;
  gap: 5px;
}

.billing-summary b {
  font-size: 27px;
  color: #ccff00;
}

.billing-summary span {
  color: rgba(255, 255, 255, .72);
  font-weight: 800;
}

.plan-list {
  display: grid;
  gap: 12px;
}

.plan-card-mini {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 8px;
}

.plan-card-mini div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.plan-card-mini b {
  font-size: 16px;
}

.plan-card-mini span {
  color: var(--primary-600);
  font-weight: 900;
  white-space: nowrap;
}

.plan-card-mini p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.plan-card-mini small {
  color: var(--muted);
  font-weight: 800;
}

.plan-card-mini.is-muted {
  opacity: .72;
}

.plan-edit-form {
  background: rgba(22, 163, 74, .06);
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.invoice-edit-row td {
  background: rgba(22, 163, 74, .04);
}

.invoice-edit-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
}

.company-event-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
}

.company-event-filter button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 900;
}

.company-event-filter button.active {
  border-color: rgba(22, 163, 74, .24);
  background: rgba(22, 163, 74, .12);
  color: var(--primary-600);
}

.production-checks {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.production-check {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
}

.production-check span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: var(--primary-600);
  font-size: 11px;
  font-weight: 900;
}

.production-check.warn span {
  background: #f59e0b;
}

.production-check b,
.production-check small,
.onboarding-grid small,
.onboarding-grid b {
  display: block;
}

.production-check small,
.onboarding-grid small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 800;
}

.onboarding-result {
  margin-bottom: 16px;
  border-color: rgba(22, 163, 74, .24);
}

.onboarding-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.onboarding-grid > div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(22, 163, 74, .05);
}

.billing-block-screen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-color: rgba(239, 68, 68, .28);
  background: linear-gradient(135deg, rgba(254, 242, 242, .92), rgba(255, 255, 255, .96));
}

.billing-block-screen h2 {
  margin: 8px 0;
  font-size: clamp(22px, 2.4vw, 34px);
}

.billing-block-screen p {
  margin: 0;
  color: var(--muted);
}

.billing-block-actions {
  min-width: 240px;
  display: grid;
  gap: 8px;
  justify-items: start;
}

.billing-block-actions b {
  font-size: 20px;
}

@media (max-width: 900px) {
  .billing-hero { display: grid; }
  .billing-summary { min-width: 0; }
}

/* v12 - CRM premium: dashboard executivo e central de integracoes guiada */
.product-hero {
  min-height: 330px;
  align-items: stretch;
  border-color: rgba(24, 195, 95, .18);
}

.product-hero .hero-copy {
  max-width: 760px;
}

.product-hero .hero-copy h1 {
  max-width: 730px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.02;
}

.command-card {
  width: min(410px, 100%);
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(242,248,244,.96));
  border: 1px solid rgba(7, 19, 12, .12);
  box-shadow: 0 22px 48px rgba(7, 19, 12, .12);
}

[data-theme="dark"] .command-card {
  background: linear-gradient(180deg, rgba(9,18,12,.98), rgba(14,30,20,.96));
}

.command-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.command-top b {
  font-size: 30px;
  color: var(--primary-600);
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.command-grid div,
.command-feed span,
.setup-steps span {
  border: 1px solid var(--border);
  background: var(--panel-solid);
  border-radius: 8px;
}

.command-grid div {
  padding: 10px;
  display: grid;
  gap: 3px;
}

.command-grid strong {
  font-size: 23px;
}

.command-grid small,
.command-feed em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.command-feed {
  display: grid;
  gap: 8px;
}

.command-feed span {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
}

.command-feed i,
.channel-mark,
.integration-chip b {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #07130c;
  color: #ccff00;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
}

.channel-mark {
  margin-right: 9px;
  vertical-align: middle;
}

.integration-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.integration-chip {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-start;
  box-shadow: var(--shadow-soft);
}

.integration-chip.online {
  border-color: rgba(24, 195, 95, .35);
  background: color-mix(in srgb, var(--primary-soft) 45%, var(--panel));
}

.integration-chip.ready {
  border-color: rgba(245, 158, 11, .32);
}

.integration-chip.active {
  outline: 2px solid rgba(22, 163, 74, .35);
  background: linear-gradient(180deg, var(--primary-soft), var(--panel));
}

.integration-chip span {
  min-width: 0;
  text-align: left;
  font-weight: 850;
}

.channel-grid.single {
  grid-template-columns: minmax(0, 1fr);
}

.channel-card .panel-head h3 {
  display: flex;
  align-items: center;
  gap: 0;
}

.readiness-meter {
  height: 9px;
  border-radius: 999px;
  background: var(--panel-2);
  overflow: hidden;
  margin: 12px 0;
  border: 1px solid var(--border);
}

.readiness-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--primary-600));
}

.setup-steps {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.setup-steps span {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.setup-steps b {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-600);
  font-size: 11px;
}

@media (max-width: 1100px) {
  .product-hero { grid-template-columns: 1fr; }
  .command-card { width: 100%; }
}

/* v13 - fila inteligente: canal, prioridade e SLA */
.inbox-toolbar-v2 {
  align-items: stretch;
}

.ops-summary {
  min-width: min(520px, 100%);
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 8px;
}

.ops-summary div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}

.ops-summary b {
  font-size: 24px;
  line-height: 1;
}

.ops-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.inbox-control-panel {
  margin: -8px 0 14px;
}

.inbox-control-panel .panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .55fr);
  gap: 12px;
  align-items: center;
}

.inbox-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.smart-list {
  gap: 9px;
}

.smart-conversation {
  position: relative;
  overflow: hidden;
  border-left: 4px solid transparent;
}

.smart-conversation.urgent {
  border-left-color: #dc2626;
  background: color-mix(in srgb, #fff1f2 70%, var(--panel-solid));
}

.smart-conversation.attention {
  border-left-color: #f59e0b;
  background: color-mix(in srgb, #fff7ed 68%, var(--panel-solid));
}

.smart-conversation.normal {
  border-left-color: var(--primary);
}

[data-theme="dark"] .smart-conversation.urgent {
  background: color-mix(in srgb, rgba(220,38,38,.18) 55%, var(--panel-solid));
}

[data-theme="dark"] .smart-conversation.attention {
  background: color-mix(in srgb, rgba(245,158,11,.15) 55%, var(--panel-solid));
}

.conversation-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.conversation-meta-line em {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 22px;
  border-radius: 7px;
  background: #07130c;
  color: #ccff00;
  font-style: normal;
  font-size: 10px;
}

.conversation-meta-line b {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-meta-line i {
  margin-left: auto;
  font-style: normal;
  color: var(--primary-600);
  white-space: nowrap;
}

.last-line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge.danger {
  color: #b91c1c;
  background: rgba(220,38,38,.12);
}

[data-theme="dark"] .badge.danger {
  color: #fecaca;
  background: rgba(220,38,38,.20);
}

.inbox-workspace .chat {
  min-height: calc(100vh - 245px);
}

.view-inbox .main {
  height: 100vh;
  overflow: hidden;
}

.view-inbox .content {
  height: calc(100vh - 104px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.view-inbox .inbox-toolbar,
.view-inbox .inbox-control-panel {
  margin-bottom: 0;
}

.view-inbox .inbox-workspace {
  min-height: 0;
  height: 100%;
  overflow: hidden;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 12px;
}

.whatsapp-topics {
  position: sticky;
  top: 0;
  z-index: 4;
  margin: 0;
}

.whatsapp-topics .panel-body {
  grid-template-columns: minmax(320px, 1fr) minmax(360px, .85fr) auto auto;
  padding: 10px 12px;
}

.whatsapp-topics .field {
  margin: 0;
}

.whatsapp-topics .cleanup-actions {
  justify-content: flex-end;
  gap: 6px;
}

.whatsapp-topics .cleanup-actions .btn {
  min-height: 40px;
  padding: 9px 11px;
}

.view-inbox .inbox-workspace > .panel,
.view-inbox .chat {
  min-height: 0;
  height: 100%;
}

.view-inbox .conversation-list {
  max-height: none;
  height: 100%;
  overflow-y: auto;
}

.view-inbox .chat {
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
}

.view-inbox .messages {
  min-height: 0;
  overflow-y: auto;
}

.view-inbox .whatsapp-composer {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.compact-ops-rail .panel-body {
  height: 100%;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 10px;
}

.rail-action {
  width: 100%;
  min-height: 86px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 9px 6px;
  text-align: center;
  font: inherit;
}

.rail-action b {
  font-size: 12px;
}

.rail-action span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.drawer-customer {
  margin-top: 8px;
}

.conversation-item.smart-conversation {
  min-height: 0;
  padding: 9px;
}

.conversation-item.smart-conversation.with-avatar {
  grid-template-columns: 34px minmax(0, 1fr);
}

.conversation-item.smart-conversation .avatar {
  width: 34px;
  height: 34px;
}

.conversation-item.smart-conversation .conversation-copy {
  gap: 3px;
}

.conversation-item.smart-conversation .conversation-title {
  font-size: 12px;
}

.conversation-item.smart-conversation .conversation-meta-line,
.conversation-item.smart-conversation .owner-line,
.conversation-item.smart-conversation .last-line {
  font-size: 10.5px;
}

@media (max-width: 1180px) {
  .inbox-control-panel .panel-body { grid-template-columns: 1fr; }
  .ops-summary { min-width: 0; }
  .whatsapp-topics .panel-body {
    grid-template-columns: 1fr;
  }
  .view-inbox .main,
  .view-inbox .content {
    height: auto;
    overflow: visible;
  }
  .view-inbox .inbox-workspace {
    height: auto;
    overflow: visible;
    grid-template-columns: 1fr;
  }
  .view-inbox .conversation-list {
    max-height: 360px;
  }
  .view-inbox .chat {
    min-height: 560px;
  }
  .compact-ops-rail .panel-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .rail-action {
    min-height: 70px;
  }
}

@media (max-width: 700px) {
  .ops-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inbox-filter-grid { grid-template-columns: 1fr; }
}

/* v15 - polimento SaaS HanyTech: linguagem visual mais premium e menos tecnica */
:root {
  --bg: #f7faf8;
  --bg-soft: #eef8f2;
  --panel: rgba(255, 255, 255, .94);
  --panel-solid: #ffffff;
  --panel-2: #edf7f1;
  --text: #07130d;
  --muted: #64756c;
  --border: rgba(7, 19, 13, .10);
  --primary: #16a34a;
  --primary-600: #0f7a37;
  --primary-soft: rgba(22, 163, 74, .12);
  --sidebar: #020805;
  --sidebar-2: #07130d;
  --radius: 18px;
  --radius-sm: 12px;
}

[data-theme="dark"] {
  --bg: #050806;
  --bg-soft: #0a140e;
  --panel: rgba(10, 20, 14, .90);
  --panel-solid: #0b1510;
  --panel-2: #102117;
  --text: #effcf4;
  --muted: #9db3a6;
  --border: rgba(220, 252, 231, .11);
  --primary: #22c55e;
  --primary-600: #16a34a;
  --primary-soft: rgba(34, 197, 94, .14);
  --sidebar: #010403;
  --sidebar-2: #07110b;
}

body {
  letter-spacing: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(22, 163, 74, .13), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(212, 255, 0, .08), transparent 22rem),
    var(--bg);
}

.panel,
.login-card,
.conversation-item,
.kanban-card,
.summary-card,
.focus-item {
  border-radius: var(--radius-sm);
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(2, 8, 5, .98), rgba(7, 19, 13, .98)),
    radial-gradient(circle at 80% 10%, rgba(22, 163, 74, .28), transparent 18rem);
}

.top-kicker {
  background: rgba(22, 163, 74, .10);
  border-color: rgba(22, 163, 74, .22);
  color: var(--primary-600);
}

.hero-panel {
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,252,244,.92)),
    radial-gradient(circle at 82% 8%, rgba(22,163,74,.18), transparent 24rem);
}

[data-theme="dark"] .hero-panel {
  background:
    linear-gradient(135deg, rgba(8,18,12,.96), rgba(10,28,17,.90)),
    radial-gradient(circle at 82% 8%, rgba(34,197,94,.18), transparent 24rem);
}

.stat {
  background: linear-gradient(180deg, var(--panel-solid), rgba(240, 253, 244, .72));
}

[data-theme="dark"] .stat {
  background: linear-gradient(180deg, var(--panel-solid), rgba(16, 33, 23, .72));
}

/* Login v2 - visual de producao com foto e slides */
.login-shell-modern {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, .72fr);
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(244, 248, 245, .20), rgba(248, 250, 252, .96) 62%),
    #f7faf8;
}

.login-shell-modern .login-brand {
  isolation: isolate;
  min-height: 100vh;
  padding: clamp(30px, 4vw, 56px);
  background: #07110b;
  justify-content: space-between;
}

.login-hero-bg,
.login-hero-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-hero-bg {
  z-index: -3;
  background-image: url("login-team-hero.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.01);
}

.login-hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(2, 6, 4, .84) 0%, rgba(2, 6, 4, .68) 38%, rgba(2, 6, 4, .20) 73%, rgba(2, 6, 4, .06) 100%),
    linear-gradient(180deg, rgba(2, 6, 4, .44), rgba(2, 6, 4, .80));
}

.login-shell-modern .login-brand::after {
  display: none;
}

.login-top-brand {
  font-size: clamp(20px, 2vw, 25px);
}

.login-top-brand img {
  border-radius: 8px;
}

.login-shell-modern .login-copy {
  max-width: 760px;
  margin-top: auto;
  margin-bottom: clamp(24px, 4vh, 42px);
}

.login-shell-modern .eyebrow {
  border-color: rgba(255, 255, 255, .24);
  background: rgba(255, 255, 255, .13);
  color: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
}

.login-shell-modern .login-copy h1 {
  max-width: 760px;
  margin: 22px 0 16px;
  font-size: clamp(40px, 4.8vw, 66px);
  line-height: 1.03;
  letter-spacing: 0;
  text-wrap: balance;
  text-shadow: 0 18px 55px rgba(0, 0, 0, .30);
}

.login-shell-modern .login-copy p {
  max-width: 650px;
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
}

.login-shell-modern .login-highlights {
  margin-top: 24px;
}

.login-shell-modern .login-highlights span {
  border-radius: 8px;
  border-color: rgba(255, 255, 255, .20);
  background: rgba(255, 255, 255, .13);
  color: #fff;
  backdrop-filter: blur(10px);
}

.login-slider {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  min-height: 118px;
  margin-bottom: 22px;
}

.login-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 255, 255, .20);
  border-radius: 8px;
  background: rgba(3, 10, 7, .42);
  color: white;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .18);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(10px);
  animation: loginSlide 12s infinite;
}

.login-slide strong {
  font-size: 15px;
  line-height: 1.25;
}

.login-slide span {
  max-width: 350px;
  color: rgba(255, 255, 255, .74);
  font-size: 13px;
  line-height: 1.45;
}

.login-slide.slide-two { animation-delay: 4s; }
.login-slide.slide-three { animation-delay: 8s; }

.login-dots {
  position: absolute;
  left: 18px;
  bottom: -16px;
  display: flex;
  gap: 6px;
}

.login-dots i {
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .30);
  animation: loginDot 12s infinite;
}

.login-dots i:nth-child(2) { animation-delay: 4s; }
.login-dots i:nth-child(3) { animation-delay: 8s; }

.login-shell-modern .brand-footer {
  color: rgba(255, 255, 255, .78);
  font-size: 14px;
}

.login-shell-modern .login-card-wrap {
  min-height: 100vh;
  padding: clamp(28px, 5vw, 64px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(246, 249, 247, .98)),
    radial-gradient(circle at 82% 20%, rgba(22, 163, 74, .12), transparent 22rem);
}

.login-shell-modern .login-card {
  width: min(430px, 100%);
  border-radius: 8px;
  padding: clamp(26px, 3vw, 34px);
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(15, 23, 42, .10);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .12);
}

.login-shell-modern .login-card h2 {
  margin: 10px 0 12px;
  font-size: clamp(24px, 2.2vw, 30px);
  line-height: 1.12;
  letter-spacing: 0;
}

.login-shell-modern .login-card .muted {
  margin-bottom: 22px;
}

.login-shell-modern .form-kicker {
  border-radius: 8px;
  color: #166534;
  background: rgba(22, 163, 74, .10);
  border-color: rgba(22, 163, 74, .24);
}

.login-shell-modern .field {
  color: #4b5870;
}

.login-shell-modern .field input {
  border-radius: 8px;
  min-height: 46px;
  background: #f8fafc;
}

.login-shell-modern .btn.primary {
  border-radius: 8px;
  min-height: 50px;
  background: linear-gradient(135deg, #3b82f6, #7c3aed);
  box-shadow: 0 14px 32px rgba(79, 70, 229, .24);
}

.login-shell-modern .auth-switch {
  display: block;
  width: 100%;
  margin-top: 13px;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-weight: 800;
  text-align: center;
}

@keyframes loginSlide {
  0%, 7% { opacity: 0; transform: translateY(10px); }
  10%, 31% { opacity: 1; transform: translateY(0); }
  36%, 100% { opacity: 0; transform: translateY(-8px); }
}

@keyframes loginDot {
  0%, 8% { background: rgba(255, 255, 255, .30); width: 18px; }
  10%, 31% { background: #ccff00; width: 30px; }
  36%, 100% { background: rgba(255, 255, 255, .30); width: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .login-slide,
  .login-dots i {
    animation: none;
  }
  .login-slide.slide-one {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 1050px) {
  .login-shell-modern {
    grid-template-columns: 1fr;
  }
  .login-shell-modern .login-brand,
  .login-shell-modern .login-card-wrap {
    min-height: auto;
  }
  .login-shell-modern .login-brand {
    gap: 48px;
  }
  .login-slider {
    display: none;
  }
}

@media (max-width: 640px) {
  .login-shell-modern .login-brand {
    padding: 24px;
  }
  .login-shell-modern .login-copy h1 {
    font-size: 34px;
  }
  .login-shell-modern .login-card-wrap {
    padding: 22px;
  }
}

.billing-access-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 8px;
  background: #fff8e6;
  color: #5b3b00;
}

.billing-access-banner div {
  display: grid;
  gap: 3px;
}

.billing-access-banner span {
  color: #806022;
  font-size: 13px;
}

.event-log-panel {
  margin: 16px 0;
}

.event-log-list {
  display: grid;
  gap: 8px;
}

.event-log-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
}

.event-type {
  width: max-content;
  max-width: 100%;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(22, 163, 74, .10);
  color: var(--primary-600);
  font-size: 11px;
  font-weight: 900;
}

.event-log-row div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.event-log-row small {
  color: var(--muted);
}

.form-inline-message {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 800;
}

.form-inline-message.success { color: var(--success); }
.form-inline-message.danger { color: var(--danger); }

.system-scope-pill {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.company-team-box {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(22, 163, 74, .05);
}

.company-team-box div {
  display: grid;
  gap: 3px;
}

.company-team-box b {
  font-size: 12px;
}

.company-team-box span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.superadmin-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -6px 0 16px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
}

.superadmin-tabs button {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  padding: 9px 12px;
  font-weight: 900;
}

.superadmin-tabs button.active {
  border-color: rgba(22, 163, 74, .22);
  background: rgba(22, 163, 74, .12);
  color: var(--primary-600);
}

.superadmin-module-head {
  margin: 0 0 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(240,253,244,.86));
}

.superadmin-module-head h3 {
  margin: 10px 0 6px;
  font-size: clamp(22px, 2.2vw, 30px);
}

.superadmin-module-head p {
  margin: 0;
}

.module-card {
  max-width: 920px;
}

.span-2 {
  grid-column: span 2;
}

@media (max-width: 760px) {
  .span-2 {
    grid-column: span 1;
  }
  .superadmin-tabs {
    position: static;
  }
}

.mobility-layout {
  align-items: start;
}

.mobility-professional-list {
  margin-top: 14px;
}

.mobility-requests-panel {
  margin-top: 18px;
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

.data-table th,
.data-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.data-table select,
.data-table input {
  min-width: 136px;
}

.table-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .billing-access-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .event-log-row {
    grid-template-columns: 1fr;
  }
}

.msg {
  border-radius: 14px 14px 14px 5px;
  box-shadow: 0 8px 20px rgba(7, 19, 13, .06);
}

.msg.out {
  background: #e7f9ed;
  color: #063f22;
  border-color: rgba(22, 163, 74, .24);
  border-radius: 14px 14px 5px 14px;
}

.message-sender-pill {
  width: max-content;
  max-width: 100%;
  border: 1px solid rgba(22, 163, 74, .18);
  background: rgba(255,255,255,.60);
  color: #0f7a37;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

[data-theme="dark"] .message-sender-pill {
  background: rgba(34,197,94,.10);
  color: #bbf7d0;
}

.app-shell.sidebar-collapsed:not(.sidebar-peek) .nav {
  justify-items: center;
}

.app-shell.sidebar-collapsed .sidebar {
  overflow: visible;
}

.app-shell.sidebar-collapsed:not(.sidebar-peek) .nav button {
  position: relative;
  width: 52px;
  max-width: 52px;
}

.app-shell.sidebar-collapsed .nav button::after {
  content: attr(data-label);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%) translateX(-4px);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: #07111f;
  color: #fff;
  box-shadow: 0 12px 24px rgba(2,6,23,.18);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transition: opacity .15s ease, transform .15s ease;
}

.app-shell.sidebar-collapsed .nav button:hover::after,
.app-shell.sidebar-collapsed .nav button:focus-visible::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.cleanup-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.media-doc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(22, 163, 74, .22);
  background: rgba(255,255,255,.58);
  border-radius: 12px;
  padding: 10px 12px;
  text-decoration: none;
}

.media-doc::before {
  content: "Arquivo";
  display: inline-flex;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-600);
  padding: 3px 7px;
  font-size: 11px;
}

.conversation-item.active {
  border-color: rgba(22, 163, 74, .36);
  background: linear-gradient(135deg, rgba(22,163,74,.08), var(--panel-solid));
}

.badge.green,
.status-pill {
  background: rgba(22, 163, 74, .12);
  color: #0f7a37;
}

/* v16 - painel executivo e ficha do cliente mais completas */
.executive-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.15fr) minmax(260px, .9fr) minmax(260px, .95fr);
  gap: 16px;
  margin: 16px 0;
}

.command-center,
.pulse-panel,
.risk-panel {
  overflow: hidden;
}

.command-center-body {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 18px;
}

.health-ring {
  width: 142px;
  height: 142px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, var(--panel-solid) 0 55%, transparent 56%),
    conic-gradient(var(--primary) calc(var(--score) * 1%), rgba(7, 19, 13, .09) 0);
  box-shadow: inset 0 0 0 1px var(--border), 0 18px 38px rgba(7, 19, 13, .08);
}

.health-ring b {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.health-ring span {
  display: block;
  max-width: 88px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.health-list,
.pulse-list {
  display: grid;
  gap: 10px;
}

.health-list span,
.pulse-list div,
.client-notes p {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .55);
  border-radius: 12px;
  padding: 11px 12px;
}

[data-theme="dark"] .health-list span,
[data-theme="dark"] .pulse-list div,
[data-theme="dark"] .client-notes p {
  background: rgba(255, 255, 255, .035);
}

.health-list b {
  color: var(--primary-600);
}

.pulse-list small,
.client-notes small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pulse-list b,
.client-notes b {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.shortcut-btn.compact {
  padding: 12px;
}

.shortcut-btn.compact b {
  font-size: 13px;
}

.client-rail .panel-body {
  display: grid;
  gap: 14px;
}

.customer-profile {
  display: grid;
  gap: 13px;
}

.customer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-pill.danger {
  color: #991b1b;
  background: rgba(239, 68, 68, .13);
}

.status-pill.warn {
  color: #92400e;
  background: rgba(245, 158, 11, .15);
}

.client-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.client-metrics span {
  min-width: 0;
  border: 1px solid rgba(22, 163, 74, .16);
  background: var(--primary-soft);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.client-metrics b {
  display: block;
  color: var(--primary-600);
  font-size: 18px;
  line-height: 1;
}

.client-metrics small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-notes {
  display: grid;
  gap: 8px;
}

.client-notes p {
  margin: 0;
}

@media (max-width: 1180px) {
  .executive-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .command-center-body {
    grid-template-columns: 1fr;
  }

  .health-ring {
    margin: 0 auto;
  }
}

/* v17 - Superadmin financeiro com operacao SaaS mais clara */
.billing-command {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 18px;
}

.billing-kpi {
  border: 1px solid var(--border);
  background:
    linear-gradient(180deg, var(--panel-solid), rgba(240, 253, 244, .62));
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 12px 28px rgba(7, 19, 13, .05);
}

[data-theme="dark"] .billing-kpi {
  background:
    linear-gradient(180deg, var(--panel-solid), rgba(16, 33, 23, .72));
}

.billing-kpi small,
.company-billing-controls label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.billing-kpi b {
  display: block;
  margin: 7px 0 5px;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.billing-kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.billing-layout .company-management-card {
  grid-column: span 2;
}

.billing-layout .invoice-card {
  grid-column: 1 / -1;
}

.company-billing-list {
  display: grid;
  gap: 12px;
}

.company-directory {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 14px;
}

.company-directory-list {
  display: grid;
  align-content: start;
  gap: 8px;
}

.company-directory-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-solid);
  color: var(--text);
  text-align: left;
}

.company-directory-item.active {
  border-color: rgba(22, 163, 74, .34);
  background: rgba(22, 163, 74, .09);
}

.company-directory-item b,
.company-directory-item small {
  display: block;
}

.company-directory-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.company-directory-item em {
  font-style: normal;
  color: var(--primary-600);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.company-directory-item em.danger {
  color: var(--danger);
}

.empty-detail {
  min-height: 180px;
  display: grid;
  place-content: center;
  gap: 6px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: rgba(22, 163, 74, .04);
  text-align: center;
}

.company-billing-card {
  display: grid;
  gap: 13px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(22, 163, 74, .055), var(--panel-solid));
  border-radius: 14px;
  padding: 14px;
}

.company-billing-card.is-blocked {
  border-color: rgba(239, 68, 68, .32);
  background: linear-gradient(135deg, rgba(239, 68, 68, .07), var(--panel-solid));
}

.company-billing-top,
.company-billing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.company-billing-top b {
  display: block;
  color: var(--text);
  font-size: 15px;
}

.company-billing-top span:not(.status-pill) {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.company-billing-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.company-usage-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-usage-row span,
.billing-block-reason,
.company-admin-line {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .56);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

[data-theme="dark"] .company-usage-row span,
[data-theme="dark"] .billing-block-reason,
[data-theme="dark"] .company-admin-line {
  background: rgba(255, 255, 255, .04);
}

.company-admin-line {
  margin: 0;
  border-radius: 12px;
  color: var(--text);
}

.billing-block-reason {
  margin: 0;
  border-color: rgba(239, 68, 68, .28);
  color: #991b1b;
  border-radius: 12px;
}

.conversation-lock-note {
  border: 1px solid rgba(245, 158, 11, .28);
  background: rgba(245, 158, 11, .12);
  color: #92400e;
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.company-billing-controls select {
  width: 100%;
  margin-top: 6px;
}

.table-scroll {
  overflow-x: auto;
}

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

  .billing-layout .company-management-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .billing-command,
  .company-billing-controls,
  .company-directory,
  .invoice-edit-form,
  .production-checks,
  .onboarding-grid {
    grid-template-columns: 1fr;
  }

  .company-billing-top,
  .company-billing-actions,
  .billing-block-screen {
    align-items: stretch;
    flex-direction: column;
  }

  .company-billing-actions .btn {
    width: 100%;
  }
}

/* v18 - identidade do usuario logado e gestao de equipe */
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 180px;
  max-width: 260px;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  box-shadow: 0 10px 24px rgba(7, 19, 13, .05);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.user-pill:hover {
  border-color: rgba(22, 163, 74, .28);
}

.user-pill span {
  display: grid;
  min-width: 0;
}

.user-pill b,
.user-pill small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill b {
  color: var(--text);
  font-size: 12px;
  line-height: 1.1;
}

.user-pill small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.team-management-card {
  grid-column: span 2;
}

.team-table .table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.team-table .btn {
  padding: 8px 10px;
}

.profile-page {
  display: grid;
  gap: 16px;
}

.profile-hero {
  background:
    linear-gradient(135deg, rgba(22, 163, 74, .12), rgba(255, 255, 255, .92)),
    var(--panel);
}

.profile-hero h1 {
  margin: 8px 0 4px;
  font-size: clamp(28px, 3vw, 44px);
}

.profile-hero p {
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.profile-layout .profile-note-card {
  align-self: start;
}

.profile-form-card,
.profile-password-card {
  grid-column: span 1;
}

@media (max-width: 920px) {
  .top-actions {
    align-items: stretch;
  }

  .user-pill {
    max-width: none;
    width: 100%;
  }

  .team-management-card {
    grid-column: 1 / -1;
  }
}
.billing-client {
  display: grid;
  gap: 16px;
}

.billing-client-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .75fr);
  align-items: stretch;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(21, 184, 106, .12), rgba(255, 255, 255, .82)),
    var(--panel);
}

[data-theme="dark"] .billing-client-hero {
  background:
    linear-gradient(135deg, rgba(21, 184, 106, .14), rgba(15, 27, 46, .86)),
    var(--panel);
}

.billing-client-hero h1 {
  margin: 16px 0 8px;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -.06em;
}

.billing-client-hero p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.billing-client-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.billing-client-summary {
  display: grid;
  gap: 10px;
  align-content: center;
  padding: 22px;
  border-left: 1px solid var(--border);
  background: rgba(255, 255, 255, .42);
}

[data-theme="dark"] .billing-client-summary {
  background: rgba(255, 255, 255, .04);
}

.billing-client-summary div,
.billing-pix-box,
.plan-current,
.usage-line {
  border: 1px solid var(--border);
  background: var(--panel-solid);
  border-radius: 16px;
  padding: 14px;
}

.billing-client-summary small,
.billing-pix-box small {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 11px;
  font-weight: 900;
}

.billing-client-summary b {
  display: block;
  margin-top: 4px;
  font-size: 20px;
}

.usage-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.plan-current {
  display: grid;
  gap: 8px;
}

.plan-current strong {
  color: var(--success);
  font-size: 24px;
}

.plan-current span,
.billing-pix-box span {
  color: var(--muted);
}

@media (max-width: 960px) {
  .billing-client-hero {
    grid-template-columns: 1fr;
  }

  .billing-client-summary {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}

/* Inbox WhatsApp-like workspace polish */
.app-shell.view-inbox {
  grid-template-columns: 76px minmax(0, 1fr);
}

.view-inbox .main {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

.view-inbox .topbar {
  min-height: 44px;
  padding: 4px 10px;
}

.view-inbox .top-kicker,
.view-inbox .topbar-copy > .muted {
  display: none;
}

.view-inbox .topbar h2 {
  font-size: 16px;
  line-height: 1.1;
}

.view-inbox .top-actions {
  gap: 8px;
}

.view-inbox .top-actions .user-pill {
  min-width: 178px;
  max-width: 230px;
  padding: 4px 9px 4px 5px;
}

.company-switcher {
  width: min(340px, 26vw);
  min-width: 250px;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(22, 163, 74, .18);
  background: linear-gradient(180deg, var(--panel-solid), rgba(240, 253, 244, .76));
  border-radius: 12px;
  padding: 4px 10px 5px;
  box-shadow: 0 10px 22px rgba(7, 19, 13, .04);
}

.company-switcher span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.company-switcher select {
  height: auto;
  min-height: 20px;
  border: 0;
  border-radius: 0;
  padding: 0 18px 0 0;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  box-shadow: none;
}

.view-inbox .top-actions select {
  min-height: 34px;
  height: 34px;
}

.view-inbox .top-actions .company-switcher select {
  min-height: 20px;
  height: 20px;
}

.view-inbox .top-actions .btn {
  min-height: 34px;
  padding: 7px 11px;
}

.view-inbox .content {
  height: calc(100vh - 44px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 5px;
  padding: 5px 8px 8px;
  overflow: hidden;
}

.view-inbox .whatsapp-topics {
  border-radius: 10px;
  box-shadow: none;
}

.view-inbox .whatsapp-topics .panel-body {
  display: flex !important;
  align-items: center;
  gap: 5px;
  flex-wrap: nowrap;
  padding: 4px 6px;
}

.view-inbox .inbox-tabs {
  flex: 1 1 auto;
  display: flex;
  justify-content: flex-start;
  gap: 6px;
  min-width: 260px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.view-inbox .filter-chip {
  min-height: 28px;
  padding: 5px 8px;
  white-space: nowrap;
}

.view-inbox .inbox-filter-grid {
  flex: 0 0 min(520px, 36vw);
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) minmax(130px, .9fr) minmax(120px, .8fr);
  gap: 6px;
}

.view-inbox .inbox-filter-grid .field {
  gap: 0;
  margin: 0;
}

.view-inbox .inbox-filter-grid label {
  font-size: 0;
  line-height: 0;
}

.view-inbox .inbox-filter-grid select,
.view-inbox .inbox-filter-grid input {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 10px;
}

.compact-search {
  margin-bottom: 10px;
}

.compact-search input {
  width: 100%;
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input);
  padding: 8px 10px;
  font: inherit;
  font-weight: 800;
}

.ai-provider-status,
.ai-credential-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-soft);
  padding: 10px 12px;
}

.ai-provider-status b,
.ai-credential-row b {
  display: block;
}

.ai-provider-status span,
.ai-credential-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ai-provider-status.ready {
  border-color: rgba(22, 163, 74, .24);
  background: rgba(220, 252, 231, .55);
}

.ai-provider-status.missing {
  border-color: rgba(245, 158, 11, .28);
  background: rgba(255, 251, 235, .68);
}

.ai-credentials-form {
  display: grid;
  gap: 10px;
}

.ai-credential-row input {
  width: min(520px, 55%);
  min-height: 38px;
}

.view-inbox .cleanup-actions {
  display: block;
  position: relative;
}

.view-inbox [data-open-ops-drawer] {
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
}

.view-inbox .notification-sound-toggle {
  min-height: 30px;
  padding: 5px 9px;
  white-space: nowrap;
  border-color: rgba(22, 163, 74, .28);
}

.view-inbox .notification-sound-toggle.active {
  background: #e8f8ef;
  color: #087a36;
  border-color: #9de7bb;
}

[data-theme="dark"] .view-inbox .notification-sound-toggle.active {
  background: rgba(22, 163, 74, .18);
  color: #9df0bb;
}

.cleanup-menu-wrap {
  position: relative;
}

.cleanup-menu-wrap summary {
  list-style: none;
}

.cleanup-menu-wrap summary::-webkit-details-marker {
  display: none;
}

.icon-menu {
  width: 36px;
  min-height: 30px;
  padding: 5px 0;
  font-size: 18px;
  line-height: 1;
}

.cleanup-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  width: 230px;
  display: grid;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-solid);
  padding: 8px;
  box-shadow: 0 18px 42px rgba(7, 19, 13, .16);
}

.cleanup-menu .btn {
  justify-content: flex-start;
  width: 100%;
  min-height: 34px;
  border-radius: 9px;
  padding: 8px 10px;
}

.view-inbox .inbox-workspace {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 380px) minmax(0, 1fr) !important;
  gap: 8px;
  overflow: hidden;
}

.view-inbox .inbox-workspace > .panel,
.view-inbox .chat {
  height: 100%;
  min-height: 0;
  border-radius: 10px;
  box-shadow: none;
}

.view-inbox .panel-head {
  min-height: 42px;
  padding: 9px 12px 8px;
}

.view-inbox .panel-body {
  padding: 10px 12px;
}

.view-inbox .conversation-list {
  gap: 7px;
  padding: 8px;
}

.view-inbox .conversation-item.smart-conversation {
  min-height: 76px;
  padding: 9px 10px;
  border-left-width: 3px;
  border-radius: 9px;
}

.view-inbox .conversation-item.smart-conversation.with-avatar {
  grid-template-columns: 42px minmax(0, 1fr);
}

.view-inbox .conversation-item.smart-conversation .avatar {
  width: 42px;
  height: 42px;
}

.view-inbox .conversation-title {
  font-size: 13px;
  line-height: 1.25;
}

.conversation-flags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.unread-pill {
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #16a34a;
  color: white;
  padding: 0 6px;
  font-size: 11px;
  line-height: 1;
}

.wa-checks {
  display: inline-flex;
  margin-right: 5px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -2px;
}

.wa-checks.read {
  color: #0ea5e9;
}

.wa-checks.delivered {
  color: #16a34a;
}

.typing-dot {
  color: #16a34a;
  font-weight: 900;
}

.view-inbox .conversation-meta-line,
.view-inbox .owner-line,
.view-inbox .last-line {
  font-size: 11px;
  line-height: 1.35;
}

.view-inbox .chat .panel-head {
  min-height: 54px;
}

.view-inbox .messages {
  min-height: 0;
  padding: 14px 16px;
}

.view-inbox .composer {
  padding: 8px 10px;
}

.view-inbox .composer input#messageInput {
  min-height: 40px;
}

.view-inbox .composer-tools {
  padding: 4px;
}

.view-inbox .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.view-inbox .send-btn {
  min-height: 40px;
  padding: 8px 16px;
}

@media (min-width: 901px) {
  .view-inbox .main {
    height: 100vh;
    overflow: hidden;
  }

  .view-inbox .content {
    height: calc(100vh - 44px);
    overflow: hidden;
  }

  .view-inbox .inbox-workspace {
    height: 100%;
    grid-template-columns: minmax(340px, 380px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 900px) {
  .view-inbox .main,
  .view-inbox .content {
    height: auto;
    overflow: visible;
  }

  .view-inbox .whatsapp-topics .panel-body {
    flex-wrap: wrap;
  }

  .view-inbox .inbox-filter-grid {
    flex-basis: 100%;
    grid-template-columns: 1fr;
  }

  .view-inbox .inbox-workspace {
    grid-template-columns: 1fr !important;
    height: auto;
    overflow: visible;
  }
}

/* Padrao HanyTech: interface profissional, humana e sem cara de template gerado. */
body {
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font-size: 15px;
  letter-spacing: 0;
}

.content {
  gap: 16px;
}

.topbar {
  min-height: 64px;
}

.view-title h1,
.page-title h1 {
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.12;
  letter-spacing: 0;
}

.view-title p,
.page-title p,
.muted {
  line-height: 1.55;
}

.hero-panel,
.product-hero {
  min-height: auto;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 246, 0.94));
}

[data-theme="dark"] .hero-panel,
[data-theme="dark"] .product-hero {
  background: linear-gradient(135deg, rgba(8, 18, 12, 0.97), rgba(10, 28, 17, 0.94));
}

.hero-panel::after,
.product-hero::after,
.login-brand::after {
  display: none;
}

.hero-copy h1,
.product-hero .hero-copy h1 {
  max-width: 760px;
  font-size: clamp(34px, 3.8vw, 50px);
  line-height: 1.06;
  letter-spacing: 0;
}

.hero-copy p,
.product-hero .hero-copy p {
  max-width: 680px;
  font-size: 16px;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 18px;
  gap: 10px;
}

.btn,
button.btn,
.action-btn,
.send-btn {
  min-height: 44px;
  border-radius: 14px;
  padding: 10px 14px;
  letter-spacing: 0;
}

.panel,
.card,
.summary-card,
.stat,
.login-card {
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(20, 31, 52, 0.07);
}

.stat strong {
  font-size: clamp(26px, 2.8vw, 36px);
  letter-spacing: 0;
}

.summary-card strong {
  font-size: clamp(32px, 3.6vw, 46px);
  letter-spacing: 0;
}

.platform-pills {
  margin-top: 18px;
  gap: 8px;
}

.platform-pills span {
  padding: 7px 11px;
  font-size: 12px;
}

.login-copy h1 {
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.04;
  letter-spacing: 0;
}

.login-shell-modern .login-copy h1 {
  max-width: 720px;
  font-size: clamp(38px, 4.1vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.login-copy p {
  font-size: 17px;
  line-height: 1.55;
}

.login-shell-modern .login-copy p {
  max-width: 650px;
  font-size: 16px;
  line-height: 1.55;
}

.login-card {
  backdrop-filter: none;
}

.login-card h2 {
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

@media (min-width: 901px) {
  .product-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
    gap: 24px;
    align-items: center;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 15px;
  }

  .hero-panel,
  .product-hero {
    padding: 22px;
    border-radius: 18px;
  }

  .hero-copy h1,
  .product-hero .hero-copy h1,
  .login-copy h1,
  .login-shell-modern .login-copy h1 {
    font-size: clamp(32px, 9vw, 38px);
  }

  .hero-copy p,
  .product-hero .hero-copy p,
  .login-copy p,
  .login-shell-modern .login-copy p {
    font-size: 15px;
  }
}
