@font-face {
  font-display: swap;
  font-family: "Bela Montserrat";
  font-style: normal;
  font-weight: 400;
  src: url("https://belanoiva.com.br/cdn/fonts/montserrat/montserrat_n4.81949fa0ac9fd2021e16436151e8eaa539321637.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Bela Montserrat";
  font-style: normal;
  font-weight: 700;
  src: url("https://belanoiva.com.br/cdn/fonts/montserrat/montserrat_n7.3c434e22befd5c18a6b4afadb1e3d77c128c7939.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Bela Playfair";
  font-style: normal;
  font-weight: 400;
  src: url("https://belanoiva.com.br/cdn/fonts/playfair/playfair_n4.13d3b411a6dc3a2e96e8bdc666266166a065c857.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Bela Script";
  font-style: normal;
  font-weight: 400;
  src: url("https://belanoiva.com.br/cdn/fonts/pinyon_script/pinyonscript_n4.d5cdaa582aa86df1f76ad2002864c37d1f357b0a.woff2") format("woff2");
}

:root {
  --panel-accent: #c7a56b;
  --panel-accent-strong: #1a0808;
  --panel-accent-soft: rgba(199, 165, 107, 0.16);
  --panel-bg: #f8f2ed;
  --panel-bg-strong: #efe4dc;
  --panel-border: #e4d7ce;
  --panel-card-shadow: 0 24px 70px rgba(26, 8, 8, 0.08);
  --panel-muted: #8a7d75;
  --panel-surface: #fffdfa;
  --panel-surface-muted: #fbf5ef;
  --panel-text: #1a0808;
  --panel-text-soft: #665952;
  --panel-font: "Bela Montserrat", "Montserrat", "Manrope", "Segoe UI", sans-serif;
  --panel-display-font: "Bela Playfair", Georgia, serif;
  --panel-script-font: "Bela Script", cursive;
  --panel-sidebar-brand-height: 102px;
}

html {
  background: var(--panel-bg);
}

body {
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(248, 242, 237, 0.98)),
    url("https://belanoiva.com.br/cdn/shop/files/belanoiva-home-sobre-a-bela-noiva.png?v=1746777861&width=713") center / cover fixed;
  color: var(--panel-text);
  font-family: var(--panel-font);
  letter-spacing: 0;
}

body::before {
  display: none;
}

.app-shell {
  grid-template-columns: 304px minmax(0, 1fr);
}

.sidebar {
  gap: 24px;
  padding: 0 22px 26px;
  background:
    linear-gradient(180deg, rgba(26, 8, 8, 0.98), rgba(42, 25, 19, 0.98)),
    #1a0808;
  border-right: 1px solid rgba(199, 165, 107, 0.28);
  box-shadow: 20px 0 60px rgba(26, 8, 8, 0.16);
}

.sidebar__brand {
  min-height: var(--panel-sidebar-brand-height);
  margin: 0 -22px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fffdfa;
  border-bottom: 1px solid rgba(228, 215, 206, 0.95);
}

.sidebar__brand .brand-lockup--logo {
  height: 100%;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  max-width: 188px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.nav-group__label,
.nav-link,
.sidebar__logout,
.user-pill--sidebar .user-pill__copy span,
.user-pill--sidebar .user-pill__copy strong {
  color: rgba(255, 253, 250, 0.76);
}

.nav-group__label {
  padding: 0 14px;
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  list-style: none;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-group__label::-webkit-details-marker {
  display: none;
}

.nav-group__chevron {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.72;
  transition: transform 0.16s ease, opacity 0.16s ease;
}

.nav-group__chevron svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.nav-group[open] .nav-group__chevron {
  transform: rotate(90deg);
  opacity: 1;
}

.nav-group:not([open]) .nav-submenu {
  display: none;
}

.nav-submenu {
  padding-left: 12px;
}

.nav-link {
  min-height: 44px;
  border-radius: 0;
  border-left: 2px solid transparent;
  font-size: 0.88rem;
  font-weight: 400;
}

.nav-link:hover {
  background: rgba(255, 253, 250, 0.08);
  color: #fffdfa;
}

.nav-link.is-current {
  background: rgba(255, 253, 250, 0.12);
  border-left-color: var(--panel-accent);
  color: #fffdfa;
  box-shadow: none;
}

.sidebar__footer md-divider {
  opacity: 0.22;
}

.user-pill,
.workspace-card {
  border-radius: 0;
  border-color: rgba(199, 165, 107, 0.26);
  background: rgba(255, 253, 250, 0.08);
}

.user-pill__avatar,
.workspace-card__avatar,
.conversation-item__avatar {
  border-radius: 50%;
  background: #fffdfa;
  color: #1a0808;
  box-shadow: inset 0 0 0 1px rgba(199, 165, 107, 0.42);
}

.sidebar__logout {
  border-radius: 0;
  background: rgba(255, 253, 250, 0.04);
  border: 1px solid rgba(199, 165, 107, 0.44);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12), inset 0 -1px 0 rgba(255, 253, 250, 0.08);
}

.sidebar__logout:hover {
  background: rgba(199, 165, 107, 0.22);
  border-color: rgba(199, 165, 107, 0.68);
  color: #fffdfa;
}

.app-main {
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.92), rgba(248, 242, 237, 0.96)),
    url("https://belanoiva.com.br/cdn/shop/files/bellanoiva-home-contador-noivas.png?v=1745535716&width=1800") center / cover fixed;
}

.page-intro h1,
.dashboard-hero h2,
.auth-copy h1,
.section-heading h2,
.chat-empty h2,
.metric-card__value {
  font-family: var(--panel-display-font);
  font-weight: 400;
}

.page-kicker,
.metric-card__label,
.data-table th,
.connection-summary span,
.auth-brand span,
.auth-footnote,
.status-badge {
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-kicker,
.inline-action,
.shortcut-card__action,
.auth-brand span {
  color: #9c7a45;
}

.toolbar-search,
.conversation-list__search,
.conversation-list__select select,
.channel-toolbar select,
.chat-composer,
.settings-form input,
.settings-form select,
.settings-form textarea,
.auth-form input {
  border-radius: 0;
  border-color: #dfd0c5;
  background: rgba(255, 253, 250, 0.92);
}

.sidebar-mobile-toggle {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 24;
  width: 48px;
  height: 48px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(228, 215, 206, 0.95);
  background: rgba(255, 253, 250, 0.96);
  color: var(--panel-text);
  box-shadow: 0 18px 42px rgba(26, 8, 8, 0.14);
  cursor: pointer;
}

.conversation-list__select,
.channel-toolbar label {
  display: grid;
  gap: 8px;
}

.conversation-list__select span,
.channel-toolbar label span {
  color: #9c7a45;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.conversation-list__select select,
.channel-toolbar select {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  color: var(--panel-text);
  font: inherit;
}

.channel-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(228, 215, 206, 0.95);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--panel-card-shadow);
}

.channel-toolbar h2 {
  margin: 6px 0 8px;
  font-family: var(--panel-display-font);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  font-weight: 400;
}

.channel-toolbar p {
  max-width: 720px;
  margin: 0;
  color: var(--panel-text-soft);
}

.channel-toolbar__actions {
  min-width: min(100%, 360px);
  display: grid;
  gap: 12px;
}

.channel-list {
  display: grid;
  gap: 10px;
}

.channel-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(228, 215, 206, 0.9);
  background: rgba(251, 245, 239, 0.78);
  color: var(--panel-text);
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.channel-card:hover,
.channel-card.is-active {
  border-color: rgba(199, 165, 107, 0.7);
  background: rgba(199, 165, 107, 0.14);
}

.channel-card span {
  color: #9c7a45;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.channel-card strong {
  font-size: 1rem;
}

.channel-card small {
  color: var(--panel-muted);
}

.app-content {
  padding: 32px;
}

.page-frame {
  gap: 24px;
}

.dashboard-hero,
.panel-card,
.toolbar-card,
.metric-card,
.info-alert,
.conversation-side__card,
.conversation-side__action,
.shortcut-card {
  border-radius: 0;
  border-color: rgba(228, 215, 206, 0.95);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--panel-card-shadow);
}

