:root {
  --brand: #25c6a6;
  --brand-strong: #0aa98b;
  --brand-soft: #dffaf4;
  --brand-ink: #064c42;
  --accent: #6e7cf6;
  --accent-soft: #eef0ff;
  --warning: #f4a340;
  --warning-soft: #fff4df;
  --danger: #eb5b65;
  --danger-soft: #fff0f1;
  --success: #25a969;
  --success-soft: #e7f8ef;
  --info: #3388e8;
  --info-soft: #eaf4ff;
  --ink: #152237;
  --ink-2: #3d4b60;
  --muted: #7a8799;
  --line: #e7ebf1;
  --line-strong: #d9dfe8;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #f0f4f8;
  --nav: #0d1c31;
  --nav-2: #132743;
  --shadow-xs: 0 1px 2px rgba(20, 31, 50, 0.05);
  --shadow-sm: 0 8px 20px rgba(20, 31, 50, 0.08);
  --shadow-md: 0 18px 45px rgba(20, 31, 50, 0.13);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 34px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  --ink: #edf3fb;
  --ink-2: #b9c5d5;
  --muted: #8f9db0;
  --line: #26364a;
  --line-strong: #34465c;
  --surface: #121e2d;
  --surface-2: #0d1724;
  --surface-3: #19283a;
  --brand-soft: #123b36;
  --brand-ink: #86e8d3;
  --accent-soft: #252c55;
  --warning-soft: #3c2f1b;
  --danger-soft: #40242a;
  --success-soft: #17382a;
  --info-soft: #182f4b;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.14);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 20px 50px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

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

/* Shared controls */
.btn {
  appearance: none;
  border: 0;
  border-radius: 12px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s ease;
  background: var(--surface-3);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.985);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  box-shadow: 0 8px 18px rgba(10, 169, 139, 0.22);
}

.btn-secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.btn-soft {
  color: var(--brand-ink);
  background: var(--brand-soft);
}

.btn-danger-soft {
  color: var(--danger);
  background: var(--danger-soft);
}

.btn-sm {
  min-height: 34px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 12px;
}

.icon-btn {
  appearance: none;
  border: 1px solid transparent;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: transparent;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--ink-2);
  transition: 0.18s ease;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--surface-3);
  border-color: var(--line);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.pill-success {
  color: var(--success);
  background: var(--success-soft);
}

.pill-warning {
  color: #b36c10;
  background: var(--warning-soft);
}

.pill-danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.pill-info {
  color: var(--info);
  background: var(--info-soft);
}

.pill-neutral {
  color: var(--ink-2);
  background: var(--surface-3);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-soft);
}

.avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 800;
  background: linear-gradient(145deg, #7888ff, #4f5bd5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  flex: 0 0 auto;
}

.avatar-sm {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 12px;
}

.avatar-lg {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 18px;
}

