:root {
  --bg: #0f172a;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #e2e8f0;
  --text: #172033;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --warning: #d97706;
  --success: #16a34a;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 86% 8%, rgba(37, 99, 235, 0.12), transparent 18rem),
    linear-gradient(180deg, #f8fafc 0%, #e8eef7 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.auth-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 15%, rgba(37, 99, 235, 0.22), transparent 22rem),
    linear-gradient(135deg, #0f172a, #172554);
}

.auth-card {
  width: min(100%, 420px);
  padding: 30px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-card h1,
.page-title h1 {
  margin: 0;
  font-size: 1.55rem;
}

.auth-card p,
.page-title p {
  margin: 8px 0 0;
  color: var(--muted);
}

.app-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background:
    radial-gradient(circle at 20% 0%, rgba(59, 130, 246, 0.28), transparent 14rem),
    linear-gradient(180deg, #0f172a 0%, #111827 100%);
  color: #e5edf9;
  box-shadow: 18px 0 60px rgba(15, 23, 42, 0.18);
}

.brand {
  display: grid;
  gap: 4px;
  margin-bottom: 24px;
}

.brand strong {
  font-size: 1.2rem;
}

.brand span,
.admin-meta {
  color: #94a3b8;
  font-size: 0.86rem;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a,
.logout-button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  text-align: left;
}

.nav a.is-active,
.nav a:hover,
.logout-button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 12px;
}

.content {
  min-width: 0;
  padding: 28px;
}

.content::before {
  content: "";
  display: block;
  height: 4px;
  margin: -28px -28px 24px;
  background: linear-gradient(90deg, #2563eb, #14b8a6, #f59e0b);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.panel,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.table-panel {
  overflow: hidden;
}

.table-panel.is-advanced {
  border-color: rgba(148, 163, 184, 0.46);
}

.table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.table-heading strong {
  font-size: 1rem;
}

.table-heading .hint {
  display: block;
  margin-top: 3px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.stat-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.8rem;
}

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

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.search-form {
  display: flex;
  gap: 8px;
  min-width: min(100%, 360px);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

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

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: #334155;
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

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

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.bulk-textbox {
  min-height: 260px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.94rem;
  line-height: 1.55;
}

.bulk-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.bulk-meta span:first-child {
  color: #0f172a;
  font-weight: 800;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
}

.checkbox-field input {
  width: 18px;
  min-height: 18px;
}

.button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.button:hover,
.link-button:hover {
  background: var(--primary-dark);
}

.button.secondary,
.link-button.secondary {
  background: #e2e8f0;
  color: #1e293b;
}

.button.danger,
.link-button.danger {
  background: var(--danger);
}

.button.warning,
.link-button.warning {
  background: var(--warning);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 800;
}

.badge.success {
  background: #dcfce7;
  color: #166534;
}

.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge.muted {
  background: #f1f5f9;
  color: #475569;
}

.json-cell {
  display: block;
  max-width: 420px;
  white-space: normal;
  word-break: break-word;
  color: #334155;
  font-size: 0.78rem;
  line-height: 1.45;
}

.log-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.log-detail-grid div,
.log-description,
.log-data-field input,
.log-data-field textarea,
.log-empty-data {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.log-detail-grid div {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
}

.log-detail-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.log-detail-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #172033;
  font-size: 0.9rem;
}

.log-description {
  min-height: 42px;
  padding: 11px 12px;
  color: #334155;
  line-height: 1.55;
}

.log-data-fields {
  display: grid;
  gap: 14px;
}

.log-data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  align-items: start;
}

.log-data-grid > .log-data-section,
.log-data-grid > .log-data-nested {
  grid-column: 1 / -1;
}

.log-data-section {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  min-width: 0;
  overflow: hidden;
}

.log-data-section .log-data-section {
  background: #f8fafc;
}

.log-data-section h3 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.95rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.log-data-stack {
  display: grid;
  gap: 12px;
}

.log-data-nested {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.log-data-nested > strong {
  color: #334155;
  font-size: 0.85rem;
}

.log-data-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.log-data-field label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.log-data-field input,
.log-data-field textarea {
  min-height: 38px;
  padding: 9px 11px;
  color: #172033;
  cursor: default;
  font-size: 0.92rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.log-data-field textarea {
  min-height: 88px;
  resize: none;
}

.log-empty-data {
  padding: 12px;
  color: var(--muted);
}

.alert {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 8px;
  background: #dcfce7;
  color: #166534;
  font-weight: 700;
}

.alert.error {
  background: #fee2e2;
  color: #991b1b;
}

.hint,
.pagination-info {
  color: var(--muted);
  font-size: 0.88rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.pagination {
  padding: 14px 16px;
}

.pagination nav > div:first-child {
  display: none;
}

@media (max-width: 920px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .sidebar-footer {
    position: static;
    margin-top: 20px;
  }

  .stats-grid,
  .split-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 20px;
  }

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

.dataTables_wrapper {
  padding: 16px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
  color: var(--muted) !important;
  font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  min-height: 38px;
  margin-left: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.dataTables_wrapper .dataTables_processing {
  top: 86px !important;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: rgba(239, 246, 255, 0.94);
  color: #1d4ed8;
  box-shadow: var(--shadow);
}

table.dataTable {
  width: 100% !important;
  border-collapse: collapse !important;
}

table.dataTable thead th {
  border-bottom: 1px solid var(--line) !important;
}

table.dataTable tbody td {
  border-bottom: 1px solid #edf2f7;
}

table.dataTable tbody tr:hover {
  background: #f8fbff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border: 1px solid #cbd5e1 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #334155 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  border-color: var(--primary) !important;
  background: #eff6ff !important;
  color: var(--primary-dark) !important;
}

.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-layer[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 23, 42, 0.66);
  backdrop-filter: blur(6px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 620px);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.modal-card.is-sm {
  width: min(100%, 430px);
}

.modal-card.is-log-detail {
  width: min(100%, 780px);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
}

.modal-header {
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.modal-body {
  padding: 18px;
}

.modal-footer {
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.is-invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) !important;
}

.field-error {
  color: var(--danger);
  font-size: 0.8rem;
  font-weight: 700;
}

.panel-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 8px;
  background: #0f172a;
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: 160ms ease;
}

.panel-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.panel-toast.error {
  background: #991b1b;
}

.panel-toast.success {
  background: #166534;
}

.body-locked {
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.brand-copy strong,
.brand-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-logo {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
}

.auth-logo {
  display: block;
  max-width: 170px;
  max-height: 72px;
  margin: 0 0 18px;
  object-fit: contain;
}

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

.config-tabs {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.config-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  color: #475569;
  font-weight: 800;
}

.config-tab.is-active {
  background: #0f172a;
  color: #fff;
}

.config-panel {
  display: grid;
  gap: 18px;
}

.config-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.config-panel-heading strong {
  display: block;
  margin-bottom: 4px;
  font-size: 1.05rem;
}

.config-asset-grid,
.otp-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.asset-upload {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.asset-preview {
  display: grid;
  place-items: center;
  min-height: 126px;
  border: 1px dashed #b6c4d6;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
}

.asset-preview img {
  max-width: 74px;
  max-height: 74px;
  object-fit: contain;
}

.asset-preview.logo-preview img {
  max-width: 112px;
  max-height: 74px;
}

.asset-control {
  min-width: 0;
}

.checkbox-field.compact {
  align-items: flex-start;
  min-height: auto;
  margin-top: 10px;
  color: #475569;
  font-size: 0.88rem;
}

.config-preview-strip {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.config-preview-strip > div {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.config-preview-strip span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mini-preview,
.logo-mirror {
  display: flex;
  align-items: center;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.mini-preview {
  justify-content: center;
  width: 54px;
}

.mini-preview img {
  max-width: 32px;
  max-height: 32px;
  object-fit: contain;
}

.mini-preview strong {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
}

.logo-mirror {
  gap: 10px;
  padding: 0 14px;
}

.logo-mirror img {
  max-width: 180px;
  max-height: 38px;
  object-fit: contain;
}

.logo-mirror strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.otp-toggle-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
}

.otp-toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.otp-toggle-card strong,
.otp-toggle-card small {
  display: block;
}

.otp-toggle-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
}

.switch {
  position: relative;
  width: 56px;
  height: 32px;
  flex: 0 0 56px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: 160ms ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.2);
  transition: 160ms ease;
}

.otp-toggle-card input:checked + .switch {
  background: var(--success);
}

.otp-toggle-card input:checked + .switch::after {
  transform: translateX(24px);
}

.provider-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.provider-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
  color: #334155;
  font-weight: 800;
  cursor: pointer;
}

.provider-card input {
  width: 18px;
  min-height: 18px;
}

.provider-card.is-selected {
  border-color: var(--primary);
  background: #eff6ff;
  color: var(--primary-dark);
}

.otp-provider-configs {
  display: grid;
  gap: 14px;
}

.otp-provider-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #fff;
}

.otp-provider-panel[hidden] {
  display: none !important;
}

.otp-provider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.otp-provider-header strong {
  color: #172033;
  font-size: 1rem;
}

.otp-provider-panel textarea {
  min-height: 92px;
}

.wa-control-panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.otp-test-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #f8fafc;
}

.otp-test-heading,
.otp-test-form {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.otp-test-heading strong {
  color: #172033;
}

.otp-test-heading span {
  max-width: 65%;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.otp-test-heading span.success {
  background: #dcfce7;
  color: #166534;
}

.otp-test-heading span.error {
  background: #fee2e2;
  color: #991b1b;
}

.otp-test-heading span.muted {
  background: #e2e8f0;
  color: #475569;
}

.otp-test-form .field {
  flex: 1;
  margin: 0;
}

.wa-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.wa-status-strip > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.wa-status-strip span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.wa-status-strip strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wa-status-badge {
  width: fit-content;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.wa-status-badge.success {
  background: #dcfce7;
  color: #166534;
}

.wa-status-badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.wa-status-badge.muted {
  background: #e2e8f0;
  color: #475569;
}

.wa-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.wa-qr-panel {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.wa-qr-box {
  display: grid;
  place-items: center;
  min-height: 190px;
  border: 1px dashed #b6c4d6;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.wa-qr-box img {
  width: 172px;
  height: 172px;
  object-fit: contain;
}

.wa-status-note {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.wa-status-note strong {
  color: #172033;
}

.wa-status-note span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.checkbox-field code {
  color: #e11d48;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.86em;
}

@media (max-width: 900px) {
  .config-asset-grid,
  .otp-config-grid,
  .provider-list,
  .otp-test-heading,
  .otp-test-form,
  .wa-status-strip,
  .wa-qr-panel {
    grid-template-columns: 1fr;
  }

  .otp-test-heading,
  .otp-test-form {
    align-items: stretch;
    flex-direction: column;
  }

  .otp-test-heading span {
    max-width: 100%;
  }

  .asset-upload,
  .config-preview-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .log-detail-grid,
  .log-data-grid {
    grid-template-columns: 1fr;
  }

  .modal-card.is-log-detail {
    width: min(100%, 560px);
  }

  .config-tabs,
  .config-panel-heading {
    width: 100%;
  }

  .config-tab {
    flex: 1;
  }

  .config-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .otp-provider-header {
    align-items: stretch;
    flex-direction: column;
  }

  .config-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }
}