.dashboard-hero--brand {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  background:
    linear-gradient(90deg, rgba(26, 8, 8, 0.78), rgba(26, 8, 8, 0.2)),
    url("https://belanoiva.com.br/cdn/shop/files/desktop-home-site-bela-noiva-26_4ddead1a-6eee-4397-8c19-019f11f7cdd4_1600x.jpg?v=1773933268") center 42% / cover;
  color: #fffdfa;
}

.dashboard-hero--brand .dashboard-hero__copy {
  max-width: 680px;
}

.dashboard-hero--brand .page-kicker,
.dashboard-hero--brand p,
.dashboard-hero--brand .hero-stat span {
  color: rgba(255, 253, 250, 0.78);
}

.dashboard-hero--brand h2 {
  max-width: 760px;
  color: #fffdfa;
  font-size: clamp(2.1rem, 4vw, 4.1rem);
}

.dashboard-hero--brand .hero-stat {
  border-radius: 0;
  border-color: rgba(255, 253, 250, 0.28);
  background: rgba(255, 253, 250, 0.12);
  backdrop-filter: blur(10px);
}

.dashboard-hero--brand .hero-stat strong {
  color: #fffdfa;
}

.metric-card {
  min-height: 148px;
  justify-content: space-between;
}

.metric-card--positive,
.metric-card--warning,
.metric-card--neutral {
  border-color: rgba(199, 165, 107, 0.28);
}

