:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef3f8;
  --ink: #172033;
  --ink-soft: #3a475c;
  --muted: #65748b;
  --line: #dce4ee;
  --line-strong: #c7d2df;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --warm: #b45309;
  --warm-soft: #fff7ed;
  --danger: #c02626;
  --danger-soft: #fef2f2;
  --success: #047857;
  --success-soft: #ecfdf5;
  --shadow-sm: 0 1px 2px rgba(23, 32, 51, 0.05);
  --shadow-md: 0 8px 22px rgba(23, 32, 51, 0.09);
  --radius: 8px;
  --radius-sm: 6px;
  --font-sans: "Segoe UI Variable Text", "Segoe UI", "Noto Sans", Tahoma, Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.2);
  --motion-fast: 160ms;
  --motion-base: 220ms;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: none;
}

.login-page {
  display: flex;
  flex-direction: column;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.15;
  margin-bottom: 16px;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.25;
}

h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.muted {
  color: var(--muted);
}

.page-credit {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  padding: 10px 24px;
  color: var(--muted);
  background: rgba(245, 247, 250, 0.92);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  text-align: right;
  backdrop-filter: blur(10px);
}

.page-credit span {
  margin-right: 6px;
  color: var(--accent-strong);
  font-weight: 800;
}

.app-topbar {
  position: sticky;
  top: 38px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
}

.app-topbar__brand,
.app-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-topbar__brand {
  min-width: 0;
}

.app-topbar__brand strong {
  font-size: 1.05rem;
}

.app-topbar__brand .muted {
  font-size: 13px;
}

.page-shell,
.stats-shell {
  position: relative;
  z-index: 1;
}

.page-shell {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 24px 28px;
}

.stats-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(100%, 1320px);
  margin: 0 auto;
  padding: 20px 24px 28px;
}

.login-shell {
  width: min(100%, 520px);
  margin: auto;
  padding: 24px;
}

.sidebar,
.main-content {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

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

.brand-card,
.panel {
  padding: 20px;
}

.brand-card {
  border-top: 4px solid var(--accent);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  margin-bottom: 14px;
  border: 1px solid #bfe3e1;
  border-radius: var(--radius-sm);
  color: var(--accent-strong);
  background: var(--accent-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.hero-action-btn {
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
}

.login-qr-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
}

.login-qr-preview[hidden] {
  display: none;
}

.login-qr-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.login-qr-preview__head strong,
.login-qr-preview__head span,
.login-qr-preview p {
  overflow-wrap: anywhere;
}

.login-qr-preview__head span,
.login-qr-preview p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.login-qr-preview__image {
  display: block;
  width: min(100%, 220px);
  height: auto;
  aspect-ratio: 1;
  margin: 0 auto;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(180deg, #ffffff, #f8fbfc);
}

.hero-copy {
  min-width: 0;
  max-width: 560px;
}

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

.summary-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 118px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.summary-block span {
  color: var(--muted);
  font-size: 12px;
}

.panel-head,
.toolbar,
.session-head,
.session-actions,
.account-meta,
.history-head,
.history-meta,
.history-actions,
.stats-summary {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-head {
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-head > div,
.history-head > strong,
.stats-card > strong,
.contact-body,
.account-main {
  min-width: 0;
}

.panel-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(380px, 1.1fr);
  gap: 20px;
  align-items: start;
}

.content-grid > .panel,
.stats-grid > section {
  min-width: 0;
}

.content-grid > .panel:first-child {
  display: flex;
  flex-direction: column;
  max-height: 860px;
}

#contacts-list {
  flex: 1;
  min-height: 0;
  max-height: 720px;
  overflow: auto;
  padding-right: 4px;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.list-results-info,
.hint-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.page-size-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.page-size-control .select-input {
  width: 92px;
}

.primary-btn,
.ghost-btn,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease,
    opacity 0.16s ease;
}

.primary-btn {
  color: white;
  background: var(--accent);
  border-color: var(--accent-strong);
  box-shadow: 0 8px 16px rgba(4, 125, 121, 0.18);
}

.primary-btn:hover {
  background: var(--accent-strong);
  box-shadow: 0 10px 18px rgba(4, 125, 121, 0.22);
  transform: translateY(-1px);
}

.ghost-btn,
.ghost-link {
  color: var(--ink-soft);
  background: var(--surface);
  border-color: var(--line-strong);
}

.ghost-btn:hover,
.ghost-link:hover {
  color: var(--accent-strong);
  border-color: #9ed3d0;
  background: var(--accent-soft);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.danger-btn {
  color: white;
  background: var(--danger);
  border-color: #8c1b13;
}

.danger-btn:hover {
  color: white;
  background: #8c1b13;
  border-color: #72150f;
  box-shadow: 0 10px 18px rgba(180, 35, 24, 0.18);
}

button:disabled,
.primary-btn:disabled,
.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.ghost-link:focus-visible,
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.account-item:focus-visible,
.contact-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(4, 125, 121, 0.22);
  outline-offset: 2px;
}

.search-input,
.select-input,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  padding: 10px 12px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.search-input:focus,
.select-input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(4, 125, 121, 0.14);
  background: white;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 800;
}

.message-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.auth-form {
  margin-top: 18px;
}

.auth-form .primary-btn {
  order: 3;
}

.mfa-panel {
  display: grid;
  order: 2;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.74);
}

.mfa-enroll {
  display: grid;
  gap: 10px;
}

.direct-recipient-section {
  margin-top: 10px;
  padding: 16px;
  border: 1px solid #bfe3e1;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.direct-recipient-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.toggle-form {
  gap: 12px;
}

.toggle-form label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 700;
}

