:root {
  --bg: #f6f8fc;
  --surface: #fff;
  --text: #202940;
  --muted: #7b869c;
  --line: #e6eaf2;
  --soft: #f2f1ff;
  --purple: #7162df;
  --green: #0b947d;
  --green-soft: #e8f7f1;
  --blue: #347cd2;
  --shadow: 0 6px 30px #314a7605;
  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #10131d;
  --surface: #191e2d;
  --text: #edf0fc;
  --muted: #9faac0;
  --line: #2c3447;
  --soft: #27213d;
  --purple: #b4a7ff;
  --green: #62d6b4;
  --green-soft: #17392f;
  --blue: #88b6ff;
  --shadow: 0 6px 30px #0001;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font:
    14px/1.55 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: var(--purple);
}
button:disabled {
  opacity: 0.55;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #ad9af2;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.skip {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 100;
  background: var(--surface);
  padding: 12px;
}
.skip:focus {
  top: 12px;
}
#shell {
  display: flex;
  min-height: 100vh;
}
#sidebar {
  width: 248px;
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  z-index: 10;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -0.7px;
}
.brand b {
  color: var(--purple);
  font-weight: 750;
}
.brand small {
  display: block;
  font-size: 7px;
  color: var(--muted);
  letter-spacing: 1.4px;
  margin-top: 3px;
}
.workspace {
  margin: 32px 0 24px;
  padding: 12px 8px;
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
}
.workspace-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}
.workspace strong {
  font-size: 11px;
}
.workspace small {
  display: block;
  font-size: 9px;
  color: var(--muted);
}
.nav-label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 750;
  margin: 18px 12px 8px;
}
.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  color: var(--muted);
  padding: 11px 13px;
  border-radius: 10px;
  text-align: left;
  font-size: 12px;
  margin-bottom: 4px;
  min-height: 43px;
}
.nav-link svg {
  width: 19px;
  height: 19px;
}
.nav-link:hover {
  background: var(--bg);
  color: var(--text);
}
.nav-link.active {
  background: var(--soft);
  color: var(--purple);
  font-weight: 750;
}
.nav-link.active:after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--purple);
  margin-left: auto;
}
.sidebar-end {
  margin-top: auto;
  padding: 28px 12px 0;
  font-size: 10px;
  color: var(--muted);
}
.sidebar-end strong {
  display: block;
  color: var(--text);
  font-size: 11px;
}
.sidebar-end a {
  text-decoration: none;
  font-size: 10px;
}
.mini-shield {
  background: var(--green-soft);
  color: var(--green);
  padding: 4px 7px;
  border-radius: 8px;
  display: inline-block;
  margin-bottom: 9px;
}
.body {
  margin-left: 248px;
  min-width: 0;
  flex: 1;
}
.topbar {
  height: 76px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 34px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 5;
}
#breadcrumb {
  color: var(--muted);
  font-size: 11px;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 15px;
}
.top-actions input {
  width: 190px;
  min-height: 34px;
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 12px;
}
.icon-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--purple);
  border-radius: 10px;
  min-width: 35px;
  height: 35px;
}
.plain-button {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11px;
}
.avatar {
  height: 32px;
  width: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--soft);
  color: var(--purple);
  font-size: 11px;
  font-weight: 800;
}
#menu {
  display: none;
}
main {
  max-width: 1480px;
  margin: auto;
  padding: 36px 42px 60px;
  min-height: calc(100vh - 145px);
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.7px;
  font-weight: 800;
  color: var(--purple);
  text-transform: uppercase;
}
h1 {
  font-size: 29px;
  letter-spacing: -1.1px;
  line-height: 1.25;
  margin: 8px 0;
}
h2 {
  font-size: 16px;
  letter-spacing: -0.4px;
  margin: 0 0 6px;
}
h3 {
  font-size: 14px;
  margin: 12px 0;
}
p {
  margin: 8px 0;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.small {
  font-size: 10px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #7460de;
  color: #fff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 750;
  white-space: normal;
}
.button svg {
  width: 15px;
  height: 15px;
}
.button:hover {
  filter: brightness(1.06);
}
.button.secondary {
  border-color: var(--line);
  color: var(--text);
  background: var(--surface);
}
.button.green {
  background: #079b7b;
  color: #fff;
}
.button.danger {
  background: #b63156;
  color: #fff;
}
.button.ghost {
  background: var(--soft);
  color: var(--purple);
}
.actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 24px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}
.metric-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}
.glyph {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  background: var(--soft);
  color: var(--purple);
  flex: none;
}
.glyph svg {
  width: 19px;
  height: 19px;
}
.glyph.green {
  background: var(--green-soft);
  color: var(--green);
}
.glyph.blue {
  background: #ebf4ff;
  color: #3c88e6;
}
.glyph.amber {
  background: #fff4de;
  color: #b88222;
}
.metric-value {
  font-size: 30px;
  line-height: 1.3;
  letter-spacing: -1px;
  font-weight: 750;
  margin: 15px 0 5px;
}
.metric-bottom {
  font-size: 9px;
  color: var(--muted);
}
.grid-two {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 22px;
}
.grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 25px;
  background: var(--soft);
  color: var(--purple);
  font-size: 9px;
  font-weight: 750;
  border: 1px solid transparent;
  white-space: normal;
}
.pill.green {
  background: var(--green-soft);
  color: var(--green);
}
.pill.amber {
  background: #fff4df;
  color: #a76c12;
}
.pill.red {
  background: #ffe9ed;
  color: #bd3753;
}
.pill.gray {
  background: var(--bg);
  color: var(--muted);
  border-color: var(--line);
}
.dot {
  height: 6px;
  width: 6px;
  border-radius: 50%;
  background: currentColor;
}
.connection-banner {
  padding: 25px 28px;
  border-radius: 17px;
  background: linear-gradient(115deg, #eae6ff, #edf7ff 70%, #e8f7f1);
  border: 1px solid #e5e0fb;
  margin-bottom: 22px;
  color: #252947;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.connection-banner h2 {
  font-size: 18px;
}
.connection-banner p {
  font-size: 11px;
  color: #6a7492;
}
.timeline {
  display: flex;
  gap: 13px;
  margin: 18px 0;
}
.timeline i {
  height: 28px;
  width: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-style: normal;
  flex: none;
}
.timeline strong {
  font-size: 11px;
}
.timeline p {
  font-size: 10px;
  margin: 3px 0;
  color: var(--muted);
}
.connection-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 22px;
}
.qr-panel {
  min-height: 470px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-direction: column;
  gap: 15px;
}
.qr-box {
  width: 270px;
  height: 290px;
  background: var(--bg);
  border: 2px dashed var(--line);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 18px;
}
.qr-box svg {
  width: 60px;
  height: 60px;
  color: #c7cde0;
}
.qr-box img {
  width: 250px;
  height: 250px;
  border-radius: 6px;
  background: white;
}
.qr-box strong {
  font-size: 25px;
  letter-spacing: 4px;
}
.qr-tabs {
  display: flex;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
}
.qr-tabs button {
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 8px 14px;
  color: var(--muted);
  font-size: 11px;
}
.qr-tabs button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 5px #0001;
}
.instance-id {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 9px;
  font:
    10px/1.5 ui-monospace,
    monospace;
  padding: 10px;
  overflow-wrap: anywhere;
}
.field {
  display: grid;
  gap: 7px;
  font-size: 11px;
  font-weight: 650;
  margin: 16px 0;
}
.field input,
.field textarea,
.field select,
.search-input {
  width: 100%;
  min-width: 0;
  min-height: 43px;
  padding: 11px 12px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-weight: 400;
  font-size: 12px;
}
.field textarea {
  resize: vertical;
}
.field small {
  font-weight: 400;
  color: var(--muted);
}
.field.check {
  display: flex;
  align-items: center;
  font-weight: 500;
}
.field.check input {
  width: 17px;
  min-height: 17px;
  flex: none;
  accent-color: #7263df;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.notice {
  padding: 13px 15px;
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--muted);
  border-radius: 10px;
  font-size: 11px;
  margin: 14px 0;
}
.error {
  color: #bc3356;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.error:empty {
  display: none;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  text-align: left;
}
th {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--muted);
  padding: 12px;
  background: var(--bg);
  font-weight: 700;
}
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  max-width: 300px;
  overflow-wrap: anywhere;
}
td .actions {
  flex-wrap: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
.empty {
  text-align: center;
  padding: 36px;
  color: var(--muted);
}
.empty strong {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin: 15px 0 6px;
}
.list-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border: 0;
}
.list-row .grow {
  flex: 1;
  min-width: 0;
}
.list-row strong {
  font-size: 11px;
}
.list-row small {
  color: var(--muted);
  font-size: 9px;
  display: block;
}
.chart {
  height: 175px;
  display: flex;
  align-items: flex-end;
  gap: 9px;
  padding-top: 20px;
}
.chart-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}
.chart-bar {
  width: 100%;
  max-width: 26px;
  min-height: 3px;
  background: linear-gradient(#b6a8fa, #7f6ee4);
  border-radius: 5px 5px 2px 2px;
}
.chart-col span {
  font-size: 8px;
  color: var(--muted);
}
.chart-col small {
  font-size: 9px;
  color: var(--purple);
}
.welcome-card {
  padding: 25px;
  background: linear-gradient(130deg, #292347, #444485);
  color: #fff;
  border-radius: 16px;
  margin-top: 22px;
}
.welcome-card p {
  color: #d1ceea;
  font-size: 11px;
  max-width: 600px;
}
.welcome-card h2 {
  font-size: 18px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px 40px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}
footer a {
  text-decoration: none;
}
.demo-banner {
  background: #fff3d7;
  color: #8c6518;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 10px;
  margin-bottom: 20px;
}
#page-error {
  border: 1px solid #edb0c2;
  padding: 14px;
  background: var(--surface);
  color: #b93358;
  border-radius: 10px;
  margin-bottom: 18px;
}
#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  border-radius: 12px;
  background: var(--text);
  color: var(--surface);
  box-shadow: 0 10px 30px #0002;
  max-width: 360px;
  z-index: 100;
  font-size: 12px;
}
dialog {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 19px;
  padding: 0;
  width: min(650px, calc(100vw - 28px));
  max-height: 90dvh;
  box-shadow: 0 30px 100px #0b102c44;
}
dialog::backdrop {
  background: #11152a80;
  backdrop-filter: blur(5px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.dialog-head h2 {
  margin: 0;
  font-size: 16px;
}
.dialog-body {
  padding: 24px;
}
.dialog-body .field:first-child {
  margin-top: 0;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  font-size: 11px;
  color: var(--muted);
}
.pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.code {
  background: var(--bg);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font:
    11px/1.8 ui-monospace,
    monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.inbox-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  min-height: 550px;
}
.chat-list {
  border-right: 1px solid var(--line);
  max-height: 650px;
  overflow: auto;
  padding: 12px;
}
.chat-select {
  width: 100%;
  text-align: left;
  border: 0;
  background: none;
  color: var(--text);
  padding: 14px 10px;
  border-radius: 10px;
  margin: 4px 0;
  font-size: 12px;
}
.chat-select.active {
  background: var(--soft);
}
.chat-select small {
  display: block;
  color: var(--muted);
  font-size: 9px;
}
.chat-area {
  padding: 20px;
  min-width: 0;
}
.messages {
  height: 380px;
  overflow-y: auto;
  padding: 16px 0;
}
.bubble {
  max-width: 80%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  margin: 9px 0;
  background: var(--bg);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}
.bubble.out {
  margin-left: auto;
  background: var(--soft);
}
.bubble small {
  display: block;
  font-size: 8px;
  color: var(--muted);
  margin-top: 6px;
}
.bubble a {
  display: block;
  font-size: 10px;
}
.compose {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}
.compose textarea {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 11px;
  padding: 12px;
  color: var(--text);
  min-width: 0;
  font-size: 12px;
}
.login-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  padding: 80px;
  background:
    radial-gradient(circle at 20% 10%, #7769ca88, transparent 65%), #23223e;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-story h1 {
  font-size: 54px;
  letter-spacing: -2px;
  max-width: 470px;
  margin: 36px 0 22px;
}
.login-story p {
  color: #cbc7e2;
  font-size: 15px;
  max-width: 420px;
}
.login-story .brand {
  color: white;
}
.login-features {
  display: flex;
  gap: 22px;
  margin-top: 35px;
  flex-wrap: wrap;
  font-size: 11px;
  color: #e1ddef;
}
.login-form {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 50px;
}
.login-form > div {
  max-width: 370px;
  width: 100%;
}
.login-form h2 {
  font-size: 29px;
  letter-spacing: -1px;
}
.login-form .button {
  width: 100%;
  margin-top: 10px;
}
.login-footer {
  font-size: 10px;
  color: var(--muted);
  margin-top: 28px;
}
.eyebrow.white {
  color: #c4b7fa;
}
.help-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.loading {
  color: var(--muted);
  text-align: center;
  padding: 60px;
}
.stack > * + * {
  margin-top: 20px;
}
@media (max-width: 1150px) {
  #sidebar {
    width: 215px;
  }
  .body {
    margin-left: 215px;
  }
  main {
    padding: 28px;
  }
  .topbar {
    padding: 0 25px;
  }
  .metrics {
    gap: 12px;
  }
  .metrics .card {
    padding: 18px;
  }
  .connection-layout {
    grid-template-columns: 270px minmax(0, 1fr);
  }
  .grid-three {
    grid-template-columns: 1fr 1fr;
  }
  .login-story {
    padding: 50px;
  }
  .login-story h1 {
    font-size: 43px;
  }
}
@media (max-width: 850px) {
  #sidebar {
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 20px 0 60px #0002;
  }
  #sidebar.open {
    transform: none;
    width: 248px;
  }
  .body {
    margin-left: 0;
  }
  #menu {
    display: block;
  }
  .top-actions input {
    display: none;
  }
  .topbar {
    height: 65px;
    padding: 0 20px;
  }
  main {
    padding: 25px 20px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .grid-two,
  .connection-layout,
  .help-grid {
    grid-template-columns: 1fr;
  }
  .connection-layout > .stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .connection-layout > .stack > * + * {
    margin-top: 0;
  }
  .qr-panel {
    min-height: 420px;
  }
  .inbox-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  footer {
    padding: 20px;
    flex-wrap: wrap;
  }
  .login-layout {
    grid-template-columns: 1fr;
  }
  .login-story {
    padding: 30px;
  }
  .login-story h1 {
    font-size: 33px;
    max-width: none;
    margin: 25px 0 12px;
  }
  .login-story p {
    font-size: 12px;
  }
  .login-story .login-features {
    display: none;
  }
  .login-form {
    padding: 35px 25px;
  }
  .login-story > p {
    display: none;
  }
  .login-story .brand {
    font-size: 18px;
  }
}
@media (max-width: 540px) {
  main {
    padding: 22px 16px 35px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 12px;
  }
  h1 {
    font-size: 24px;
  }
  .page-heading > .button {
    font-size: 10px;
    padding: 9px 12px;
  }
  .eyebrow {
    font-size: 8px;
  }
  .topbar {
    padding: 0 16px;
    gap: 10px;
  }
  #breadcrumb {
    font-size: 9px;
    max-width: 90px;
  }
  .top-actions {
    gap: 10px;
  }
  .avatar {
    display: none;
  }
  .card {
    padding: 19px;
  }
  .metrics {
    gap: 10px;
  }
  .metric-head {
    font-size: 10px;
  }
  .metric-value {
    font-size: 26px;
  }
  .glyph {
    width: 29px;
    height: 29px;
  }
  .metrics .card {
    padding: 15px;
  }
  .metric-bottom {
    font-size: 8px;
  }
  .grid-three,
  .form-grid,
  .connection-layout > .stack {
    grid-template-columns: 1fr;
  }
  .connection-banner {
    padding: 21px;
    align-items: flex-start;
    flex-direction: column;
  }
  .connection-banner h2 {
    font-size: 16px;
  }
  .connection-banner .button {
    font-size: 10px;
  }
  .qr-box {
    width: 240px;
    height: 270px;
  }
  .qr-box img {
    width: 220px;
    height: 220px;
  }
  .qr-panel {
    min-height: 400px;
  }
  .inbox-layout {
    display: block;
  }
  .chat-list {
    max-height: 170px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .messages {
    height: 320px;
  }
  .compose {
    flex-direction: column;
  }
  .compose textarea,
  .compose .button {
    width: 100%;
  }
  .section-head {
    align-items: flex-start;
  }
  .section-head .actions {
    justify-content: flex-end;
  }
  .section-head h2 {
    font-size: 14px;
  }
  footer {
    flex-direction: column;
    text-align: center;
    gap: 7px;
  }
  .dialog-body {
    padding: 20px;
  }
  .login-story h1 {
    font-size: 29px;
  }
  .login-form h2 {
    font-size: 26px;
  }
  .help-grid {
    gap: 13px;
  }
  td {
    padding: 12px 8px;
    font-size: 10px;
  }
  th {
    padding: 10px 8px;
    font-size: 8px;
  }
  .top-actions .plain-button {
    font-size: 10px;
  }
  #toast {
    right: 16px;
    left: 16px;
    bottom: 16px;
  }
  .qr-panel .field {
    width: 100%;
  }
  .chart {
    gap: 6px;
  }
  .sidebar-end {
    padding-bottom: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
/* v2 · Obsidian glass */
:root,
html[data-theme="dark"],
html[data-theme="light"] {
  --bg: #08090e;
  --surface: rgba(23, 24, 34, 0.78);
  --text: #f0f0f7;
  --muted: #9698b0;
  --line: rgba(207, 208, 255, 0.095);
  --soft: rgba(157, 128, 255, 0.095);
  --purple: var(--accent, #a78bfa);
  --green: #5de2ba;
  --green-soft: rgba(65, 208, 166, 0.1);
  --blue: #80b8ff;
  --shadow: 0 12px 45px #0002;
  color-scheme: dark;
}
body {
  background:
    radial-gradient(ellipse at 78% 4%, #40227124, transparent 42%),
    radial-gradient(ellipse at 25% 84%, #12504619, transparent 45%), #08090e;
  font-size: 13px;
}
body.glow-off {
  background: #08090e;
}
button,
input,
select,
textarea {
  font-size: 13px;
}
a {
  text-decoration: none;
}
#page-title:focus {
  outline: none;
}
.card {
  border: 1px solid var(--line);
  background: linear-gradient(140deg, #252535b8, #13141dd6);
  border-radius: 21px;
  box-shadow:
    var(--shadow),
    inset 0 1px 0 #ffffff03;
  backdrop-filter: blur(18px);
  padding: 25px;
  margin-bottom: 22px;
}
.card h2 {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 0.19em;
  color: #b4a0ed;
  font-weight: 750;
}
.page-heading {
  margin: 4px 0 28px;
}
.page-heading h1 {
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.045em;
  margin: 10px 0 12px;
  font-weight: 650;
}
.page-heading p {
  font-size: 12px;
  max-width: 690px;
}
.button {
  min-height: 40px;
  padding: 10px 17px;
  border-radius: 11px;
  background: linear-gradient(120deg, #a88cf4, #8673eb);
  border: 1px solid #b8a1ff30;
  color: #11101c;
  font-size: 11px;
  font-weight: 750;
  gap: 8px;
  box-shadow: 0 5px 22px #9679ed13;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.button:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}
.button svg {
  width: 16px;
  height: 16px;
}
.button.green {
  background: linear-gradient(120deg, #68e4bd, #44c5a6);
  color: #0b2823;
}
.button.secondary {
  background: #ffffff05;
  border-color: #ffffff12;
  color: #d8d6ed;
  box-shadow: none;
}
.button.ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #bda7f1;
}
.button.selected {
  background: #a78bfa20;
  border-color: #a78bfa33;
  color: #d5c4ff;
}
.button.danger {
  background: #ef738722;
  border-color: #ef738733;
  color: #ffacbc;
}
input,
select,
textarea {
  background: #0e1019b0 !important;
  border: 1px solid #b3b1e21a !important;
  color: #e4e3ef;
  border-radius: 11px;
  min-height: 44px;
  padding: 11px 13px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #b19be87a !important;
  outline: 2px solid #a78bfa16;
}
input::placeholder,
textarea::placeholder {
  color: #62637c;
}
input[type="checkbox"] {
  accent-color: #a78bfa;
  min-height: 17px;
  width: 17px;
  flex: none;
}
input[type="color"] {
  padding: 5px;
  width: 100%;
  height: 44px;
}
.field {
  gap: 8px;
  margin-bottom: 19px;
  color: #c5c5d6;
  font-size: 11px;
  font-weight: 550;
}
.field small {
  font-size: 10px;
  font-weight: 400;
}
.field.check {
  font-weight: 400;
  line-height: 1.5;
}
.glyph {
  width: 39px;
  height: 39px;
  background: #9e7ef512;
  color: #baa1ff;
  border: 1px solid #a78bfa13;
  border-radius: 12px;
}
.glyph svg {
  width: 19px;
  height: 19px;
}
.glyph.green {
  background: #4dd9ad13;
  color: #64dfba;
}
.glyph.blue {
  background: #6fafff12;
  color: #8abcff;
}
.glyph.amber {
  background: #e9b76e12;
  color: #edc384;
}
.glyph.pink {
  background: #ee8cbd12;
  color: #f1a6cf;
}
.pill {
  padding: 5px 10px;
  border-radius: 8px;
  background: #ffffff06;
  border: 1px solid #ffffff0c;
  font-size: 9px;
  color: #b8b7cc;
  white-space: nowrap;
}
.pill.green {
  color: #73ddbb;
  background: #57dab20e;
  border-color: #57dab218;
}
.pill.blue {
  color: #9cc5ff;
  background: #6aa7ff0e;
  border-color: #6aa7ff18;
}
.pill.purple {
  color: #cbb7fb;
  background: #a78bfa0e;
  border-color: #a78bfa18;
}
.pill.amber {
  color: #e7c38e;
  background: #e7b86a0e;
  border-color: #e7b86a18;
}
.pill.red {
  color: #ed9aab;
  background: #f37a990c;
  border-color: #f37a9918;
}
.dot {
  width: 5px;
  height: 5px;
}
.metric-value {
  font-size: 37px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.065em;
  margin: 21px 0 12px;
}
.metric-head {
  font-size: 11px;
  color: #b7b6ca;
  font-weight: 500;
}
.metric-bottom {
  font-size: 9px;
  color: #73758e;
}
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin-bottom: 22px;
}
.admin-kpis .card,
.metrics .card {
  margin: 0;
  padding: 22px;
}
.metrics {
  gap: 17px;
  margin-bottom: 23px;
}
.kpi {
  position: relative;
  overflow: hidden;
}
.kpi:after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  right: -70px;
  bottom: -70px;
  background: #a78bfa12;
  border-radius: 50%;
}
.trend-svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 270px;
  margin-top: 12px;
}
.chart {
  padding: 25px 0 0;
  gap: 8px;
  height: 225px;
}
.chart-col {
  max-width: 40px;
}
.chart-bar {
  background: linear-gradient(0deg, #7960b7aa, #b4a0ed);
  border-radius: 4px 4px 0 0;
}
.chart-col span,
.chart-col small {
  font-size: 8px;
}
.table-wrap {
  border-radius: 12px;
  overflow-x: auto;
}
table {
  font-size: 11px;
}
thead {
  background: #ffffff03;
}
th {
  color: #88899f;
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
td,
th {
  padding: 16px 13px;
  border-bottom: 1px solid #ffffff07;
  text-align: left;
}
td {
  color: #d2d0e1;
}
tbody tr:hover {
  background: #b8a3f604;
}
table .button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 9px;
}
.empty {
  padding: 35px 20px;
}
.notice {
  background: #a78bfa0b;
  border: 1px solid #a78bfa1a;
  color: #c1b1e4;
  font-size: 11px;
  border-radius: 12px;
}
.error {
  color: #ff9eb2;
  font-size: 11px;
}
.demo-banner {
  background: #d8b57909;
  color: #c5b292;
  border: 1px solid #d8b57916;
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 9px;
  margin-bottom: 24px;
}
.list-row {
  border-bottom: 1px solid #ffffff08;
  padding: 14px 0;
}
.section-head {
  margin-bottom: 20px;
}
.grid-two {
  gap: 20px;
}
.grid-two > .card {
  min-width: 0;
}
.actions {
  gap: 9px;
  flex-wrap: wrap;
}
.break {
  overflow-wrap: anywhere;
}
.preline {
  white-space: pre-line;
}
.report-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}
.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.plan-price {
  font-size: 36px;
  letter-spacing: -0.05em;
  margin: 20px 0;
}
.customer-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  min-height: 170px;
  background:
    radial-gradient(ellipse at 90% 0, #693db72a, transparent 60%),
    linear-gradient(130deg, #1d1d2ba8, #11131da8);
}
.customer-welcome h2 {
  font-size: 24px;
  letter-spacing: -0.04em;
}
.plan-glance {
  min-width: 220px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
}
.plan-glance strong {
  font-size: 20px;
}
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.button.shortcut {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  padding: 16px 13px;
  background: #ffffff02;
  border: 1px solid var(--line);
  border-radius: 13px;
  min-height: 115px;
  color: #dbd6ee;
  gap: 10px;
}
.shortcut:hover {
  background: #a78bfa0a;
}
.connection-banner {
  background: linear-gradient(120deg, #3d2c602c, #16483727);
  border: 1px solid #ad8ceb13;
  border-radius: 20px;
  padding: 26px;
  margin: 0 0 22px;
}
.connection-banner h2 {
  font-size: 18px;
}
.connection-banner p {
  color: #9e9bb6;
  font-size: 11px;
}
.welcome-card {
  background: linear-gradient(110deg, #4c346631, #163c3b30);
  border: 1px solid var(--line);
  border-radius: 20px;
}
.instance-id {
  background: #080a1266;
  border: 1px solid var(--line);
  color: #c1b5db;
  font-size: 11px;
  border-radius: 10px;
  overflow-wrap: anywhere;
}
.qr-box {
  background: #0c1019;
  border-color: #a78bfa20;
  border-radius: 24px;
}
.qr-box img,
.qr-preview img {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  max-width: 260px;
}
.qr-tabs {
  background: #0b0b14;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.qr-tabs button {
  color: #85849f;
  border-radius: 9px;
  font-size: 11px;
}
.qr-tabs button.active {
  background: #a78bfa17;
  color: #d3baff;
  box-shadow: none;
}
.qr-preview {
  text-align: center;
}
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 7px;
  background: #ffffff02;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 22px;
}
.settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 20px;
  align-content: start;
}
.settings-form > .section-head,
.settings-form > .notice,
.settings-form > .error,
.settings-form > button {
  grid-column: 1/-1;
}
.profile-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 24px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}
.avatar.large {
  width: 62px;
  height: 62px;
  font-size: 18px;
  border-radius: 20px;
}
.profile-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.token-box {
  padding: 20px;
  background: #0b0d1666;
  border: 1px solid #a78bfa22;
  border-radius: 14px;
  margin: 18px 0;
}
.password-field {
  display: flex;
  position: relative;
}
.password-field input {
  width: 100%;
  padding-right: 65px;
}
.password-field button {
  position: absolute;
  right: 2px;
  top: 3px;
  min-height: 37px;
}
.message {
  background: #232030;
  border: 1px solid #a78bfa0d;
  color: #dfdaee;
}
.message.out {
  background: #1e3330;
  border-color: #62caa918;
}
.chat-area {
  background: #0a0c1366;
}
.compose {
  background: #12131e;
}
dialog {
  background: #15151feb;
  border: 1px solid #b7a6ec25;
  border-radius: 23px;
  box-shadow: 0 30px 140px #0009;
  backdrop-filter: blur(30px);
  color: var(--text);
  max-width: 710px;
}
dialog::backdrop {
  background: #02030acf;
  backdrop-filter: blur(9px);
}
.dialog-head {
  background: #ffffff02;
  border-color: var(--line);
  padding: 23px 26px;
}
.dialog-head h2 {
  font-size: 18px;
}
.dialog-body {
  padding: 26px;
}
#toast {
  background: #2a263b;
  color: #e9dfff;
  border: 1px solid #b99cf141;
  border-radius: 12px;
}
#sidebar {
  width: 222px;
  background: #1010199c;
  border-right: 1px solid var(--line);
  backdrop-filter: blur(24px);
  padding: 26px 17px;
}
.brand {
  color: #e2d8ff;
  gap: 11px;
  font-size: 20px;
  letter-spacing: -0.045em;
}
.brand b {
  color: #b89ae9;
}
.brand small {
  color: #6c6b85;
  font-size: 6px;
  letter-spacing: 0.17em;
}
.workspace {
  margin: 32px 0 27px;
  background: #ffffff02;
  border: 1px solid #b9a9f00c;
  border-radius: 12px;
  padding: 13px 10px;
}
.workspace-avatar {
  background: #a78bfa12;
  color: #ba9af3;
  border-radius: 10px;
  font-size: 14px;
  width: 32px;
  height: 32px;
}
.workspace strong {
  font-size: 10px;
}
.workspace small {
  font-size: 8px;
}
.nav-label {
  font-size: 8px;
  letter-spacing: 0.15em;
  color: #68687d;
  margin: 24px 10px 10px;
}
.nav-link {
  font-size: 11px;
  color: #9c9bb0;
  border-radius: 10px;
  min-height: 44px;
  margin: 4px 0;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
}
.nav-link svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
.nav-link:hover {
  background: #ffffff03;
  color: #e0d5f8;
}
.nav-link.active {
  color: #ccafff;
  background: linear-gradient(100deg, #a78bfa15, #a78bfa08);
  border-color: #a78bfa0d;
}
.sidebar-end {
  border-top: 1px solid var(--line);
  padding: 23px 9px 0;
  margin-top: 25px;
}
.sidebar-end strong {
  font-size: 10px;
  color: #8b859b;
}
.sidebar-end p,
.sidebar-end a {
  font-size: 9px;
}
.body {
  margin-left: 222px;
}
.topbar {
  height: 76px;
  min-height: 76px;
  background: #11111b70;
  backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
  padding: 0 34px;
}
.topbar #breadcrumb {
  font-size: 10px;
  color: #868299;
}
.top-actions {
  gap: 14px;
}
.top-actions input {
  min-height: 33px !important;
  height: 33px;
  width: 185px;
  font-size: 10px;
  background: #ffffff02 !important;
}
.icon-button,
.plain-button {
  color: #9e92bb;
  border: 1px solid #ffffff08;
  background: #ffffff02;
  border-radius: 9px;
}
.plain-button {
  font-size: 10px;
  padding: 8px 12px;
}
.avatar {
  border-radius: 11px;
  background: linear-gradient(130deg, #a78bfa25, #7a67c01c);
  border: 1px solid #a78bfa20;
  color: #cdb3ff;
  width: 35px;
  height: 35px;
  font-size: 10px;
  cursor: pointer;
}
.body > main {
  padding: 30px 34px 35px;
  max-width: 1580px;
  margin: 0 auto;
}
.body > footer {
  background: transparent;
  border-top: 1px solid var(--line);
  color: #626075;
  font-size: 9px;
  padding: 25px 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
#hub-nav {
  position: fixed;
  left: 222px;
  top: 76px;
  bottom: 0;
  width: 213px;
  overflow-y: auto;
  padding: 25px 15px;
  background: #11131a8c;
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--line);
  z-index: 10;
}
.hub-brand {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 23px;
}
.hub-brand strong {
  font-size: 12px;
}
.hub-brand small {
  display: block;
  font-size: 8px;
}
.hub-connection {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  margin-bottom: 16px;
}
.hub-connection .button {
  width: 100%;
  margin-top: 9px;
  font-size: 10px;
  min-height: 34px;
}
#hub-nav > input {
  width: 100%;
  font-size: 9px;
  min-height: 34px;
  margin-bottom: 12px;
}
#hub-nav .nav-link {
  font-size: 10px;
  min-height: 37px;
  padding: 8px 9px;
  gap: 9px;
  margin: 3px 0;
}
#hub-nav .nav-link svg {
  width: 15px;
  height: 15px;
}
.body.hub-open > main,
.body.hub-open > footer {
  margin-left: 213px;
}
.body.hub-open > main {
  padding: 30px 27px;
}
.hub-open .page-heading h1 {
  font-size: 27px;
}
.compact .card {
  padding: 18px;
}
.compact td,
.compact th {
  padding: 11px;
}
#login {
  min-height: 100dvh;
}
.auth-page {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  background: #090a10;
}
.auth-story {
  padding: 45px 58px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at 25% 50%, #734bad17, transparent 65%);
}
.auth-story:before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#b9a3e80b 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(transparent, #000, transparent);
}
.auth-story-content {
  position: relative;
  max-width: 520px;
  padding: 70px 0 25px;
}
.auth-story-content h1 {
  font-size: clamp(42px, 4vw, 68px);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1.08;
  white-space: pre-line;
  margin: 20px 0;
  color: #ede9f7;
}
.auth-story-content > p {
  color: #8c869f;
  font-size: 13px;
  line-height: 1.85;
  max-width: 400px;
}
.auth-orbit {
  height: 210px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 420px;
  margin: 8px 0;
}
.auth-orbit > .glyph {
  width: 64px;
  height: 64px;
  border-radius: 22px;
  background: #121b20;
  border: 1px solid #75c6af30;
  box-shadow: 0 0 70px #5ac7a519;
}
.auth-orbit .glyph svg {
  width: 30px;
  height: 30px;
}
.orbit-ring {
  position: absolute;
  width: 210px;
  height: 155px;
  border: 1px solid #a48bcb15;
  border-radius: 50%;
  transform: rotate(-18deg);
}
.orbit-ring:before {
  content: "";
  position: absolute;
  inset: -25px -38px;
  border: 1px solid #a48bcb0a;
  border-radius: 50%;
}
.orbit-chip {
  position: absolute;
  border: 1px solid #b7a4d719;
  background: #1a1722b0;
  backdrop-filter: blur(15px);
  border-radius: 10px;
  padding: 11px 14px;
  color: #aaa1bc;
  font-size: 9px;
}
.orbit-chip.one {
  left: 3px;
  top: 35px;
}
.orbit-chip.two {
  right: 4px;
  top: 70px;
}
.orbit-chip.three {
  bottom: 15px;
  left: 48px;
}
.trust-row {
  color: #8e879e;
  font-size: 9px;
}
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 50px 40px;
}
.auth-card {
  width: min(100%, 430px);
}
.auth-card h2 {
  font-size: 29px;
  line-height: 1.2;
  letter-spacing: -0.04em;
  font-weight: 600;
  margin: 14px 0;
}
.auth-card > p.muted {
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 28px;
}
.auth-card .field {
  font-size: 10px;
}
.auth-card input {
  min-height: 47px;
}
.auth-submit {
  width: 100%;
  min-height: 46px;
  font-size: 12px;
  justify-content: space-between;
  padding: 13px 18px;
}
.auth-tabs {
  display: flex;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 12px;
  background: #ffffff02;
  margin-bottom: 42px;
}
.auth-tabs .button {
  flex: 1;
  min-height: 35px;
  border-radius: 8px;
  font-size: 10px;
}
.auth-card > .small {
  font-size: 9px;
  line-height: 1.8;
  margin: 20px 0;
}
.auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 22px;
  font-size: 10px;
}
.demo-entry {
  margin-top: 24px;
  padding: 17px;
  border: 1px dashed #b59ce92b;
  border-radius: 12px;
}
.demo-entry > .small {
  font-size: 8px;
  letter-spacing: 0.09em;
  display: block;
  margin-bottom: 10px;
}
.demo-entry .actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.demo-entry .button {
  font-size: 9px;
  min-height: 35px;
}
.public-form {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 25px;
}
.form-card {
  width: min(100%, 560px);
}
.trap {
  display: none;
}
.nav-link[aria-current="page"] {
  box-shadow: inset 2px 0 0 #b99bf6;
}
@media (max-width: 1200px) {
  .hub-open .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hub-open .grid-two {
    grid-template-columns: 1fr;
  }
  .body > main {
    padding: 26px;
  }
  .body.hub-open > main {
    padding: 25px 20px;
  }
  .auth-story {
    padding: 34px;
  }
  .auth-panel {
    padding: 35px;
  }
  .auth-story-content h1 {
    font-size: 47px;
  }
  .shortcut-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 950px) {
  .admin-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 21px;
  }
  .hub-open .connection-layout {
    grid-template-columns: 1fr;
  }
  .plan-grid {
    grid-template-columns: 1fr;
  }
  .auth-page {
    grid-template-columns: 0.85fr 1fr;
  }
  .auth-story {
    padding: 30px 25px;
  }
  .auth-story-content h1 {
    font-size: 40px;
  }
  .auth-panel {
    padding: 30px;
  }
  .customer-welcome {
    align-items: flex-start;
  }
}
@media (max-width: 850px) {
  #sidebar {
    transform: translateX(-100%);
    z-index: 35;
    width: 235px;
    background: #101019f5;
    box-shadow: 20px 0 100px #000a;
  }
  #sidebar.open {
    transform: translateX(0);
  }
  .body {
    margin-left: 0;
  }
  .topbar {
    height: 65px;
    min-height: 65px;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 25;
  }
  #menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
  }
  #hub-nav {
    position: static;
    width: auto;
    max-height: 230px;
    margin: 17px 20px 0;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #15141ed9;
    padding: 14px 15px;
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    overflow-y: auto;
  }
  #hub-nav[hidden] {
    display: none !important;
  }
  .hub-brand,
  .hub-connection {
    display: none;
  }
  #hub-nav > input {
    flex-basis: 100%;
    margin: 0;
  }
  .hub-link {
    width: auto !important;
    margin: 0 !important;
    min-height: 30px !important;
    padding: 5px 9px !important;
    font-size: 9px !important;
  }
  #hub-nav .nav-label {
    display: none;
  }
  .body.hub-open > main,
  .body.hub-open > footer {
    margin-left: 0;
  }
  .body > main,
  .body.hub-open > main {
    padding: 22px 20px;
  }
  .topbar #breadcrumb {
    flex: 1;
  }
  .top-actions input {
    display: none;
  }
  .top-actions {
    gap: 8px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .auth-page {
    grid-template-columns: 1fr;
  }
  .auth-story {
    padding: 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .auth-story-content {
    padding: 25px 0 0;
  }
  .auth-story-content h1 {
    font-size: 35px;
    white-space: normal;
    max-width: 360px;
  }
  .auth-story-content > p {
    font-size: 11px;
    margin-bottom: 0;
  }
  .auth-orbit,
  .trust-row,
  .auth-story > p {
    display: none;
  }
  .auth-panel {
    padding: 28px 24px 40px;
  }
  .auth-tabs {
    margin-bottom: 28px;
  }
  .auth-card .form-grid {
    grid-template-columns: 1fr;
  }
  .admin-kpis {
    gap: 11px;
  }
  .admin-kpis .card,
  .metrics .card {
    padding: 16px;
    border-radius: 16px;
  }
  .metric-value {
    font-size: 30px;
  }
  .metric-head {
    font-size: 9px;
    gap: 6px;
  }
  .metric-head .glyph {
    width: 28px;
    height: 28px;
  }
  .metric-head .glyph svg {
    width: 15px;
  }
  .metric-bottom {
    font-size: 8px;
  }
  .card {
    padding: 18px;
    border-radius: 17px;
  }
  .page-heading {
    align-items: flex-start;
    gap: 15px;
  }
  .page-heading h1 {
    font-size: 25px;
  }
  .page-heading p {
    font-size: 10px;
  }
  .customer-welcome {
    flex-direction: column;
    gap: 15px;
  }
  .plan-glance {
    border-top: 1px solid var(--line);
    padding-top: 15px;
    min-width: 100%;
  }
  .settings-form {
    grid-template-columns: 1fr;
  }
  .plain-button {
    display: none;
  }
  .body > footer {
    flex-direction: column;
    align-items: center;
    gap: 9px;
    text-align: center;
  }
  .body > main,
  .body.hub-open > main {
    padding: 20px 14px;
  }
  #hub-nav {
    margin: 14px 14px 0;
  }
  .demo-banner {
    font-size: 8px;
  }
  .chart {
    height: 185px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .connection-banner {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }
  dialog {
    max-width: calc(100vw - 26px);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* v4 — RanSan Billing visual system, adapted to Connect's existing DOM.
   Theme only: no business state, report data, API, or chart geometry changes.
   Palette source: billing_live_v2/assets/{modern,final-polish,finance-dialogs,
   reports-workspace,laptop-workspace}.css. This is the maintained theme layer. */
:root,html[data-theme="dark"],html[data-theme="light"] {
  --bg:#080a0e; --surface:#12161e; --text:#edf2fa; --muted:#a7b2c4;
  --line:rgba(255,255,255,.12); --soft:#8b5cf612; --purple:#c4b5fd;
  --green:#5eead4; --green-soft:#14b8a615; --blue:#93c5fd;
  --shadow:0 16px 48px #0004; color-scheme:dark;
}
body {
  background:radial-gradient(ellipse at 10% 0,rgba(99,102,241,.16),transparent 45%),
    radial-gradient(ellipse at 100% 30%,rgba(34,211,238,.07),transparent 40%),#080a0e;
  color:var(--text);font-size:13px;line-height:1.6;
}
body.glow-off{background:#080a0e}
h1,h2,h3{letter-spacing:-.025em;color:#edf3ff}
.muted,.small.muted{color:#a7b9d1}.eyebrow{color:#a5b4fc;letter-spacing:.15em}
.page-heading{margin:2px 0 24px;gap:18px}
.page-heading h1{font-size:clamp(24px,2.3vw,32px);line-height:1.3;font-weight:700;letter-spacing:-.035em}
.page-heading p{font-size:12px;line-height:1.8;color:#acbed6}
.card {
  border:1px solid #a78bfa38;border-radius:20px;
  background:linear-gradient(135deg,rgba(26,32,44,.94),rgba(13,17,24,.96));
  box-shadow:0 16px 48px #0004,inset 0 1px 0 #ffffff08;
  backdrop-filter:blur(18px);padding:22px;
}
.card h2{font-size:16px;font-weight:700;line-height:1.5}
.card h3{font-size:14px;font-weight:700;line-height:1.5}
.grid-two>.card:nth-child(even){background:linear-gradient(125deg,#142e37ee,#182438ee);border-color:#2dd4bf38}
.grid-two>.card:nth-child(odd),.chart-card{background:linear-gradient(125deg,#24233cee,#142334ee);border-color:#a78bfa40}
.grid-three>.card:nth-child(3n+2),.plan-grid>.card:nth-child(3n+2){background:linear-gradient(125deg,#143238,#182b3b);border-color:#2dd4bf45}
.grid-three>.card:nth-child(3n),.plan-grid>.card:nth-child(3n){background:linear-gradient(125deg,#213251,#142538);border-color:#60a5fa45}
.section-head{gap:14px;align-items:center}.section-head h2{margin:0}
/* Navigation: the billing project's bordered, coloured active rows. */
#sidebar{background:linear-gradient(165deg,#171c2af5,#0c1520f5);border-right:1px solid #a5b4fc28;padding:23px 15px}
.brand{font-size:20px;color:#edf3ff}.brand b{color:#c4b5fd}.brand small{color:#a0b0ca;font-size:7px}
.workspace{background:linear-gradient(120deg,#8b5cf613,#14b8a60c);border:1px solid #a78bfa30;padding:12px;border-radius:14px}
.workspace strong{font-size:11px;color:#e1eafa}.workspace small{font-size:10px;color:#acbed6}.workspace-avatar{background:#8b5cf626;border:1px solid #a78bfa3b;color:#c4b5fd}
.nav-label{color:#9caec9;font-size:9px;letter-spacing:.13em;margin-top:20px}
.nav-link{
  --nav-rgb:139,92,246;--nav-ink:#c4b5fd;
  color:#d3def0;background:linear-gradient(115deg,#ffffff05,#ffffff02);
  border:1px solid #94a3b83d;border-radius:12px;min-height:44px;
  padding:10px 11px;font-size:12px;line-height:1.5;gap:10px;margin:6px 0;
}
.nav-link:nth-of-type(4n+2){--nav-rgb:20,184,166;--nav-ink:#5eead4}
.nav-link:nth-of-type(4n+3){--nav-rgb:59,130,246;--nav-ink:#93c5fd}
.nav-link:nth-of-type(4n){--nav-rgb:245,158,11;--nav-ink:#fcd34d}
.nav-link svg{color:var(--nav-ink);width:17px;height:17px}
.nav-link:hover{border-color:#a5b4fc80;background:#a5b4fc0d;color:#f1f5ff}
.nav-link.active,.nav-link[aria-current="page"]{
  border-color:rgba(var(--nav-rgb),.65);color:var(--nav-ink);
  background:linear-gradient(110deg,rgba(var(--nav-rgb),.23),#10283b50);
  box-shadow:inset 3px 0 0 var(--nav-ink),0 7px 20px #02061718;
}
.sidebar-end{border-color:#94a3b826;padding:20px 8px 80px}.sidebar-end strong{color:#c3cfe2;font-size:11px}.sidebar-end p,.sidebar-end a{font-size:10px;line-height:1.8}
.topbar{background:#0a0d13ed;border-bottom:1px solid #a5b4fc28;box-shadow:0 8px 32px #0003}
.topbar #breadcrumb{font-size:11px;color:#afbed5}
.icon-button,.plain-button,.avatar{background:#161e2d;border:1px solid #ffffff20;color:#c7d2fe;min-height:40px;border-radius:12px}
.avatar{width:40px;height:40px;background:linear-gradient(125deg,#3c2a5b,#173d47);border-color:#a78bfa50}
#hub-nav{background:linear-gradient(160deg,#132431f2,#141b2cf2);border-color:#94a3b826;padding:22px 12px}
#hub-nav .nav-link{font-size:11px;min-height:38px;border-radius:10px;border-color:#94a3b826;padding:8px}
.hub-brand strong{font-size:13px}.hub-brand small{color:#acc0d7;font-size:10px}
.hub-connection{border:1px solid #2dd4bf35;background:#14b8a60b;padding:12px;border-radius:13px}
.hub-connection .button{min-height:38px;font-size:11px}
#hub-nav>input{min-height:39px;font-size:11px}
/* Common controls: violet > blue > teal from the reference's primary actions. */
.button,button.contact-trigger{
  min-height:43px;padding:10px 14px;border-radius:12px;font-size:12px;font-weight:650;
  background:linear-gradient(115deg,#7c3aed,#2563eb 60%,#0f766e);
  border:1px solid #a78bfa70;color:#fff;box-shadow:0 8px 22px #02061728;
  transition:background .18s,border-color .18s,box-shadow .18s;
}
.button:hover{transform:none;filter:brightness(1.12);border-color:#c4b5fd;box-shadow:0 8px 24px #02061750}
.button.secondary{background:#64748b18;border-color:#94a3b845;color:#d2deee;box-shadow:none}
.button.ghost{background:#8b5cf610;border-color:#a78bfa35;color:#c4b5fd;box-shadow:none}
.button.green{background:linear-gradient(115deg,#0f766e,#0c6a82);border-color:#2dd4bf65;color:#ccfbf1}
.button.selected,.settings-tabs .button.selected,.auth-tabs .button.selected{background:linear-gradient(110deg,#7c3aed45,#0f766e25);border-color:#a78bfa80;color:#ede9fe;box-shadow:inset 0 1px #ffffff0d}
.button.danger{background:#ec48991b;border-color:#f9a8d44a;color:#f9a8d4;box-shadow:none}
.button:disabled,button.contact-trigger:disabled{opacity:.5;filter:none;cursor:default;transform:none}
.button svg{width:16px;height:16px}
input:not([type="checkbox"]):not([type="radio"]),select,textarea{
  min-height:44px;background:#091a30a0!important;border:1px solid #a5b4fc45!important;
  border-radius:11px;color:#edf3ff;font-size:13px;line-height:1.7;padding:10px 12px;
}
input::placeholder,textarea::placeholder{color:#91a5c2;opacity:1}
select option{background:#14283c;color:#edf3ff}
input[type="checkbox"],input[type="radio"]{accent-color:#a5b4fc}
.field{font-size:12px;line-height:1.7;color:#c0cfe3;gap:9px}
.field small{font-size:11px;line-height:1.7;color:#adbed6}
:focus-visible{outline:2px solid #a78bfa;outline-offset:3px}
/* KPIs: exact deep/ink palette from final-polish.css, including pink. */
.kpi,.metrics>.card:has(>.metric-head){--fx-rgb:139,92,246;--fx-ink:#c4b5fd;--fx-deep:#432a70}
.kpi.tone-green,.metrics>.card:has(>.metric-head .glyph.green){--fx-rgb:20,184,166;--fx-ink:#5eead4;--fx-deep:#124e50}
.kpi.tone-blue,.metrics>.card:has(>.metric-head .glyph.blue){--fx-rgb:59,130,246;--fx-ink:#93c5fd;--fx-deep:#213d70}
.kpi.tone-amber,.metrics>.card:has(>.metric-head .glyph.amber){--fx-rgb:245,158,11;--fx-ink:#fcd34d;--fx-deep:#614322}
.kpi.tone-pink,.kpi.tone-red{--fx-rgb:236,72,153;--fx-ink:#f9a8d4;--fx-deep:#532a4e}
.kpi,.metrics>.card:has(>.metric-head){
  position:relative;isolation:isolate;overflow:hidden;border:1px solid rgba(var(--fx-rgb),.5);
  border-radius:19px;background:radial-gradient(ellipse at 100% 0,rgba(var(--fx-rgb),.17),transparent 75%),linear-gradient(120deg,var(--fx-deep),#182a3d);
  box-shadow:0 12px 28px #0206171a,inset 0 1px 0 #ffffff0c;
  padding:20px;min-height:150px;color:#dbe7f7;
}
.kpi:before,.kpi:after{content:none}
.metric-head{font-size:12px;color:#d6e1f0;font-weight:550;gap:10px;line-height:1.5;align-items:flex-start}
.metric-value{font-size:clamp(26px,2.4vw,33px);font-weight:750;line-height:1.35;letter-spacing:-.03em;color:var(--fx-ink,#c4b5fd);font-variant-numeric:tabular-nums;margin:12px 0 7px;overflow-wrap:anywhere}
.metric-bottom{color:#b8c8df;font-size:10px;line-height:1.7;max-width:90%}
.kpi .glyph,.metrics>.card:has(>.metric-head) .glyph{width:37px;height:37px;flex:0 0 37px;border:1px solid rgba(var(--fx-rgb),.4);border-radius:12px;background:rgba(var(--fx-rgb),.16);color:var(--fx-ink)}
.glyph{border:1px solid #a78bfa45;background:#8b5cf623;color:#c4b5fd;border-radius:12px}
.glyph.green{border-color:#2dd4bf40;background:#14b8a61b;color:#5eead4}.glyph.blue{border-color:#60a5fa40;background:#3b82f61b;color:#93c5fd}
.glyph.amber{border-color:#fbbf2440;background:#f59e0b1b;color:#fcd34d}.glyph.pink{border-color:#f9a8d440;background:#ec48991b;color:#f9a8d4}
.metrics,.admin-kpis{gap:15px;margin-bottom:22px}
/* Report panels, status and data pills retain their original meaning. */
.pill{display:inline-flex;align-items:center;gap:5px;padding:4px 10px;border-radius:999px;border:1px solid #a78bfa66;background:#8b5cf621;color:#c4b5fd;font-size:11px;font-weight:650;line-height:1.7;white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;max-width:100%}
.pill.green{background:#14b8a621;border-color:#2dd4bf66;color:#5eead4}.pill.blue{background:#3b82f621;border-color:#60a5fa66;color:#93c5fd}.pill.purple{background:#8b5cf621;border-color:#a78bfa66;color:#c4b5fd}
.pill.amber{background:#f59e0b21;border-color:#fbbf2466;color:#fcd34d}.pill.red{background:#ec489921;border-color:#f9a8d466;color:#f9a8d4}.pill.gray{background:#64748b21;border-color:#94a3b850;color:#cbd5e1}
.report-pills{gap:9px;padding:14px;border:1px solid #a78bfa30;background:linear-gradient(125deg,#24233c,#142e37);border-radius:16px}
.report-pills>.pill:nth-child(4n+2){background:#14b8a621;border-color:#2dd4bf66;color:#5eead4}
.report-pills>.pill:nth-child(4n+3){background:#3b82f621;border-color:#60a5fa66;color:#93c5fd}
.report-pills>.pill:nth-child(4n){background:#f59e0b21;border-color:#fbbf2466;color:#fcd34d}
.report-pills>.pill.green{background:#14b8a621;border-color:#2dd4bf66;color:#5eead4}.report-pills>.pill.red{background:#ec489921;border-color:#f9a8d466;color:#f9a8d4}
.chart{height:225px;padding:20px 10px 0;border-bottom:1px solid #a5b4fc30;background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#94a3b815 calc(25% - 1px),#94a3b815 25%);gap:8px}
.chart-col{min-width:0}.chart-col span,.chart-col small{color:#b2c3da;font-size:9px;font-variant-numeric:tabular-nums}
.chart-bar{background:linear-gradient(0deg,#433079,#a78bfa);border:1px solid #c4b5fd70;border-radius:5px 5px 0 0;box-shadow:none}
.chart-col:nth-child(4n+2) .chart-bar{background:linear-gradient(0deg,#124e50,#2dd4bf);border-color:#5eead470}
.chart-col:nth-child(4n+3) .chart-bar{background:linear-gradient(0deg,#213d70,#60a5fa);border-color:#93c5fd70}
.chart-col:nth-child(4n) .chart-bar{background:linear-gradient(0deg,#614322,#fbbf24);border-color:#fcd34d70}
.trend-svg{color:#c0cfe3}.trend-svg path{fill:#8b5cf6;opacity:.2}.trend-svg polyline{stroke:#5eead4}.trend-svg circle{fill:#99f6e4}.trend-svg text{fill:#b4c7df}
.table-wrap{border:1px solid #94a3b82a;border-radius:13px;overflow:auto;-webkit-overflow-scrolling:touch}
table{border-collapse:separate;border-spacing:0;font-size:12px}thead{background:#202f47}
th{background:#202f47;color:#a5b4fc;font-size:10px;letter-spacing:.06em;padding:13px 12px;white-space:nowrap}
td{padding:13px 12px;color:#d9e6f5;border-bottom:1px solid #94a3b81a;line-height:1.8}
tbody tr:nth-child(even){background:#818cf809}tbody tr:hover{background:#818cf810}
td:first-child{font-weight:600;color:#c4b5fd}tbody tr:nth-child(4n+2) td:first-child{color:#5eead4}tbody tr:nth-child(4n+3) td:first-child{color:#93c5fd}tbody tr:nth-child(4n) td:first-child{color:#fcd34d}
table .button{min-height:35px;padding:7px 10px;font-size:11px;border-radius:10px}
.pagination{font-size:11px;color:#b9cbe0;padding-top:15px}
/* Dashboard supporting panels and action tiles. */
.customer-welcome,.welcome-card,.connection-banner{background:linear-gradient(125deg,#332650,#143440);border:1px solid #a78bfa50;border-radius:20px;color:#edf3ff}
.customer-welcome{padding:24px;min-height:165px}.customer-welcome h2{color:#ddd6fe;font-size:24px}.plan-glance{padding:14px 18px;border:1px solid #2dd4bf35;border-radius:14px;background:#07182c40}.plan-glance small{color:#b8c9df}
.button.shortcut{--tile-rgb:139,92,246;--tile-ink:#c4b5fd;align-items:flex-start;background:linear-gradient(130deg,rgba(var(--tile-rgb),.17),#142334cc);border:1px solid rgba(var(--tile-rgb),.4);color:var(--tile-ink);padding:15px 13px;min-height:103px;gap:11px;border-radius:15px}
.button.shortcut:nth-child(4n+2){--tile-rgb:20,184,166;--tile-ink:#5eead4}.button.shortcut:nth-child(4n+3){--tile-rgb:59,130,246;--tile-ink:#93c5fd}.button.shortcut:nth-child(4n){--tile-rgb:245,158,11;--tile-ink:#fcd34d}
.button.shortcut .glyph{background:rgba(var(--tile-rgb),.13);border-color:rgba(var(--tile-rgb),.4);color:var(--tile-ink);width:32px;height:32px}
.button.shortcut strong{font-size:11px}.button.shortcut:hover{border-color:var(--tile-ink);filter:brightness(1.15)}
.notice,.demo-banner,.warning-note{border:1px solid #a78bfa38;border-radius:12px;background:#8b5cf612;color:#c6c4e7;font-size:11px;line-height:1.8;padding:12px 14px}
.demo-banner{border-color:#fbbf2440;background:#f59e0b0d;color:#fcd99b;font-size:10px}
.error:not(:empty),#page-error:not([hidden]){border:1px solid #f9a8d440;border-radius:12px;background:#ec489910;color:#f9a8d4;padding:11px 13px;line-height:1.8}
.empty{padding:28px 20px;border:1px dashed #94a3b835;border-radius:14px;background:#64748b08;color:#b4c5dc}
.list-row{border-color:#94a3b826}.list-row small{color:#acc0d8}.instance-id{background:#07182c80;border-color:#60a5fa35;color:#bcd7f7;font-size:11px}
/* Dialogs: actual .dialog-head/.dialog-body structure, not an unused header. */
dialog.premium-dialog{
  width:min(760px,calc(100vw - 36px));max-width:calc(100vw - 36px);max-height:calc(100dvh - 40px);
  padding:0;border:1px solid #a78bfa65;border-radius:24px;
  background:linear-gradient(135deg,#292441,#12353f 75%,#15283e);
  color:#edf3ff;box-shadow:0 30px 100px #02061790;overflow:hidden;
}
dialog.premium-dialog[open]{display:flex;flex-direction:column}
dialog.premium-dialog::backdrop{background:#020617bd;backdrop-filter:blur(12px)}
.premium-dialog>.dialog-head{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0;padding:22px 24px;border-bottom:1px solid #a78bfa35;background:linear-gradient(115deg,#8b5cf61a,#14b8a611);margin:0}
.modal-title{display:flex;gap:13px;align-items:center;min-width:0}.modal-title>.glyph{width:43px;height:43px;flex:0 0 43px;border-radius:14px;border:1px solid #a78bfa50;background:#8b5cf625;color:#c4b5fd}
.modal-title .eyebrow{display:block;font-size:9px;font-weight:750;letter-spacing:.15em;color:#a5b4fc;margin-bottom:5px}
.premium-dialog .modal-title h2{margin:0;padding:0;border:0;background:none;font-size:22px;line-height:1.4;font-weight:750;color:#f1f5ff;overflow-wrap:anywhere}
.premium-dialog>.dialog-head>button{flex:0 0 38px;width:38px;height:38px;min-height:38px;padding:0;border:1px solid #a5b4fc40;border-radius:11px;background:#64748b15;color:#dbe7f7;font-size:24px}
.premium-dialog>.dialog-body{padding:21px 24px;overflow:auto;min-height:0;overscroll-behavior:contain}
.premium-dialog .dialog-form{padding:0;margin:0;display:block}
.dialog-fields{display:grid;gap:13px;min-width:0}
.premium-dialog .field{margin:0;padding:13px;border:1px solid #a78bfa30;border-radius:14px;background:#6366f10c;min-width:0;font-size:12px;font-weight:650;line-height:1.7;color:#bdcee3;gap:9px}
.premium-dialog .field:nth-of-type(even){border-color:#2dd4bf30;background:#14b8a609}
.premium-dialog .form-grid{gap:13px;margin:0 0 13px}
.premium-dialog .field.check{flex-direction:row;align-items:center;padding:12px;gap:10px}
.premium-dialog :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){background:#091a30aa!important;border-color:#a5b4fc45!important;width:100%;font-size:13px;line-height:1.7}
.premium-dialog .field small{font-size:11px;font-weight:400;color:#adbed6}
.premium-dialog .dialog-actions{position:sticky;bottom:-22px;z-index:2;display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:17px 0 8px;margin-top:20px;border-top:1px solid #94a3b830;background:#112f3cf5;box-shadow:0 -8px 18px #112f3c90}
.premium-dialog .dialog-actions>.button{min-width:105px}.premium-dialog .notice{margin:0;font-weight:400}
.premium-dialog .dialog-body>div>.actions{justify-content:flex-end;padding-top:16px;margin-top:20px;border-top:1px solid #94a3b830}
.premium-dialog .dialog-body p{line-height:1.8}.premium-dialog pre{background:#081a2d90;border:1px solid #60a5fa35;border-radius:14px;padding:16px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;color:#c9daef}
/* Login uses the same violet/teal surface family as the workspace. */
.auth-page{background:#080a0e}.auth-story{border-color:#a78bfa30;background:radial-gradient(ellipse at 0 0,#8b5cf632,transparent 70%),linear-gradient(135deg,#292441,#12353f 75%,#15283e)}
.auth-story:before{opacity:.24}.auth-story-content h1{color:#f1f5ff;letter-spacing:-.035em}.auth-story-content>p{color:#b9cde3}
.auth-panel{background:radial-gradient(ellipse at 100% 0,#3b82f610,transparent 65%),#080d16}.auth-card{padding:28px;border:1px solid #a78bfa38;border-radius:24px;background:linear-gradient(140deg,#22223a99,#10293799);box-shadow:0 20px 60px #02061760;width:100%}
.auth-card h2{font-size:27px;color:#edf3ff}.auth-tabs{background:#07182c80;border:1px solid #a78bfa35;border-radius:13px;padding:5px}.auth-tabs .button{min-height:39px}
.auth-card .field{padding:0;margin:15px 0;background:none;border:0}.auth-card .field input{background:#091a30aa!important}.auth-links{color:#b0c3dd}.auth-orbit{border-color:#a78bfa40;background:linear-gradient(120deg,#8b5cf614,#14b8a612)}
/* Environment controls: maintain separation; appearance does not select data. */
.environment-switch{position:fixed;bottom:14px;left:14px;z-index:35;display:flex;gap:9px;align-items:center;padding:7px 8px 7px 11px;border:1px solid #a78bfa50;border-radius:13px;background:linear-gradient(125deg,#292441f5,#12353ff5);box-shadow:0 8px 30px #02061780;backdrop-filter:blur(18px)}
.environment-switch[hidden]{display:none}.env-status{display:flex;align-items:center;gap:6px;font-size:9px;font-weight:700;letter-spacing:.06em;color:#dce7f7}
.env-status .dot{width:6px;height:6px;border-radius:50%;background:#fcd34d}.env-status.live .dot{background:#5eead4}
.env-segment{display:flex;gap:3px;padding:3px;border-radius:9px;background:#07182c80}.env-segment button{min-height:29px;padding:5px 8px;font-size:9px;border:1px solid transparent;border-radius:7px;background:transparent;color:#a7b9d1}.env-segment button.selected{background:#8b5cf62d;color:#ddd6fe;border-color:#a78bfa50}
/* Saved-contact chooser: v3 behaviour retained, restyled to match form panels. */
.recipient-picker{position:relative;display:flex;gap:8px;align-items:center;min-width:0}.recipient-picker>input{flex:1;min-width:0;width:0}.contact-trigger{white-space:nowrap;flex-shrink:0}
.contact-popover{position:absolute;z-index:20;top:calc(100% + 8px);left:0;right:0;padding:14px;background:linear-gradient(135deg,#292441,#12353f);border:1px solid #a78bfa65;border-radius:17px;box-shadow:0 22px 65px #020617b0;min-width:0}
.contact-popover[hidden]{display:none}.contact-picker-heading{display:flex;justify-content:space-between;gap:8px;align-items:center;margin-bottom:10px;color:#e2e8f0}.contact-popover input{width:100%}
.contact-options{max-height:240px;overflow:auto;margin-top:10px}.contact-option{display:flex;align-items:center;text-align:left;gap:10px;width:100%;border:1px solid #a78bfa22;background:#8b5cf609;color:#edf3ff;padding:11px;border-radius:12px;min-height:64px;margin-top:5px}
.contact-option:nth-child(even){border-color:#2dd4bf25;background:#14b8a609}.contact-option:hover,.contact-option:focus{background:#8b5cf622;border-color:#c4b5fd80}.contact-option .grow{flex:1;min-width:0}.contact-option strong,.contact-option small{display:block;overflow-wrap:anywhere}.contact-option strong{font-size:12px}.contact-option small{font-size:11px;color:#acc0d8;margin-top:3px}
.contact-avatar{display:grid;place-items:center;flex:0 0 34px;height:34px;border-radius:11px;background:#8b5cf625;border:1px solid #a78bfa45;color:#c4b5fd;font-size:11px}.contact-empty{padding:12px;font-size:12px;color:#adc0da}
.api-field-grid{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:end}.api-field-grid input{font-family:ui-monospace,monospace}.api-copy-action{margin-bottom:16px}
.body>footer{color:#9bafc9;font-size:10px;line-height:1.7;background:#07121b60;border-color:#a5b4fc25;padding-bottom:28px}.body>footer a{color:#c4b5fd}
#toast{background:linear-gradient(125deg,#292441,#12353f);color:#edf3ff;border:1px solid #a78bfa65;box-shadow:0 18px 60px #02061790;border-radius:13px;font-size:12px;padding:13px 18px}
/* Laptop density follows the reference; no CSS zoom or transform scaling. */
@media screen and (min-width:1024px) and (max-width:1599px){
 .body>main{padding:25px 26px}.body.hub-open>main{padding:25px 22px}
 .card{padding:18px;border-radius:17px;margin-bottom:18px}
 .admin-kpis,.metrics{gap:12px;margin-bottom:18px}
 .admin-kpis>.kpi,.metrics>.card{padding:17px;min-height:140px;border-radius:16px}
 .metric-value{font-size:28px}.metric-head{font-size:11px}.metric-bottom{font-size:10px}
 .chart{height:205px}.page-heading{margin-bottom:22px}.page-heading h1{font-size:27px}
 .auth-story-content h1{font-size:48px}.auth-panel{padding:30px}.auth-card{padding:25px}
}
@media(max-width:850px){
 #sidebar{background:linear-gradient(165deg,#171c2a,#0c1520)}
 #hub-nav{background:linear-gradient(145deg,#18293b,#1e233c);border-color:#a78bfa38;padding:13px;margin:14px 16px 0}
 #hub-nav .nav-link{font-size:11px;min-height:36px;border:1px solid #94a3b83d;padding:7px 10px;margin:3px 0}
 .body>main,.body.hub-open>main{padding:20px 16px}.topbar{padding:0 15px}
 .topbar .icon-button,.topbar .plain-button{min-height:40px}.top-actions{gap:7px}
 .body>footer{padding:18px 17px 75px}.environment-switch{left:auto;right:12px;bottom:12px}
 .sidebar-end{padding-bottom:20px}.auth-card{padding:22px}
}
@media(max-width:640px){
 .page-heading h1,.hub-open .page-heading h1{font-size:25px}.page-heading p{font-size:12px}
 .card{padding:17px;border-radius:17px}.metrics,.admin-kpis{gap:10px}
 .admin-kpis>.kpi,.metrics>.card{padding:14px;min-height:155px;border-radius:15px}
 .metric-head{font-size:11px;gap:6px}.metric-value{font-size:27px;margin-top:12px}.metric-bottom{font-size:10px;max-width:100%}
 .kpi .glyph,.metrics>.card:has(>.metric-head) .glyph{width:29px;height:29px;flex-basis:29px;border-radius:10px}.kpi .glyph svg{width:16px;height:16px}
 .customer-welcome{align-items:stretch;padding:18px}.plan-glance{min-width:0;width:100%;padding:13px}.customer-welcome h2{font-size:22px}
 input:not([type="checkbox"]):not([type="radio"]),select,textarea{font-size:16px}
 .premium-dialog :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea){font-size:16px}
 dialog.premium-dialog{width:calc(100vw - 20px);max-width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:19px}
 .premium-dialog>.dialog-head{padding:17px;gap:10px}.modal-title{gap:10px}.modal-title>.glyph{width:36px;height:36px;flex-basis:36px;border-radius:12px}
 .premium-dialog .modal-title h2{font-size:19px}.premium-dialog .modal-title .eyebrow{font-size:8px}.premium-dialog>.dialog-body{padding:15px}
 .premium-dialog .field{padding:11px}.dialog-fields{gap:11px}.premium-dialog .dialog-actions{bottom:-16px;padding:14px 0 5px;flex-wrap:wrap}.premium-dialog .dialog-actions>.button{flex:1;min-width:0}
 .premium-dialog .form-grid{grid-template-columns:1fr;gap:11px}
 .contact-picker-heading{align-items:flex-start;flex-direction:column}.recipient-picker{gap:6px}.contact-trigger{font-size:11px!important;padding:9px!important;min-height:44px!important}
 .contact-option{padding:8px;gap:7px}.contact-option .pill{font-size:9px;padding:4px 6px}.contact-option strong{font-size:11px}
 .api-field-grid{grid-template-columns:1fr;gap:0}.api-copy-action{margin-bottom:15px}
 .chart{gap:4px;padding-inline:4px}.chart-col span,.chart-col small{font-size:8px}
 .auth-panel{padding:20px 14px}.auth-card{padding:20px}.auth-card h2{font-size:25px}.auth-tabs .button{font-size:12px}
 .environment-switch{padding:5px 7px 5px 9px}.env-status{font-size:8px}.env-segment button{min-height:28px}
}
@media(max-width:360px){.metrics,.admin-kpis{grid-template-columns:1fr}.metric-head{font-size:12px}.metric-value{font-size:30px}.admin-kpis>.kpi,.metrics>.card{min-height:130px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{.environment-switch{display:none!important}}
/* Preserve semantic state colours inside the alternating summary strip. */
.report-pills>.pill.amber{background:#f59e0b21;border-color:#fbbf2466;color:#fcd34d}
.report-pills>.pill.blue{background:#3b82f621;border-color:#60a5fa66;color:#93c5fd}
.report-pills>.pill.purple{background:#8b5cf621;border-color:#a78bfa66;color:#c4b5fd}
.report-pills>.pill.gray{background:#64748b21;border-color:#94a3b850;color:#cbd5e1}
@media(max-width:640px){.page-heading{align-items:flex-start;flex-direction:column;gap:12px}.page-heading>div{width:100%}.page-heading>.button{align-self:flex-start}.page-heading h1{margin-block:9px}}

/* RanSan TEST visual refresh */
:root { font-size: 16px; }
#brand-mark, .auth-story .brand img { border-radius: 50%; object-fit: contain; }
.auth-card h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.auth-card label, .auth-card input, .auth-card .button { font-size: .94rem; }
.auth-card .small, .auth-links { font-size: .82rem; }
.auth-signup { border-color: #5eead46b; box-shadow: 0 20px 60px #0007, inset 0 1px #5eead442; }
.button.login-action, .auth-tabs .button.login-action { color: #eeeaff; background: #38246a; border-color: #a78bfa75; }
.button.signup-action, .auth-tabs .button.signup-action { color: #c5fff0; background: #153d37; border-color: #5eead46e; }
.auth-tabs .button.selected, .auth-submit { box-shadow: inset 0 -2px currentColor; }
.auth-orbit .orbit-chip { border-radius: 99px; border: 1px solid; font-weight: 650; font-size: clamp(.64rem, 1vw, .85rem); }
.auth-orbit .one { color: #e7dcff; background: #30234f; border-color: #a78bfa70; }
.auth-orbit .two { color: #c0faff; background: #153946; border-color: #67e8f980; }
.auth-orbit .three { color: #ffe2b4; background: #493120; border-color: #fbbf2470; }
.environment-switch .env-segment button.env-test { color: #ffabb6; }
.environment-switch .env-segment button.env-live { color: #a1ffcd; }
.environment-switch .env-segment button.env-test.selected { background: #7a2737; color: #fff0f2; }
.environment-switch .env-segment button.env-live.selected { background: #146142; color: #effff5; }
.environment-switch .env-status.test .dot { background: #fb7185; }
.environment-switch .env-status.live .dot { background: #4ade80; }
.body table, .body .section-head, .body .nav-link, .body .hub-link { font-size: .875rem; }
.table-wrap tbody tr:nth-child(odd) { background: #8b5cf611; }
.table-wrap tbody tr:nth-child(even) { background: #38bdf80c; }
.table-wrap tbody tr:hover { background: #a78bfa23; }
.card > input[type=search] + div { margin-top: 18px; }
.card .actions { gap: 9px; }
.card .actions .button:hover, .auth-tabs .button:hover { filter: brightness(1.25); }
.kpi.tone-pink { --fx-rgb: 244,114,182; --fx-ink:#fbcfe8; --fx-deep:#58283f; }
.admin-kpis > .kpi, .metrics > .kpi, .metrics > .card:has(>.metric-head) {
  min-height: 0; padding: 15px; display: grid; align-content: start; gap: 5px;
  transition: translate .2s, border-color .2s, box-shadow .2s;
}
.admin-kpis > .kpi:hover, .metrics > .card:has(>.metric-head):hover {
  translate: 0 -3px; border-color: rgba(var(--fx-rgb),.65); box-shadow: 0 9px 28px rgba(var(--fx-rgb),.15);
}
.metric-head { align-items: center; flex-direction: row-reverse; justify-content: flex-end; font-size: .83rem; }
.kpi .glyph, .metrics > .card:has(>.metric-head) .glyph { border-radius: 50%; }
.metric-value { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.metric-bottom { width: fit-content; max-width: 100%; padding: 2px 8px; border-radius: 30px; background: rgba(var(--fx-rgb),.16); }
.premium-dialog { border-color: #b69dff66; box-shadow: 0 25px 100px #000b, 0 0 50px #8b5cf625; }
.premium-dialog > .dialog-head { background: linear-gradient(110deg,#33244a,#143138); }
.premium-dialog input:focus-visible, .premium-dialog textarea:focus-visible { outline: 2px solid #a78bfa; }
.widget-options { display:grid; grid-template-columns: repeat(auto-fit,minmax(min(190px,100%),1fr)); gap: 10px; margin: 14px 0; }
.widget-option { display:flex; align-items:center; gap: 8px; border:1px solid #8675a15e; border-radius:12px; padding:9px; cursor:pointer; }
.widget-option:has(:checked) { border-color:#a78bfa; background:#8b5cf620; }
@media (prefers-reduced-motion: reduce) {
  .admin-kpis > .kpi, .metrics > .card { transition:none; }
  .admin-kpis > .kpi:hover, .metrics > .card:hover { translate:none; }
}
.qr-box.pairing-success .glyph { width: 78px; height: 78px; border-radius: 50%; box-shadow: 0 0 36px #34d39938; }
.qr-box.pairing-success .glyph svg { width: 44px; height: 44px; }
.template-layout { display:grid; grid-template-columns: 1.35fr 1fr; gap:16px; }
.template-preview { background: linear-gradient(150deg,#143739,#1a2236); border:1px solid #5eead455; border-radius:22px; padding:15px; min-width:0; }
.template-bubble { overflow-wrap:anywhere; background:#223f3d; border:1px solid #5eead445; border-radius:14px; padding:12px; }
.policy-list .pre { overflow-wrap:anywhere; }
@media(max-width:600px){ .template-layout{grid-template-columns:1fr;} }
.bulk-contacts { max-height: 195px; overflow:auto; display:grid; gap:6px; margin:8px 0 14px; }
.message-breakdown { display:flex; flex-wrap:wrap; align-items:center; gap:18px; }
.message-breakdown svg { width:108px; height:108px; }
.message-breakdown ul { list-style:none; margin:0; padding:0; display:grid; gap:7px; flex:1; }
.message-breakdown li { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.settings-tabs .button:nth-child(3n+1) { color:#ded0ff; }
.settings-tabs .button:nth-child(3n+2) { color:#a6f6e5; }
.settings-tabs .button:nth-child(3n) { color:#ffe2a8; }
.settings-tabs .button:hover { background:#55528050; }
.settings-tabs .button.selected { border-color:currentColor; }
.plan-grid .plan-card:nth-child(3n+1) { border-color:#a78bfa5c; background:linear-gradient(140deg,#352455,#1b202f); }
.plan-grid .plan-card:nth-child(3n+2) { border-color:#5eead45c; background:linear-gradient(140deg,#153e40,#1b202f); }
.plan-grid .plan-card:nth-child(3n) { border-color:#fbbf245c; background:linear-gradient(140deg,#443127,#1b202f); }

/* Billing workspace reference — restrained gradients, readable badges and responsive actions. */
.auth-card h2 { font-size: clamp(1.55rem, 2.5vw, 2.05rem); }
.auth-card label, .auth-card input, .auth-card .button { font-size: .88rem; }
.auth-card .password-field { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; }
.auth-card .password-field input { min-width:0; padding-right:12px; }
.auth-card .password-field button { position:static; margin:0; padding:0 12px; }
.tone-action { --action-ink:#ddd0ff; --action-bg:#362655; --action-edge:#a78bfa75; }
.tone-action.tone-blue { --action-ink:#b8e4ff; --action-bg:#19374f; --action-edge:#60a5fa75; }
.tone-action.tone-green { --action-ink:#acffdf; --action-bg:#163e37; --action-edge:#5eead475; }
.tone-action.tone-red { --action-ink:#ffc6d0; --action-bg:#502535; --action-edge:#fb718575; }
.tone-action.tone-amber { --action-ink:#ffe4ae; --action-bg:#483323; --action-edge:#fbbf2475; }
.button.tone-action { color:var(--action-ink); background:var(--action-bg); border:1px solid var(--action-edge); white-space:nowrap; }
.button.tone-action:is(:hover,:focus-visible,.selected) { box-shadow:inset 0 -2px var(--action-ink); filter:brightness(1.2); }
.table-wrap { overflow-x:auto; max-width:100%; }
.table-wrap td .pill { display:inline-flex; white-space:nowrap; max-width:none; }
.table-wrap td .pill .dot { flex:none; }
.table-wrap td .actions { min-width:max-content; flex-wrap:nowrap; }
.table-wrap tr:nth-child(4n+1) td { background:#8b5cf611; }
.table-wrap tr:nth-child(4n+2) td { background:#38bdf80f; }
.table-wrap tr:nth-child(4n+3) td { background:#14b8a60f; }
.table-wrap tr:nth-child(4n+4) td { background:#fbbf240c; }
.table-wrap tr:hover td { background:#a78bfa24; }
.compose-card, .linking-guide, .profile-card, .token-box { background:linear-gradient(135deg,#302545,#172f3d 65%,#141c31); border-color:#a78bfa55; }
.compose-card .field { padding:10px; border:1px solid #a78bfa28; border-radius:13px; background:#151d32; }
.catalogue-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,175px),1fr)); }
.catalogue-grid .plan-card { display:grid; gap:8px; align-content:start; }
.profile-card > .button { margin:8px 10px 0 0; }
.profile-card .profile-banner { border-bottom:1px solid #a78bfa42; margin-bottom:14px; padding-bottom:14px; }
.linking-guide .timeline { margin:10px 0; padding:10px; border:1px solid #a78bfa30; border-radius:13px; align-items:flex-start; }
.linking-guide .timeline:nth-of-type(even) { background:#14b8a612; }
.chat-select { border-radius:12px; background:#8b5cf614; border:1px solid #a78bfa37; margin-bottom:6px; }
.chat-select:nth-child(even) { background:#14b8a612; border-color:#5eead437; }
.chat-select:hover { border-color:#a78bfa; }
.chat-area { background:linear-gradient(135deg,#24223b,#182f3c); }
.kpi > .tone-action { justify-self:start; margin-top:5px; min-height:30px; padding:4px 10px; font-size:.75rem; }
.auth-card .auth-tabs { gap:10px; }
.linking-guide .timeline > .pill { min-width:68px; flex:0 0 auto; white-space:nowrap; justify-content:center; }
.linking-guide .timeline > div { min-width:0; }
.template-categories { margin:0 0 16px; }
.hub-link.template-child { margin-inline-start:16px; width:calc(100% - 16px); border-inline-start:2px solid #a78bfa50; }

body.reduced-motion *, body.reduced-motion *::before, body.reduced-motion *::after {
  animation-duration: .01ms !important;
  transition-duration: .01ms !important;
  scroll-behavior: auto !important;
}

/* Workspace finishing pass */
.body { display:flex; flex-direction:column; min-height:100vh; }
.body > main { flex:1; width:100%; min-width:0; }
.body.hub-open > main { width:auto; }
.body > .brand-footer { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px; padding:20px 28px 28px; }
.brand-footer > :last-child { text-align:right; }
.brand-footer > a { justify-self:center; }
.topbar { background:linear-gradient(110deg,#151b31,#242043 56%,#132b34); }
.top-actions #logout { background:#49283f; border:1px solid #a76b8c; color:#ffe4f1; font-weight:700; }
.top-actions #user-avatar { background:linear-gradient(145deg,#6241aa,#285b70); border:1px solid #aa93ef; color:white; }
.top-actions :is(#logout,#user-avatar):hover { filter:brightness(1.2); }
.help-topic { border-color:#a78bfa60; background:linear-gradient(145deg,#24233d,#161e2c); }
.help-topic:nth-child(even) { border-color:#2dd4bf60; background:linear-gradient(145deg,#18343a,#17212d); }
.help-topic > .pill { margin-inline:8px; }
.plan-name { display:flex; align-items:center; gap:9px; }
.chat-select[aria-current="true"] { outline:2px solid #a78bfa; outline-offset:-2px; }
.inbox-header { border-bottom:1px solid #6673985c; padding:0 0 12px; }
.bubble.in { background:#163748; border-color:#468899; }
.bubble.out { background:#302853; border-color:#7463a0; }
.chat-message-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:6px; }
.contact-selection { max-height:42vh; overflow:auto; display:grid; gap:8px; }
.contact-selection .widget-option { display:flex; gap:10px; align-items:center; }
.contact-selection small,.phone-top small { display:block; }
.phone-preview { border:5px solid #10272d; border-radius:25px; padding:0; overflow:hidden; max-width:320px; margin:auto; }
.phone-top { display:flex; align-items:center; gap:10px; background:#12493f; padding:12px; color:#ebfff5; }
.phone-thread { min-height:185px; padding:18px 12px; background:radial-gradient(ellipse at top,#29414a,#131e29); }
.phone-thread .template-bubble { background:#164f45; border-radius:13px 3px 13px 13px; overflow-wrap:anywhere; }
.phone-file { color:#baf2df; font-size:12px; overflow-wrap:anywhere; }
@media(max-width:700px) {
  .body > .brand-footer { grid-template-columns:1fr; text-align:center; }
  .brand-footer > :last-child { text-align:center; }
}

/* Footer and catalogue refinements */
#shell:not([hidden]) { --footer-height:48px; flex-direction:column; }
#shell > .body { flex:1; min-height:0; }
#shell > .body > main { min-height:0; }
#shell #sidebar, #shell #hub-nav { bottom:var(--footer-height); }
html:has(#shell:not([hidden])) { scrollbar-gutter:stable; }
body:has(#shell:not([hidden])) .environment-switch { bottom:62px; }
#shell > .brand-footer > span:first-child { text-align:left; }
#shell > .brand-footer { position:sticky; bottom:0; z-index:34; flex:none; box-sizing:border-box; display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); align-items:center; gap:12px; min-height:var(--footer-height); width:100%; padding:8px 20px; background:#121c2b; }
.template-categories { display:flex; flex-wrap:wrap; gap:10px; }
.template-categories > button { white-space:normal; min-width:0; }
.template-categories > .selected { outline:2px solid currentColor; outline-offset:1px; }
.template-card { display:flex; flex-direction:column; align-items:flex-start; gap:9px; min-width:0; }
.template-card-head { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.template-card h3,.template-card p { margin:0; overflow-wrap:anywhere; max-width:100%; }
.template-card > .button { margin-top:auto; }
.messages .bubble { box-sizing:border-box; width:76%; max-width:76%; }
dialog.premium-dialog.catalogue-dialog { width:min(940px,calc(100% - 24px)); max-width:calc(100% - 24px); }
.catalogue-dialog .catalogue-grid { grid-template-columns:repeat(auto-fit,minmax(min(230px,100%),1fr)); }
.catalogue-dialog .catalogue-grid .plan-card { display:grid; gap:12px; padding:20px; border-radius:18px; }
.catalogue-dialog .catalogue-tone-0 { background:linear-gradient(150deg,#302551,#131b2e); }
.catalogue-dialog .catalogue-tone-1 { background:linear-gradient(150deg,#164244,#141e2c); }
.catalogue-dialog .catalogue-tone-2 { background:linear-gradient(150deg,#4a3028,#1d1a2d); }
.catalogue-features { padding-left:17px; margin:0; color:var(--muted); }
.inbox-layout { width:100%; min-width:0; }
.chat-list { display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:8px; min-width:0; overflow-y:auto; scrollbar-gutter:stable; }
.chat-select { box-sizing:border-box; display:grid; justify-items:start; gap:3px; min-width:0; width:100%; margin:0; overflow-wrap:anywhere; }
.chat-select:nth-child(odd) { background:#28233e; border-color:#8870b3; }
.chat-select:nth-child(even) { background:#152e35; border-color:#4a898d; }
.chat-select:hover { filter:brightness(1.15); }
.chat-select > * { min-width:0; max-width:100%; }
.chat-select .pill { margin-top:4px; }
.messages { scrollbar-gutter:stable; }
.inbox-header .grow { min-width:0; overflow-wrap:anywhere; }
.template-support > h3 { margin-top:0; }
.poll-preview { color:#c4ffe7; padding-inline-start:22px; }
@media(max-width:700px) {
 #shell:not([hidden]) { --footer-height:78px; }
 #shell > .brand-footer { grid-template-columns:1fr; gap:3px; text-align:center; }
 body:has(#shell:not([hidden])) .environment-switch { bottom:90px; }
 #shell > .brand-footer > span:first-child { text-align:center; }
 .messages .bubble { width:90%; max-width:90%; }
}

@media print { #shell > .brand-footer { position:static; } }

/* Hub tools share the same available workspace width. */
.body.hub-open > main { width:calc(100% - 213px); max-width:none; }
@media (max-width:850px) { .body.hub-open > main { width:100%; } }

.messaging-kpis { grid-template-columns:repeat(4,minmax(0,1fr)); }
.messaging-kpis progress { display:block; width:100%; height:8px; margin:0 0 8px; accent-color:#3dd8af; }
@media (max-width:640px) { .body.hub-open .messaging-kpis { grid-template-columns:1fr; } }

.template-grid { align-items:stretch; }
.template-grid .template-card { padding:0; align-items:stretch; gap:0; overflow:hidden; border-top:4px solid #36bc83; }
.template-card-head,.template-card-message,.template-card-foot { padding:14px; }
.template-card-head h3 { margin-bottom:5px; }
.template-card-message { flex:1; background:#727d9230; }
.template-card-message p { max-height:8em; overflow:auto; padding:12px; background:#17584437; border-inline-start:3px solid #36bc83; border-radius:8px; }
.template-card-foot { align-items:center; justify-content:space-between; flex-wrap:wrap; border-top:1px solid var(--line); font-size:.75rem; }
.template-card-foot .actions { margin:0; }
.template-dialog { width:min(850px,calc(100% - 24px)); }
.template-phone-figure { width:min(100%,255px); margin:0 auto; text-align:center; }
.template-phone-figure figcaption { margin-top:10px; color:var(--muted); font-size:.75rem; }
.template-phone { position:relative; display:grid; grid-template-rows:auto minmax(280px,1fr) auto; overflow:hidden; border:6px solid #303338; border-radius:30px; background:#eee8de; color:#132428; box-shadow:0 18px 35px #0004; text-align:start; }
.template-phone::before { content:""; position:absolute; top:0; left:25%; width:50%; height:12px; background:#303338; border-radius:0 0 12px 12px; }
.template-phone-head { display:flex; gap:8px; align-items:center; padding:15px 9px 8px; background:#087c68; color:white; }
.template-phone-head .glyph { background:#ecfff8; color:#087c68; border-radius:50%; }
.template-phone-head small { display:block; opacity:.85; }
.template-phone-chat { padding:8px; background-color:#e9e2d8; background-image:radial-gradient(circle at center,#af9e8533 1px,transparent 2px),repeating-linear-gradient(35deg,transparent 0 22px,#b5a58e18 23px 24px,transparent 25px 45px); background-size:18px 18px,auto; }
.template-phone-bubble { max-width:95%; border-radius:3px 11px 11px 11px; padding:8px; background:#fff; box-shadow:0 1px 3px #0002; font-size:.8rem; overflow-wrap:anywhere; }
.template-phone-bubble p { margin:0; max-height:12em; overflow:auto; }
.template-phone-time { display:block; text-align:end; color:#566873; }
.template-phone-options { padding-inline-start:18px; color:#0b6857; }
.template-phone-media img { max-width:100%; max-height:150px; object-fit:contain; border-radius:7px; }
.template-phone-media a { color:#075c50; }
.template-phone-compose { display:flex; align-items:center; gap:8px; padding:8px; background:#eef1f3; color:#0b6c5a; }
.template-phone-compose span { flex:1; padding:4px 8px; background:white; color:#596a73; border-radius:16px; font-size:.72rem; }

.catalogue-periods { display:flex; justify-content:center; flex-wrap:wrap; gap:5px; width:fit-content; max-width:100%; margin:0 auto 18px; padding:5px; border:1px solid #2dd4bf50; border-radius:24px; background:#1c6f5f25; }
.catalogue-periods .button { border-radius:19px; }
.catalogue-periods .button[aria-pressed=true] { background:#197a62; color:white; }
.catalogue-switcher .catalogue-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); align-items:stretch; }
.catalogue-switcher .plan-card { display:grid; grid-template-rows:auto auto 1fr auto; gap:13px; padding:18px; border:1px solid var(--line); border-top:4px solid #4ad4ae; }
.catalogue-switcher .catalogue-tone-0 { background:linear-gradient(155deg,#302551,#131b2e); }
.catalogue-switcher .catalogue-tone-1 { background:linear-gradient(155deg,#164244,#141e2c); }
.catalogue-switcher .catalogue-tone-2 { background:linear-gradient(155deg,#4a3028,#1d1a2d); }
.catalogue-card-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.catalogue-card-head h3 { margin:0; overflow-wrap:anywhere; }
.catalogue-switcher .plan-price small { display:inline-block; font-size:.8rem; color:var(--muted); }
.catalogue-switcher .catalogue-features { list-style:none; padding:0; display:grid; align-content:start; gap:10px; }
.catalogue-features li { display:flex; gap:7px; align-items:baseline; }
.catalogue-features li > span { color:#63e4b9; }
.catalogue-actions { margin-top:0; }

#shell > .brand-footer { background:linear-gradient(105deg,#171d34,#122e36 50%,#262034); }
.brand-footer .footer-badge { width:fit-content; max-width:100%; border:1px solid; border-radius:999px; padding:4px 10px; line-height:1.3; }
.brand-footer .footer-copyright { color:#dcd0ff; background:#442e6b; border-color:#7654a7; }
.brand-footer .footer-site { color:#bcf8eb; background:#164c45; border-color:#328676; }
.brand-footer .footer-credit { justify-self:end; color:#ffddad; background:#573d33; border-color:#906451; }
.brand-footer .footer-site:hover { background:#21695e; }
.catalogue-features li { align-items:center; }
.catalogue-features .glyph { flex:none; width:28px; height:28px; }
.catalogue-features .glyph svg { width:15px; height:15px; }
.bot-nav-label { display:flex; gap:6px; align-items:center; }
.bot-nav-label .glyph { width:25px; height:25px; }
.bot-nav-label .glyph svg { width:14px; height:14px; }
.bot-banner { background:linear-gradient(115deg,#3e3088,#334a86,#345a67); }
.bot-banner .page-heading { margin:0; }
@media(max-width:700px) {
  #shell:not([hidden]) { --footer-height:86px; }
  #shell > .brand-footer { padding-block:4px; }
  .brand-footer .footer-badge { justify-self:center; padding-block:3px; }
  body:has(#shell:not([hidden])) .environment-switch { bottom:98px; }
}

.bot-workspace { display:grid; grid-template-columns:minmax(0,1fr) minmax(290px,390px); gap:18px; align-items:start; }
.bot-side .bot-presets { margin-top:14px; }
.bot-side .dialog-fields { max-height:none; }
.bot-side .dialog-actions { flex-wrap:wrap; }
.bot-workspace > section > .grid-three { margin-top:12px; }
.menu-builder { display:grid; gap:8px; }
.menu-builder-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:center; }
.menu-builder > button { justify-self:start; }
.interactive-menu-preview { margin-top:8px; border-top:1px solid #a6d7c8; color:#075c50; }
.interactive-menu-preview summary { cursor:pointer; padding:8px 4px; text-align:center; font-weight:700; }
.menu-preview-choices { display:grid; }
.menu-preview-choices .menu-preview-action { min-height:30px; border:0; border-bottom:1px solid #d7ede6; border-radius:0; background:#fff; color:#075c50; font-size:.75rem; white-space:normal; overflow-wrap:anywhere; }
.menu-preview-choices .menu-preview-action:hover,.menu-preview-choices .menu-preview-action:focus-visible { background:#daf4ea; }
.menu-preview-result { display:block; margin-top:6px; color:#406258; }
@media(max-width:1050px) { .bot-workspace { grid-template-columns:1fr; } }
