html {
  font-size: 15px;
  height: 100%;
  min-height: 100%;
}

body {
  color: #172033;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.operator-body {
  background:
    linear-gradient(180deg, #eef5ff 0, #f7f9fc 330px),
    #f7f9fc;
}

.public-body {
  background:
    linear-gradient(135deg, #f4f9ff 0%, #f7fbf6 46%, #fff7ea 100%);
}

.btn {
  border-radius: 8px;
  font-weight: 650;
}

.btn-primary {
  background: #155eef;
  border-color: #155eef;
  box-shadow: 0 10px 22px rgba(21, 94, 239, .18);
}

.btn-primary:hover {
  background: #0e48c7;
  border-color: #0e48c7;
}

.btn-outline-primary {
  border-color: #b6cdfb;
  color: #155eef;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 .16rem rgba(21, 94, 239, .16);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 1030;
}

.app-navbar {
  backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, .42);
  box-shadow: 0 14px 34px rgba(30, 49, 83, .10);
  min-height: 68px;
  position: relative;
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.operator-navbar {
  background: rgba(255, 255, 255, .68);
}

.public-navbar {
  background: rgba(255, 255, 255, .58);
}

.app-brand {
  align-items: center;
  display: inline-flex;
  margin-right: 26px;
  padding: 0;
}

.app-logo {
  display: block;
  height: 38px;
  width: auto;
}

.operator-nav {
  gap: 2px;
}

.operator-nav .nav-link {
  border-radius: 8px;
  color: #536175;
  font-weight: 620;
  padding-left: .75rem;
  padding-right: .75rem;
}

.operator-nav .nav-link:hover {
  background: #eef4ff;
  color: #155eef;
}

.mobile-menu {
  border-left: 1px solid rgba(126, 143, 167, .22);
  max-width: 340px;
}

.mobile-menu .offcanvas-header {
  border-bottom: 1px solid rgba(126, 143, 167, .16);
  min-height: 68px;
}

.mobile-menu-section + .mobile-menu-section {
  border-top: 1px solid rgba(126, 143, 167, .16);
  margin-top: 18px;
  padding-top: 18px;
}

.mobile-menu-label {
  color: #718096;
  font-size: .74rem;
  font-weight: 780;
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.mobile-menu-link {
  align-items: center;
  border-radius: 8px;
  color: #172033;
  display: flex;
  font-weight: 680;
  min-height: 44px;
  padding: 10px 12px;
  text-decoration: none;
}

.mobile-menu-link:hover {
  background: #eef4ff;
  color: #155eef;
}

.operator-container {
  flex: 1 0 auto;
  margin: 0 auto;
  max-width: 1480px;
  padding: 22px 18px 32px;
}

.operator-main {
  min-height: 0;
}

.public-container {
  flex: 1 0 auto;
  margin: 0 auto;
  max-width: 1220px;
  padding: 34px 18px 48px;
}

.public-main {
  min-height: 0;
}

.fullbleed-container {
  flex: 1 0 auto;
  margin: 0;
  padding: 0;
  width: 100%;
}

.fullbleed-main {
  min-height: calc(100vh - 108px);
}

.page-kicker {
  color: #155eef;
  font-size: .78rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.operator-hero,
.surface,
.metric-card,
.request-tile,
.session-tile,
.public-panel,
.support-stage,
.privacy-box {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(126, 143, 167, .18);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(18, 32, 59, .08);
}

.operator-hero {
  background:
    linear-gradient(135deg, rgba(16, 32, 59, .98), rgba(21, 94, 239, .90) 58%, rgba(0, 148, 143, .92));
  color: #fff;
  overflow: hidden;
  padding: 18px 22px;
}

.operator-hero .text-muted {
  color: rgba(255, 255, 255, .75) !important;
}

.operator-hero .page-kicker {
  font-size: .68rem;
  margin-bottom: 4px !important;
}

.operator-hero h1 {
  font-size: 1.2rem;
  line-height: 1.2;
}

.operator-hero .badge {
  font-size: .78rem !important;
}

.metric-card {
  min-height: 118px;
  padding: 20px;
}

.metric-label {
  color: #68758a;
  font-size: .8rem;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.metric-value {
  color: #10203b;
  font-size: 2rem;
  font-weight: 780;
  line-height: 1;
}

.metric-accent {
  border-left: 4px solid #155eef;
}

.metric-active {
  border-left: 4px solid #00948f;
}

.metric-waiting {
  border-left: 4px solid #f59f00;
}

.surface {
  padding: 22px;
}

.sessions-index-page {
  margin: 0 auto;
  max-width: 1760px;
  padding: 22px 24px 36px;
  width: 100%;
}

.sessions-list-panel {
  padding: 26px;
}

.sessions-table {
  min-width: 1040px;
}

.sessions-table th,
.sessions-table td {
  padding-left: 1rem;
  padding-right: 1rem;
}

.notification-status-panel {
  max-width: 980px;
}

.notification-status-row {
  align-items: center;
  background: #f8fafc;
  border: 1px solid rgba(126, 143, 167, .18);
  border-radius: 8px;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 14px 16px;
}

.invite-create-panel {
  max-width: 720px;
  width: 100%;
}

.invite-manage-panel {
  max-width: 980px;
  width: 100%;
}

.form-panel {
  max-width: 860px;
  width: 100%;
}

.contact-create-panel {
  max-width: 1120px;
  width: 100%;
}

.contact-create-form {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-create-notes,
.contact-create-actions {
  grid-column: 1 / -1;
}

@media (max-width: 767.98px) {
  .contact-create-form {
    grid-template-columns: 1fr;
  }
}

.api-client-create-panel {
  max-width: 860px;
  width: 100%;
}

.api-client-create-form {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

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

.section-title h2 {
  font-size: 1rem;
  font-weight: 760;
  margin: 0;
}

.session-tile,
.request-tile {
  color: inherit;
  box-shadow: none;
  display: block;
  padding: 16px;
  text-decoration: none;
}

.session-tile:hover,
.request-tile:hover {
  border-color: rgba(21, 94, 239, .36);
  transform: translateY(-1px);
}

.waiting-room-priority {
  border-top: 4px solid #155eef;
}

.direct-sessions-priority {
  border-top: 4px solid #f59f00;
}

.waiting-room-priority-tile {
  border-left: 4px solid #155eef;
  padding: 20px;
}

.waiting-room-priority-tile .status-dot {
  height: 11px;
  width: 11px;
}

.waiting-room-action {
  min-width: 210px;
}

.waiting-room-message {
  color: #172033;
  font-size: 1rem;
}

.status-dot {
  border-radius: 999px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.status-waiting {
  background: #f59f00;
}

.status-active {
  background: #00948f;
}

.status-closed {
  background: #7b8798;
}

.table {
  --bs-table-bg: transparent;
}

.table thead th {
  color: #6b778c;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.form-control,
.form-select {
  border-color: #d8e0eb;
  border-radius: 8px;
  min-height: 44px;
}

.jodit-container:not(.jodit_inline) {
  border-color: #d8e0eb;
  border-radius: 8px;
  overflow: hidden;
}

.jodit-container:not(.jodit_inline) .jodit-toolbar__box,
.jodit-container:not(.jodit_inline) .jodit-status-bar {
  background: #fbfcfe;
}

.jodit-container:not(.jodit_inline) .jodit-workplace {
  background: #fff;
}

.public-hero {
  align-items: center;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 480px);
}

.public-copy {
  padding: 22px 0;
}

.public-copy h1 {
  color: #10203b;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.05;
}

.public-copy .lead {
  color: #4f5d72;
  max-width: 660px;
}

.public-panel {
  padding: 28px;
}

.support-stage {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  padding: 28px;
}

.operator-session-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98) 0%, rgba(247, 250, 255, .96) 100%);
}

.privacy-box {
  background: #fbfcfe;
  box-shadow: none;
  padding: 16px;
}

.screen-placeholder {
  align-items: center;
  background:
    linear-gradient(135deg, #10203b 0%, #23395f 58%, #0f766e 100%);
  border-radius: 8px;
  color: rgba(255, 255, 255, .86);
  display: flex;
  justify-content: center;
  min-height: 260px;
}

.operator-screen-frame {
  background: #07111f;
  border-radius: 8px;
  height: clamp(420px, 58vh, 720px);
  min-height: 360px;
  overflow: hidden;
  position: relative;
}

.operator-support-stage {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: clamp(540px, calc(100vh - 220px), 820px);
  padding: 14px;
}

.operator-session-room {
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.operator-session-room .session-main-stage {
  min-height: 0;
  padding: 0;
}

.operator-session-room .operator-screen-frame {
  height: 100%;
  min-height: 0;
  width: 100%;
}

.operator-screen-view {
  height: 100%;
  min-height: 360px;
  width: 100%;
}

.operator-session-room .operator-screen-view {
  min-height: 0;
}

.operator-screen-view > *,
.operator-screen-view iframe,
.operator-screen-view object,
.operator-screen-view video {
  height: 100% !important;
  max-width: none !important;
  width: 100% !important;
}

.operator-control-row {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.operator-control-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.operator-copy-feedback {
  margin: 0;
  text-align: right;
}

.operator-environment-row {
  align-items: center;
  border-top: 1px solid rgba(126, 143, 167, .16);
  color: #10203b;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 14px;
  padding-top: 12px;
}

.operator-environment-row > div {
  align-items: baseline;
  display: inline-flex;
  gap: 6px;
}

.operator-env-label {
  color: #64748b;
  font-size: .74rem;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.operator-whatsapp-accordion .accordion-item {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(126, 143, 167, .20);
  border-radius: 8px;
  overflow: hidden;
}

.operator-whatsapp-accordion .accordion-button {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #10203b;
  font-size: .92rem;
  font-weight: 760;
  min-height: 42px;
  padding: 10px 14px;
}

.operator-whatsapp-panel {
  display: grid;
  gap: 12px;
}

.operator-fullscreen-button {
  box-shadow: 0 12px 28px rgba(0, 0, 0, .22);
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 5;
}

.session-room {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.customer-session-shell {
  min-height: calc(100vh - 108px);
  padding: clamp(18px, 3vw, 38px);
}

.customer-session-room {
  grid-template-columns: minmax(0, 1fr);
  margin: 0 auto;
  max-width: 980px;
}

.public-session-intro p:last-child {
  margin-bottom: 0;
}

.session-main-stage,
.session-side,
.audio-card {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(126, 143, 167, .18);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(18, 32, 59, .08);
}

.session-main-stage {
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
}

.session-side {
  align-content: start;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.audio-card {
  background: #07111f;
  color: rgba(255, 255, 255, .88);
  overflow: hidden;
  padding: 10px;
}

.audio-card-label {
  color: rgba(255, 255, 255, .72);
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .08em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.audio-card-body {
  align-items: center;
  background:
    linear-gradient(135deg, #10203b 0%, #23395f 60%, #0f766e 100%);
  border-radius: 8px;
  color: rgba(255, 255, 255, .82);
  display: flex;
  gap: 8px;
  font-weight: 650;
  justify-content: center;
  min-height: 146px;
  overflow: hidden;
}

.audio-card-body svg {
  height: 22px;
  width: 22px;
}

.session-audio-node {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  width: 1px;
}

.session-action-form {
  margin-top: 24px;
}

.customer-screen-action {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  max-width: 520px;
}

.session-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.session-control-button {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: center;
}

.session-control-button svg {
  height: 18px;
  width: 18px;
}

.session-chat {
  background: #f8fafc;
  border: 1px solid rgba(126, 143, 167, .20);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 14px;
}

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

.session-chat-header h2 {
  color: #10203b;
  font-size: 1rem;
  font-weight: 760;
  margin: 0;
}

.session-chat-kicker {
  color: #64748b;
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.session-chat-status {
  background: #eaf1ff;
  border-radius: 999px;
  color: #155eef;
  font-size: .76rem;
  font-weight: 700;
  padding: 4px 10px;
}

.session-chat-messages {
  background: #fff;
  border: 1px solid rgba(126, 143, 167, .18);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  min-height: 190px;
  overflow-y: auto;
  padding: 12px;
}

.session-chat-empty {
  align-items: center;
  color: #64748b;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 150px;
  text-align: center;
}

.session-chat-message {
  align-items: flex-end;
  display: flex;
  gap: 8px;
  max-width: 92%;
}

.session-chat-message.from-operator {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.session-chat-avatar {
  align-items: center;
  background: #eaf1ff;
  border-radius: 999px;
  color: #155eef;
  display: flex;
  flex: 0 0 34px;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  width: 34px;
}

.session-chat-avatar img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.session-chat-avatar svg {
  height: 18px;
  width: 18px;
}

.from-customer .session-chat-avatar {
  background: #fff7e6;
  color: #b66f00;
}

.session-chat-bubble {
  background: #eef4ff;
  border: 1px solid rgba(21, 94, 239, .16);
  border-radius: 8px;
  color: #10203b;
  min-width: 0;
  padding: 10px 12px;
}

.from-customer .session-chat-bubble {
  background: #fffaf0;
  border-color: rgba(245, 159, 0, .22);
}

.session-chat-meta {
  align-items: center;
  color: #64748b;
  display: flex;
  font-size: .74rem;
  font-weight: 700;
  gap: 8px;
  justify-content: space-between;
  margin-bottom: 4px;
}

.session-chat-text {
  font-size: .92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.session-chat-text a {
  font-weight: 700;
}

.session-chat-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.session-chat-form textarea {
  max-height: 140px;
  min-height: 46px;
  resize: vertical;
}

.operator-screen-frame:fullscreen {
  border-radius: 0;
  height: 100vh;
  padding: 0;
  width: 100vw;
}

.operator-screen-frame:-webkit-full-screen {
  border-radius: 0;
  height: 100vh;
  padding: 0;
  width: 100vw;
}

.operator-screen-frame:fullscreen .operator-screen-view,
.operator-screen-frame:-webkit-full-screen .operator-screen-view {
  height: 100vh;
  min-height: 100vh;
}

.remote-session-shell {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  min-height: calc(100vh - 108px);
  width: 100%;
}

.remote-session-panel {
  background: rgba(255, 255, 255, .94);
  border-right: 1px solid rgba(126, 143, 167, .22);
  padding: 34px 28px;
}

.remote-session-stage {
  background: #07111f;
  min-height: calc(100vh - 108px);
  padding: 14px;
}

.screen-share-canvas {
  align-items: center;
  background:
    linear-gradient(135deg, #10203b 0%, #23395f 58%, #0f766e 100%);
  border-radius: 8px;
  color: rgba(255, 255, 255, .86);
  display: flex;
  height: 100%;
  justify-content: center;
  min-height: calc(100vh - 136px);
  overflow: hidden;
  width: 100%;
}

.screen-share-shell {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 108px);
  padding: clamp(24px, 5vw, 72px);
}

.screen-share-panel {
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(126, 143, 167, .18);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(18, 32, 59, .12);
  max-width: 760px;
  padding: clamp(28px, 5vw, 64px);
  width: min(100%, 760px);
}

.screen-share-actions {
  display: grid;
  gap: 14px;
  margin: 34px auto 0;
  max-width: 460px;
}

.screen-share-button {
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  min-height: 88px;
  padding: 22px 28px;
}

.screen-share-publisher {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  width: 1px;
}

.footer {
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(126, 143, 167, .16);
  bottom: 0;
  color: #7a8495;
  flex-shrink: 0;
  padding: 14px 0;
  position: sticky;
  z-index: 1020;
}

.footer,
.footer * {
  white-space: normal !important;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
  text-align: start;
}

@media (max-width: 991.98px) {
  .session-room {
    grid-template-columns: 1fr;
  }

  .session-side {
    grid-template-columns: 1fr;
  }

  .public-hero {
    grid-template-columns: 1fr;
  }

  .operator-hero {
    padding: 22px;
  }

  .remote-session-shell {
    grid-template-columns: 1fr;
  }

  .remote-session-panel,
  .remote-session-stage {
    min-height: auto;
  }

  .screen-share-button {
    min-height: 76px;
  }

  .waiting-room-action {
    width: 100%;
  }
}

@media (max-width: 575.98px) {
  .api-client-create-form {
    grid-template-columns: 1fr;
  }

  .api-client-create-form .btn {
    width: 100%;
  }
}