.avatar .presence {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  background: var(--success);
  border: 3px solid var(--surface);
  border-radius: 50%;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(145deg, #33dbb9 0%, #12ac91 55%, #4f6bea 100%);
  box-shadow: 0 12px 24px rgba(29, 205, 171, 0.24);
}

/* A marca oficial é vermelha e azul: sobre o azul-escuro da barra lateral ela
   sumiria. A pastilha branca mantém as cores do logo e destaca do fundo. */
/* Imagem de fundo, e não uma <img> dentro: a pastilha é um grid centralizado,
   e ali `height:100%` numa <img> não resolve de forma confiável — a altura
   caía para a intrínseca do arquivo e o overflow cortava o logo no meio. */
.brand-mark-logo {
  /* Sem texto dentro, um item de flex encolheria a zero num espaço apertado. */
  flex: 0 0 auto;
  background-color: #ffffff;
  background-image: url("logo-mark.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: auto 66%;
  box-shadow: 0 8px 20px rgba(9, 22, 38, 0.35);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-lockup strong {
  display: block;
  font-size: 16px;
  line-height: 1.1;
}

.brand-lockup small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.search-field .icon {
  position: absolute;
  left: 12px;
  color: var(--muted);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px 0 40px;
  color: var(--ink);
  background: var(--surface-2);
  outline: none;
  transition: 0.18s ease;
}

.search-field input:focus {
  border-color: rgba(37, 198, 166, 0.55);
  box-shadow: 0 0 0 4px rgba(37, 198, 166, 0.12);
  background: var(--surface);
}

.section-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.toast-stack {
  position: fixed;
  z-index: 1000;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  min-width: 270px;
  max-width: 360px;
  padding: 13px 14px;
  border-radius: 14px;
  color: var(--ink);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in 0.22s ease both;
}

.toast .toast-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-ink);
  font-weight: 900;
}

.toast strong {
  display: block;
  font-size: 13px;
}

.toast span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Landing */
.landing-page {
  min-height: 100vh;
  padding: 34px;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 8%, rgba(37, 198, 166, 0.14), transparent 28%),
    radial-gradient(circle at 92% 15%, rgba(110, 124, 246, 0.15), transparent 30%),
    linear-gradient(180deg, #f9fbfd 0%, #eef4f8 100%);
}

.landing-wrap {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.landing-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.landing-topbar .meta {
  color: #637086;
  font-size: 13px;
  font-weight: 700;
}

.landing-hero {
  max-width: 780px;
  margin: 78px auto 40px;
  text-align: center;
}

.landing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  color: #087e6b;
  background: rgba(37, 198, 166, 0.13);
  border: 1px solid rgba(37, 198, 166, 0.25);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.landing-hero h1 {
  margin: 20px 0 16px;
  color: #142136;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.landing-hero h1 span {
  color: transparent;
  background: linear-gradient(135deg, #0aaa8c, #5569eb);
  -webkit-background-clip: text;
  background-clip: text;
}

.landing-hero p {
  max-width: 650px;
  margin: 0 auto;
  color: #637086;
  font-size: 17px;
  line-height: 1.7;
}

.product-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
}

.product-card {
  position: relative;
  min-height: 420px;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 28px 70px rgba(34, 52, 81, 0.12);
  backdrop-filter: blur(18px);
  overflow: hidden;
  transition: 0.25s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 80px rgba(34, 52, 81, 0.16);
}

.product-card h2 {
  margin: 18px 0 10px;
  color: #142136;
  font-size: 30px;
  letter-spacing: -0.035em;
}

.product-card p {
  max-width: 500px;
  margin: 0;
  color: #6d7b8f;
  line-height: 1.65;
}

.product-card .card-actions {
  position: absolute;
  left: 30px;
  bottom: 30px;
  z-index: 3;
}

.product-card .preview-lines {
  position: absolute;
  right: -24px;
  bottom: -35px;
  width: 60%;
  height: 240px;
  padding: 18px;
  border-radius: 24px 0 0 0;
  background: #f8fafc;
  box-shadow: -14px -14px 40px rgba(25, 43, 70, 0.1);
  transform: rotate(-2deg);
}

.preview-lines .fake-header,
.preview-lines .fake-row,
.preview-lines .fake-bubble {
  border-radius: 10px;
  background: #e8edf4;
}

.preview-lines .fake-header {
  width: 60%;
  height: 16px;
  margin-bottom: 18px;
}

.preview-lines .fake-row {
  height: 38px;
  margin-bottom: 10px;
}

.preview-lines .fake-bubble {
  width: 72%;
  height: 44px;
  margin: 18px 0 0 auto;
  background: #dff8f2;
}

.phone-preview {
  position: absolute;
  right: 34px;
  bottom: -60px;
  width: 210px;
  height: 350px;
  padding: 10px;
  border: 8px solid #142136;
  border-radius: 34px;
  background: #f5f8fb;
  box-shadow: 0 24px 50px rgba(20, 33, 54, 0.2);
  transform: rotate(4deg);
}

.phone-preview::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 70px;
  height: 20px;
  border-radius: 0 0 12px 12px;
  background: #142136;
  transform: translateX(-50%);
}

.phone-preview .mini-status {
  height: 100px;
  margin-top: 28px;
  border-radius: 20px;
  background: linear-gradient(135deg, #14b99b, #4e67e8);
}

.phone-preview .mini-action-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.phone-preview .mini-action-grid span {
  height: 56px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(20, 33, 54, 0.07);
}

.landing-footer {
  margin: 30px 0 10px;
  color: #7a8799;
  text-align: center;
  font-size: 12px;
}

/* Agent console */
.agent-page {
  height: 100vh;
  overflow: hidden;
  background: var(--surface-2);
}

.agent-shell {
  display: grid;
  grid-template-columns: 76px 326px minmax(420px, 1fr) 356px;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  transition: grid-template-columns .2s ease;
}

/* Visao 360 recolhida. Na tela larga a coluna sai da grade e a conversa ocupa
   o espaco — util quando o atendente esta lendo uma conversa longa ou olhando
   a foto que o cliente mandou. Abaixo de 1280px o painel ja e uma gaveta e
   quem manda e `details-open`, entao esta regra nao vale la. */
@media (min-width: 1281px) {
  .agent-page.details-collapsed .agent-shell {
    grid-template-columns: 76px 326px minmax(420px, 1fr) 0;
  }

  .agent-page.details-collapsed .customer-panel {
    overflow: hidden;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .agent-shell {
    transition: none;
  }
}

.nav-rail {
  position: relative;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 17px 10px;
  color: #c4d0df;
  background:
    radial-gradient(circle at 50% 0%, rgba(37, 198, 166, 0.16), transparent 26%),
    linear-gradient(180deg, var(--nav), #091626 100%);
}

.nav-rail .brand-mark {
  width: 44px;
  height: 44px;
  margin-bottom: 22px;
}

.rail-menu {
  width: 100%;
  display: grid;
  gap: 7px;
}

.rail-btn {
  position: relative;
  width: 54px;
  height: 48px;
  margin: 0 auto;
  border: 0;
  border-radius: 15px;
  color: #91a1b5;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: 0.18s ease;
}

.rail-btn:hover,
.rail-btn.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.09);
}

.rail-btn.active::before {
  content: "";
  position: absolute;
  left: -10px;
  width: 4px;
  height: 24px;
  border-radius: 0 5px 5px 0;
  background: var(--brand);
  box-shadow: 0 0 18px rgba(37, 198, 166, 0.7);
}

.rail-btn .badge {
  position: absolute;
  top: 5px;
  right: 5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--nav);
  border-radius: 999px;
  color: #ffffff;
  background: var(--danger);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
}

.rail-btn .tooltip {
  position: absolute;
  left: 62px;
  z-index: 100;
  min-width: max-content;
  padding: 8px 10px;
  border-radius: 9px;
  color: #ffffff;
  background: #0c1727;
  box-shadow: var(--shadow-sm);
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-5px);
  transition: 0.18s ease;
}

.rail-btn:hover .tooltip {
  opacity: 1;
  transform: translateX(0);
}

.rail-bottom {
  width: 100%;
  margin-top: auto;
  display: grid;
  gap: 8px;
}

.rail-user {
  width: 44px;
  height: 44px;
  margin: 4px auto 0;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 15px;
  color: #ffffff;
  background: linear-gradient(145deg, #f09b60, #cf6b58);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.queue-panel,
.chat-panel,
.customer-panel {
  min-width: 0;
  height: 100vh;
  background: var(--surface);
}

.queue-panel {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.queue-header {
  padding: 19px 18px 14px;
  border-bottom: 1px solid var(--line);
}

.queue-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queue-title-row h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.queue-title-row .live-state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--success);
  font-size: 11px;
  font-weight: 800;
}

.queue-header .search-field {
  margin-top: 15px;
}

.queue-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 13px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-3);
}