.inline-check {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 700;
}

.zbs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.zbs-sample-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  margin-top: 14px;
}

.json-input {
  min-height: 220px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.5;
}

.json-preview {
  min-height: 160px;
  max-height: 420px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: #0f172a;
  color: #e5eefc;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.zbs-cache-item {
  grid-template-columns: minmax(0, 1fr);
}

.stack-list,
.contact-list,
.stats-list,
.stats-inner-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 112px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: var(--surface-soft);
  text-align: center;
  line-height: 1.5;
}

.account-item,
.contact-item,
.history-item,
.stats-card,
.session-card,
.recipient-card,
.status-box {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.account-item,
.contact-item {
  width: 100%;
  text-align: left;
  padding: 13px 14px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.account-item:hover,
.contact-item:hover,
.stats-card:hover,
.history-item:hover {
  border-color: #b8c5d4;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.account-item.active,
.contact-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(4, 125, 121, 0.08);
}

.account-main,
.contact-body,
.summary-block,
.recipient-card {
  display: flex;
  flex-direction: column;
}

.account-main strong,
.contact-body strong,
.history-head strong,
.stats-card strong {
  overflow-wrap: anywhere;
}

.account-main span,
.account-meta,
.contact-body span,
.contact-body small,
.recipient-card span,
.recipient-card small {
  color: var(--muted);
}

.account-meta {
  margin-top: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.contact-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.contact-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--accent-strong);
  background: #dff4f1;
  border: 1px solid #bfe3e1;
  font-size: 14px;
  font-weight: 800;
}

.recipient-card,
.status-box,
.session-card,
.stats-card,
.history-item {
  padding: 14px;
}

.history-item.is-hidden-history {
  background: var(--surface-soft);
  border-style: dashed;
  opacity: 0.82;
}

.recipient-card {
  gap: 6px;
}

.status-box {
  color: var(--ink-soft);
  font-weight: 700;
  line-height: 1.5;
}

.status-box[data-type="success"],
.status-box.success {
  color: var(--success);
  background: var(--success-soft);
  border-color: #bde8cd;
}

.status-box[data-type="error"] {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #ffc7c0;
}

.status-box[data-type="warning"] {
  color: #8a5a00;
  background: #fff4d6;
  border-color: #f5d48a;
}

.status-box[data-type="info"],
.status-box.info {
  color: #185abc;
  background: var(--blue-soft);
  border-color: #c7d7fe;
}

.card-form,
.history-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.history-head,
.session-head,
.history-actions,
.session-actions {
  justify-content: space-between;
}

.history-meta,
.stats-summary,
.account-meta {
  flex-wrap: wrap;
}

.history-meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.history-content {
  margin-top: 10px;
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.55;
}

.history-actions,
.session-actions {
  margin-top: 12px;
}

.history-button-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.session-note,
.error-line {
  margin-top: 10px;
}

.error-line {
  color: var(--danger);
  font-weight: 700;
}

.qr-image {
  display: block;
  width: min(100%, 240px);
  margin: 14px auto 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
}

.pagination-bar,
.pagination-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination-bar {
  justify-content: center;
  margin-top: 14px;
}

.pagination-panel {
  justify-content: space-between;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.pagination-summary {
  color: var(--muted);
  font-size: 13px;
}

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

.pagination-btn,
.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
}

.pagination-btn {
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  background: var(--surface);
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease;
}

.pagination-btn:hover {
  border-color: #9ed3d0;
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.pagination-btn.active {
  color: white;
  border-color: var(--accent-strong);
  background: var(--accent);
}

.pagination-btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.pagination-ellipsis {
  color: var(--muted);
}

.stats-grid,
.dashboard-summary-grid,
.dashboard-chart-grid {
  display: grid;
  gap: 14px;
}

.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.stats-grid--providers {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stats-tabs {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.stats-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.stats-tab.active {
  color: white;
  border-color: var(--accent-strong);
  background: var(--accent);
}

.dashboard-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.dashboard-kpi-card,
.dashboard-chart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 112px;
  padding: 16px;
  border-top: 3px solid var(--accent);
}

.dashboard-kpi-card strong {
  font-size: 1.8rem;
  line-height: 1.05;
}

.dashboard-kpi-card__label,
.dashboard-kpi-card small {
  color: var(--muted);
}

.dashboard-chart-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-chart-card {
  padding: 16px;
}

.dashboard-chart-card--wide {
  grid-column: 1 / -1;
}

.dashboard-chart-card__head {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.dashboard-bar-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dashboard-bar-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dashboard-bar-row__meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.dashboard-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-muted);
}

.dashboard-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.dashboard-bar-fill--warm {
  background: var(--warm);
}

.dashboard-bar-fill--danger {
  background: var(--danger);
}

.dashboard-line-chart {
  width: 100%;
  height: 220px;
}

.dashboard-line-axis {
  stroke: var(--line-strong);
  stroke-width: 1.5;
}

.dashboard-line-path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dashboard-line-point {
  fill: white;
  stroke: var(--blue);
  stroke-width: 2;
}

.dashboard-line-label {
  fill: var(--muted);
  font-size: 11px;
}

.dashboard-chart-footnote {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.dashboard-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  background: var(--surface);
}

.dashboard-table th,
.dashboard-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.dashboard-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--accent-strong);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-table tbody tr:hover {
  background: var(--accent-soft);
}

.dashboard-cell-wrap {
  min-width: 200px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
}

.stats-card {
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.stats-summary {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.stats-subtitle {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
  word-break: break-word;
}

.stats-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #c7d7fe;
  border-radius: var(--radius-sm);
  color: #185abc;
  background: var(--blue-soft);
  font-size: 12px;
  font-weight: 800;
}

.stats-chip--hidden {
  color: var(--danger);
  border-color: #ffc7c0;
  background: var(--danger-soft);
}

.success-chip {
  color: var(--success);
  border-color: #bde8cd;
  background: var(--success-soft);
}

.danger-chip {
  color: var(--danger);
  border-color: #ffc7c0;
  background: var(--danger-soft);
}

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

.phone-cookie-input {
  min-height: 118px;
}

.phone-list-input {
  min-height: 150px;
}

.phone-table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.data-table th {
  color: var(--ink-soft);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.empty-cell {
  color: var(--muted);
  text-align: center !important;
}

.phone-avatar {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
  color: var(--muted);
  background: var(--surface-soft);
  font-weight: 800;
}

.phone-qr {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: cover;
  color: var(--muted);
  background: #fff;
  font-weight: 800;
}

.hidden-link-note {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  border: 1px solid #f0c36d;
  border-radius: var(--radius-sm);
  color: #7a4100;
  background: #fff7df;
  font-weight: 800;
  word-break: break-word;
}

.stats-card.is-hidden-stat,
.stats-card.is-provider-error {
  border-style: dashed;
  background: var(--surface-soft);
}

.ip-detail-table {
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.ip-detail-row {
  display: contents;
}

.ip-detail-row span,
.ip-detail-row strong {
  min-width: 0;
  padding: 8px 10px;
  background: var(--surface);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ip-detail-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.ip-detail-row strong {
  color: var(--ink-soft);
  font-size: 13px;
}

.ip-raw-json {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.ip-raw-json summary {
  padding: 10px 12px;
  color: var(--ink-soft);
  font-weight: 800;
  cursor: pointer;
}

.ip-raw-json pre {
  max-height: 360px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  background: #0f172a;
  color: #dbeafe;
  font: 12px/1.55 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.group-zalo-request-details {
  margin: 14px 0;
}

.table-json-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.table-json-details pre {
  margin: 8px 0 0;
  max-width: min(760px, 70vw);
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.ip-map-section {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.ip-map-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.ip-map-head h3 {
  margin: 0 0 4px;
}

.ip-provider-map {
  width: 100%;
  height: 460px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #d8e8ee;
}

.ip-map-grid,
.ip-map-equator,
.ip-map-meridian {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ip-map-grid::before {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: rgba(39, 58, 76, 0.68);
  content: "Kinh độ / Vĩ độ";
  font-size: 12px;
  font-weight: 800;
}

.ip-map-equator {
  top: 50%;
  bottom: auto;
  height: 1px;
  border-top: 1px dashed rgba(30, 91, 132, 0.42);
}

.ip-map-meridian {
  left: 50%;
  right: auto;
  width: 1px;
  border-left: 1px dashed rgba(30, 91, 132, 0.42);
}

.ip-map-point {
  position: absolute;
  z-index: 2;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 2px 6px;
  min-width: 108px;
  max-width: 170px;
  padding: 6px 8px;
  border: 1px solid #125b72;
  border-radius: 6px;
  color: #0d3340;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  cursor: default;
  transform: translate(calc(-50% + var(--map-point-x, 0px)), calc(-100% + var(--map-point-y, 0px)));
}

.ip-map-point span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  color: white;
  background: #176b83;
  font-size: 12px;
  font-weight: 900;
}

.ip-map-point strong {
  min-width: 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ip-map-point small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ip-provider-map--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  color: var(--muted);
  background: var(--surface);
  text-align: center;
}

.ip-map-label {
  padding: 4px 7px;
  border: 1px solid #0f6478;
  border-radius: 4px;
  color: #0d3340;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-sm);
  font-size: 12px;
  font-weight: 900;
}

.ip-map-popup {
  display: grid;
  gap: 8px;
  min-width: 250px;
}

.ip-map-popup h4 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.ip-map-popup-row {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.ip-map-popup-row strong,
.ip-map-popup-row span,
.ip-map-popup-row small {
  overflow-wrap: anywhere;
}

.ip-map-popup-row span {
  color: var(--ink-soft);
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.ip-map-popup-row small {
  color: var(--muted);
  font-size: 12px;
}

.ip-coordinate-table {
  display: grid;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--line);
}

.ip-coordinate-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(110px, 0.8fr) minmax(110px, 0.8fr) minmax(90px, 0.7fr) minmax(180px, 1.4fr);
  gap: 1px;
}

.ip-coordinate-row > * {
  min-width: 0;
  padding: 9px 10px;
  background: var(--surface);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.ip-coordinate-row--head > * {
  color: var(--muted);
  background: #f4f8fb;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: #b7c3d1;
  background-clip: padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1080px) {
  .page-shell,
  .content-grid,
  .stats-grid,
  .dashboard-summary-grid,
  .dashboard-chart-grid,
  .zbs-sample-layout {
    grid-template-columns: 1fr;
  }

  .content-grid > .panel:first-child {
    max-height: none;
  }

  #contacts-list {
    max-height: 420px;
  }

  .hero {
    flex-direction: column;
  }

  .hero-summary {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .zbs-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .page-credit {
    padding: 8px 14px;
    font-size: 11px;
  }

  .app-topbar {
    position: relative;
    top: auto;
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 12px 14px;
  }

  .page-shell,
  .stats-shell {
    padding: 14px;
  }

  .brand-card,
  .panel {
    padding: 16px;
  }

  .hero-actions,
  .direct-recipient-grid,
  .phone-grid,
  .dashboard-filter-grid {
    grid-template-columns: 1fr;
  }

  .list-toolbar,
  .pagination-panel,
  .toolbar,
  .panel-head,
  .ip-map-head,
  .history-head,
  .history-actions,
  .session-head,
  .session-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .page-size-control {
    width: 100%;
    justify-content: space-between;
  }

  .page-size-control .select-input {
    width: 110px;
  }

  .primary-btn,
  .ghost-btn,
  .ghost-link {
    width: 100%;
  }

  .app-topbar__actions {
    width: 100%;
  }

  .message-form,
  .direct-recipient-section {
    padding: 14px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .ip-provider-map {
    height: 340px;
  }

  .ip-coordinate-row {
    grid-template-columns: 1fr;
  }
}

/* UI Pro Max operations design system */
html {
  color-scheme: light;
  font-size: 16px;
}

body {
  min-height: 100dvh;
  line-height: 1.5;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

button,
a,
select,
input[type="checkbox"],
input[type="radio"] {
  touch-action: manipulation;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent-strong);
  box-shadow: var(--shadow-md);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--motion-fast) ease-out;
}

.skip-link:focus {
  transform: translateY(0);
}

.page-credit {
  position: relative;
  top: auto;
  z-index: 1;
  min-height: 30px;
  padding: 6px 24px;
  color: #dbeafe;
  background: #172554;
  border-bottom: 0;
  backdrop-filter: none;
  font-size: 11px;
  font-weight: 500;
}

.page-credit span {
  color: #ffffff;
  font-weight: 700;
}

.app-topbar {
  top: 0;
  z-index: 50;
  min-height: 64px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1px 0 rgba(23, 32, 51, 0.04);
  backdrop-filter: blur(14px);
}

.app-topbar__brand {
  flex: 0 1 auto;
  flex-wrap: nowrap;
  gap: 10px;
}

.app-topbar__brand--logo::before {
  display: none;
}

.app-topbar__logo {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  object-fit: contain;
  border: 1px solid #263343;
  border-radius: 10px;
  background: #080c12;
}

.app-topbar__brand-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.app-topbar__brand--logo .muted {
  max-width: 300px;
  margin-left: 0;
}

.app-topbar__brand::before {
  content: "";
  flex: 0 0 auto;
  width: 10px;
  height: 30px;
  border-radius: 3px;
  background: var(--accent);
}

.app-topbar__brand strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.app-topbar__brand .muted {
  max-width: 300px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-topbar__actions {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: thin;
}

.app-topbar__actions .ghost-link,
.app-topbar__actions .ghost-btn {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 11px;
  border-color: transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
}

.app-topbar__actions .ghost-link:hover,
.app-topbar__actions .ghost-btn:hover {
  border-color: var(--line);
  background: var(--surface-soft);
  box-shadow: none;
}

.app-topbar__actions .ghost-link.is-current {
  color: var(--accent-strong);
  border-color: #bfdbfe;
  background: var(--accent-soft);
}

.app-topbar__actions .danger-btn {
  margin-left: 4px;
  color: var(--danger);
  border-color: #fecaca;
  background: var(--danger-soft);
}

.page-shell {
  grid-template-columns: 316px minmax(0, 1fr);
  gap: 16px;
  width: min(100%, 1560px);
  margin: 0 auto;
  padding: 16px 24px 32px;
}

.stats-shell {
  gap: 14px;
  width: min(100%, 1440px);
  padding: 16px 24px 32px;
}

.sidebar,
.main-content {
  gap: 14px;
}

.panel,
.brand-card {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: none;
}

.brand-card,
.panel {
  padding: 18px;
}

.brand-card {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
}

.brand-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--accent);
}

.brand-card h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  line-height: 1.25;
}

.brand-badge {
  min-height: 24px;
  margin-bottom: 8px;
  padding: 3px 8px;
  color: var(--accent-strong);
  border-color: #bfdbfe;
  background: var(--accent-soft);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero {
  align-items: center;
  background: var(--surface);
}

.hero-summary {
  justify-content: flex-start;
}

.summary-block {
  min-width: 112px;
  padding: 4px 12px;
  border: 0;
  border-left: 3px solid #bfdbfe;
  border-radius: 0;
  background: transparent;
}

.panel-head {
  min-height: 36px;
  margin-bottom: 14px;
}

.panel-head h2 {
  font-size: 1.05rem;
  font-weight: 700;
}

.panel-copy,
.hint-text,
.list-results-info {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.message-form {
  gap: 12px;
  margin-top: 12px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.field {
  gap: 6px;
}

.field span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.search-input,
.select-input,
textarea {
  min-height: 44px;
  padding: 9px 12px;
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.search-input:hover,
.select-input:hover,
textarea:hover {
  border-color: #94a3b8;
}

.search-input:focus,
.select-input:focus,
textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--focus-ring);
}

input[type="checkbox"],
input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.primary-btn,
.ghost-btn,
.ghost-link {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 700;
  transition:
    color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
}

.primary-btn {
  color: #fff;
  border-color: var(--accent-strong);
  background: var(--accent);
  box-shadow: none;
}

.primary-btn:hover {
  border-color: #1e40af;
  background: var(--accent-strong);
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.2);
  transform: none;
}

.ghost-btn,
.ghost-link {
  border-color: var(--line-strong);
  background: var(--surface);
}

.ghost-btn:hover,
.ghost-link:hover {
  color: var(--accent-strong);
  border-color: #93c5fd;
  background: var(--accent-soft);
  box-shadow: none;
  transform: none;
}

.danger-btn,
.danger-btn:hover {
  color: var(--danger);
  border-color: #fecaca;
  background: var(--danger-soft);
  box-shadow: none;
}

button:active,
.ghost-link:active {
  opacity: 0.76;
}

button:disabled,
.primary-btn:disabled,
.ghost-btn:disabled {
  opacity: 0.44;
}

.ghost-link:focus-visible,
.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.account-item:focus-visible,
.contact-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.phone-table-wrap:focus-visible,
.dashboard-table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.list-toolbar {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--surface-soft);
}

.account-item,
.contact-item,
.history-item,
.stats-card,
.session-card,
.recipient-card,
.status-box {
  box-shadow: none;
}

.account-item,
.contact-item {
  min-height: 52px;
  padding: 11px 12px;
}

.account-item:hover,
.contact-item:hover,
.stats-card:hover,
.history-item:hover {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: none;
  transform: none;
}

.account-item.active,
.contact-item.active {
  border-color: #93c5fd;
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}

.contact-avatar {
  color: var(--accent-strong);
  border-color: #bfdbfe;
  background: var(--accent-soft);
}

.status-box {
  position: relative;
  min-height: 44px;
  padding: 11px 12px 11px 16px;
  border-color: var(--line);
  background: var(--surface-soft);
}

.status-box::before {
  content: "";
  position: absolute;
  inset: 8px auto 8px 0;
  width: 3px;
  border-radius: 2px;
  background: var(--line-strong);
}

.status-box[data-type="success"]::before,
.status-box.success::before {
  background: var(--success);
}

.status-box[data-type="error"]::before {
  background: var(--danger);
}

.status-box[data-type="warning"]::before {
  background: #d19600;
}

.status-box[data-type="info"]::before,
.status-box.info::before {
  background: var(--accent);
}

.empty-state {
  min-height: 96px;
  background: var(--surface-soft);
}

.dashboard-summary-grid {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.dashboard-kpi-card {
  min-height: 104px;
  padding: 14px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}

.dashboard-kpi-card:last-child {
  border-right: 0;
}

.dashboard-kpi-card strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-size: 1.65rem;
}

.dashboard-chart-card {
  border-color: var(--line);
  box-shadow: none;
}

.dashboard-bar-track {
  height: 8px;
  border-radius: 3px;
}

.dashboard-bar-fill {
  border-radius: 3px;
  background: var(--accent);
}

.dashboard-table-wrap,
.phone-table-wrap {
  border-color: var(--line);
  background: var(--surface);
  scrollbar-gutter: stable;
}

.dashboard-table,
.data-table {
  font-variant-numeric: tabular-nums;
}

.dashboard-table th,
.data-table th {
  color: var(--ink-soft);
  background: #f1f5f9;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.dashboard-table td,
.data-table td {
  color: var(--ink-soft);
}

.dashboard-table tbody tr:nth-child(even),
.data-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

.dashboard-table tbody tr:hover,
.data-table tbody tr:hover {
  background: var(--accent-soft);
}

.stats-chip {
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.json-input,
.json-preview,
.ip-raw-json pre,
.table-json-details pre {
  font-family: var(--font-mono);
}

.login-page {
  background: #eef3f8;
}

.login-shell {
  width: min(100%, 460px);
  padding: clamp(18px, 4vw, 32px);
}

.login-shell .brand-card {
  padding: clamp(22px, 5vw, 32px);
  box-shadow: 0 18px 50px rgba(23, 32, 51, 0.12);
}

.login-shell .brand-card::before {
  width: 5px;
}

.login-shell .brand-badge {
  margin-bottom: 12px;
}

.login-shell h1 {
  margin-bottom: 18px;
  font-size: 1.55rem;
}

.mfa-panel {
  border-color: #bfdbfe;
  background: var(--accent-soft);
}

.qr-image {
  aspect-ratio: 1;
  object-fit: contain;
}

@media (max-width: 1180px) {
  .app-topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .app-topbar__actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 1080px) {
  .page-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .sidebar .brand-card,
  .sidebar > :last-child {
    grid-column: 1 / -1;
  }

  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-kpi-card:nth-child(2n) {
    border-right: 0;
  }

  .dashboard-kpi-card:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 860px) {
  .content-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .page-credit {
    min-height: 0;
    padding: 5px 12px;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 8px;
    padding: 10px 12px;
  }

  .app-topbar__brand {
    width: 100%;
  }

  .app-topbar__brand--logo {
    align-items: center;
    flex-direction: row;
  }

  .app-topbar__brand .muted {
    margin-left: auto;
    max-width: 42%;
  }

  .app-topbar__actions {
    flex-direction: row;
    padding-bottom: 4px;
  }

  .app-topbar__actions .ghost-link,
  .app-topbar__actions .ghost-btn {
    width: auto;
    min-height: 44px;
  }

  .page-shell,
  .stats-shell {
    padding: 12px 12px 24px;
  }

  .sidebar {
    display: flex;
  }

  .login-qr-preview__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand-card,
  .panel {
    padding: 14px;
  }

  .toolbar {
    width: 100%;
    align-items: stretch;
  }

  .toolbar > * {
    flex: 1 1 auto;
  }

  .primary-btn,
  .ghost-btn,
  .ghost-link {
    min-height: 44px;
  }

  .panel-head {
    gap: 12px;
  }

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

  .dashboard-kpi-card,
  .dashboard-kpi-card:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-kpi-card:last-child {
    border-bottom: 0;
  }

  .dashboard-table,
  .data-table {
    font-size: 12px;
  }

  .dashboard-table th,
  .dashboard-table td,
  .data-table th,
  .data-table td {
    padding: 9px 10px;
  }
}

/* Final responsive safety net: keep every module inside the viewport. */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
canvas,
video,
iframe {
  max-width: 100%;
}

.page-shell,
.stats-shell,
.sidebar,
.main-content,
.content-grid,
.panel,
.brand-card,
.toolbar,
.panel-head,
.message-form,
.field {
  min-width: 0;
  max-width: 100%;
}

input,
select,
textarea,
button,
.primary-btn,
.ghost-btn,
.ghost-link {
  max-width: 100%;
}

pre,
code,
.history-content,
.panel-copy,
.status-box {
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .page-shell,
  .stats-shell {
    padding-inline: 8px;
  }

  .brand-card,
  .panel {
    padding: 12px;
  }

  .hero-actions,
  .sidebar,
  .direct-recipient-grid,
  .dashboard-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-topbar__brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-topbar__brand--logo {
    align-items: center;
    flex-direction: row;
  }

  .app-topbar__brand::before {
    display: none;
  }

  .app-topbar__brand .muted {
    max-width: 100%;
    margin-left: 0;
  }

  .app-topbar__brand--logo .muted {
    max-width: calc(100vw - 92px);
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Dashboard command center */
.dashboard-shell {
  width: min(100%, 1540px);
  gap: 14px;
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 2px 4px;
}

.dashboard-heading h1 {
  margin: 6px 0 4px;
  color: var(--ink);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.dashboard-heading__status {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-state-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  max-width: 220px;
  padding: 4px 9px;
  overflow: hidden;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-state-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--line-strong);
}

.dashboard-state-badge[data-state="success"] {
  color: var(--success);
  border-color: #a7f3d0;
  background: var(--success-soft);
}

.dashboard-state-badge[data-state="success"]::before {
  background: var(--success);
}

.dashboard-state-badge[data-state="error"] {
  color: var(--danger);
  border-color: #fecaca;
  background: var(--danger-soft);
}

.dashboard-state-badge[data-state="error"]::before {
  background: var(--danger);
}

.dashboard-state-badge[data-state="loading"]::before {
  border: 2px solid #bfdbfe;
  border-top-color: var(--accent);
  background: transparent;
  animation: dashboard-spin 0.8s linear infinite;
}

@keyframes dashboard-spin {
  to { transform: rotate(360deg); }
}

.dashboard-section-nav {
  display: flex;
  gap: 4px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  scrollbar-width: thin;
}

.dashboard-section-nav a {
  min-height: 36px;
  padding: 8px 11px;
  flex: 0 0 auto;
  color: var(--ink-soft);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.dashboard-section-nav a:hover,
.dashboard-section-nav a:focus-visible {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.dashboard-section {
  scroll-margin-top: 150px;
}

.dashboard-filter-panel .panel-head {
  margin-bottom: 8px;
}

.dashboard-filter-panel .dashboard-filter-grid {
  grid-template-columns: minmax(180px, 260px) minmax(180px, 260px) auto auto;
  justify-content: start;
}

.dashboard-shell .dashboard-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-shell .dashboard-kpi-card {
  position: relative;
  min-height: 96px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dashboard-shell .dashboard-kpi-card:nth-child(4n) {
  border-right: 0;
}

.dashboard-shell .dashboard-kpi-card:nth-last-child(-n + 4) {
  border-bottom: 0;
}

.dashboard-kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: transparent;
}

.dashboard-kpi-card[data-tone="primary"]::before { background: var(--accent); }
.dashboard-kpi-card[data-tone="success"]::before { background: var(--success); }
.dashboard-kpi-card[data-tone="tracking"]::before { background: var(--warm); }
.dashboard-kpi-card[data-tone="warning"]::before { background: #ca8a04; }

.dashboard-module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.dashboard-module-card {
  position: relative;
  display: flex;
  min-height: 112px;
  padding: 15px 15px 13px;
  flex-direction: column;
  gap: 7px;
  overflow: hidden;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-decoration: none;
  transition: border-color var(--motion-fast), box-shadow var(--motion-fast), background var(--motion-fast);
}

.dashboard-module-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: var(--line-strong);
}

.dashboard-module-card[data-tone="blue"]::before { background: #2563eb; }
.dashboard-module-card[data-tone="green"]::before { background: #059669; }
.dashboard-module-card[data-tone="teal"]::before { background: #0f766e; }
.dashboard-module-card[data-tone="amber"]::before { background: #d97706; }
.dashboard-module-card[data-tone="violet"]::before { background: #7c3aed; }
.dashboard-module-card[data-tone="slate"]::before { background: #475569; }
.dashboard-module-card[data-tone="red"]::before { background: #dc2626; }

.dashboard-module-card:hover,
.dashboard-module-card:focus-visible {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 5px 16px rgba(23, 32, 51, 0.08);
}

.dashboard-module-card > span {
  font-size: 14px;
  font-weight: 750;
}

.dashboard-module-card > strong {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.dashboard-module-card > small {
  margin-top: auto;
  color: var(--accent-strong);
  font-weight: 700;
}

.dashboard-operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-operations-grid > .panel {
  min-width: 0;
}

.dashboard-health-list {
  border-top: 1px solid var(--line);
}

.dashboard-health-row {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

.dashboard-health-row strong {
  color: var(--ink);
  text-align: right;
}

.dashboard-health-row strong[data-state="success"] { color: var(--success); }
.dashboard-health-row strong[data-state="error"] { color: var(--danger); }
.dashboard-health-row strong[data-state="warning"] { color: var(--warm); }

.dashboard-data-block + .dashboard-data-block,
.dashboard-summary-grid + .dashboard-data-block {
  margin-top: 18px;
}

.dashboard-data-block h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.dashboard-account-cell {
  display: flex;
  min-width: 190px;
  align-items: center;
  gap: 9px;
}

.dashboard-account-cell img {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  object-fit: cover;
}

.dashboard-account-cell div {
  display: grid;
  gap: 2px;
}

.dashboard-account-cell span {
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.dashboard-global-status {
  position: sticky;
  bottom: 8px;
  z-index: 20;
  box-shadow: 0 7px 24px rgba(23, 32, 51, 0.12);
}

.dashboard-shell[aria-busy="true"] .dashboard-table-wrap,
.dashboard-shell[aria-busy="true"] .dashboard-summary-grid {
  opacity: 0.62;
}

@media (max-width: 1100px) {
  .dashboard-shell .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-shell .dashboard-kpi-card:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .dashboard-shell .dashboard-kpi-card:nth-child(2n) {
    border-right: 0;
  }

  .dashboard-shell .dashboard-kpi-card:nth-last-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .dashboard-shell .dashboard-kpi-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
}

@media (max-width: 760px) {
  .dashboard-heading {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .dashboard-heading__status {
    justify-content: flex-start;
  }

  .dashboard-heading__status .primary-btn,
  .dashboard-heading__status .ghost-btn {
    width: auto;
    flex: 1 1 120px;
  }

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

  .dashboard-filter-panel .field {
    grid-column: 1 / -1;
  }

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

@media (max-width: 560px) {
  .dashboard-shell .dashboard-summary-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-shell .dashboard-kpi-card,
  .dashboard-shell .dashboard-kpi-card:nth-child(2n),
  .dashboard-shell .dashboard-kpi-card:nth-child(4n),
  .dashboard-shell .dashboard-kpi-card:nth-last-child(-n + 2) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-shell .dashboard-kpi-card:last-child {
    border-bottom: 0;
  }

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

/* Telegram notification settings */
.telegram-enable-field {
  min-height: 44px;
  align-self: end;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.stats-chip[data-state="success"] {
  color: var(--success);
  border-color: #a7f3d0;
  background: var(--success-soft);
}

.stats-chip[data-state="error"] {
  color: var(--danger);
  border-color: #fecaca;
  background: var(--danger-soft);
}

#telegram-settings-form[aria-busy="true"] {
  opacity: 0.68;
  pointer-events: none;
}

.uuid-notification-settings {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.uuid-notification-settings .inline-check {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
}

.telegram-history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.telegram-history-item {
  margin: 0;
}

.telegram-history-item[data-status="failed"] {
  border-left: 3px solid var(--danger);
}

.telegram-history-item[data-status="sent"] {
  border-left: 3px solid var(--success);
}

.telegram-history-list {
  grid-template-columns: 1fr;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.telegram-history-item {
  padding: 12px 14px;
}

.telegram-history-details {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.telegram-history-details > span:first-child {
  max-width: min(100%, 34rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-save-status {
  margin: 8px 0;
  padding: 7px 10px;
  font-size: 0.85rem;
}

.telegram-error-text {
  color: var(--danger);
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 760px) {
  .uuid-notification-settings {
    grid-template-columns: 1fr;
  }
}

.request-detail-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);
}

.request-detail-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.request-detail-dialog__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.request-detail-dialog__head h2 {
  margin: 8px 0 0;
  font-size: 20px;
}

.request-detail-content {
  max-height: calc(100vh - 145px);
  padding: 20px;
  overflow: auto;
}

.request-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.request-detail-section {
  margin-top: 18px;
}

.request-detail-section h3 {
  margin: 0 0 9px;
  font-size: 15px;
}

.request-detail-section > pre {
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: #dbeafe;
  background: #0f172a;
  font: 12px/1.55 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.request-header-table {
  max-height: 360px;
  overflow: auto;
}

@media (max-width: 640px) {
  .request-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .request-detail-content {
    max-height: calc(100vh - 120px);
    padding: 14px;
  }

  .request-detail-section .ip-detail-table {
    grid-template-columns: minmax(100px, 0.42fr) minmax(0, 1fr);
  }
}

/* Compact paired IPv6/IPv4 access card. Full request data stays in the admin detail dialog. */
.access-compact-card {
  padding: 20px;
  border-color: var(--line-strong);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
  box-shadow: var(--shadow-sm);
}

.access-compact-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.access-compact-card__eyebrow,
.access-meta-label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-compact-card__title {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.3;
}

.access-compact-card__actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.access-compact-card__actions .ghost-btn {
  width: auto;
  min-height: 44px;
}

.access-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.access-stage-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.access-stage-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.access-stage-card__lookup.ghost-btn {
  width: auto;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.access-stage-card--ipv6 {
  border-color: #bfd4ff;
  background: #f5f8ff;
}

.access-stage-card--ipv4 {
  border-color: #b8e4cf;
  background: #f2fbf7;
}

.access-stage-card__label {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.access-stage-card--ipv6 .access-stage-card__label {
  color: var(--accent-strong);
}

.access-stage-card--ipv4 .access-stage-card__label {
  color: var(--success);
}

.access-stage-card__endpoint {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 5px;
  margin-top: 9px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(15px, 2vw, 20px);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.access-stage-card__ip {
  min-width: 0;
  overflow-wrap: anywhere;
}

.access-stage-card__separator {
  color: var(--muted);
}

.access-stage-card__port {
  color: var(--ink);
}

.access-stage-card__caption {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.access-compact-card__meta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.access-compact-card__meta > span {
  display: grid;
  gap: 4px;
}

.access-compact-card__meta strong,
.access-compact-card__meta time {
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.access-group-card {
  overflow: hidden;
  border-color: var(--line-strong);
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
}

.access-group-card__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.access-group-card__summary::-webkit-details-marker {
  display: none;
}

.access-group-card__summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.access-group-card__main {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.access-group-card__main > strong {
  color: var(--ink);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.access-group-card__main > strong span {
  color: var(--muted);
  font-weight: 650;
}

.access-group-card__main .stats-summary {
  margin: 0;
}

.access-group-card__toggle {
  flex: 0 0 auto;
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

.access-group-card__items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 14px 14px;
}

.access-group-card__items .access-compact-card {
  box-shadow: none;
}

@media (max-width: 640px) {
  .access-compact-card {
    padding: 16px;
  }

  .access-group-card__summary {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .access-group-card__toggle {
    text-align: left;
  }

  .access-group-card__items {
    padding: 0 10px 10px;
  }

  .access-compact-card__head,
  .access-compact-card__meta {
    align-items: stretch;
    flex-direction: column;
  }

  .access-compact-card__actions .ghost-btn {
    width: 100%;
  }

  .access-stage-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .access-compact-card {
    transition: none;
  }
}
.admin-renewlink-panel {
  border: 2px solid #dc2626;
  border-radius: 16px;
  padding: 18px;
  background: rgba(220, 38, 38, 0.045);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.admin-renewlink-panel > .panel-head h2 {
  color: #b91c1c;
}

.admin-renewlink-panel > .panel-head .panel-copy {
  color: #991b1b;
}

/* Separate each sending tool and its controls at a glance. */
#message-form,
#link-form,
#card-form,
#renewlink-message-form,
#image-domain-message-form {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

#link-form {
  border-left-color: #2563eb;
}

#card-form {
  border-top: 1px solid #cbd5e1;
  border-left-color: #7c3aed;
}

#renewlink-message-form,
#image-domain-message-form {
  border-color: #fecaca;
  border-left-color: #dc2626;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

#message-form > .field,
#link-form > .field,
#card-form > .field,
#renewlink-message-form > .field,
#image-domain-message-form > .field {
  padding: 12px;
  border: 1px solid #d7e0ea;
  border-radius: 12px;
  background: #ffffff;
}

#renewlink-message-form > .field,
#image-domain-message-form > .field {
  border-color: #fecaca;
}

#message-form > .primary-btn,
#link-form > .primary-btn,
#card-form > .primary-btn,
#renewlink-message-form > .primary-btn,
#image-domain-message-form > .primary-btn {
  margin-top: 2px;
  border: 1px solid rgba(15, 23, 42, 0.18);
}

@media (max-width: 680px) {
  #message-form,
  #link-form,
  #card-form,
  #renewlink-message-form,
  #image-domain-message-form {
    padding: 12px;
    border-radius: 13px;
  }

  #message-form > .field,
  #link-form > .field,
  #card-form > .field,
  #renewlink-message-form > .field,
  #image-domain-message-form > .field {
    padding: 10px;
  }
}

/* Keep contact rows from collapsing inside the scrollable directory. */
.contacts-panel {
  container-type: inline-size;
}

.contacts-panel .panel-head {
  align-items: start;
}

.contacts-panel .toolbar {
  width: min(100%, 440px);
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
}

.contacts-panel .contact-list {
  scrollbar-gutter: stable;
}

.contacts-panel .contact-item {
  flex: 0 0 auto;
  min-height: 66px;
  height: auto;
  padding: 10px 12px;
  align-items: center;
}

.contacts-panel .contact-avatar {
  flex: 0 0 42px;
}

.contacts-panel .contact-body {
  min-width: 0;
  gap: 2px;
  overflow: hidden;
}

.contacts-panel .contact-body strong,
.contacts-panel .contact-body span,
.contacts-panel .contact-body small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  line-height: 1.35;
}

@container (max-width: 560px) {
  .contacts-panel .panel-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .contacts-panel .toolbar {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .contacts-panel .list-toolbar {
    align-items: stretch;
  }
}

