:root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  color: #22272d;
  background: #f7f8fa;
  font-synthesis: none;
  --muted: #66707b;
  --border: #e1e5e9;
  --green: #23704f;
  --green-soft: #edf6f0;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
a {
  touch-action: manipulation;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
main:focus-visible {
  outline: 3px solid #71a88d;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-definitions {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  z-index: 100;
  background: white;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.skip-link:focus {
  transform: translateY(0);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.35px;
  white-space: nowrap;
}
.brand img {
  flex-shrink: 0;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
  transition:
    background 0.15s,
    border-color 0.15s;
}
.button-primary {
  color: white;
  background: var(--green);
  border-color: var(--green);
}
.button-primary:hover:not(:disabled) {
  background: #195a3e;
  border-color: #195a3e;
}
.button-secondary {
  background: white;
  color: #39434c;
  border-color: #d4dae0;
}
.button-secondary:hover:not(:disabled) {
  background: #f5f6f8;
  border-color: #bcc5ce;
}
.button svg {
  width: 16px;
  height: 16px;
}
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #58636e;
  font-size: 13px;
  line-height: 1.5;
  font-weight: 500;
  white-space: nowrap;
}
.text-button:hover:not(:disabled) {
  color: #20272d;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.danger {
  color: #a4483f;
}
.danger:hover:not(:disabled) {
  color: #862d25;
}
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #66707b;
  background: transparent;
  font-size: 24px;
  line-height: 1;
}
.icon-button.bordered {
  border-color: var(--border);
  background: white;
}
.icon-button:hover:not(:disabled) {
  color: #22272d;
  background: #f1f3f5;
}
input,
select {
  color: #303942;
}
input:not([type='radio']),
select {
  min-height: 40px;
  border: 1px solid #cfd6dd;
  border-radius: 6px;
  padding: 8px 11px;
  background: white;
  font-size: 14px;
  line-height: 1.5;
}
input::placeholder {
  color: #66707b;
}
select {
  cursor: pointer;
}
.form-error {
  color: #a43930 !important;
  min-height: 20px;
  font-size: 13px;
  line-height: 1.5;
}