.status-badge,
.surface-pill,
.conversation-tab,
.button-primary,
.button-secondary,
.icon-ghost-button,
.user-pill__logout {
  border-radius: 0;
}

.button-primary,
.button-secondary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(26, 8, 8, 0.08), inset 0 -1px 0 rgba(26, 8, 8, 0.08);
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.button-primary:hover,
.button-secondary:hover,
.icon-ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(26, 8, 8, 0.12), inset 0 -1px 0 rgba(26, 8, 8, 0.1);
}

.button-primary:focus-visible,
.button-secondary:focus-visible,
.icon-ghost-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(199, 165, 107, 0.2);
}

.button-primary:disabled,
.button-secondary:disabled,
.icon-ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.button-compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.78rem;
}

.button-block {
  width: 100%;
}

.status-badge--positive,
.status-badge--soft,
.status-badge--neutral {
  background: rgba(199, 165, 107, 0.16);
  color: #1a0808;
}

.status-badge--warning {
  background: rgba(151, 109, 72, 0.16);
  color: #7b4b24;
}

.button-primary {
  border-color: #1a0808;
  background: linear-gradient(180deg, #2b1010 0%, #1a0808 100%);
  color: #fffdfa;
  box-shadow: 0 12px 26px rgba(26, 8, 8, 0.18), inset 0 1px 0 rgba(255, 253, 250, 0.1);
}

.button-primary:hover {
  border-color: #3a221b;
  background: linear-gradient(180deg, #3a1714 0%, #24100d 100%);
}

.button-secondary {
  border: 1px solid rgba(156, 122, 69, 0.5);
  background: linear-gradient(180deg, #fffdfa 0%, #f8efe8 100%);
  color: #1a0808;
}

.button-secondary:hover,
.icon-ghost-button:hover {
  border-color: rgba(156, 122, 69, 0.76);
  background: linear-gradient(180deg, #fff8ef 0%, #f1e2d3 100%);
  color: #1a0808;
}

.icon-ghost-button {
  flex: 0 0 auto;
  border: 1px solid rgba(156, 122, 69, 0.48);
  background: linear-gradient(180deg, #fffdfa 0%, #f8efe8 100%);
  box-shadow: 0 9px 18px rgba(26, 8, 8, 0.08), inset 0 -1px 0 rgba(26, 8, 8, 0.08);
}

.icon-ghost-button--accent {
  border-color: rgba(156, 122, 69, 0.7);
  background: linear-gradient(180deg, #f7e7c7 0%, #d6b879 100%);
  color: #1a0808;
}

.bullet-list__icon,
.info-alert__icon,
.empty-state__icon {
  border-radius: 50%;
  background: rgba(199, 165, 107, 0.16);
  color: #1a0808;
}

.progress-bar {
  background: rgba(199, 165, 107, 0.15);
}

.progress-bar span {
  background: linear-gradient(90deg, #1a0808, #c7a56b);
}

.conversation-list {
  background: rgba(251, 245, 239, 0.84);
}

.conversation-list__panel > .button-secondary {
  justify-self: stretch;
}

.conversation-list__filter {
  margin: 0;
}

.conversation-list__filter select {
  cursor: pointer;
}

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

.conversation-item__body p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.conversation-item__sender {
  color: #9c7a45;
  font-weight: 700;
}

.conversation-item {
  border-color: rgba(228, 215, 206, 0.75);
}

.conversation-item.is-active {
  background: rgba(199, 165, 107, 0.13);
}

.conversation-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.conversation-item__meta span {
  border: 1px solid rgba(199, 165, 107, 0.28);
  padding: 3px 7px;
  color: #7d6f68;
  font-size: 0.68rem;
  line-height: 1.2;
}

.conversation-item__counter {
  background: #1a0808;
}

.chat-panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 250, 0.96), rgba(251, 245, 239, 0.9)),
    url("https://belanoiva.com.br/cdn/shop/files/belanoiva-since-1993-logo.svg?v=1745564957&width=347") center / 220px no-repeat;
}

.chat-bubble {
  max-width: min(92%, 760px);
  border-radius: 0;
}

.chat-bubble__sender {
  display: block;
  margin-bottom: 6px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-bubble--agent {
  background: #1a0808;
  color: #fffdfa;
}

.chat-bubble--agent span {
  color: rgba(255, 253, 250, 0.68);
}

.chat-bubble--contact {
  border: 1px solid rgba(228, 215, 206, 0.9);
  background: #fffdfa;
}

.chat-audio-player {
  width: min(100%, 320px);
  height: 40px;
  display: block;
  margin: 2px 0 10px;
  filter: saturate(0.82);
}

.chat-bubble--agent .chat-audio-player {
  filter: invert(1) hue-rotate(180deg) saturate(0.72);
}

.chat-audio-status {
  display: block;
  margin: -4px 0 8px;
  color: #9c7a45;
  font-size: 0.76rem;
  font-weight: 700;
}

.chat-bubble--agent .chat-audio-status {
  color: rgba(255, 253, 250, 0.78);
}

.chat-audio-record-button {
  flex: 0 0 auto;
}

.chat-composer--form {
  grid-template-columns: auto 1fr auto;
}

.chat-audio-record-button.is-recording {
  border-color: rgba(173, 38, 38, 0.35);
  background: rgba(173, 38, 38, 0.12);
  color: #8c1f1f;
}

.chat-audio-recorder {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(199, 165, 107, 0.32);
  background: rgba(255, 253, 250, 0.96);
}

.chat-audio-recorder[hidden] {
  display: none;
}

.chat-composer__notice {
  grid-column: 1 / -1;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(199, 165, 107, 0.34);
  background: rgba(255, 253, 250, 0.96);
  color: #5f4f44;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.35;
}

.chat-composer__notice[hidden] {
  display: none;
}

.chat-composer__notice--success {
  border-color: rgba(37, 118, 78, 0.28);
  background: rgba(237, 249, 242, 0.96);
  color: #1f6b47;
}

.chat-composer__notice--error {
  border-color: rgba(173, 38, 38, 0.28);
  background: rgba(255, 244, 242, 0.98);
  color: #8c1f1f;
}

.chat-composer__notice--info {
  border-color: rgba(199, 165, 107, 0.34);
  background: rgba(255, 250, 241, 0.98);
  color: #7a5c2b;
}

.chat-audio-recorder strong {
  flex: 1 1 auto;
  color: #1a0808;
  font-size: 0.84rem;
}

.chat-audio-recorder__dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #ad2626;
  box-shadow: 0 0 0 6px rgba(173, 38, 38, 0.12);
}

.chat-panel__actions {
  justify-content: flex-end;
  flex: 1 1 auto;
}

.conversation-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.conversation-admin-actions form {
  width: auto;
  display: grid;
  grid-template-columns: minmax(176px, 190px) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.conversation-admin-actions select {
  width: 100%;
  min-height: 40px;
  min-width: 0;
  max-width: none;
  border: 1px solid #dfd0c5;
  border-radius: 0;
  background: rgba(255, 253, 250, 0.96);
  color: var(--panel-text);
  font: inherit;
  padding: 0 10px;
}

.conversation-admin-actions button {
  min-height: 40px;
  height: 40px;
  min-width: 108px;
}

@media (max-width: 1120px) {
  .conversation-admin-actions {
    flex-wrap: wrap;
  }
}

.code-panel,
.connection-summary div,
.webhook-list code {
  border-radius: 0;
  border-color: #dfd0c5;
  background: #fbf5ef;
}

.auth-body {
  background: #f8f2ed;
}

.auth-shell {
  grid-template-columns: minmax(360px, 1fr) minmax(380px, 520px);
  gap: 0;
  padding: 0;
  place-items: stretch;
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  display: grid;
  align-items: end;
  padding: clamp(32px, 6vw, 84px);
  color: #fffdfa;
  background:
    linear-gradient(180deg, rgba(26, 8, 8, 0.08), rgba(26, 8, 8, 0.72)),
    url("https://belanoiva.com.br/cdn/shop/files/desktop-home-site-bela-noiva-26_4ddead1a-6eee-4397-8c19-019f11f7cdd4_1600x.jpg?v=1773933268") center / cover;
}

.auth-visual__overlay {
  max-width: 640px;
}

.auth-script {
  display: block;
  margin-bottom: 10px;
  font-family: var(--panel-script-font);
  font-size: clamp(2.8rem, 7vw, 6.8rem);
  line-height: 0.82;
}

.auth-visual h2 {
  margin: 0 0 18px;
  max-width: 780px;
  font-family: var(--panel-display-font);
  font-size: clamp(2.6rem, 5vw, 5.7rem);
  font-weight: 400;
  line-height: 0.98;
}

.auth-visual p {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 253, 250, 0.84);
  font-size: 1rem;
  line-height: 1.8;
}

.auth-panel {
  width: 100%;
  min-height: 100vh;
  align-content: center;
  gap: 28px;
  padding: clamp(32px, 5vw, 74px);
  border: 0;
  border-left: 1px solid rgba(228, 215, 206, 0.9);
  border-radius: 0;
  background: #fffdfa;
  box-shadow: none;
}

.auth-brand {
  align-items: flex-start;
}

.auth-brand__logo {
  width: 176px;
}

.auth-copy h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.95;
}

.auth-copy p {
  max-width: 420px;
}

.auth-form {
  gap: 18px;
}

.auth-form label {
  color: #1a0808;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input {
  min-height: 56px;
}

.auth-form input:focus,
.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus,
.channel-toolbar select:focus,
.conversation-list__select select:focus {
  border-color: #1a0808;
  box-shadow: 0 0 0 4px rgba(199, 165, 107, 0.14);
}

.checkbox-field {
  align-items: center;
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.settings-form label.checkbox-field,
.auth-form label.checkbox-field {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.checkbox-field input[type="checkbox"] {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--panel-accent);
  margin: 0;
}

.checkbox-field span {
  flex: 1 1 auto;
  color: var(--panel-text);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.table-actions {
  min-width: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.row-edit {
  margin: 0;
}

.row-edit summary {
  cursor: pointer;
  color: #9c7a45;
  font-weight: 700;
}

.settings-form--compact {
  margin-top: 12px;
  max-width: 340px;
}

.settings-form--compact input,
.settings-form--compact select {
  min-height: 40px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.form-actions--start {
  justify-content: flex-start;
}

.form-actions--between {
  justify-content: space-between;
}

.form-actions__note {
  flex: 1 1 220px;
  color: var(--panel-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.settings-form--inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.settings-form--inline .muted {
  flex: 1 1 220px;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.section-heading > form {
  margin: 0;
}

.settings-tabs-shell {
  display: grid;
  gap: 16px;
}

.settings-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(228, 215, 206, 0.95);
  background: rgba(255, 253, 250, 0.94);
  box-shadow: var(--panel-card-shadow);
}

.settings-tab {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  padding: 0 14px;
  border: 1px solid rgba(156, 122, 69, 0.3);
  border-radius: 0;
  background: linear-gradient(180deg, #fffdfa 0%, #f8efe8 100%);
  box-shadow: 0 8px 16px rgba(26, 8, 8, 0.06), inset 0 -1px 0 rgba(26, 8, 8, 0.06);
  color: var(--panel-text);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.settings-tab:hover,
.settings-tab.is-active {
  border-color: rgba(156, 122, 69, 0.76);
  background: linear-gradient(180deg, #f7e7c7 0%, #d6b879 100%);
  box-shadow: 0 10px 20px rgba(26, 8, 8, 0.1), inset 0 1px 0 rgba(255, 253, 250, 0.25);
  color: var(--panel-text);
}

.settings-tab:hover {
  transform: translateY(-1px);
}

.settings-tab:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(199, 165, 107, 0.2);
}

.settings-tab-panels,
.settings-tab-panel {
  min-width: 0;
}

.settings-tab-panel {
  display: none;
}

.settings-tab-panel.is-active {
  display: block;
}

.ai-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.handoff-rules {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(228, 215, 206, 0.92);
  background: rgba(251, 245, 239, 0.58);
}

.handoff-rules__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.handoff-rules__header span {
  color: #9c7a45;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.handoff-rules__header p {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--panel-text-soft);
}

.handoff-rules__list {
  display: grid;
  gap: 10px;
}

.handoff-rule-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 12px;
}

.handoff-rule-row .checkbox-field {
  min-height: 44px;
}

.handoff-rule-row .button-secondary {
  align-self: end;
}

.auth-submit {
  min-height: 56px;
  width: 100%;
}

.auth-footnote {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 6px;
  color: #9c7a45;
  font-size: 0.7rem;
  font-weight: 700;
}

@media (max-width: 1120px) {
  .app-shell,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .sidebar-mobile-toggle {
    display: inline-flex;
  }

  .app-content {
    padding-top: 82px;
  }

  .channel-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-visual {
    min-height: 42vh;
  }

  .auth-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .app-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .dashboard-hero--brand {
    min-height: auto;
    padding: 24px;
  }

  .auth-visual {
    padding: 28px;
  }

  .auth-panel {
    padding: 30px 22px;
  }

  .auth-footnote {
    flex-direction: column;
  }

  .button-primary,
  .button-secondary {
    white-space: normal;
  }

  .form-actions,
  .toolbar-actions,
  .conversation-admin-actions,
  .conversation-admin-actions form,
  .settings-form--inline {
    align-items: stretch;
    justify-content: stretch;
  }

  .form-actions > .button-primary,
  .form-actions > .button-secondary,
  .toolbar-actions > .button-primary,
  .toolbar-actions > .button-secondary,
  .settings-form--inline > .button-primary,
  .settings-form--inline > .button-secondary,
  .conversation-admin-actions button,
  .conversation-admin-actions select {
    width: 100%;
    max-width: none;
  }

  .conversation-admin-actions form {
    grid-template-columns: 1fr;
  }

  .chat-composer--form {
    grid-template-columns: auto 1fr auto;
  }

  .chat-audio-recorder {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .chat-audio-recorder strong {
    flex: 1 0 calc(100% - 24px);
  }

  .chat-audio-recorder button {
    flex: 1 1 150px;
  }

  .handoff-rule-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .settings-tabs {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-tab {
    width: 100%;
  }

  .ai-status-grid {
    grid-template-columns: 1fr;
  }
}