.queue-tab {
  position: relative;
  min-height: 34px;
  padding: 0 7px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.queue-tab.active {
  color: var(--ink);
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.queue-tab b {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  padding: 0 5px;
  place-items: center;
  border-radius: 999px;
  background: var(--line);
  font-size: 9px;
}

.queue-tab.active b {
  color: var(--brand-ink);
  background: var(--brand-soft);
}

.queue-filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.queue-filter-row button {
  border: 0;
  color: var(--ink-2);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 800;
}

.conversation-list {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 0 8px 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.conversation-item {
  position: relative;
  width: 100%;
  padding: 13px 10px;
  border: 1px solid transparent;
  border-radius: 15px;
  background: transparent;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: 0.15s ease;
}

.conversation-item + .conversation-item {
  margin-top: 2px;
}

.conversation-item:hover {
  background: var(--surface-2);
}

.conversation-item.active {
  border-color: rgba(37, 198, 166, 0.22);
  background: var(--brand-soft);
}

.conversation-item.active::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 15px;
  bottom: 15px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--brand);
}

.conversation-main {
  min-width: 0;
}

.conversation-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.conversation-name {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.channel-chip {
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 7px;
  color: #ffffff;
  display: inline-grid;
  place-items: center;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.channel-wa { background: #1fbf74; }
.channel-ig { background: linear-gradient(135deg, #8d49d6, #eb4f7a, #f3a43a); }
.channel-web { background: #4f6fea; }
.channel-app { background: #04a8bd; }
.channel-telegram { background: #229ed9; }
.channel-mail { background: #7d8898; }

.conversation-preview {
  /* Sem `display: block` o recorte não acontece: o elemento é um <span>, e
     overflow/text-overflow não valem para caixa inline. A prévia da última
     mensagem passava direto pela borda do painel. */
  display: block;
  margin-top: 5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  line-height: 1.4;
}

.conversation-tags {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.mini-tag {
  min-height: 20px;
  padding: 0 7px;
  border-radius: 7px;
  color: var(--ink-2);
  background: var(--surface-3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.conversation-item.active .mini-tag {
  background: rgba(255, 255, 255, 0.65);
}

.conversation-meta {
  min-width: 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.conversation-time {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.unread-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--brand-strong);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
}

.priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}

.queue-footer {
  padding: 11px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.agent-presence {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 10px;
}

.agent-presence .state {
  min-width: 0;
  flex: 1;
}

.agent-presence strong {
  display: block;
  font-size: 11px;
}

.agent-presence span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.chat-panel {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background:
    linear-gradient(rgba(255,255,255,0.93), rgba(255,255,255,0.93)),
    radial-gradient(circle at 20px 20px, rgba(43, 86, 126, 0.06) 1.4px, transparent 1.4px);
  background-size: auto, 30px 30px;
}

[data-theme="dark"] .chat-panel {
  background:
    linear-gradient(rgba(18,30,45,0.95), rgba(18,30,45,0.95)),
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.05) 1.4px, transparent 1.4px);
  background-size: auto, 30px 30px;
}

.chat-header {
  min-height: 76px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-person {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.chat-person-text {
  min-width: 0;
}

.chat-person h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  letter-spacing: -0.015em;
}

.chat-person p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-header-actions .finish-btn {
  min-height: 38px;
  margin-left: 5px;
}

/* O botao da Visao 360 fica marcado enquanto o painel esta aberto na tela
   larga. Sem isso nada diz que e aquele botao que recolhe o painel — ele so
   parecia decoracao ao lado do "Finalizar". */
.chat-header-actions .icon-btn.active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.message-scroll {
  min-height: 0;
  overflow: auto;
  padding: 22px clamp(20px, 4vw, 52px) 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 20px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.date-separator::before,
.date-separator::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 8px 0;
}

.message-row.outgoing {
  justify-content: flex-end;
}

.message-avatar {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: linear-gradient(145deg, #7584f5, #4d5bd0);
  font-size: 9px;
  font-weight: 900;
}

.message-bubble {
  max-width: min(76%, 580px);
  padding: 10px 12px 8px;
  border: 1px solid var(--line);
  border-radius: 15px 15px 15px 5px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.outgoing .message-bubble {
  border-color: rgba(37, 198, 166, 0.2);
  border-radius: 15px 15px 5px 15px;
  background: var(--brand-soft);
}

.message-bubble.bot {
  border-color: rgba(110, 124, 246, 0.18);
  background: var(--accent-soft);
}

.message-author {
  margin-bottom: 5px;
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 900;
}

.message-bubble.bot .message-author {
  color: var(--accent);
}

.message-text {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-time {
  margin-top: 6px;
  color: var(--muted);
  text-align: right;
  font-size: 8px;
  font-weight: 700;
}

/* Foto que o cliente mandou no atendimento. Largura fixa para a conversa nao
   dar solavanco enquanto carrega; clicar abre em tamanho cheio noutra aba. */
/* Contratos do cliente na Visao 360. So aparece quando ha mais de um. */
.contrato-linha {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 6px;
}

.contrato-linha.atual {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 7%, transparent);
}

.contrato-marca {
  flex: 0 0 34px;
  color: var(--brand-strong);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.contrato-texto {
  flex: 1;
  min-width: 0;
}

.contrato-texto strong {
  display: block;
  font-size: 12px;
}

.contrato-texto small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.message-foto {
  display: block;
  margin: 0 0 7px;
}

.message-foto img {
  display: block;
  width: 260px;
  max-width: 100%;
  border-radius: 10px;
  background: var(--surface-3);
}

.message-file {
  margin-top: 8px;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  display: flex;
  align-items: center;
  gap: 9px;
}

.message-file-icon {
  width: 32px;
  height: 36px;
  border-radius: 8px;
  color: var(--danger);
  background: var(--danger-soft);
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 900;
}

.message-file strong {
  display: block;
  font-size: 10px;
}

.message-file small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.system-message {
  width: fit-content;
  max-width: 88%;
  margin: 16px auto;
  padding: 8px 11px;
  border-radius: 10px;
  color: var(--muted);
  background: var(--surface-3);
  font-size: 9px;
  font-weight: 700;
  text-align: center;
}

.ai-suggestion {
  margin: 8px clamp(20px, 4vw, 52px) 0;
  padding: 10px 12px;
  border: 1px solid rgba(110, 124, 246, 0.24);
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-soft), var(--surface));
  box-shadow: var(--shadow-xs);
}

.ai-suggestion-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
}

.ai-suggestion-body {
  margin-top: 7px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ai-suggestion-text {
  min-width: 0;
  flex: 1;
  color: var(--ink-2);
  font-size: 10px;
  line-height: 1.45;
}

.composer-wrap {
  padding: 10px 16px 15px;
  background: linear-gradient(180deg, transparent, var(--surface) 26%);
}

.composer {
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 12px 28px rgba(20, 31, 50, 0.09);
  overflow: hidden;
}

.composer textarea {
  width: 100%;
  min-height: 55px;
  max-height: 130px;
  padding: 14px 15px 8px;
  border: 0;
  resize: none;
  color: var(--ink);
  background: transparent;
  outline: none;
  font-size: 12px;
  line-height: 1.5;
}

.composer-bottom {
  min-height: 43px;
  padding: 5px 7px 7px 9px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.composer-tools {
  display: flex;
  align-items: center;
  gap: 1px;
}

.composer-tools .icon-btn {
  width: 33px;
  height: 33px;
  border-radius: 9px;
}

.composer-hint {
  margin-left: 5px;
  color: var(--muted);
  font-size: 9px;
}

.composer-send {
  width: 36px;
  height: 36px;
  margin-left: auto;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-strong));
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(10, 169, 139, 0.24);
}

.customer-panel {
  border-left: 1px solid var(--line);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.customer-header {
  min-height: 76px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.customer-header h2 {
  margin: 0;
  font-size: 14px;
}

.customer-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.customer-content {
  padding: 15px;
}

.customer-identity {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background:
    radial-gradient(circle at 100% 0%, rgba(37, 198, 166, 0.16), transparent 42%),
    var(--surface);
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
}

.customer-identity h3 {
  margin: 2px 0 4px;
  font-size: 15px;
}

.customer-identity p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.customer-identity .identity-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 3px;
}

.customer-status-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.customer-status-card {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-2);
}

.customer-status-card .label {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.customer-status-card strong {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 11px;
}

.side-section {
  margin-top: 17px;
}

.side-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.side-section-title h4 {
  margin: 0;
  font-size: 11px;
  letter-spacing: -0.01em;
}

.side-section-title button {
  border: 0;
  color: var(--brand-strong);
  background: transparent;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.quick-action {
  min-height: 72px;
  padding: 9px 5px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink-2);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  transition: 0.16s ease;
}

.quick-action:hover {
  color: var(--brand-ink);
  border-color: rgba(37, 198, 166, 0.35);
  background: var(--brand-soft);
  transform: translateY(-1px);
}

.quick-action .qa-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  display: grid;
  place-items: center;
}

.quick-action span:last-child {
  font-size: 8px;
  font-weight: 800;
  line-height: 1.25;
}

.info-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.info-row {
  min-height: 43px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
}

.info-row + .info-row {
  border-top: 1px solid var(--line);
}

.info-row .info-icon {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  color: var(--ink-2);
  background: var(--surface-3);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.info-row .info-copy {
  min-width: 0;
  flex: 1;
}

.info-row .info-copy span {
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.info-row .info-copy strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
}

.info-row .info-value {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-summary-card {
  padding: 12px;
  border: 1px solid rgba(110, 124, 246, 0.22);
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent-soft), var(--surface));
}

.ai-summary-card .ai-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 900;
}

.ai-summary-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 9px;
  line-height: 1.55;
}

.timeline {
  position: relative;
  display: grid;
  gap: 11px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 5px;
  width: 1px;
  background: var(--line-strong);
}

.timeline-item {
  position: relative;
  padding-left: 21px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.timeline-item strong {
  display: block;
  font-size: 9px;
}

.timeline-item span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.4;
}

/* Dashboard module */
.overview-module {
  grid-column: 2 / -1;
  height: 100vh;
  overflow: auto;
  padding: 24px 28px 34px;
  background: var(--surface-2);
}

.overview-module[hidden],
.queue-panel[hidden],
.chat-panel[hidden],
.customer-panel[hidden] {
  display: none !important;
}

.overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.overview-title h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.overview-title p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 13px;
  margin-top: 22px;
}

.kpi-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.kpi-icon {
  width: 37px;
  height: 37px;
  border-radius: 12px;
  color: var(--brand-ink);
  background: var(--brand-soft);
  display: grid;
  place-items: center;
}

.kpi-trend {
  color: var(--success);
  font-size: 9px;
  font-weight: 900;
}

.kpi-trend.down {
  color: var(--danger);
}

.kpi-card strong {
  display: block;
  margin-top: 15px;
  font-size: 26px;
  letter-spacing: -0.04em;
}

.kpi-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.95fr;
  gap: 13px;
  margin-top: 13px;
}

.dashboard-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
}

.dashboard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-card-header h3 {
  margin: 0;
  font-size: 13px;
}

.dashboard-card-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.fake-chart {
  position: relative;
  height: 225px;
  margin-top: 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.fake-chart::before,
.fake-chart::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}

.fake-chart::before { top: 33%; }
.fake-chart::after { top: 66%; }

.chart-bar-group {
  position: relative;
  z-index: 1;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.chart-bar {
  width: min(18px, 40%);
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  min-height: 12px;
}

.chart-bar.secondary {
  opacity: 0.3;
  background: var(--accent);
}

.chart-label {
  position: absolute;
  top: calc(100% + 8px);
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}

.department-list {
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.department-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 12px;
}

.department-row strong {
  font-size: 10px;
}

.department-row span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.progress-track {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.team-table {
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.team-row {
  min-height: 52px;
  padding: 9px 12px;
  display: grid;
  grid-template-columns: 1.2fr 0.65fr 0.65fr 0.55fr;
  align-items: center;
  gap: 8px;
}

.team-row + .team-row {
  border-top: 1px solid var(--line);
}

.team-row.header {
  min-height: 38px;
  color: var(--muted);
  background: var(--surface-2);
  font-size: 8px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.team-member {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.team-member strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
}

.team-row > span {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 800;
}

/* Client app */
.client-page {
  min-height: 100vh;
  color: #152237;
  background:
    radial-gradient(circle at 10% 10%, rgba(37, 198, 166, 0.18), transparent 25%),
    radial-gradient(circle at 90% 12%, rgba(110, 124, 246, 0.18), transparent 28%),
    #edf3f7;
}

.client-showcase {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(300px, 560px) 440px;
  align-items: center;
  justify-content: center;
  gap: 70px;
  padding: 34px;
}

.client-pitch {
  max-width: 560px;
}

.client-pitch .brand-lockup small {
  color: #6d7b8f;
}

.client-pitch h1 {
  margin: 34px 0 18px;
  color: #142136;
  font-size: clamp(42px, 5vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.client-pitch h1 span {
  color: transparent;
  background: linear-gradient(135deg, #0aaa8c, #5669eb);
  -webkit-background-clip: text;
  background-clip: text;
}

.client-pitch p {
  margin: 0;
  color: #637086;
  font-size: 16px;
  line-height: 1.7;
}

.client-feature-list {
  display: grid;
  gap: 11px;
  margin-top: 28px;
}

.client-feature {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #3d4b60;
  font-size: 13px;
  font-weight: 750;
}

.client-feature i {
  width: 29px;
  height: 29px;
  border-radius: 10px;
  color: #087e6b;
  background: rgba(37, 198, 166, 0.14);
  display: grid;
  place-items: center;
  font-style: normal;
  font-weight: 900;
}

.client-back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 30px;
  color: #516075;
  font-size: 12px;
  font-weight: 800;
}

.phone-frame {
  position: relative;
  width: 410px;
  height: min(860px, calc(100vh - 44px));
  min-height: 680px;
  padding: 11px;
  border: 9px solid #142136;
  border-radius: 46px;
  background: #142136;
  box-shadow: 0 36px 90px rgba(20, 33, 54, 0.25);
}

.phone-frame::before {
  content: "";
  position: absolute;
  z-index: 50;
  top: 10px;
  left: 50%;
  width: 112px;
  height: 26px;
  border-radius: 0 0 17px 17px;
  background: #142136;
  transform: translateX(-50%);
}

.client-shell {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 31px;
  background: #f5f8fb;
  overflow: hidden;
}

.client-status-bar {
  position: absolute;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  height: 33px;
  padding: 8px 20px 0;
  color: #ffffff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 900;
  pointer-events: none;
}

.mobile-app-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 108px;
  padding: 38px 17px 13px;
  color: #ffffff;
  background: linear-gradient(135deg, #0ead90 0%, #18b99d 45%, #4f68e6 125%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-app-header .brand-mini {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mobile-app-header .brand-mini .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: none;
  backdrop-filter: blur(8px);
}

.mobile-app-header .brand-mini strong {
  display: block;
  font-size: 13px;
}

.mobile-app-header .brand-mini small {
  display: block;
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  font-weight: 700;
}

.mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mobile-header-actions button {
  position: relative;
  width: 35px;
  height: 35px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.mobile-header-actions button::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid #17b799;
  border-radius: 50%;
  background: #ff6e76;
}

.app-content {
  position: absolute;
  top: 108px;
  right: 0;
  bottom: 68px;
  left: 0;
  overflow: auto;
  scrollbar-width: none;
}

.app-content::-webkit-scrollbar {
  display: none;
}

.app-view {
  display: none;
  min-height: 100%;
  padding: 15px 14px 26px;
}

.app-view.active {
  display: block;
  animation: app-view-in 0.18s ease both;
}

@keyframes app-view-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.hello-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hello-row p {
  margin: 0;
  color: #758298;
  font-size: 10px;
  font-weight: 700;
}

.hello-row h2 {
  margin: 3px 0 0;
  color: #17243a;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.connection-card {
  position: relative;
  min-height: 155px;
  margin-top: 13px;
  padding: 17px;
  border-radius: 23px;
  color: #ffffff;
  background:
    radial-gradient(circle at 95% 0%, rgba(255, 255, 255, 0.25), transparent 37%),
    linear-gradient(135deg, #122a48, #174c63 55%, #119e8a);
  box-shadow: 0 18px 30px rgba(18, 42, 72, 0.18);
  overflow: hidden;
}

.connection-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -55px;
  width: 150px;
  height: 150px;
  border: 24px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}

.connection-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.connection-state {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 900;
}

.connection-state .pulse {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #56efb5;
  box-shadow: 0 0 0 5px rgba(86, 239, 181, 0.13);
}

.connection-state .pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border: 1px solid rgba(86, 239, 181, 0.35);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 0.8; }
  70% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1.45); opacity: 0; }
}

.connection-plan {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  font-size: 8px;
  font-weight: 900;
}

.connection-card h3 {
  position: relative;
  z-index: 1;
  margin: 20px 0 2px;
  font-size: 27px;
  letter-spacing: -0.05em;
}

.connection-card > p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
  font-weight: 700;
}

.connection-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
}

.connection-metric span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.connection-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 10px;
}

.mobile-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 2px 10px;
}

.mobile-section-title h3 {
  margin: 0;
  color: #1f2c42;
  font-size: 13px;
}

.mobile-section-title button {
  border: 0;
  color: #0aa98b;
  background: transparent;
  font-size: 9px;
  font-weight: 900;
}

.app-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.app-quick-action {
  min-height: 82px;
  padding: 9px 4px;
  border: 0;
  border-radius: 17px;
  color: #334157;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(35, 51, 77, 0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
}

.app-quick-icon {
  width: 35px;
  height: 35px;
  border-radius: 12px;
  color: #087e6b;
  background: #e5faf5;
  display: grid;
  place-items: center;
}

.app-quick-action:nth-child(2) .app-quick-icon {
  color: #5262db;
  background: #eef0ff;
}

.app-quick-action:nth-child(3) .app-quick-icon {
  color: #c37a17;
  background: #fff4df;
}

.app-quick-action:nth-child(4) .app-quick-icon {
  color: #3388e8;
  background: #eaf4ff;
}

.app-quick-action span:last-child {
  font-size: 8px;
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
}

.invoice-card {
  padding: 14px;
  border: 1px solid #e6ebf1;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(35, 51, 77, 0.055);
}

.invoice-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.invoice-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #5162df;
  background: #eef0ff;
  display: grid;
  place-items: center;
}

.invoice-copy {
  min-width: 0;
  flex: 1;
}

.invoice-copy span {
  color: #8490a2;
  font-size: 8px;
  font-weight: 800;
}

.invoice-copy strong {
  display: block;
  margin-top: 3px;
  color: #17243a;
  font-size: 14px;
}

.invoice-value {
  text-align: right;
}

.invoice-value strong {
  display: block;
  color: #17243a;
  font-size: 14px;
}

.invoice-value span {
  display: block;
  margin-top: 3px;
  color: #ea626a;
  font-size: 8px;
  font-weight: 900;
}

.invoice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
}

.invoice-actions button {
  min-height: 36px;
  border: 0;
  border-radius: 11px;
  font-size: 9px;
  font-weight: 900;
  cursor: pointer;
}

.invoice-actions .pay {
  color: #ffffff;
  background: linear-gradient(135deg, #19bf9e, #0aa98b);
}

.invoice-actions .copy {
  color: #4050ca;
  background: #eef0ff;
}

.support-banner {
  position: relative;
  min-height: 95px;
  padding: 15px 120px 15px 15px;
  border-radius: 19px;
  color: #ffffff;
  background: linear-gradient(135deg, #5567e9, #704dbd);
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(84, 103, 233, 0.18);
}

.support-banner h4 {
  margin: 0;
  font-size: 13px;
}

.support-banner p {
  margin: 6px 0 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 8px;
  line-height: 1.4;
}

.support-banner button {
  min-height: 28px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  color: #4758d0;
  background: #ffffff;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.support-illustration {
  position: absolute;
  right: 16px;
  bottom: -8px;
  width: 86px;
  height: 86px;
  border: 12px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.support-illustration::before,
.support-illustration::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
}

.support-illustration::before {
  top: 17px;
  left: 21px;
  width: 20px;
  height: 20px;
}

.support-illustration::after {
  left: 12px;
  bottom: 8px;
  width: 38px;
  height: 23px;
  border-radius: 20px 20px 8px 8px;
}

.bottom-nav {
  position: absolute;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  height: 69px;
  padding: 7px 9px 8px;
  border-top: 1px solid #e4eaf1;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.bottom-nav-btn {
  position: relative;
  border: 0;
  color: #93a0b2;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 7px;
  font-weight: 900;
  cursor: pointer;
}

.bottom-nav-btn.active {
  color: #0aa98b;
}

.bottom-nav-btn.active::before {
  content: "";
  position: absolute;
  top: -7px;
  width: 28px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: #16b596;
}

.bottom-nav-btn.chat-main {
  margin-top: -22px;
}

.bottom-nav-btn.chat-main .nav-main-circle {
  width: 49px;
  height: 49px;
  border: 5px solid #f5f8fb;
  border-radius: 17px;
  color: #ffffff;
  background: linear-gradient(135deg, #22c6a7, #0aa98b);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 22px rgba(10, 169, 139, 0.28);
}

.bottom-nav-btn.chat-main span:last-child {
  margin-top: -1px;
}

/* Inner mobile pages */
.mobile-page-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-page-title h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.03em;
}

.mobile-page-title p {
  margin: 3px 0 0;
  color: #7e8b9e;
  font-size: 9px;
  font-weight: 700;
}

.mobile-page-title .circle-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  color: #425067;
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(35, 51, 77, 0.07);
  display: grid;
  place-items: center;
}

.bill-summary {
  padding: 16px;
  border-radius: 20px;
  color: #ffffff;
  background: linear-gradient(135deg, #4e62e0, #6d50b9);
  box-shadow: 0 14px 28px rgba(78, 98, 224, 0.18);
}

.bill-summary span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 8px;
  font-weight: 800;
}

.bill-summary h3 {
  margin: 7px 0 0;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.bill-summary .bill-status-row {
  margin-top: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bill-summary .bill-status {
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  color: #f7d58d;
  background: rgba(255, 255, 255, 0.12);
  display: inline-flex;
  align-items: center;
  font-size: 8px;
  font-weight: 900;
}

.bill-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.bill-item {
  padding: 12px;
  border: 1px solid #e4eaf1;
  border-radius: 15px;
  background: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.bill-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #4f60d8;
  background: #eef0ff;
  display: grid;
  place-items: center;
}

.bill-item-copy {
  min-width: 0;
  flex: 1;
}

.bill-item-copy strong {
  display: block;
  font-size: 10px;
}

.bill-item-copy span {
  display: block;
  margin-top: 3px;
  color: #8490a2;
  font-size: 8px;
  font-weight: 700;
}

.bill-item-value {
  text-align: right;
}

.bill-item-value strong {
  display: block;
  font-size: 10px;
}

.bill-item-value span {
  display: block;
  margin-top: 3px;
  color: #24a96b;
  font-size: 8px;
  font-weight: 900;
}

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

.app-chat-header {
  padding: 0 0 11px;
  border-bottom: 1px solid #e4eaf1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-chat-header .avatar {
  width: 41px;
  height: 41px;
  border-radius: 14px;
  background: linear-gradient(145deg, #16b596, #5267e6);
}

.app-chat-header-copy {
  min-width: 0;
  flex: 1;
}

.app-chat-header-copy strong {
  display: block;
  font-size: 11px;
}

.app-chat-header-copy span {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #78869a;
  font-size: 8px;
  font-weight: 800;
}

.app-chat-header-copy i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #25a969;
}

.app-chat-messages {
  min-height: 0;
  overflow: auto;
  padding: 14px 1px;
  scrollbar-width: none;
}

.app-chat-messages::-webkit-scrollbar {
  display: none;
}

.app-message {
  display: flex;
  margin: 8px 0;
}

.app-message.me {
  justify-content: flex-end;
}

.app-message-bubble {
  max-width: 82%;
  padding: 10px 11px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 15px 15px 15px 5px;
  color: #2d3b51;
  background: #ffffff;
  font-size: 10px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(35, 51, 77, 0.04);
}

.app-message.me .app-message-bubble {
  border-color: #d5f3ec;
  border-radius: 15px 15px 5px 15px;
  background: #def7f1;
}

.app-message-bubble small {
  display: block;
  margin-top: 5px;
  color: #8a96a8;
  text-align: right;
  font-size: 7px;
  font-weight: 700;
}

.app-chat-options {
  display: flex;
  gap: 6px;
  margin: 7px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.app-chat-options button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #cfeee7;
  border-radius: 999px;
  color: #087e6b;
  background: #ffffff;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.app-chat-composer {
  padding-top: 9px;
  border-top: 1px solid #e4eaf1;
  display: flex;
  align-items: center;
  gap: 7px;
}

.app-chat-composer button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 12px;
  color: #6f7d91;
  background: #ffffff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.app-chat-composer input {
  min-width: 0;
  height: 39px;
  flex: 1;
  padding: 0 12px;
  border: 1px solid #e0e7ef;
  border-radius: 13px;
  outline: 0;
  color: #253349;
  background: #ffffff;
  font-size: 10px;
}

.app-chat-composer .send {
  color: #ffffff;
  background: linear-gradient(135deg, #20c4a5, #0aa98b);
}

.service-card {
  padding: 14px;
  border: 1px solid #e4eaf1;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(35, 51, 77, 0.045);
}

.service-card + .service-card {
  margin-top: 9px;
}

.service-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.service-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #087e6b;
  background: #e5faf5;
  display: grid;
  place-items: center;
}

.service-card-copy {
  min-width: 0;
  flex: 1;
}

.service-card-copy strong {
  display: block;
  font-size: 11px;
}

.service-card-copy span {
  display: block;
  margin-top: 3px;
  color: #8490a2;
  font-size: 8px;
  font-weight: 700;
}

.service-card button {
  min-height: 31px;
  margin-top: 12px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  color: #087e6b;
  background: #e5faf5;
  font-size: 8px;
  font-weight: 900;
  cursor: pointer;
}

.diagnostic-progress {
  display: none;
  margin-top: 12px;
  padding: 10px;
  border-radius: 12px;
  background: #f3f6f9;
}

.diagnostic-progress.active {
  display: block;
}

.diagnostic-bar {
  height: 7px;
  border-radius: 999px;
  background: #e3e9f0;
  overflow: hidden;
}

.diagnostic-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c6a7, #5669eb);
  transition: width 0.35s ease;
}

.diagnostic-progress p {
  margin: 8px 0 0;
  color: #758298;
  font-size: 8px;
  font-weight: 800;
}

.wifi-card {
  padding: 15px;
  border-radius: 19px;
  color: #ffffff;
  background: linear-gradient(135deg, #174c63, #119e8a);
  box-shadow: 0 13px 25px rgba(17, 158, 138, 0.16);
}

.wifi-card .wifi-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wifi-card .wifi-head .wifi-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.13);
  display: grid;
  place-items: center;
}

.wifi-card .wifi-copy {
  min-width: 0;
  flex: 1;
}

.wifi-card .wifi-copy span {
  color: rgba(255, 255, 255, 0.67);
  font-size: 8px;
  font-weight: 800;
}

.wifi-card .wifi-copy strong {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}

.wifi-card button {
  min-height: 31px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: #087e6b;
  background: #ffffff;
  font-size: 8px;
  font-weight: 900;
}

.wifi-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.wifi-stat {
  padding: 8px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
}

.wifi-stat span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 7px;
  font-weight: 800;
}

.wifi-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 9px;
}

.profile-card {
  padding: 18px 14px;
  border-radius: 20px;
  background: linear-gradient(145deg, #ffffff, #f5f8fb);
  box-shadow: 0 10px 24px rgba(35, 51, 77, 0.07);
  text-align: center;
}

.profile-card .avatar {
  width: 65px;
  height: 65px;
  margin: 0 auto;
  border-radius: 21px;
  background: linear-gradient(145deg, #f29a63, #d66a5a);
  font-size: 18px;
}

.profile-card h3 {
  margin: 11px 0 4px;
  font-size: 15px;
}

.profile-card p {
  margin: 0;
  color: #8490a2;
  font-size: 9px;
  font-weight: 700;
}

.profile-list {
  margin-top: 12px;
  border: 1px solid #e4eaf1;
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

.profile-row {
  min-height: 49px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-row + .profile-row {
  border-top: 1px solid #e4eaf1;
}

.profile-row .profile-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
  color: #4f60d8;
  background: #eef0ff;
  display: grid;
  place-items: center;
}

.profile-row strong {
  min-width: 0;
  flex: 1;
  font-size: 9px;
}

.profile-row span {
  color: #8490a2;
  font-size: 8px;
  font-weight: 800;
}

/* Responsive */
@media (max-width: 1280px) {
  .agent-shell {
    grid-template-columns: 72px 306px minmax(420px, 1fr);
  }

  .customer-panel {
    position: fixed;
    z-index: 80;
    top: 0;
    right: 0;
    width: 356px;
    max-width: 92vw;
    transform: translateX(102%);
    transition: 0.22s ease;
    box-shadow: -20px 0 50px rgba(10, 20, 34, 0.2);
  }

  .agent-page.details-open .customer-panel {
    transform: translateX(0);
  }

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

@media (max-width: 980px) {
  .client-showcase {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .client-pitch {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
  }

  .client-pitch .brand-lockup {
    justify-content: center;
  }

  .client-feature-list {
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .phone-frame {
    margin: 0 auto;
  }

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

  .product-card {
    min-height: 390px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .agent-shell {
    grid-template-columns: 1fr;
  }

  .nav-rail {
    position: fixed;
    z-index: 90;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    padding: 7px 10px;
    flex-direction: row;
  }

  .nav-rail .brand-mark,
  .rail-bottom,
  .rail-btn:nth-child(n+6) {
    display: none;
  }

  .rail-menu {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
  }

  .rail-btn {
    width: 100%;
    height: 49px;
  }

  .rail-btn.active::before {
    top: -7px;
    left: 50%;
    width: 28px;
    height: 3px;
    transform: translateX(-50%);
  }

  .rail-btn .tooltip {
    display: none;
  }

  .queue-panel {
    height: calc(100vh - 64px);
  }

  .chat-panel {
    position: fixed;
    z-index: 70;
    inset: 0 0 64px;
    transform: translateX(102%);
    transition: 0.22s ease;
  }

  .agent-page.mobile-chat-open .chat-panel {
    transform: translateX(0);
  }

  .customer-panel {
    bottom: 64px;
    height: auto;
  }

  .overview-module {
    grid-column: 1;
    height: calc(100vh - 64px);
    padding: 18px 14px 30px;
  }

  .overview-header {
    align-items: flex-start;
  }

  .overview-actions .btn-secondary {
    display: none;
  }

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

  .team-row {
    grid-template-columns: 1fr 0.5fr 0.5fr;
  }

  .team-row > :nth-child(3) {
    display: none;
  }

  .chat-header-actions .icon-btn:nth-child(-n+2) {
    display: none;
  }

  .landing-page {
    padding: 20px;
  }

  .landing-hero {
    margin-top: 50px;
  }

  .product-card {
    min-height: 430px;
    padding: 24px;
  }

  .product-card .card-actions {
    left: 24px;
    bottom: 24px;
  }
}

@media (max-width: 560px) {
  .client-showcase {
    display: block;
    min-height: 100vh;
    padding: 0;
  }

  .client-pitch {
    display: none;
  }

  .phone-frame {
    width: 100%;
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #f5f8fb;
    box-shadow: none;
  }

  .phone-frame::before,
  .client-status-bar {
    display: none;
  }

  .client-shell {
    border-radius: 0;
  }

  .mobile-app-header {
    height: 88px;
    padding-top: 16px;
  }

  .app-content {
    top: 88px;
  }

  .landing-topbar .meta {
    display: none;
  }

  .landing-hero h1 {
    font-size: 42px;
  }

  .landing-hero p {
    font-size: 14px;
  }

  .product-card .preview-lines {
    width: 70%;
  }

  .phone-preview {
    right: -15px;
  }

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

.mobile-back {
  display: none;
}

@media (max-width: 760px) {
  .mobile-back {
    display: inline-grid;
  }
}

/* ==========================================================================
   Módulo de configurações
   ========================================================================== */
.settings-module {
  grid-column: 2 / -1;              /* sem isto o modulo cai na coluna estreita */
  height: 100vh; overflow-y: auto;
  padding: 24px 28px 40px;
  background: var(--surface-2);
}
.settings-module[hidden] { display: none !important; }
/* .btn define display, que vence a regra [hidden] do navegador. */
.settings-module .btn[hidden] { display: none !important; }
.settings-inner { max-width: 1080px; }   /* limita a linha para leitura */
.settings-head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.settings-head h1 { margin: 0 0 4px; font-size: 18px; color: var(--ink); }
.settings-head p { margin: 0; font-size: 12px; color: var(--muted); }
.settings-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px;
  border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.settings-tab { padding: 8px 14px; font: inherit; font-size: 12px; font-weight: 600;
  color: var(--muted); background: transparent; border: 1px solid transparent;
  border-radius: var(--radius-sm); cursor: pointer; }
.settings-tab:hover { color: var(--ink); background: var(--surface-3); }
.settings-tab.active { color: var(--brand-ink, var(--ink)); background: var(--brand-soft);
  border-color: var(--brand); }
.settings-panel[hidden] { display: none; }
.settings-card { background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
  box-shadow: var(--shadow-xs); }
.settings-card > h2 { margin: 0 0 4px; font-size: 14px; color: var(--ink); }
.settings-card > p.hint { margin: 0 0 16px; font-size: 11px; line-height: 1.6;
  color: var(--muted); }
.settings-grid { display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 11px; font-weight: 600; color: var(--muted); }
.field > small { font-size: 10px; line-height: 1.5; color: var(--muted); }
.field input[type=text], .field input[type=password], .field input[type=number],
.field input[type=time],
.field select, .field textarea { width: 100%; box-sizing: border-box; padding: 9px 11px;
  font: inherit; font-size: 12px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none;
  border-color: var(--brand); background: var(--surface); }
.field textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
.field-wide { grid-column: 1 / -1; }
.weekday-row { display: flex; flex-wrap: wrap; gap: 6px; }
.weekday-row label { display: flex; align-items: center; gap: 6px; padding: 7px 10px;
  font-size: 11px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.weekday-row input[type=checkbox] { margin: 0; width: 14px; height: 14px;
  accent-color: var(--brand); cursor: pointer; }
.weekday-row label:has(input:checked) { color: var(--ink); border-color: var(--brand);
  background: var(--surface); }
.holiday-list { display: flex; flex-direction: column; gap: 1px;
  background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius-sm); overflow: hidden; }
.holiday-item { display: flex; align-items: baseline; gap: 8px; padding: 8px 11px;
  font-size: 11px; color: var(--ink-2); background: var(--surface-2); }
.holiday-item strong { font-variant-numeric: tabular-nums; color: var(--ink); }
.holiday-item small { margin-left: auto; font-size: 10px; color: var(--muted); }
.holiday-item em { font-style: normal; }
.holiday-empty { padding: 9px 11px; font-size: 11px; color: var(--muted);
  background: var(--surface-2); }
.agent-actions { white-space: nowrap; }
.agent-actions .btn { margin: 2px 4px 2px 0; }
.agent-actions .btn:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 760px) {
  .agent-actions { white-space: normal; }
}
.settings-code { margin: 6px 0 0; padding: 11px 13px; overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px;
  line-height: 1.6; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  white-space: pre; }
.switch-row { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0;
  border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row input[type=checkbox] { margin: 2px 0 0; width: 16px; height: 16px;
  accent-color: var(--brand); flex: 0 0 auto; cursor: pointer; }
.switch-row .switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-row strong { font-size: 12px; font-weight: 600; color: var(--ink); }
.switch-row span { font-size: 10px; line-height: 1.5; color: var(--muted); }
.settings-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 4px; }
.settings-result { margin: 12px 0 0; padding: 11px 13px; font-size: 11px; line-height: 1.6;
  border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-word; }
.settings-result.ok { color: var(--success); background: var(--success-soft); }
.settings-result.bad { color: var(--danger); background: var(--danger-soft); }
.settings-result.info { color: var(--ink-2); background: var(--surface-3); }
.settings-result[hidden] { display: none; }
.settings-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.settings-table th { text-align: left; padding: 8px 10px; font-size: 10px;
  text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  border-bottom: 1px solid var(--line); }
.settings-table td { padding: 9px 10px; color: var(--ink-2);
  border-bottom: 1px solid var(--line); vertical-align: middle; }
.settings-table tr:last-child td { border-bottom: 0; }
.settings-table code { font-size: 10px; color: var(--muted); }
.settings-scroll { max-height: 340px; overflow-y: auto; }
.settings-warn { display: flex; gap: 10px; padding: 13px 15px; margin-bottom: 16px;
  font-size: 11px; line-height: 1.65; color: var(--ink-2);
  background: var(--surface-3); border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm); }
@media (max-width: 720px) {
  .settings-module { padding: 16px 14px 32px; }
  .settings-grid { grid-template-columns: 1fr; }
}