.login-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.login-card {
  width: 100%;
  max-width: 390px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  box-shadow: 0 4px 18px #1b273005;
}
.login-card .brand {
  margin-bottom: 35px;
}
.login-form h1 {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin: 0 0 8px;
}
.login-form > p {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.login-form label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
}
.login-form input {
  width: 100%;
}
.login-form .form-error {
  margin: 8px 0;
}
.login-form > .button {
  width: 100%;
}
.demo-login {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 18px;
  margin-top: 22px;
  border-top: 1px solid var(--border);
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.demo-login strong {
  font-weight: 600;
  color: #46515b;
}
.demo-login .text-button {
  font-size: 12px;
  padding-left: 0;
}

.shell {
  min-height: 100vh;
}
.app-header {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 max(28px, calc((100vw - 1280px) / 2));
  border-bottom: 1px solid var(--border);
  background: white;
}
.app-header nav {
  display: flex;
  align-items: stretch;
  gap: 26px;
}
.nav-link {
  display: flex;
  align-items: center;
  min-height: 62px;
  color: #68727d;
  font-size: 13px;
}
.nav-link:hover {
  color: #22272d;
}
.header-actions {
  margin-left: auto;
  display: flex;
  gap: 20px;
}
.header-actions .text-button {
  font-size: 13px;
}
.page {
  max-width: 1336px;
  padding: 28px 28px 40px;
  margin: 0 auto;
}
.page-heading {
  margin: 0 0 20px;
}
.page-heading h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.7px;
  line-height: 1.3;
}
.nav-link[aria-current='page'] {
  color: #22272d;
  font-weight: 600;
}
.numbers-heading,
.detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.numbers-heading h1 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.page-heading p {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}
.numbers-toolbar {
  padding: 18px 20px;
}
.numbers-toolbar .search {
  max-width: 360px;
  margin: 0;
}
.numbers-columns,
.number-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.7fr) minmax(120px, 1fr) 100px 90px 145px 70px;
  gap: 18px;
  align-items: center;
  padding: 15px 20px;
}
.numbers-columns {
  border-top: 1px solid #edf0f3;
  border-bottom: 1px solid #edf0f3;
  background: #fafbfc;
  font-size: 12px;
  color: var(--muted);
}
.numbers-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.number-list-item + .number-list-item {
  border-top: 1px solid #edf0f3;
}
.number-row {
  min-height: 88px;
  transition: background 0.15s;
}
.number-row:hover {
  background: #fafbfc;
}
.number-row:focus-visible {
  outline-offset: -3px;
}
.number-identity {
  min-width: 0;
}
.number-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.number-status {
  justify-self: start;
}
.number-activity {
  display: contents;
}
.number-stat {
  min-width: 0;
}
.number-stat-value {
  color: #46515c;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
.number-stat-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.number-last-message .number-stat-value {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.number-open {
  justify-self: end;
  color: var(--green);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.numbers-card .empty-state {
  min-height: 240px;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  margin: -7px 0 12px;
  color: var(--muted);
  font-size: 13px;
}
.back-link:hover {
  color: #22272d;
}
.detail-heading {
  align-items: flex-start;
}
.detail-heading h1 {
  overflow-wrap: anywhere;
}
.detail-heading h1:focus-visible {
  outline: none;
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
}
#numbers-error,
#detail-load-error {
  justify-content: space-between;
}
#numbers-title {
  outline: none;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.connection-card {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 20px 22px;
  margin-bottom: 22px;
}
.connection-copy {
  flex: 1;
  min-width: 0;
}
.connection-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.2px;
  line-height: 1.4;
}
.connection-copy > p {
  margin: 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.badge > span,
.live-label > span {
  width: 6px;
  height: 6px;
  background: currentColor;
  border-radius: 50%;
  flex-shrink: 0;
}
.badge-neutral {
  background: #f0f2f4;
  color: #697480;
}
.badge-green {
  background: var(--green-soft);
  color: #216c4c;
}
.badge-amber {
  background: #fff6e5;
  color: #91691f;
}
.badge-red {
  background: #fcf0ee;
  color: #ad473b;
}
.pairing-options {
  border: 0;
  padding: 0;
  margin: 18px 0 0;
  min-width: 0;
  max-width: 360px;
}
.pairing-options legend {
  margin-bottom: 9px;
  padding: 0;
  font-size: 12px;
  color: var(--muted);
}
.pairing-methods {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.pairing-methods label {
  display: flex;
  align-items: center;
  min-height: 28px;
  gap: 7px;
  font-size: 13px;
  cursor: pointer;
}
.pairing-methods input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}
.pairing-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
#account-phone-number {
  font-size: 16px;
}
input[readonly] {
  background: #f7f8fa;
  color: #46515c;
}
.phone-number-field {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  margin-top: 14px;
}
.phone-number-field label {
  font-size: 13px;
  font-weight: 500;
}
.phone-number-field > span {
  font-size: 12px;
  color: var(--muted);
}
.connection-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 18px;
}
.connection-card[data-phase='connected'] .connection-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 24px;
}
.connection-card[data-phase='connected'] .connection-heading,
.connection-card[data-phase='connected'] #connection-detail {
  grid-column: 1;
}
.connection-card[data-phase='connected'] .connection-actions {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: center;
  margin: 0;
}
.pairing-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 260px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}
.pairing-area > img {
  width: 200px;
  height: 200px;
  object-fit: contain;
  background: white;
}
.qr-caption {
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.pairing-code-panel {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}
.pairing-code-label {
  font-size: 12px;
  color: var(--muted);
}
.pairing-code-panel output {
  font:
    600 28px/1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    monospace;
  letter-spacing: 1px;
  color: #273b31;
  white-space: nowrap;
}
.pairing-code-panel p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
  color: var(--muted);
}
#pairing-code-timeout {
  font-size: 12px;
  color: #56616b;
  font-variant-numeric: tabular-nums;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.6fr);
  align-items: stretch;
  gap: 20px;
}
.groups-card,
.preview-card {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  scroll-margin-top: 20px;
}
.card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 20px 16px;
}
.card-heading h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-heading p {
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
}
.count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 21px;
  padding: 0 6px;
  border-radius: 4px;
  background: #f0f2f4;
  color: #68727d;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 20px 16px;
  padding: 0 10px;
  border: 1px solid #d6dce3;
  border-radius: 6px;
  color: #828b95;
}
.search svg {
  width: 16px;
  height: 16px;
}
.search input:not([type='radio']) {
  border: 0;
  padding: 7px 0;
  min-height: 36px;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 13px;
}
.search:focus-within {
  outline: 3px solid #71a88d;
  outline-offset: 3px;
}
.list-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-top: 1px solid #eef0f3;
  border-bottom: 1px solid #eef0f3;
  background: #fafbfc;
  font-size: 12px;
  color: #66707b;
}
.groups-list {
  max-height: 480px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px;
}
.group-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 0;
  border-bottom: 1px solid #edf0f3;
}
.group-row:last-child {
  border-bottom: 0;
}
.group-details {
  flex: 1;
  min-width: 0;
}
.group-details strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-details > span {
  display: block;
  margin-top: 5px;
  color: #66707b;
  font-size: 12px;
  line-height: 1.5;
}
.group-details .listening-text {
  color: #876c32;
}
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 40px;
  height: 32px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 6px;
}
.toggle:before {
  content: '';
  position: absolute;
  width: 34px;
  height: 20px;
  right: 0;
  border-radius: 12px;
  background: #d2d8de;
  transition: background 0.15s;
}
.toggle:after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  right: 17px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 2px #0002;
  transition: transform 0.15s;
}
.toggle[aria-checked='true']:before {
  background: var(--green);
}
.toggle[aria-checked='true']:after {
  transform: translateX(14px);
}
.toggle:disabled {
  opacity: 0.45;
}
.card-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 12px 20px;
  color: #66707b;
  font-size: 12px;
  line-height: 1.6;
  background: #fcfcfd;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  min-height: 190px;
  padding: 36px 25px;
}
.empty-state strong {
  font-size: 14px;
  font-weight: 600;
  color: #53606b;
  line-height: 1.5;
}
.empty-state p {
  max-width: 300px;
  font-size: 13px;
  line-height: 1.7;
  color: #66707b;
  margin: 8px 0 0;
}
.preview-empty {
  min-height: 264px;
}
.preview-empty .button {
  margin-top: 18px;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px 14px;
  border-bottom: 1px solid #edf0f3;
}
.preview-toolbar select {
  min-width: 0;
  max-width: 65%;
  min-height: 36px;
  font-size: 13px;
  padding: 6px 9px;
}
.preview-toolbar .text-button {
  font-size: 12px;
}
.live-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #66707b;
  white-space: nowrap;
}
.live-label.is-live {
  color: var(--green);
}
.messages-list {
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px;
}
.message-row {
  display: flex;
  gap: 12px;
  padding: 19px 0;
  border-bottom: 1px solid #edf0f3;
}
.message-row:last-child {
  border-bottom: 0;
}
.sender-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f0f2f5;
  color: #66707b;
  font-size: 10px;
  font-weight: 600;
}
.message-content {
  min-width: 0;
  flex: 1;
}
.message-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.message-meta strong {
  font-size: 13px;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.message-meta time {
  color: #66707b;
  font-size: 11px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.message-group {
  display: block;
  color: #66707b;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 4px;
  overflow-wrap: anywhere;
}
.message-text {
  color: #46515c;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 9px 0 0;
}
.message-text:empty {
  display: none;
}
.attachment-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfc;
}
.attachment-card > div {
  min-width: 0;
}
.attachment-card strong {
  display: block;
  font-size: 13px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.attachment-card span {
  display: block;
  color: #66707b;
  font-size: 11px;
  line-height: 1.5;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.attachment-card .text-button {
  flex-shrink: 0;
  color: var(--green);
  font-size: 12px;
}
.demo-files {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 20px;
  margin-bottom: 12px;
  background: #f6f8fa;
  color: #66707b;
  font-size: 12px;
}
.demo-files .text-button {
  font-size: 12px;
  min-height: 30px;
}
.demo-banner,
.stream-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #dbe2e8;
  border-radius: 6px;
  padding: 10px 13px;
  margin-bottom: 22px;
  background: #f0f3f6;
  color: #66717c;
  font-size: 12px;
  line-height: 1.6;
}
.demo-banner strong {
  font-weight: 600;
  color: #4f5c68;
}
.stream-banner {
  border-color: #efdfb8;
  color: #886522;
  background: #fff9ed;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 18px;
  border-radius: 7px;
  background: #293a31;
  color: white;
  box-shadow: 0 6px 24px #15202520;
  font-size: 13px;
  line-height: 1.6;
  z-index: 100;
}
.toast.error {
  background: #883d35;
}

dialog {
  width: 460px;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 24px;
  border: 1px solid #dce1e6;
  border-radius: 10px;
  box-shadow: 0 16px 80px #18253125;
  color: #303942;
}
dialog::backdrop {
  background: #18253166;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.dialog-heading h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
dialog p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}
dialog ol {
  padding-left: 21px;
  margin: 0 0 20px;
  font-size: 13px;
  line-height: 1.75;
}
dialog li {
  padding-left: 3px;
  margin: 14px 0;
}
dialog strong {
  font-weight: 600;
}
dialog > .button {
  margin-top: 8px;
}
#account-form > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}
#account-form > input {
  width: 100%;
}
#account-form > p {
  margin: 10px 0 0;
}
#account-form > .button {
  margin-top: 14px;
}
.file-dialog {
  width: min(900px, 94vw);
  max-width: 94vw;
}
.file-dialog .dialog-heading {
  margin-bottom: 8px;
}
.file-dialog h2 {
  overflow-wrap: anywhere;
  min-width: 0;
}
#file-status {
  font-size: 13px;
  margin: 0 0 12px;
}
.file-stage {
  max-height: 62vh;
  overflow: auto;
  background: #f0f2f5;
  border: 1px solid #e1e5e9;
  border-radius: 6px;
  text-align: center;
  margin: 14px 0;
}
.file-stage:has(canvas[hidden]):has(img[hidden]) {
  display: none;
}
.file-stage canvas {
  max-width: 100%;
  height: auto;
  background: white;
  vertical-align: middle;
}
.file-stage img {
  max-width: 100%;
  max-height: 60vh;
  object-fit: contain;
  vertical-align: middle;
}
.pdf-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-top: 5px;
  font-size: 13px;
}
#pdf-page {
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (min-width: 1600px) {
  .page {
    padding-top: 34px;
  }
  .groups-card,
  .preview-card {
    min-height: 500px;
  }
}
@media (max-width: 1050px) {
  .app-header {
    padding: 0 24px;
  }
  .page {
    padding: 26px 24px 32px;
  }
  .workspace-grid {
    grid-template-columns: minmax(280px, 1fr) minmax(0, 1.4fr);
    gap: 18px;
  }
  .card-heading,
  .preview-toolbar {
    padding-left: 18px;
    padding-right: 18px;
  }
  .groups-list,
  .messages-list {
    padding-left: 18px;
    padding-right: 18px;
  }
  .search {
    margin-left: 18px;
    margin-right: 18px;
  }
  .attachment-card {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 4px;
  }
}
@media (max-width: 1000px) {
  .numbers-columns,
  .number-row {
    grid-template-columns: minmax(150px, 1.5fr) minmax(110px, 1fr) 85px 75px 120px 60px;
    gap: 12px;
  }
}
@media (max-width: 900px) {
  .numbers-columns {
    display: none;
  }
  .numbers-toolbar {
    border-bottom: 1px solid var(--border);
  }
  .number-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 17px 20px;
    padding: 20px;
  }
  .number-status {
    justify-self: end;
    align-self: start;
  }
  .number-activity {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 16px;
    grid-column: 1 / -1;
  }
  .number-stat-label {
    position: static;
    display: block;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
  }
  .number-stat-value {
    font-size: 14px;
  }
  .number-open {
    grid-column: 1 / -1;
  }
}
@media (max-width: 760px) {
  .app-header {
    gap: 24px;
    min-height: 58px;
    padding: 0 20px;
  }
  .nav-link {
    min-height: 58px;
  }
  .app-header nav {
    gap: 18px;
  }
  .header-actions {
    gap: 14px;
  }
  .page {
    padding: 24px 20px 30px;
  }
  .connection-card {
    padding: 18px 20px;
    gap: 20px;
  }
  .connection-card[data-phase='connected'] .connection-copy {
    display: block;
  }
  .connection-card[data-phase='connected'] .connection-actions {
    margin-top: 16px;
  }
  .pairing-area {
    width: 230px;
    padding-left: 20px;
  }
  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .groups-card,
  .preview-card {
    min-height: 350px;
  }
  .groups-list {
    max-height: 360px;
  }
  .messages-list {
    max-height: 580px;
  }
  .preview-empty {
    min-height: 230px;
  }
  .attachment-card {
    align-items: center;
    flex-wrap: nowrap;
    gap: 16px;
  }
}
@media (max-width: 520px) {
  .numbers-heading,
  .detail-heading {
    gap: 16px;
  }
  .numbers-heading > div {
    min-width: 0;
  }
  .numbers-heading .button {
    flex-shrink: 0;
  }
  .numbers-heading .count {
    font-size: 12px;
  }
  .numbers-toolbar {
    padding: 16px;
  }
  .numbers-toolbar .search {
    max-width: none;
  }
  .number-row {
    padding: 18px 16px;
    gap: 16px;
  }
  .number-activity {
    grid-template-columns: 0.9fr 0.8fr 1.3fr;
    gap: 12px;
  }
  .number-status .badge {
    padding: 3px 6px;
    font-size: 11px;
  }
  .number-stat-label {
    font-size: 11px;
  }
  .number-open {
    font-size: 13px;
  }
  .detail-actions {
    gap: 12px;
  }

  input:not([type='radio']),
  select,
  .search input:not([type='radio']),
  .preview-toolbar select {
    font-size: 16px;
  }
  .app-header {
    padding: 13px 16px 0;
    min-height: 0;
    flex-wrap: wrap;
    gap: 0;
  }
  .app-header .brand {
    font-size: 15px;
  }
  .app-header .brand img {
    width: 26px;
    height: 26px;
  }
  .header-actions {
    gap: 16px;
  }
  .header-actions .text-button {
    font-size: 12px;
  }
  .app-header nav {
    width: 100%;
    order: 3;
    gap: 24px;
    margin-top: 5px;
  }
  .nav-link {
    min-height: 43px;
    font-size: 13px;
  }
  .page {
    padding: 22px 16px 28px;
  }
  .page-heading {
    margin-bottom: 18px;
  }
  .page-heading h1 {
    font-size: 22px;
  }
  .connection-card {
    flex-direction: column;
    align-items: stretch;
    padding: 18px;
    margin-bottom: 18px;
  }
  .connection-heading {
    gap: 10px;
  }
  .connection-actions {
    gap: 16px;
  }
  .pairing-area {
    width: 100%;
    padding: 20px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .pairing-code-panel {
    max-width: 260px;
  }
  .qr-caption {
    max-width: 260px;
  }
  .workspace-grid {
    gap: 18px;
  }
  .card-heading {
    padding-top: 17px;
  }
  .card-heading h2 {
    font-size: 15px;
  }
  .card-heading p {
    font-size: 12px;
  }
  .preview-toolbar {
    gap: 8px;
  }
  .preview-toolbar select {
    max-width: 62%;
  }
  .preview-toolbar .text-button {
    font-size: 12px;
  }
  .card-footer {
    padding: 11px 18px;
    font-size: 11px;
  }
  .message-row {
    gap: 9px;
  }
  .sender-avatar {
    width: 26px;
    height: 26px;
    font-size: 9px;
  }
  .message-meta {
    gap: 10px;
  }
  .message-text {
    font-size: 13px;
  }
  .attachment-card {
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 12px;
  }
  .attachment-card .text-button {
    min-height: 30px;
  }
  .demo-banner {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 20px;
  }
  dialog {
    padding: 20px;
  }
  .dialog-heading {
    gap: 12px;
  }
  .dialog-heading h2 {
    font-size: 17px;
  }
  .pdf-controls {
    gap: 8px;
  }
  .login-card {
    padding: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
